#
libsff

Home | Modules | Examples

# Intermediate API

The Intermediate API provides a higher level method of accessing data than the Core API. More...

## Basic functions

CCMIOError | CCMIOOpenFile (CCMIOError *err, const char *file, CCMIOIOType mode, CCMIOID *root)
| Opens an CCMIO file.
CCMIOError | CCMIOCloseFile (CCMIOError *err, CCMIOID root)
| Opens an CCMIO file.
CCMIOError | CCMIOGetVersion (CCMIOError *err, CCMIONode root, int *version)
| Returns the version number of the file.
CCMIOError | CCMIOSetVersion (CCMIOError *err, CCMIONode root, int version)
| Sets the version number of the file.
CCMIOError | CCMIOGetTitle (CCMIOError *err, CCMIONode root, char **title)
| Returns the title of the file.
CCMIOError | CCMIOSetTitle (CCMIOError *err, CCMIONode root, const char *title)
| Sets the title of the file.

## Functions for Optional Nodes

CCMIOError | CCMIOWriteOpti (CCMIOError *err, CCMIOID parent, const char *name, int value)
| Creates a child node of parent with given name and scalar value.
CCMIOError | CCMIOWriteOptf (CCMIOError *err, CCMIOID parent, const char *name, float value)
| Creates a child node of parent with given name and scalar value.
CCMIOError | CCMIOWriteOptd (CCMIOError *err, CCMIOID parent, const char *name, double value)
| Creates a child node of parent with given name and scalar value.
CCMIOError | CCMIOWriteOptstr (CCMIOError *err, CCMIOID parent, const char *name, const char *value)
| Creates a child node of parent with given name and string value.
CCMIOError | CCMIOReadOpti (CCMIOError *err, CCMIOID parent, const char *name, int *value)
| Creates a child node of parent with given name and scalar value.
CCMIOError | CCMIOReadOptf (CCMIOError *err, CCMIOID parent, const char *name, float *value)
| Creates a child node of parent with given name and scalar value.
CCMIOError | CCMIOReadOptd (CCMIOError *err, CCMIOID parent, const char *name, double *value)
| Creates a child node of parent with given name and scalar value.
CCMIOError | CCMIOReadOptstr (CCMIOError *err, CCMIOID parent, const char *name, int *size, char *value)
| Creates a child node of parent with given name and scalar value.
CCMIOError | CCMIOReadOpt1i (CCMIOError *err, CCMIOID parent, const char *name, int *data, unsigned int start, unsigned int end)
| Reads a one-dimensional array from the child node of 'parent' with name 'name' into 'data'.
CCMIOError | CCMIOReadOpt1f (CCMIOError *err, CCMIOID parent, const char *name, float *data, unsigned int start, unsigned int end)
| Reads a one-dimensional array from the child node of 'parent' with name 'name' into 'data'.
CCMIOError | CCMIOReadOpt1d (CCMIOError *err, CCMIOID parent, const char *name, double *data, unsigned int start, unsigned int end)
| Reads a one-dimensional array from the child node of 'parent' with name 'name' into 'data'.
CCMIOError | CCMIOReadOpt2i (CCMIOError *err, CCMIOID parent, const char *name, int *data, unsigned int start, unsigned int end)
| Reads a two-dimensional array from the child node of 'parent' with name 'name' into 'data'.
CCMIOError | CCMIOReadOpt2f (CCMIOError *err, CCMIOID parent, const char *name, float *data, unsigned int start, unsigned int end)
| Reads a two-dimensional array from the child node of 'parent' with name 'name' into 'data'.
CCMIOError | CCMIOReadOpt2d (CCMIOError *err, CCMIOID parent, const char *name, double *data, unsigned int start, unsigned int end)
| Reads a two-dimensional array from the child node of 'parent' with name 'name' into 'data'.
CCMIOError | CCMIOReadOpt3i (CCMIOError *err, CCMIOID parent, const char *name, int *data, unsigned int start, unsigned int end)
| Reads a three-dimensional array from the child node of 'parent' with name 'name' into 'data'.
CCMIOError | CCMIOReadOpt3f (CCMIOError *err, CCMIOID parent, const char *name, float *data, unsigned int start, unsigned int end)
| Reads a three-dimensional array from the child node of 'parent' with name 'name' into 'data'.
CCMIOError | CCMIOReadOpt3d (CCMIOError *err, CCMIOID parent, const char *name, double *data, unsigned int start, unsigned int end)
| Reads a three-dimensional array from the child node of 'parent' with name 'name' into 'data'.
CCMIOError | CCMIOWriteOpt1i (CCMIOError *err, CCMIOID parent, const char *name, int n, const int *data, unsigned int start, unsigned int end)
| Writes a one-dimensional array to a child node of 'parent' with name 'name'.
CCMIOError | CCMIOWriteOpt1f (CCMIOError *err, CCMIOID parent, const char *name, int n, const float *data, unsigned int start, unsigned int end)
| Writes a one-dimensional array to a child node of 'parent' with name 'name'.
CCMIOError | CCMIOWriteOpt1d (CCMIOError *err, CCMIOID parent, const char *name, int n, const double *data, unsigned int start, unsigned int end)
| Writes a one-dimensional array to a child node of 'parent' with name 'name'.
CCMIOError | CCMIOWriteOpt2i (CCMIOError *err, CCMIOID parent, const char *name, int x, int y, const int *data, unsigned int start, unsigned int end)
| Writes a two-dimensional array to a child node of 'parent' with name 'name'.
CCMIOError | CCMIOWriteOpt2f (CCMIOError *err, CCMIOID parent, const char *name, int x, int y, const float *data, unsigned int start, unsigned int end)
| Writes a two-dimensional array to a child node of 'parent' with name 'name'.
CCMIOError | CCMIOWriteOpt2d (CCMIOError *err, CCMIOID parent, const char *name, int x, int y, const double *data, unsigned int start, unsigned int end)
| Writes a two-dimensional array to a child node of 'parent' with name 'name'.
CCMIOError | CCMIOWriteOpt3i (CCMIOError *err, CCMIOID parent, const char *name, int x, int y, int z, const int *data, unsigned int start, unsigned int end)
| Writes a three-dimensional array to a child node of 'parent' with name 'name'.
CCMIOError | CCMIOWriteOpt3f (CCMIOError *err, CCMIOID parent, const char *name, int x, int y, int z, const float *data, unsigned int start, unsigned int end)
| Writes a three-dimensional array to a child node of 'parent' with name 'name'.
CCMIOError | CCMIOWriteOpt3d (CCMIOError *err, CCMIOID parent, const char *name, int x, int y, int z, const double *data, unsigned int start, unsigned int end)
| Writes a three-dimensional array to a child node of 'parent' with name 'name'.
CCMIOError | CCMIOGetOptInfo (CCMIOError *err, CCMIOID parent, const char *name, CCMIODataType *type, unsigned int *x, unsigned int *y, unsigned int *z)
| Returns information about the optional node.

## Intermediate API

int | CCMIOIsValidEntity (CCMIOID entity)
| Returns TRUE if the entity is valid, FALSE otherwise.
int | CCMIOIsFromSameFile (CCMIOID entity1, CCMIOID entity2)
| Returns TRUE if the two entities are from the same file, FALSE otherwise.
CCMIOError | CCMIONewEntity (CCMIOError *err, CCMIOID parent, CCMIOEntity type, const char *description, CCMIOID *id)
| Creates a new entity.
CCMIOError | CCMIOGetEntity (CCMIOError *err, CCMIOID parent, CCMIOEntity type, int idVal, CCMIOID *id)
| Retrieves an entity.
CCMIOError | CCMIONewIndexedEntity (CCMIOError *err, CCMIOID parent, CCMIOEntity which, int idVal, const char *description, CCMIOID *id)
| Creates a new entity identified by an index number.
CCMIOError | CCMIOGetEntityIndex (CCMIOError *err, CCMIOID id, int *n)
| Returns the index (i.e.
CCMIOError | CCMIONewState (CCMIOError *err, CCMIOID root, const char *name, CCMIOID *problemDescription, const char *description, CCMIOID *state)
| Creates a new state.
CCMIOError | CCMIOGetState (CCMIOError *err, CCMIOID root, const char *name, CCMIOID *problemDescription, CCMIOID *state)
| Returns TRUE if the entity is valid, FALSE otherwise.
CCMIOError | CCMIOWriteState (CCMIOError *err, CCMIOID state, CCMIOID problemDescription, const char *description)
| Writes the problem description node to the state.
CCMIOError | CCMIONewField (CCMIOError *err, CCMIOID phase, const char *name, const char *shortName, CCMIODimensionality dim, CCMIOID *field)
| Returns TRUE if the entity is valid, FALSE otherwise.
CCMIOError | CCMIOGetField (CCMIOError *err, CCMIOID phase, const char *name, CCMIODimensionality *dim, CCMIOID *field)
| Retrieves a field entity.
CCMIOError | CCMIOReadField (CCMIOError *err, CCMIOID field, char *name, char *shortName, CCMIODimensionality *dim, CCMIODataType *datatype)
| Reads information about a field.
CCMIOError | CCMIODeleteEntity (CCMIOError *err, CCMIOID id)
| Deletes the entity and all of its children.
CCMIOError | CCMIONextEntity (CCMIOError *err, CCMIOID parent, CCMIOEntity type, int *i, CCMIOID *next)
| Returns TRUE if the entity is valid, FALSE otherwise.
CCMIOError | CCMIOEntitySize (CCMIOError *err, CCMIOID id, unsigned int *n, unsigned int *max)
| Returns the number of elements and the maximum element ID in the specified entity.
CCMIOError | CCMIOEntityName (CCMIOError *err, CCMIOID id, char *name)
| Gets the name of the entity.
CCMIOError | CCMIOEntityLabel (CCMIOError *err, CCMIOID id, unsigned int *size, char *label)
| Gets the label of the entity.
CCMIOError | CCMIOEntityDescription (CCMIOError *err, CCMIOID id, unsigned int *size, char *desc)
| Gets the description (if any) of the specified entity.
CCMIOError | CCMIOGetEntityNode (CCMIOError *err, CCMIOID id, CCMIONode *node)
| Returns the CCMIO node corresponding to this entity.
CCMIOError | CCMIOEntityDataType (CCMIOError *err, CCMIOID id, CCMIODataType *type)
| Returns the data type of the main data of the entity.
CCMIOError | CCMIOWriteMap (CCMIOError *err, CCMIOID id, unsigned int n, unsigned int max, int *data, unsigned int start, unsigned int end)
| Writes the map data.
CCMIOError | CCMIOReadMap (CCMIOError *err, CCMIOID id, int *data, unsigned int start, unsigned int end)
| Reads the map data.
CCMIOError | CCMIOReadVerticesf (CCMIOError *err, CCMIOID id, int *dims, float *scale, CCMIOID *mapID, float *vertices, unsigned int start, unsigned int end)
| Reads the vertex data.
CCMIOError | CCMIOReadVerticesd (CCMIOError *err, CCMIOID id, int *dims, float *scale, CCMIOID *mapID, double *vertices, unsigned int start, unsigned int end)
| Reads the vertex data.
CCMIOError | CCMIOWriteVerticesf (CCMIOError *err, CCMIOID id, int dims, float scale, CCMIOID mapID, const float *vertices, unsigned int start, unsigned int end)
| Writes the vertex data.
CCMIOError | CCMIOWriteVerticesd (CCMIOError *err, CCMIOID id, int dims, float scale, CCMIOID mapID, const double *vertices, unsigned int start, unsigned int end)
| Writes the vertex data.
CCMIOError | CCMIOReadCells (CCMIOError *err, CCMIOID id, CCMIOID *mapID, int *cellTypes, unsigned int start, unsigned int end)
| Reads the cell data.
CCMIOError | CCMIOWriteCells (CCMIOError *err, CCMIOID id, CCMIOID mapID, int *cellTypes, unsigned int start, unsigned int end)
| Writes the cell data.
CCMIOError | CCMIOReadFaces (CCMIOError *err, CCMIOID entity, CCMIOEntity which, CCMIOID *mapID, unsigned int *streamSize, int *vertexStream, unsigned int start, unsigned int end)
| Reads the face data.
CCMIOError | CCMIOWriteFaces (CCMIOError *err, CCMIOID entity, CCMIOEntity which, CCMIOID mapID, unsigned int streamSize, int *vertexStream, unsigned int start, unsigned int end)
| Writes the face data.
CCMIOError | CCMIOReadFaceCells (CCMIOError *err, CCMIOID entity, CCMIOEntity which, int *cells, unsigned int start, unsigned int end)
| Reads the faces' cell associations with the faces.
CCMIOError | CCMIOWriteFaceCells (CCMIOError *err, CCMIOID entity, CCMIOEntity which, CCMIOID mapID, int *cells, unsigned int start, unsigned int end)
| Writes the face data.
CCMIOError | CCMIOWriteProcessor (CCMIOError *err, CCMIOID processor, const char *verticesFile, CCMIOID *vertices, const char *topologyFile, CCMIOID *topology, const char *initialFieldFile, CCMIOID *initialField, const char *solutionFile, CCMIOID *solution)
| Writes the processor information.
CCMIOError | CCMIOReadProcessor (CCMIOError *err, CCMIOID processor, CCMIOID *vertices, CCMIOID *topology, CCMIOID *initialField, CCMIOID *solution)
| Reads the processor information.
CCMIOError | CCMIOClearProcessor (CCMIOError *err, CCMIOID state, CCMIOID processor, int clearVertices, int clearTopology, int clearInitialField, int clearSolution, int clearLagrangian)
| Clears the relevant information from the processor.
CCMIOError | CCMIOWriteLagrangianData (CCMIOError *err, CCMIOID lagrangian, const char *positionsFile, CCMIOID *positions, const char *solutionFile, CCMIOID *solution)
| Writes Lagrangian data.
CCMIOError | CCMIOReadLagrangianData (CCMIOError *err, CCMIOID lagrangian, CCMIOID *positions, CCMIOID *solution)
| Reads the Langrangian information.
CCMIOError | CCMIOWriteMultiDimensionalFieldData (CCMIOError *err, CCMIOID fieldID, CCMIOComponent component, CCMIOID componentField)
| Writes one component of a vector or tensor data field.
CCMIOError | CCMIOReadMultiDimensionalFieldData (CCMIOError *err, CCMIOID fieldID, CCMIOComponent component, CCMIOID *componentField)
| Gets the field ID of one component of a vector or tensor data field.
CCMIOError | CCMIOWriteFieldDataf (CCMIOError *err, CCMIOID fieldData, CCMIOID mapID, CCMIODataLocation loc, float *data, unsigned int start, unsigned int end)
| Writes scalar data for a field.
CCMIOError | CCMIOWriteFieldDatad (CCMIOError *err, CCMIOID fieldData, CCMIOID mapID, CCMIODataLocation loc, double *data, unsigned int start, unsigned int end)
| Writes the data for a field.
CCMIOError | CCMIOWriteFieldDatai (CCMIOError *err, CCMIOID fieldData, CCMIOID mapID, CCMIODataLocation loc, int *data, unsigned int start, unsigned int end)
| Writes the data for a field.
CCMIOError | CCMIOWriteConstantFieldDataf (CCMIOError *err, CCMIOID fieldData, CCMIOID mapID, CCMIODataLocation loc, float value)
| Writes data for a field that is constant.
CCMIOError | CCMIOWriteConstantFieldDatad (CCMIOError *err, CCMIOID fieldData, CCMIOID mapID, CCMIODataLocation loc, double value)
| Writes data for a field that is constant.
CCMIOError | CCMIOWriteConstantFieldDatai (CCMIOError *err, CCMIOID fieldData, CCMIOID mapID, CCMIODataLocation loc, int value)
| Writes data for a field that is constant.
CCMIOError | CCMIOReadFieldDataf (CCMIOError *err, CCMIOID fieldData, CCMIOID *mapID, CCMIODataLocation *loc, float *data, unsigned int start, unsigned int end)
| Reads scalar data from a field.
CCMIOError | CCMIOReadFieldDatad (CCMIOError *err, CCMIOID fieldData, CCMIOID *mapID, CCMIODataLocation *loc, double *data, unsigned int start, unsigned int end)
| Reads the data from a field.
CCMIOError | CCMIOReadFieldDatai (CCMIOError *err, CCMIOID fieldData, CCMIOID *mapID, CCMIODataLocation *loc, int *data, unsigned int start, unsigned int end)
| Reads the data from a field.
CCMIOError | CCMIOWriteRestartInfo (CCMIOError *err, CCMIOID restartInfo, const char *solverName, int iteration, float time, const char *timeUnits, float startAngle)
| Writes the solver restart entity.
CCMIOError | CCMIOReadRestartInfo (CCMIOError *err, CCMIOID restartInfo, char *solverName, int *iteration, float *time, char *timeUnits, float *startAngle)
| Reads the solver restart entity.

## Detailed Description

The Intermediate API provides a higher level method of accessing data than the Core API.

## Function Documentation

CCMIOError CCMIOClearProcessor | ( | CCMIOError * | err,
|  | CCMIOID | state,
|  | CCMIOID | processor,
|  | int | clearVertices,
|  | int | clearTopology,
|  | int | clearInitialField,
|  | int | clearSolution,
|  | int | clearLagrangian
| ) |

Clears the relevant information from the processor.

If this information is not used elsewhere, it will be removed from the file.

Parameters:

  state | The state that is the parent of this processor.
  processor | The processor to clear.
  clearVertices | If TRUE, vertex information will be cleared. If FALSE, it will be untouched.
  clearTopology | If TRUE, topology information will be cleared. If FALSE, it will be untouched.
  clearInitialField | If TRUE, initial field information will be cleared. If FALSE, it will be untouched.
  clearSolution | If TRUE, solution post data will be cleared. If FALSE, it will be untouched.
  clearLagrangian | If TRUE, any Lagrangian data will be cleared. If FALSE, it will be untouched.

Examples:
  writeexample.cpp.

CCMIOError CCMIOCloseFile | ( | CCMIOError * | err,
|  | CCMIOID | root
| ) |

Opens an CCMIO file.

Calling CCMIOOpenFile() multiple times on a file does not create multiple references to it; thus if CCMIOOpenFile() is called five times on the same file, only one CCMIOCloseFile() is required.

Examples:
  readexample.cpp, and writeexample.cpp.

CCMIOError CCMIODeleteEntity | ( | CCMIOError * | err,
|  | CCMIOID | id
| ) |

| Deletes the entity and all of its children. Note that deleting a processor without calling CCMIOClearProcessor() first will not delete entites that become unused as a result of the delete (e.g. the mesh and post data referred to by that processor) and may lead to wasted disk space. However, calling CCMIODeleteEntity on a state entity is safe.

CCMIOError CCMIOEntityDataType | ( | CCMIOError * | err,
|  | CCMIOID | id,
|  | CCMIODataType * | type
| ) |

| Returns the data type of the main data of the entity. Currently only valid for vertices.

CCMIOError CCMIOEntityDescription | ( | CCMIOError * | err,
|  | CCMIOID | id,
|  | unsigned int * | size,
|  | char * | desc
| ) |

Gets the description (if any) of the specified entity.

Parameters:

  size | Returns the size of the string. May be NULL if the information is not desired.
  desc | Returns the description string. This must be allocated to at least as large as the number of characters + 1 and may be NULL if the information is not desired.

Examples:
  readexample.cpp.

CCMIOError CCMIOEntityLabel | ( | CCMIOError * | err,
|  | CCMIOID | id,
|  | unsigned int * | size,
|  | char * | label
| ) |

Gets the label of the entity.

Parameters:

  size | Returns the length of the label (not including a terminating NULL). May be NULL if the information is not required.
  name | Returns the label. Must be at least 'size' + 1 bytes. If there is no label, this will be the empty string. May be NULL if the information is not required.

CCMIOError CCMIOEntityName | ( | CCMIOError * | err,
|  | CCMIOID | id,
|  | char * | name
| ) |

Gets the name of the entity.

Although this is not useful for most entities, it may be convenient for named entities (kCCMIOState, kCCMIOField).

Parameters:

  name | Returns the name of the entity. Must be at least kCCMIOMaxStringLength + 1.

CCMIOError CCMIOEntitySize | ( | CCMIOError * | err,
|  | CCMIOID | id,
|  | unsigned int * | n,
|  | unsigned int * | max
| ) |

Returns the number of elements and the maximum element ID in the specified entity.

Either 'n' or 'max' may be NULL if the information is not desired.

Examples:
  readexample.cpp.

CCMIOError CCMIOGetEntity | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | CCMIOEntity | type,
|  | int | idVal,
|  | CCMIOID * | id
| ) |

Retrieves an entity.

Although it is mostly an internal function, it is necessary for retrieving the cell and internal face entities.

Parameters:

  parent | For top-level entities this may be any CCMIOID in the same file, but for child entities this must be the actual parent.
  type | The type of entity to be retrieved.
  idVal | For entites that may have siblings, this specifies the ID number of the entity (this is most useful internally). For entities that may not have siblings (e.g. cells and internal faces) this value is ignored.
  id | The CCMIOID of the created entity.

Examples:
  readexample.cpp.

CCMIOError CCMIOGetEntityIndex | ( | CCMIOError * | err,
|  | CCMIOID | id,
|  | int * | n
| ) |

Returns the index (i.e.

the id) of the given indexed entity. (See CCMIONewIndexedEntity() for more details and a list of valid entities.)

Examples:
  readexample.cpp.

CCMIOError CCMIOGetEntityNode | ( | CCMIOError * | err,
|  | CCMIOID | id,
|  | CCMIONode * | node
| ) |

| Returns the CCMIO node corresponding to this entity.

CCMIOError CCMIOGetField | ( | CCMIOError * | err,
|  | CCMIOID | phase,
|  | const char * | name,
|  | CCMIODimensionality * | dim,
|  | CCMIOID * | field
| ) |

Retrieves a field entity.

Parameters:

  phase | The FieldPhase entity.
  name | The name of the field (limited to kCCMIOMaxStringLength characters, not including a terminating NULL).
  dim | Returns the number of dimensions kCCMIOTensor).
  field | The CCMIOID of the field entity.

CCMIOError CCMIOGetOptInfo | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | CCMIODataType * | type,
|  | unsigned int * | x,
|  | unsigned int * | y,
|  | unsigned int * | z
| ) |

Returns information about the optional node.

Parameters:

  parant | The parent node.
  name | Name of the child entity.
  type | Returns the data type of the child. Can be NULL if the information is not desired.
  x | Returns the size of the first dimension (1 if the node is a scalar). Can be NULL.
  y | Returns the size of the third dimension (0 if the node is one dimensional). Can be NULL.
  z | Returns the size of the first dimension (0 if the node is less than three dimensions). Can be NULL.

CCMIOError CCMIOGetState | ( | CCMIOError * | err,
|  | CCMIOID | root,
|  | const char * | name,
|  | CCMIOID * | problemDescription,
|  | CCMIOID * | state
| ) |

Returns TRUE if the entity is valid, FALSE otherwise.

Examples:
  readexample.cpp.

CCMIOError CCMIOGetTitle | ( | CCMIOError * | err,
|  | CCMIONode | root,
|  | char ** | title
| ) |

| Returns the title of the file. Note that the returned string is allocated by the library and must be freed by the user. It is null-terminated.

CCMIOError CCMIOGetVersion | ( | CCMIOError * | err,
|  | CCMIONode | root,
|  | int * | version
| ) |

| Returns the version number of the file.

int CCMIOIsFromSameFile | ( | CCMIOID | entity1,
|  | CCMIOID | entity2
| ) |

| Returns TRUE if the two entities are from the same file, FALSE otherwise.

int CCMIOIsValidEntity | ( | CCMIOID | entity | ) |

Returns TRUE if the entity is valid, FALSE otherwise.

Examples:
  readexample.cpp.

CCMIOError CCMIONewEntity | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | CCMIOEntity | type,
|  | const char * | description,
|  | CCMIOID * | id
| ) |

Creates a new entity.

Parameters:

  parent | For top-level entities this may be any CCMIOID in the same file, but for child entities this must be the actual parent.
  type | The type of entity to be created.
  description | An optional description of the entity. Passing NULL will omit a description.
  id | The CCMIOID of the created entity.

Examples:
  writeexample.cpp.

CCMIOError CCMIONewField | ( | CCMIOError * | err,
|  | CCMIOID | phase,
|  | const char * | name,
|  | const char * | shortName,
|  | CCMIODimensionality | dim,
|  | CCMIOID * | field
| ) |

Returns TRUE if the entity is valid, FALSE otherwise.

Examples:
  writeexample.cpp.

CCMIOError CCMIONewIndexedEntity | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | CCMIOEntity | which,
|  | int | idVal,
|  | const char * | description,
|  | CCMIOID * | id
| ) |

Creates a new entity identified by an index number.

Although almost all entities are internally identified by an ID number, this number is unimportant for most entities and is only used internally. Some entities, however, are most easily identified with a number and for these entities (kCCMIOBoundaryFaces, kCCMIOCellType, and kCCMIOBoundaryRegion) the ID number is provided by the creator. The entities, called indexed entities, can be created with this function.

Parameters:

  parent | The CCMIOID of the parent entity.
  idVal | The boundary ID number.
  which | May be kCCMIOBoundaryFaces, kCCMIOCellType, or kCCMIOBoundaryRegion.
  description | An optional description (NULL for no description)
  id | The CCMIOID to the new entity.

Examples:
  writeexample.cpp.

CCMIOError CCMIONewState | ( | CCMIOError * | err,
|  | CCMIOID | root,
|  | const char * | name,
|  | CCMIOID * | problemDescription,
|  | const char * | description,
|  | CCMIOID * | state
| ) |

Creates a new state.

If a state with that name exists, its contents, including processor entities, will be cleared.

Parameters:

  root | The root node of the file (returned by CCMIOOpenFile()).
  name | The name of the new state (limited to kCCMIOMaxStringLength characters, not including a terminating NULL).
  problemDescription | The CCMIOID of the problemDescription entity relevant to this state, or NULL if there is none.
  state | The CCMIOID of the new entity.
  description | An optional description string (NULL for no description)

Examples:
  writeexample.cpp.

CCMIOError CCMIONextEntity | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | CCMIOEntity | type,
|  | int * | i,
|  | CCMIOID * | next
| ) |

Returns TRUE if the entity is valid, FALSE otherwise.

Examples:
  readexample.cpp, and writeexample.cpp.

CCMIOError CCMIOOpenFile | ( | CCMIOError * | err,
|  | const char * | file,
|  | CCMIOIOType | mode,
|  | CCMIOID * | root
| ) |

Opens an CCMIO file.

Calling CCMIOOpenFile() multiple times on a file does not create multiple references to it; thus if CCMIOOpenFile() is called five times on the same file, only one CCMIOCloseFile() is required.

Examples:
  readexample.cpp, and writeexample.cpp.

CCMIOError CCMIOReadCells | ( | CCMIOError * | err,
|  | CCMIOID | id,
|  | CCMIOID * | mapID,
|  | int * | cellTypes,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Reads the cell data.

Parameters:

  id | The CCMIOID of the cell entity.
  mapID | Returns the CCMIOID of the map corresponding to this entity. May be NULL if the information is not desired.
  cellTypes | Returns an array of cell type information. May be NULL if the information is not desired.
  start | The beginning cell.
  end | The ending cell. Data from 'start' to 'end' -1 will be read. If end is zero, data will be read from 'start' to the end of the data.

Examples:
  readexample.cpp.

CCMIOError CCMIOReadFaceCells | ( | CCMIOError * | err,
|  | CCMIOID | entity,
|  | CCMIOEntity | which,
|  | int * | cells,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Reads the faces' cell associations with the faces.

Parameters:

  entity | The face entity.
  which | Either kCCMIOInternalFaces or kCCMIOBoundaryFaces.
  mapID | Returns the CCMIOID of the map associated with these faces. May be NULL if the information is not desired.
  cells | If reading internal faces, this is a two dimensional array with size [nFaces][2]. If reading boundary faces it is a one dimensional array of size nFaces. Must be pre-allocated to the correct size. May be NULL if the information is not desired.
  start | The beginning face.
  end | The ending face. Data from 'start' to 'end' -1 will be read. If end is zero, data will be read from 'start' to the end of the data.

Examples:
  readexample.cpp.

CCMIOError CCMIOReadFaces | ( | CCMIOError * | err,
|  | CCMIOID | entity,
|  | CCMIOEntity | which,
|  | CCMIOID * | mapID,
|  | unsigned int * | streamSize,
|  | int * | vertexStream,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Reads the face data.

Parameters:

  entity | The face entity.
  which | Either kCCMIOInternalFaces or kCCMIOBoundaryFaces.
  mapID | Returns the CCMIOID of the map associated with these faces. May be NULL if the information is not desired.
  streamSize | Returns the total number of elements in the vertexStream. May be NULL if the information is not desired.
  vertexStream | Returns the vertices in the faces in the form `nVerts v1 v2 ... vn nVerts v1 v2 ... vn ...` Note that if the stream is being buffered (with 'start' and 'end'), only a piece of the stream will be returned, and may be in the middle of a face.
  start | The beginning element.
  end | The ending element. Data from 'start' to 'end' -1 will be read. If end is zero, data will be read from 'start' to the end of the data.

Examples:
  readexample.cpp.

CCMIOError CCMIOReadField | ( | CCMIOError * | err,
|  | CCMIOID | field,
|  | char * | name,
|  | char * | shortName,
|  | CCMIODimensionality * | dim,
|  | CCMIODataType * | datatype
| ) |

Reads information about a field.

Note that this does not read the data of the node; use CCMIOReadFieldData(f|v|i)() for that. This is for determining the name of the field when using CCMIONextEntity().

Parameters:

  field | The CCMIOID of the field.
  name | Returns the name of the field. Must be at least kCCMIOMaxStringLength + 1 characters.
  shortName | Returns the short name of the field. Must be at least kCCMIOProstarShortName + 1 characters.
  dim | Returns the dimensions of the field.
  datatype | Returns the type of data. Only valid for scalar data; Vector and tensor components are not required to be the same data type (kCCMIOUnknownType will be returned for non-scalar data). May be NULL if the information is not desired.

Examples:
  readexample.cpp.

CCMIOError CCMIOReadFieldDatad | ( | CCMIOError * | err,
|  | CCMIOID | fieldData,
|  | CCMIOID * | mapID,
|  | CCMIODataLocation * | loc,
|  | double * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Reads the data from a field. The data is returned in double-precision so if the original data is single-precision it will be converted. See CCMIOReadFieldDataf() for a full description.

CCMIOError CCMIOReadFieldDataf | ( | CCMIOError * | err,
|  | CCMIOID | fieldData,
|  | CCMIOID * | mapID,
|  | CCMIODataLocation * | loc,
|  | float * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Reads scalar data from a field.

The data is returned in single-precision so if the original data is double-precision it will be converted. If the data is a constant value, the entire array will be filled with that value.
Note: If the file pre-dates vector and tensor data being stored as separate components (that is, if CCMIOReadMultiDimensionalArray() returns a kCCMIOVersion error), CCMIOReadFieldDataf() may be used to read the data. If this is the case, CCMIOReadFieldDataf() will automatically return the multidimensional data into 'data', and 'data' must be big enough to accomodate it.

Parameters:

  fieldData | The CCMIOID of the field entity.
  mapID | Returns the CCMIOID of the map corresponding to this field. May be NULL if not desired.
  loc | Returns the type of data this node is (cell, vertex, face). May be NULL if not desired.
  data | The data, must be preallocated to [n], [n][3], or [n][3][3] for kCCMIOScalar, kCCMIOVector, and kCCMIOTensor data, respectively. May be NULL if not desired.
  start | The offset of the element pointed to by 'data'. Must Be in units of of the first element; so if float data[10][3][3]; then start can be in the range [0, 9].
  end | The element one beyond the end. So to read from [2, 5], start = 2, end = 6, which reads from data[2][0][0] to data[5][3][3]. (Note that newer files will only have scalar data)

Examples:
  readexample.cpp.

CCMIOError CCMIOReadFieldDatai | ( | CCMIOError * | err,
|  | CCMIOID | fieldData,
|  | CCMIOID * | mapID,
|  | CCMIODataLocation * | loc,
|  | int * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Reads the data from a field. The data is returned in double-precision so if the original data is single-precision it will be converted. See CCMIOReadFieldDataf() for a full description.

CCMIOError CCMIOReadLagrangianData | ( | CCMIOError * | err,
|  | CCMIOID | lagrangian,
|  | CCMIOID * | positions,
|  | CCMIOID * | solution
| ) |

Reads the Langrangian information.

The returned entities may be in a a different file and this will need to be closed with CCMIOClose, but since the node might be the root of the current file, they should not be closed until the end. 'positions' and 'solution' may be NULL if the information is not desired.

Examples:
  readexample.cpp.

CCMIOError CCMIOReadMap | ( | CCMIOError * | err,
|  | CCMIOID | id,
|  | int * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Reads the map data.

Parameters:

  id | The CCMIOID of the map.
  data | The map data. Must be pre-allocated to the correct number of elements (given by CCMIOEntitySize()).

Examples:
  readexample.cpp.

CCMIOError CCMIOReadMultiDimensionalFieldData | ( | CCMIOError * | err,
|  | CCMIOID | fieldID,
|  | CCMIOComponent | component,
|  | CCMIOID * | componentField
| ) |

Gets the field ID of one component of a vector or tensor data field.

Although applications should specify all components, if there is a kCCMIONoNodeErr reading the entity, the application should assume that this component was not written and should use a proper default value (presumably 0.0).

Parameters:

  fieldID | The postdata field.
  component | The component (kCCMIOVectorX to kCCMIOVectorZ and kCCMIOTensorXX to kCCMIOTensorZZ).
  componentField | The component field ID.

Examples:
  readexample.cpp.

CCMIOError CCMIOReadOpt1d | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | double * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Reads a one-dimensional array from the child node of 'parent' with name 'name' into 'data'. See CCMIOReadOpt1f() for a complete description.

CCMIOError CCMIOReadOpt1f | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | float * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Reads a one-dimensional array from the child node of 'parent' with name 'name' into 'data'.

'data' must be the proper size (which can be determined with CCMIOGetDimensions()). If actual node data is stored in a different format than requested (i.e. float or double), it will be converted.

Parameters:

  parent | The parent entity.
  name | Name of the child node.
  data | Data to be read into. Must be non-NULL.

CCMIOError CCMIOReadOpt1i | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | int * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Reads a one-dimensional array from the child node of 'parent' with name 'name' into 'data'.

See CCMIOReadOpt1f() for a complete description.

Examples:
  readexample.cpp.

CCMIOError CCMIOReadOpt2d | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | double * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Reads a two-dimensional array from the child node of 'parent' with name 'name' into 'data'. See CCMIOReadOpt2f() for a complete description.

CCMIOError CCMIOReadOpt2f | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | float * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Reads a two-dimensional array from the child node of 'parent' with name 'name' into 'data'.

'data' must be the proper size (which can be determined with CCMIOGetDimensions()). If actual node data is stored in a different format than requested (i.e. float or double), it will be converted.

Parameters:

  parent | The parent entity.
  name | Name of the child node.
  isC | TRUE if the data should be returned in C order, FALSE for Fortran order. Since data is stored in Fortran order on disk, returning C order involves an extra copy.
  data | Data to be read into. Must be non-NULL.
  start | The offset of the element pointed to by 'data'. Must Be in units of of the first element; so if float data[10][3]; then start can be in the range [0, 9].
  end | The element one beyond the end. So to read from [2, 5], start = 2, end = 6, which reads from data[2][0] to data[5][3].

CCMIOError CCMIOReadOpt2i | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | int * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Reads a two-dimensional array from the child node of 'parent' with name 'name' into 'data'. See CCMIOReadOpt2f() for a complete description.

CCMIOError CCMIOReadOpt3d | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | double * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Reads a three-dimensional array from the child node of 'parent' with name 'name' into 'data'. See CCMIOReadOpt3f() for a complete description.

CCMIOError CCMIOReadOpt3f | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | float * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Reads a three-dimensional array from the child node of 'parent' with name 'name' into 'data'.

'data' must be the proper size (which can be determined with CCMIOGetDimensions()). If actual node data is stored in a different format than requested (i.e. float or double), it will be converted.

Parameters:

  parent | The parent entity.
  name | Name of the child node.
  isC | TRUE if the data should be returned in C order, FALSE for Fortran order. Since data is stored in Fortran order on disk, returning C order involves an extra copy.
  data | Data to be read into. Must be non-NULL.
  start | The offset of the element pointed to by 'data'. Must Be in units of of the first element; so if float data[10][3][3]; then start can be in the range [0, 9].
  end | The element one beyond the end. So to read from [2, 5], start = 2, end = 6, which reads from data[2][0][0] to data[5][3][3].

CCMIOError CCMIOReadOpt3i | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | int * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Reads a three-dimensional array from the child node of 'parent' with name 'name' into 'data'. See CCMIOReadOpt3f() for a complete description.

CCMIOError CCMIOReadOptd | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | double * | value
| ) |

Creates a child node of parent with given name and scalar value.

If the node already exists it will be overwritten.

Parameters:

  parent | The parent entity.
  name | Name of the child node.
  value | Scalar value to be written.

CCMIOError CCMIOReadOptf | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | float * | value
| ) |

Creates a child node of parent with given name and scalar value.

If the node already exists it will be overwritten.

Parameters:

  parent | The parent entity.
  name | Name of the child node.
  value | Scalar value to be written.

Examples:
  readexample.cpp.

CCMIOError CCMIOReadOpti | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | int * | value
| ) |

Creates a child node of parent with given name and scalar value.

If the node already exists it will be overwritten.

Parameters:

  parent | The parent entity.
  name | Name of the child node.
  value | Scalar value to be written.

CCMIOError CCMIOReadOptstr | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | int * | size,
|  | char * | value
| ) |

Creates a child node of parent with given name and scalar value.

If the node already exists it will be overwritten.

Parameters:

  parent | The parent entity.
  name | Name of the child node.
  value | Scalar value to be written.

Examples:
  readexample.cpp.

CCMIOError CCMIOReadProcessor | ( | CCMIOError * | err,
|  | CCMIOID | processor,
|  | CCMIOID * | vertices,
|  | CCMIOID * | topology,
|  | CCMIOID * | initialField,
|  | CCMIOID * | solution
| ) |

Reads the processor information.

The returned entities may be in a a different file and this will need to be closed with CCMIOClose, but since the node might be the root of the current file, they should not be closed until the end. 'positions' and 'solution' may be NULL if the information is not desired.

Examples:
  readexample.cpp.

CCMIOError CCMIOReadRestartInfo | ( | CCMIOError * | err,
|  | CCMIOID | restartInfo,
|  | char * | solverName,
|  | int * | iteration,
|  | float * | time,
|  | char * | timeUnits,
|  | float * | startAngle
| ) |

Reads the solver restart entity.

Any pointer may be NULL if the information is not desired.

Examples:
  readexample.cpp.

CCMIOError CCMIOReadVerticesd | ( | CCMIOError * | err,
|  | CCMIOID | id,
|  | int * | dims,
|  | float * | scale,
|  | CCMIOID * | mapID,
|  | double * | vertices,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Reads the vertex data.

Parameters:

  id | The CCMIOID of the vertices.
  dims | Returns the dimensionality of the vertex (i.e. 2 or 3). May be NULL if the information is not desired.
  scale | Returns the scaling factor. May be NULL if the information is not desired.
  mapID | Returns the CCMIOID of the map corresponding to this entity. May be NULL if the information is not desired.
  vertices | A two dimensional array of size [nVerts][dims]. Must be pre-allocated to the correct size. May be NULL if the information is not desired.
  start | The offset (in units of vertices) of the starting vertex.
  end | The offset (in units of vertices) of the ending vertecx. Data from start to end - 1 will be read. If end is zero, data will be read from 'start' to the end of the data.

CCMIOError CCMIOReadVerticesf | ( | CCMIOError * | err,
|  | CCMIOID | id,
|  | int * | dims,
|  | float * | scale,
|  | CCMIOID * | mapID,
|  | float * | vertices,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Reads the vertex data.

Parameters:

  id | The CCMIOID of the vertices.
  dims | Returns the dimensionality of the vertex (i.e. 2 or 3). May be NULL if the information is not desired.
  scale | Returns the scaling factor. May be NULL if the information is not desired.
  mapID | Returns the CCMIOID of the map corresponding to this entity. May be NULL if the information is not desired.
  vertices | A two dimensional array of size [nVerts][dims]. Must be pre-allocated to the correct size. May be NULL if the information is not desired.
  start | The offset (in units of vertices) of the starting vertex.
  end | The offset (in units of vertices) of the ending vertecx. Data from start to end - 1 will be read. If end is zero, data will be read from 'start' to the end of the data.

Examples:
  readexample.cpp.

CCMIOError CCMIOSetTitle | ( | CCMIOError * | err,
|  | CCMIONode | root,
|  | const char * | title
| ) |

| Sets the title of the file. The string must be null-terminated.

CCMIOError CCMIOSetVersion | ( | CCMIOError * | err,
|  | CCMIONode | root,
|  | int | version
| ) |

| Sets the version number of the file.

CCMIOError CCMIOWriteCells | ( | CCMIOError * | err,
|  | CCMIOID | id,
|  | CCMIOID | mapID,
|  | int * | cellTypes,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Writes the cell data.

Parameters:

  id | The CCMIOID of the cell entity.
  mapID | The CCMIOID of the map corresponding to this entity.
  cellTypes | Returns an array of cell type information.
  start | The beginning cell.
  end | The ending cell. Data from 'start' to 'end' -1 will be read. If end is zero, data will be written from 'start' to the end of the data.

Examples:
  writeexample.cpp.

CCMIOError CCMIOWriteConstantFieldDatad | ( | CCMIOError * | err,
|  | CCMIOID | fieldData,
|  | CCMIOID | mapID,
|  | CCMIODataLocation | loc,
|  | double | value
| ) |

| Writes data for a field that is constant. See CCMIoWriteConstantFieldDataf() for a description of the parameters.

CCMIOError CCMIOWriteConstantFieldDataf | ( | CCMIOError * | err,
|  | CCMIOID | fieldData,
|  | CCMIOID | mapID,
|  | CCMIODataLocation | loc,
|  | float | value
| ) |

Writes data for a field that is constant.

Note that it is possible for one type of data (e.g. kCCMIOCellValues) to be constant and another type to be specified. (Whether this is meaningful is another issue.)

Parameters:

  fieldData | The CCMIOID of the field entity.
  mapID | The CCMIOID of the map corresponding to this field.
  loc | What type of data this node is (cell, vertex, face)
  value | The constant value.

Examples:
  writeexample.cpp.

CCMIOError CCMIOWriteConstantFieldDatai | ( | CCMIOError * | err,
|  | CCMIOID | fieldData,
|  | CCMIOID | mapID,
|  | CCMIODataLocation | loc,
|  | int | value
| ) |

| Writes data for a field that is constant. See CCMIoWriteConstantFieldDataf() for a description of the parameters.

CCMIOError CCMIOWriteFaceCells | ( | CCMIOError * | err,
|  | CCMIOID | entity,
|  | CCMIOEntity | which,
|  | CCMIOID | mapID,
|  | int * | cells,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Writes the face data.

See CCMIOReadFaces() for a description of the parameters.

Examples:
  writeexample.cpp.

CCMIOError CCMIOWriteFaces | ( | CCMIOError * | err,
|  | CCMIOID | entity,
|  | CCMIOEntity | which,
|  | CCMIOID | mapID,
|  | unsigned int | streamSize,
|  | int * | vertexStream,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Writes the face data.

See CCMIOReadFaces() for a description of the parameters.

Examples:
  writeexample.cpp.

CCMIOError CCMIOWriteFieldDatad | ( | CCMIOError * | err,
|  | CCMIOID | fieldData,
|  | CCMIOID | mapID,
|  | CCMIODataLocation | loc,
|  | double * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Writes the data for a field. See CCMIOWriteFieldDataf() for a description of the paramaters.

CCMIOError CCMIOWriteFieldDataf | ( | CCMIOError * | err,
|  | CCMIOID | fieldData,
|  | CCMIOID | mapID,
|  | CCMIODataLocation | loc,
|  | float * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Writes scalar data for a field.

Vector or tensor data should be written as individual components and each component written with CCMIOWriteMultiDimensionalFieldData().

Parameters:

  fieldData | The CCMIOID of the field entity.
  mapID | The CCMIOID of the map corresponding to this field.
  loc | What type of data this node is (cell, vertex, face)
  data | The data.
  start | The offset of the element pointed to by 'data'. Must Be in units of of the first element; so if float data[10][3][3]; then start can be in the range [0, 9].
  end | The element one beyond the end. So to write from [2, 5], start = 2, end = 6, which writes from data[2][0][0] to data[5][3][3].

Examples:
  writeexample.cpp.

CCMIOError CCMIOWriteFieldDatai | ( | CCMIOError * | err,
|  | CCMIOID | fieldData,
|  | CCMIOID | mapID,
|  | CCMIODataLocation | loc,
|  | int * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Writes the data for a field.

See CCMIOWriteFieldDataf() for a description of the paramaters.

Examples:
  writeexample.cpp.

CCMIOError CCMIOWriteLagrangianData | ( | CCMIOError * | err,
|  | CCMIOID | lagrangian,
|  | const char * | positionsFile,
|  | CCMIOID * | positions,
|  | const char * | solutionFile,
|  | CCMIOID * | solution
| ) |

Writes Lagrangian data.

Parameters:

  positionsFile | The file that contains the positions node, NULL for this file.
  positions | The node that contains the positions. This node must be a kCCMIOVertices node. (Verteices and positions ultimately store the same data) This node may be NULL if no position data is to be written.
  solutionFile | The file containing the solution node, or NULL for this file.
  solution | The solution node (field set entity). May be NULL if not solution data is to be written.

Examples:
  writeexample.cpp.

CCMIOError CCMIOWriteMap | ( | CCMIOError * | err,
|  | CCMIOID | id,
|  | unsigned int | n,
|  | unsigned int | max,
|  | int * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Writes the map data.

Parameters:

  id | The CCMIOID of the map.
  n | The number of elements in the array.
  max | The maximum element value.
  data | The map data.

Examples:
  writeexample.cpp.

CCMIOError CCMIOWriteMultiDimensionalFieldData | ( | CCMIOError * | err,
|  | CCMIOID | fieldID,
|  | CCMIOComponent | component,
|  | CCMIOID | componentField
| ) |

Writes one component of a vector or tensor data field.

Parameters:

  fieldID | The postdata field.
  component | The component (kCCMIOVectorX to kCCMIOVectorZ and kCCMIOTensorXX to kCCMIOTensorZZ). All components should be specified. If a component is not specified, the application is free to use whatever default value it feels is correct.
  componentField | The component field ID.

Examples:
  writeexample.cpp.

CCMIOError CCMIOWriteOpt1d | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | int | n,
|  | const double * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Writes a one-dimensional array to a child node of 'parent' with name 'name'. See CCMIOWriteOpt1f() for a complete description.

CCMIOError CCMIOWriteOpt1f | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | int | n,
|  | const float * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Writes a one-dimensional array to a child node of 'parent' with name 'name'.

If the child node does not exist it will be created and in either case its size and data type will be automatically set to the proper values.

Parameters:

  parent | The parent entity.
  name | Name of the child node.
  n | The number of elements of 'data'.
  data | The data to be written.

CCMIOError CCMIOWriteOpt1i | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | int | n,
|  | const int * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Writes a one-dimensional array to a child node of 'parent' with name 'name'. See CCMIOWriteOpt1f() for a complete description.

CCMIOError CCMIOWriteOpt2d | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | int | x,
|  | int | y,
|  | const double * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Writes a two-dimensional array to a child node of 'parent' with name 'name'. See CCMIOWriteOpt2f() for a complete description.

CCMIOError CCMIOWriteOpt2f | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | int | x,
|  | int | y,
|  | const float * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Writes a two-dimensional array to a child node of 'parent' with name 'name'.

If the child node does not exist it will be created and in either case its size and data type will be automatically set to the proper values. 'data' is expected to be an array of data[x][y] elements. Note that although the CCM specification specifies dimension in FORTRAN ordering, the API expects C ordering. Thus a C array data[x][y] must be called as CCMIOWriteOpt2f(..., x, y, ...), even though the dimensions will be reversed on disk.

Parameters:

  parent | The parent node.
  name | Name of the child entity.
  isC | TRUE if 'data' is in C array order, FALSE if in Fortran array order.
  x | The size of the first C dimension.
  y | The size of the second C dimension.
  data | The data to be written.
  start | The offset of the element pointed to by 'data'. Must Be in units of of the first element; so if float data[10][3]; then start can be in the range [0, 9].
  end | The element one beyond the end. So to write from [2, 5], start = 2, end = 6, which writes from data[2][0] to data[5][3].

CCMIOError CCMIOWriteOpt2i | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | int | x,
|  | int | y,
|  | const int * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Writes a two-dimensional array to a child node of 'parent' with name 'name'. See CCMIOWriteOpt2f() for a complete description.

CCMIOError CCMIOWriteOpt3d | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | int | x,
|  | int | y,
|  | int | z,
|  | const double * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Writes a three-dimensional array to a child node of 'parent' with name 'name'. See CCMIOWriteOpt3f() for a complete description.

CCMIOError CCMIOWriteOpt3f | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | int | x,
|  | int | y,
|  | int | z,
|  | const float * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Writes a three-dimensional array to a child node of 'parent' with name 'name'.

If the child node does not exist it will be created and in either case its size and data type will be automatically set to the proper values. 'data' is expected to be an array of data[x][y] elements. Note that although the CCM specification specifies dimension in FORTRAN ordering, the API expects C ordering. Thus a C array data[x][y] must be called as CCMIOWriteOpt3f(..., x, y, z, ...), even though the dimensions will be reversed on disk.

Parameters:

  parent | The parent node.
  name | Name of the child entity.
  isC | TRUE if 'data' is in C array order, FALSE if in Fortran array order.
  x | The size of the first dimension.
  y | The size of the second dimension.
  z | The size of the third dimension.
  data | The data to be written.
  start | The offset of the element pointed to by 'data'. Must Be in units of of the first element; so if float data[10][3][3]; then start can be in the range [0, 9].
  end | The element one beyond the end. So to write from [2, 5], start = 2, end = 6, which writes from data[2][0][0] to data[5][3][3].

CCMIOError CCMIOWriteOpt3i | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | int | x,
|  | int | y,
|  | int | z,
|  | const int * | data,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

| Writes a three-dimensional array to a child node of 'parent' with name 'name'. See CCMIOWriteOpt3f() for a complete description.

CCMIOError CCMIOWriteOptd | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | double | value
| ) |

Creates a child node of parent with given name and scalar value.

If the node already exists it will be overwritten.

Parameters:

  parent | The parent entity.
  name | Name of the child node.
  value | Scalar value to be written.

CCMIOError CCMIOWriteOptf | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | float | value
| ) |

Creates a child node of parent with given name and scalar value.

If the node already exists it will be overwritten.

Parameters:

  parent | The parent entity.
  name | Name of the child node.
  value | Scalar value to be written.

Examples:
  writeexample.cpp.

CCMIOError CCMIOWriteOpti | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | int | value
| ) |

Creates a child node of parent with given name and scalar value.

If the node already exists it will be overwritten.

Parameters:

  parent | The parent entity.
  name | Name of the child node.
  value | Scalar value to be written.

CCMIOError CCMIOWriteOptstr | ( | CCMIOError * | err,
|  | CCMIOID | parent,
|  | const char * | name,
|  | const char * | value
| ) |

Creates a child node of parent with given name and string value.

If the node already exists it will be overwritten.

Parameters:

  parent | The parent entity.
  name | Name of the child node.
  value | Null-terminated string.

Examples:
  writeexample.cpp.

CCMIOError CCMIOWriteProcessor | ( | CCMIOError * | err,
|  | CCMIOID | processor,
|  | const char * | verticesFile,
|  | CCMIOID * | vertices,
|  | const char * | topologyFile,
|  | CCMIOID * | topology,
|  | const char * | initialFieldFile,
|  | CCMIOID * | initialField,
|  | const char * | solutionFile,
|  | CCMIOID * | solution
| ) |

Writes the processor information.

Parameters:

  processor | The CCMIOID of the processor entity.
  verticesFile | The name of the file that the vertices are stored in. NULL indicates the current file.
  vertices | The CCMIOID of the vertices entity. If NULL, vertices information will be unchanged.
  topologyFile | The name of the file that the mesh is stored in. NULL indicates the current file.
  topology | The CCMIOID of the mesh entity. If NULL, mesh information will be unchanged.
  initialFieldFile | The name of the file that the inital field is stored in. NULL indicates the current file.
  initialField | The CCMIOID of the initial field set entity. If NULL, the initial field information will be unchanged.
  solutionFile | The name of the file that the solution data is stored in. NULL indicates the current file.
  vertices | The CCMIOID of the solution data field set entity. If NULL, vertices information will be unchanged.

Examples:
  writeexample.cpp.

CCMIOError CCMIOWriteRestartInfo | ( | CCMIOError * | err,
|  | CCMIOID | restartInfo,
|  | const char * | solverName,
|  | int | iteration,
|  | float | time,
|  | const char * | timeUnits,
|  | float | startAngle
| ) |

Writes the solver restart entity.

Parameters:

  restartInfo | The restart entity.
  solverName | The name of the solver that is writing this node. only the first kCCMIOMaxStringLength characters are meaningful.
  iteration | The iteration number.
  time | The time (in solver units, with 0.0 being the initial time).
  timeUnits | A string describing the units of time. If NULL, the units default to "s".
  startAngle | The starting angle of the mesh. Should be 0.0 if the mesh is not rotating.

Examples:
  writeexample.cpp.

CCMIOError CCMIOWriteState | ( | CCMIOError * | err,
|  | CCMIOID | state,
|  | CCMIOID | problemDescription,
|  | const char * | description
| ) |

Writes the problem description node to the state.

Note that there is not an CCMIOReadState(); this functionality is incorporated in CCMIOGetState().

Parameters:

  description | Optional character string describing the state. Pass NULL for no description (note that this will remove any existing description).

Examples:
  writeexample.cpp.

CCMIOError CCMIOWriteVerticesd | ( | CCMIOError * | err,
|  | CCMIOID | id,
|  | int | dims,
|  | float | scale,
|  | CCMIOID | mapID,
|  | const double * | vertices,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Writes the vertex data.

Parameters:

  id | The CCMIOID of the vertices.
  dims | Returns the dimensionality of the vertex (i.e. 2 or 3).
  scale | Returns the scaling factor.
  mapID | Returns the CCMIOID of the map corresponding to this entity.
  vertices | A two dimensional array of size [nVerts][dims].
  start | The offset (in units of vertices) of the starting vertex.
  end | The offset (in units of vertices) of the ending vertecx. Data from start to end - 1 will be read. If end is zero, data will be written from 'start' to the end of the data.

CCMIOError CCMIOWriteVerticesf | ( | CCMIOError * | err,
|  | CCMIOID | id,
|  | int | dims,
|  | float | scale,
|  | CCMIOID | mapID,
|  | const float * | vertices,
|  | unsigned int | start,
|  | unsigned int | end
| ) |

Writes the vertex data.

Parameters:

  id | The CCMIOID of the vertices.
  dims | Returns the dimensionality of the vertex (i.e. 2 or 3).
  scale | Returns the scaling factor.
  mapID | Returns the CCMIOID of the map corresponding to this entity.
  vertices | A two dimensional array of size [nVerts][dims].
  start | The offset (in units of vertices) of the starting vertex.
  end | The offset (in units of vertices) of the ending vertecx. Data from start to end - 1 will be read. If end is zero, data will be written from 'start' to the end of the data.

Examples:
  writeexample.cpp.