PICurv 0.1.0
A Parallel Particle-In-Cell Solver for Curvilinear LES
|
Implementation of data input/output routines, focusing on grid configuration. More...
#include "io.h"
Go to the source code of this file.
Macros | |
#define | __FUNCT__ "ReadGridGenerationInputs" |
#define | __FUNCT__ "ReadGridFile" |
Functions | |
PetscErrorCode | ReadGridGenerationInputs (UserCtx *user) |
Parses command-line options for a programmatically generated grid for a SINGLE block. | |
PetscErrorCode | ReadGridFile (UserCtx *user) |
Sets grid dimensions from a file for a SINGLE block using a one-time read cache. | |
void | FreeBC_ParamList (BC_Param *head) |
Frees the memory allocated for a linked list of BC_Param structs. | |
PetscErrorCode | StringToBCFace (const char *str, BCFace *face_out) |
Converts a string representation of a face to a BCFace enum. | |
PetscErrorCode | StringToBCType (const char *str, BCType *type_out) |
Converts a string representation of a BC type to a BCType enum. | |
PetscErrorCode | StringToBCHandlerType (const char *str, BCHandlerType *handler_out) |
Converts a string representation of a handler to a BCHandlerType enum. | |
PetscErrorCode | ValidateBCHandlerForBCType (BCType type, BCHandlerType handler) |
Validates that a specific handler is compatible with a general BC type. | |
PetscErrorCode | ParseAllBoundaryConditions (UserCtx *user, const char *bcs_input_filename) |
Parses the boundary conditions file to configure the type, handler, and any associated parameters for all 6 global faces of the domain. | |
static PetscErrorCode | CheckDataFile (PetscInt ti, const char *fieldName, const char *ext, PetscBool *fileExists) |
Checks for a data file's existence in a parallel-safe manner. | |
static PetscErrorCode | ReadOptionalSwarmField (UserCtx *user, const char *field_name, const char *field_label, PetscInt ti, const char *ext) |
Checks for and reads an optional DMSwarm field from a file. | |
PetscErrorCode | ReadFieldData (UserCtx *user, const char *field_name, Vec field_vec, PetscInt ti, const char *ext) |
Reads data for a specific field from a file into the provided vector. | |
PetscErrorCode | ReadSimulationFields (UserCtx *user, PetscInt ti) |
Reads simulation fields from files into their respective PETSc vectors. | |
PetscErrorCode | ReadStatisticalFields (UserCtx *user, PetscInt ti) |
Reads statistical fields for averaging purposes. | |
PetscErrorCode | ReadLESFields (UserCtx *user, PetscInt ti) |
Reads LES-related fields. | |
PetscErrorCode | ReadRANSFields (UserCtx *user, PetscInt ti) |
Reads RANS-related fields. | |
PetscErrorCode | ReadSwarmField (UserCtx *user, const char *field_name, PetscInt ti, const char *ext) |
Reads data from a file into a specified field of a PETSc DMSwarm. | |
PetscErrorCode | ReadSwarmIntField (UserCtx *user, const char *field_name, PetscInt ti, const char *ext) |
Reads integer swarm data by using ReadFieldData and casting the result. | |
PetscErrorCode | ReadAllSwarmFields (UserCtx *user, PetscInt ti) |
Reads multiple fields into a DMSwarm, gracefully handling missing optional files. | |
PetscErrorCode | WriteFieldData (UserCtx *user, const char *field_name, Vec field_vec, PetscInt ti, const char *ext) |
Writes data from a specific PETSc vector to a single, sequential file. | |
PetscErrorCode | WriteSimulationFields (UserCtx *user) |
Writes simulation fields to files. | |
PetscErrorCode | WriteStatisticalFields (UserCtx *user) |
Writes statistical fields for averaging purposes. | |
PetscErrorCode | WriteLESFields (UserCtx *user) |
Writes LES-related fields. | |
PetscErrorCode | WriteRANSFields (UserCtx *user) |
Writes RANS-related fields. | |
PetscErrorCode | WriteSwarmField (UserCtx *user, const char *field_name, PetscInt ti, const char *ext) |
Writes data from a specific field in a PETSc Swarm to a file. | |
PetscErrorCode | WriteSwarmIntField (UserCtx *user, const char *field_name, PetscInt ti, const char *ext) |
Writes integer swarm data by casting it to a temporary Vec and using WriteFieldData. | |
PetscErrorCode | WriteAllSwarmFields (UserCtx *user) |
Writes a predefined set of PETSc Swarm fields to files. | |
PetscErrorCode | VecToArrayOnRank0 (Vec inVec, PetscInt *N, double **arrayOut) |
Gather a (possibly distributed) PETSc Vec onto rank 0 as a contiguous C array. | |
PetscErrorCode | SwarmFieldToArrayOnRank0 (DM swarm, const char *field_name, PetscInt *n_total_particles, PetscInt *n_components, void **gathered_array) |
Gathers any DMSwarm field from all ranks to a single, contiguous array on rank 0. | |
PetscErrorCode | DisplayBanner (SimCtx *simCtx) |
Displays a structured banner summarizing the simulation configuration. | |
void | TrimWhitespace (char *str) |
Helper function to trim leading/trailing whitespace from a string. | |
PetscErrorCode | ParsePostProcessingSettings (SimCtx *simCtx) |
Initializes post-processing settings from a config file and command-line overrides. | |
PetscInt | ReadDataFileToArray (const char *filename, double **data_out, PetscInt *Nout, MPI_Comm comm) |
PetscErrorCode | ReadPositionsFromFile (PetscInt timeIndex, UserCtx *user, double **coordsArray, PetscInt *Ncoords) |
Reads coordinate data (for particles) from file into a PETSc Vec, then gathers it to rank 0. | |
PetscErrorCode | ReadFieldDataToRank0 (PetscInt timeIndex, const char *fieldName, UserCtx *user, double **scalarArray, PetscInt *Nscalars) |
Reads a named field from file into a PETSc Vec, then gathers it to rank 0. | |
Variables | |
static PetscInt | g_nblk_from_file = 0 |
Stores the number of blocks read from the grid file. | |
static PetscInt * | g_IMs_from_file = NULL |
Caches the IM dimensions for all blocks read from the grid file. | |
static PetscInt * | g_JMs_from_file = NULL |
Caches the JM dimensions for all blocks read from the grid file. | |
static PetscInt * | g_KMs_from_file = NULL |
Caches the KM dimensions for all blocks read from the grid file. | |
static PetscBool | g_file_has_been_read = PETSC_FALSE |
A flag to ensure the grid file is read only once. | |
Implementation of data input/output routines, focusing on grid configuration.
This module provides functions to parse grid geometry information, either from command-line options for programmatically generated grids or by reading the header of a grid definition file.
Definition in file io.c.
PetscErrorCode ReadGridGenerationInputs | ( | UserCtx * | user | ) |
Parses command-line options for a programmatically generated grid for a SINGLE block.
This function is responsible for reading all per-block array options related to grid geometry, such as dimensions (-im
), domain bounds (-xMins
, -xMaxs
), and stretching ratios (-rxs
). It reads the entire array for each option, then uses the block index stored in user->_this
to select the correct value and populate the fields of the provided UserCtx
struct.
user | Pointer to the UserCtx for a specific block. The function will populate the geometric fields (IM , Min_X , rx , etc.) within this struct. |
Definition at line 47 of file io.c.
PetscErrorCode ReadGridFile | ( | UserCtx * | user | ) |
Sets grid dimensions from a file for a SINGLE block using a one-time read cache.
This function uses a static-variable pattern to ensure the grid file header is read only once, collectively, by all processes. The first time any process calls this function, it triggers a collective operation where rank 0 reads the file and broadcasts the dimensions for all blocks. This data is stored in static "cached" arrays.
On every call (including the first), the function retrieves the dimensions for the specific block (identified by user->_this
) from the cached arrays and populates the IM
, JM
, and KM
fields of the provided UserCtx
.
user | Pointer to the UserCtx for a specific block. |
Definition at line 145 of file io.c.
void FreeBC_ParamList | ( | BC_Param * | head | ) |
Frees the memory allocated for a linked list of BC_Param structs.
head | A pointer to the head of the linked list to be freed. |
Definition at line 229 of file io.c.
PetscErrorCode StringToBCFace | ( | const char * | str, |
BCFace * | face_out | ||
) |
Converts a string representation of a face to a BCFace enum.
str | The input string (e.g., "-Xi", "+Zeta"). Case-insensitive. | |
[out] | face_out | The resulting BCFace enum. |
Definition at line 246 of file io.c.
PetscErrorCode StringToBCType | ( | const char * | str, |
BCType * | type_out | ||
) |
Converts a string representation of a BC type to a BCType enum.
str | The input string (e.g., "WALL", "INLET"). Case-insensitive. | |
[out] | type_out | The resulting BCType enum. |
Definition at line 263 of file io.c.
PetscErrorCode StringToBCHandlerType | ( | const char * | str, |
BCHandlerType * | handler_out | ||
) |
Converts a string representation of a handler to a BCHandlerType enum.
str | The input string (e.g., "noslip", "constant_velocity"). Case-insensitive. | |
[out] | handler_out | The resulting BCHandlerType enum. |
Definition at line 280 of file io.c.
PetscErrorCode ValidateBCHandlerForBCType | ( | BCType | type, |
BCHandlerType | handler | ||
) |
Validates that a specific handler is compatible with a general BC type.
type | The general BCType. |
handler | The specific BCHandlerType. |
Definition at line 297 of file io.c.
PetscErrorCode ParseAllBoundaryConditions | ( | UserCtx * | user, |
const char * | bcs_input_filename | ||
) |
Parses the boundary conditions file to configure the type, handler, and any associated parameters for all 6 global faces of the domain.
This function performs the following steps:
<Face> <Type> <Handler> [param=value]...
format.user->boundary_faces
array identically.[in,out] | user | The main UserCtx struct where the final configuration for all ranks will be stored. |
[in] | bcs_input_filename | The path to the boundary conditions configuration file. |
Definition at line 339 of file io.c.
|
static |
Checks for a data file's existence in a parallel-safe manner.
Only Rank 0 checks for the file on disk. The result (true or false) is then broadcast to all other processes in the communicator. This ensures all processes make a collective, synchronized decision.
ti | The time index of the file. |
fieldName | The name of the field. |
ext | The file extension. |
fileExists | [out] The result, which will be identical on all ranks. |
Definition at line 521 of file io.c.
|
static |
Checks for and reads an optional DMSwarm field from a file.
This helper function first checks if the corresponding data file exists.
[in] | user | Pointer to the UserCtx structure. |
[in] | field_name | Internal name of the DMSwarm field (e.g., "DMSwarm_CellID"). |
[in] | field_label | A user-friendly name for logging (e.g., "Cell ID"). |
[in] | ti | Time index for the file name. |
[in] | ext | File extension. |
Definition at line 571 of file io.c.
PetscErrorCode ReadFieldData | ( | UserCtx * | user, |
const char * | field_name, | ||
Vec | field_vec, | ||
PetscInt | ti, | ||
const char * | ext | ||
) |
Reads data for a specific field from a file into the provided vector.
This function uses the field name to construct the file path and reads the data from the corresponding file into the provided PETSc vector.
[in] | user | Pointer to the UserCtx structure containing simulation context. |
[in] | field_name | Name of the field (e.g., "ufield", "vfield", "pfield"). |
[out] | field_vec | PETSc vector to store the field data. |
[in] | ti | Time index for constructing the file name. |
[in] | ext | File extension (e.g., "dat"). |
Definition at line 639 of file io.c.
PetscErrorCode ReadSimulationFields | ( | UserCtx * | user, |
PetscInt | ti | ||
) |
Reads simulation fields from files into their respective PETSc vectors.
Reads binary field data for velocity, pressure, and other required vectors.
This function reads contravariant velocity, Cartesian velocity, pressure, and node state fields from their respective binary files. It also conditionally reads LES, RANS, and statistical fields if they are enabled.
[in,out] | user | Pointer to the UserCtx structure containing simulation context. |
[in] | ti | Time index for constructing the file name. |
Definition at line 823 of file io.c.
PetscErrorCode ReadStatisticalFields | ( | UserCtx * | user, |
PetscInt | ti | ||
) |
Reads statistical fields for averaging purposes.
Reads statistical fields used for time-averaged simulations.
This function reads data for fields such as Ucat_sum, Ucat_cross_sum, Ucat_square_sum, and P_sum, used for statistical analysis during simulation.
[in,out] | user | Pointer to the UserCtx structure containing simulation context. |
[in] | ti | Time index for constructing the file name. |
Definition at line 884 of file io.c.
PetscErrorCode ReadLESFields | ( | UserCtx * | user, |
PetscInt | ti | ||
) |
Reads LES-related fields.
Reads LES-related fields used in turbulence modeling.
This function reads LES-related fields such as Cs (Smagorinsky constant) into their respective PETSc vectors.
[in,out] | user | Pointer to the UserCtx structure containing simulation context. |
[in] | ti | Time index for constructing the file name. |
Definition at line 911 of file io.c.
PetscErrorCode ReadRANSFields | ( | UserCtx * | user, |
PetscInt | ti | ||
) |
Reads RANS-related fields.
Reads RANS-related fields for turbulence modeling.
This function reads RANS-related fields such as K_Omega into their respective PETSc vectors.
[in,out] | user | Pointer to the UserCtx structure containing simulation context. |
[in] | ti | Time index for constructing the file name. |
Definition at line 940 of file io.c.
PetscErrorCode ReadSwarmField | ( | UserCtx * | user, |
const char * | field_name, | ||
PetscInt | ti, | ||
const char * | ext | ||
) |
Reads data from a file into a specified field of a PETSc DMSwarm.
This function is the counterpart to WriteSwarmField(). It creates a global PETSc vector that references the specified DMSwarm field, uses ReadFieldData() to read the data from a file, and then destroys the global vector reference.
[in] | user | Pointer to the UserCtx structure (containing user->swarm ). |
[in] | field_name | Name of the DMSwarm field to read into (must be previously declared/allocated). |
[in] | ti | Time index used to construct the input file name. |
[in] | ext | File extension (e.g., "dat" or "bin"). |
Definition at line 977 of file io.c.
PetscErrorCode ReadSwarmIntField | ( | UserCtx * | user, |
const char * | field_name, | ||
PetscInt | ti, | ||
const char * | ext | ||
) |
Reads integer swarm data by using ReadFieldData and casting the result.
This function is the counterpart to WriteSwarmIntField. It reads a file containing floating-point data (that was originally integer) into a temporary Vec and then casts it back to the integer swarm field. It works by:
[in] | user | Pointer to the UserCtx structure. |
[in] | field_name | Name of the integer Swarm field to be read. |
[in] | ti | Time index for the input file. |
[in] | ext | File extension. |
Definition at line 1022 of file io.c.
PetscErrorCode ReadAllSwarmFields | ( | UserCtx * | user, |
PetscInt | ti | ||
) |
Reads multiple fields into a DMSwarm, gracefully handling missing optional files.
Reads multiple fields (positions, velocity, CellID, and weight) into a DMSwarm.
This function reads all necessary and optional fields for a DMSwarm for a given timestep. It assumes the swarm has already been resized to match the particle count in the input files.
The 'position' field is considered MANDATORY. If its file is missing or corrupt, the function will return a fatal error.
All other fields (velocity, CellID, weight, etc.) are OPTIONAL. If their corresponding files are not found, a warning is logged, and the function continues without error. If an optional file IS found but is corrupt or has a size mismatch, it is treated as a fatal error.
[in,out] | user | Pointer to the UserCtx structure containing the DMSwarm (user->swarm). |
[in] | ti | Time index for constructing the file names. |
Definition at line 1100 of file io.c.
PetscErrorCode WriteFieldData | ( | UserCtx * | user, |
const char * | field_name, | ||
Vec | field_vec, | ||
PetscInt | ti, | ||
const char * | ext | ||
) |
Writes data from a specific PETSc vector to a single, sequential file.
Writes data from a specific PETSc vector to a file.
This function is now parallel-safe.
This ensures the output file is always in a simple, portable format.
[in] | user | Pointer to the UserCtx structure. |
[in] | field_name | Name of the field (e.g., "position"). |
[in] | field_vec | The parallel PETSc vector containing the data to write. |
[in] | ti | Time index for constructing the file name. |
[in] | ext | File extension (e.g., "dat"). |
Dump a distributed PETSc Vec to the single sequential file format used by our restart / post-processing tools.
The companion of ReadFieldData(): it always produces one file (e.g. results/ufield00006_0.dat
) regardless of how many MPI ranks are running.
Behaviour
# MPI ranks | Strategy |
---|---|
1 | Direct VecView() into the file. |
> 1 | VecScatterCreateToZero() gathers the distributed Vec onto rank 0. |
Rank 0 writes the sequential Vec; all other ranks allocate no storage. |
The routine never alters or destroys the parallel Vec passed in; the gather buffer is created and freed internally.
[in] | user | Simulation context (used only for logging). |
[in] | field_name | Logical field name (forms part of the filename). |
[in] | field_vec | Distributed PETSc Vec to write. |
[in] | ti | Timestep index used in the filename. |
[in] | ext | File extension ("dat" in our workflow). |
0
on success or a PETSc error code. Definition at line 1180 of file io.c.
PetscErrorCode WriteSimulationFields | ( | UserCtx * | user | ) |
Writes simulation fields to files.
This function writes contravariant velocity, Cartesian velocity, pressure, and node state fields to their respective binary files. It also conditionally writes LES, RANS, and statistical fields if they are enabled.
[in] | user | Pointer to the UserCtx structure containing simulation context. |
Definition at line 1280 of file io.c.
PetscErrorCode WriteStatisticalFields | ( | UserCtx * | user | ) |
Writes statistical fields for averaging purposes.
This function writes data for fields such as Ucat_sum, Ucat_cross_sum, Ucat_square_sum, and P_sum to their respective binary files.
[in] | user | Pointer to the UserCtx structure containing simulation context. |
Definition at line 1335 of file io.c.
PetscErrorCode WriteLESFields | ( | UserCtx * | user | ) |
Writes LES-related fields.
This function writes LES-related fields such as Cs (Smagorinsky constant) to their respective binary files.
[in] | user | Pointer to the UserCtx structure containing simulation context. |
Definition at line 1363 of file io.c.
PetscErrorCode WriteRANSFields | ( | UserCtx * | user | ) |
Writes RANS-related fields.
This function writes RANS-related fields such as K_Omega to their respective binary files.
[in] | user | Pointer to the UserCtx structure containing simulation context. |
Definition at line 1393 of file io.c.
PetscErrorCode WriteSwarmField | ( | UserCtx * | user, |
const char * | field_name, | ||
PetscInt | ti, | ||
const char * | ext | ||
) |
Writes data from a specific field in a PETSc Swarm to a file.
This function retrieves the Swarm from the UserCtx (i.e., user->swarm
) and creates a global PETSc vector from the specified Swarm field. It then calls the existing WriteFieldData() function to handle the actual I/O operation. After writing the data, the function destroys the temporary global vector to avoid memory leaks.
[in] | user | Pointer to the UserCtx structure containing simulation context and the PetscSwarm (as user->swarm ). |
[in] | field_name | Name of the Swarm field to be written (e.g., "my_field"). |
[in] | ti | Time index used to construct the output file name. |
[in] | ext | File extension (e.g., "dat", "bin"). |
Definition at line 1427 of file io.c.
PetscErrorCode WriteSwarmIntField | ( | UserCtx * | user, |
const char * | field_name, | ||
PetscInt | ti, | ||
const char * | ext | ||
) |
Writes integer swarm data by casting it to a temporary Vec and using WriteFieldData.
Writes integer data from a specific PETSc Swarm field to a file.
This function provides a bridge to write integer-based swarm fields (like DMSwarm_CellID) using the existing Vec-based I/O routine (WriteFieldData). It works by:
[in] | user | Pointer to the UserCtx structure. |
[in] | field_name | Name of the integer Swarm field to be written. |
[in] | ti | Time index for the output file. |
[in] | ext | File extension. |
Definition at line 1496 of file io.c.
PetscErrorCode WriteAllSwarmFields | ( | UserCtx * | user | ) |
Writes a predefined set of PETSc Swarm fields to files.
This function iterates through a hardcoded list of common swarm fields (position, velocity, etc.) and calls the WriteSwarmField() helper function for each one. This provides a straightforward way to output essential particle data at a given simulation step.
This function will only execute if particles are enabled in the simulation (i.e., user->simCtx->np > 0
and user->swarm
is not NULL).
[in] | user | Pointer to the UserCtx structure containing the simulation context and the PetscSwarm. |
Definition at line 1568 of file io.c.
PetscErrorCode VecToArrayOnRank0 | ( | Vec | inVec, |
PetscInt * | N, | ||
double ** | arrayOut | ||
) |
Gather a (possibly distributed) PETSc Vec onto rank 0 as a contiguous C array.
Gathers the contents of a distributed PETSc Vec into a single array on rank 0.
If the Vec has a DMDA attached, the gather is performed in DMDA "natural" ordering.
[in] | inVec | The PETSc Vec (may be distributed). |
[out] | N | Global length of the Vec (includes dof). |
[out] | arrayOut | On rank 0, newly allocated buffer with the gathered values (PetscScalar-sized). On other ranks, set to NULL. |
Definition at line 1619 of file io.c.
PetscErrorCode SwarmFieldToArrayOnRank0 | ( | DM | swarm, |
const char * | field_name, | ||
PetscInt * | n_total_particles, | ||
PetscInt * | n_components, | ||
void ** | gathered_array | ||
) |
Gathers any DMSwarm field from all ranks to a single, contiguous array on rank 0.
This is a generic, type-aware version of SwarmFieldToArrayOnRank0. It is a COLLECTIVE operation.
[in] | swarm | The DMSwarm to gather from. |
[in] | field_name | The name of the field to gather. |
[out] | n_total_particles | (Output on rank 0) Total number of particles in the global swarm. |
[out] | n_components | (Output on rank 0) Number of components for the field. |
[out] | gathered_array | (Output on rank 0) A newly allocated array containing the full, gathered data. The caller is responsible for freeing this memory and for casting it to the correct type. |
Definition at line 1714 of file io.c.
PetscErrorCode DisplayBanner | ( | SimCtx * | simCtx | ) |
Displays a structured banner summarizing the simulation configuration.
This function prints key simulation parameters to standard output. It is intended to be called ONLY by MPI rank 0. It retrieves global domain bounds from user->global_domain_bbox
and boundary conditions for all faces from user->face_bc_types
.
[in] | user | Pointer to UserCtx structure. |
[in] | StartTime | Initial simulation time. |
[in] | StartStep | Starting timestep index. |
[in] | StepsToRun | Total number of timesteps to run. |
[in] | num_mpi_procs | Total number of MPI processes. |
[in] | total_num_particles | Total number of particles. |
[in] | bboxlist | (If rank 0 needed to compute global_domain_bbox here, otherwise NULL) |
0
on success. Definition at line 1807 of file io.c.
void TrimWhitespace | ( | char * | str | ) |
Helper function to trim leading/trailing whitespace from a string.
str | The string to trim in-place. |
Definition at line 1910 of file io.c.
PetscErrorCode ParsePostProcessingSettings | ( | SimCtx * | simCtx | ) |
Initializes post-processing settings from a config file and command-line overrides.
This function establishes the configuration for a post-processing run by:
configFile | The path to the configuration file to parse. |
pps | Pointer to the PostProcessParams struct to be populated. |
Definition at line 1935 of file io.c.
PetscInt ReadDataFileToArray | ( | const char * | filename, |
double ** | data_out, | ||
PetscInt * | Nout, | ||
MPI_Comm | comm | ||
) |
Definition at line 2050 of file io.c.
PetscErrorCode ReadPositionsFromFile | ( | PetscInt | timeIndex, |
UserCtx * | user, | ||
double ** | coordsArray, | ||
PetscInt * | Ncoords | ||
) |
Reads coordinate data (for particles) from file into a PETSc Vec, then gathers it to rank 0.
This function uses ReadFieldData
to fill a PETSc Vec with coordinate data, then leverages VecToArrayOnRank0
to gather that data into a contiguous array (valid on rank 0 only).
[in] | timeIndex | The time index used to construct file names. |
[in] | user | Pointer to the user context. |
[out] | coordsArray | On rank 0, will point to a newly allocated array holding the coordinates. |
[out] | Ncoords | On rank 0, the length of coordsArray . On other ranks, 0. |
Definition at line 2192 of file io.c.
PetscErrorCode ReadFieldDataToRank0 | ( | PetscInt | timeIndex, |
const char * | fieldName, | ||
UserCtx * | user, | ||
double ** | scalarArray, | ||
PetscInt * | Nscalars | ||
) |
Reads a named field from file into a PETSc Vec, then gathers it to rank 0.
This function wraps ReadFieldData
and VecToArrayOnRank0
into a single step. The gathered data is stored in scalarArray
on rank 0, with its length in Nscalars
.
[in] | timeIndex | The time index used to construct file names. |
[in] | fieldName | Name of the field to be read (e.g., "velocity"). |
[in] | user | Pointer to the user context. |
[out] | scalarArray | On rank 0, a newly allocated array holding the field data. |
[out] | Nscalars | On rank 0, length of scalarArray . On other ranks, 0. |
Definition at line 2240 of file io.c.
|
static |
|
static |
|
static |
|
static |