    

 ## On this page

  

 

 # Ansys Common Fluids Mesh Data Model 

 Last update: 16.07.2025 

# <a class="anchor" id="MeshDMIntro"></a>Mesh Data Model

The Ansys Common Fluids Mesh Data Model is defined to store mesh can be thought of as a discretization of geometric space into smaller [Elements](_mesh_d_m.xhtml#MeshElements) on which a solver may calculate a fluid simulation.

In its simplest form a mesh is a collection of Elements that are called Cells, Faces, Edges and Nodes.

There are a number of ways that the Elements can be defined and these depend on the type of Elements that might be needed and the [Mesh Dimensionality](_mesh_d_m.xhtml#MeshDim) of the Geometric space being represented.

Meshes within the [Data Model](_mesh_d_m.xhtml) are defined as collections of [Elements](_mesh_d_m.xhtml#MeshElements). Elements can be categorized as Cells, Faces, Edges and Nodes.

The Element topology of Cells, Faces, and Edges will ultimately be determined in terms of Nodes.

## <a class="anchor" id="MeshDim"></a>Mesh Dimensionality

The dimensionality of a mesh will typically be decided by the type of solver being run and the type of geometric space it works in. A mesh is typically two-dimensional (2D) or three-dimensional (3D).

The number of coordinates each Node has determines the dimensionality of the mesh. In a 3D mesh a Node will have 3 coordinates whereas a 2D mesh will have 2 coordinates.

The dimensionality of a mesh will imply what type of Cells can be stored and therefore the Faces that are also stored.

NoteIt is important to remember that the Cells or Faces stored don't determine the dimensionality of the mesh. A Triangle, for example, can be represented as a 3D Face or a 2D Cell but the reverse isn't true as a Triange can only be represented as a cell within a 2D mesh.To read or write mesh dimensionality, see the API function documentation for [getMeshSize](classansys_1_1_cff_base.xhtml#acaf3eef987d98a7af34c15b9b7954abc) and [setMeshSize](classansys_1_1_cff_base.xhtml#a259b65322ef0d42859d988166eed23d7).

## <a class="anchor" id="MeshUnits"></a>Units

Mesh units are optionally stored with the mesh. The absence of units within a mesh should be interpretted by the [CffProvider](classansys_1_1_cff_provider.xhtml) API as indicating that the mesh is in the default SI unit of meters.

To read or write mesh units, see the API function documention for [getMeshUnits](classansys_1_1_cff_base.xhtml#a1f85337345d893d33c9cfcdd0431757a) and [setMeshUnits](classansys_1_1_cff_base.xhtml#ae323125334ed9fb3d4d62796e08a8451)

## <a class="anchor" id="MeshElements"></a>Elements

Mesh Elements are one of Cells, Faces, Edges, or Nodes.

To read or write the total number of each object, see the API function documentation for [getMeshSize](classansys_1_1_cff_base.xhtml#acaf3eef987d98a7af34c15b9b7954abc) and [setMeshSize](classansys_1_1_cff_base.xhtml#a259b65322ef0d42859d988166eed23d7).

The following are definitions are used when referring to Cells, Faces, and Nodes:

Mesh Dimension Cell Face Node 3D 3D (Tet, Pyramid, Wedge, Hex, Poly) 2D (Quad, Tri, Poly) 0D (that is, Point) 2D 2D (Quad, Tri, Poly) 1D (Edge) \* 0D (that is, Point) NoteThe types of Cell and Face will depend on dimension of the mesh.### <a class="anchor" id="MeshElememtType"></a>Element Types

There are many types of mesh element defined.

Cells types are defined as [ansys::CellType](group__typedefs.xhtml#ga2e99665f07441f706e8f9d41461844c1).

To read or write cell types, see [CffProvider::startReadingTypesForCells](classansys_1_1_cff_provider.xhtml#a8412293a2d419024be3e6a4a8aa58a97) and [CffConsumer::startWritingTypesForCells](classansys_1_1_cff_consumer.xhtml#ae40b4a5f63b1c57aaea793827eeffed1) and associated functions.

### <a class="anchor" id="MeshElementTopology"></a>Element Topology

Non polyhedral 3D elements must be defined using the following node orderings.

![](/sites/default/files/migrate-content/common_fluids_format_2024_r1/3DElementTopology.png)

### <a class="anchor" id="MeshNodes"></a>Nodes

Nodes are defined by coordinates. In a 3D mesh the number of coordinates per node is 3 and in a 2D mesh the number of coordinates is 2.

See alsoAPI functions [CffProvider::startReadingCoordinatesForNodes](classansys_1_1_cff_provider.xhtml#a27d53bed5408033d1847519f50054249) and [CffConsumer::startWritingCoordinatesForNodes](classansys_1_1_cff_consumer.xhtml#a0caf47b26c27b85aabc920428d0d1229)## <a class="anchor" id="MeshSize"></a>Mesh Size

The total number of each type of [Elements](_mesh_d_m.xhtml#MeshElements) (Cell, Face, Edge, and Node) is available in the [Data Model](_mesh_d_m.xhtml).

## <a class="anchor" id="MeshZone"></a>Zone

Zones are groupings of [Elements](_mesh_d_m.xhtml#MeshElements) of the same dimensionality. The way [Elements](_mesh_d_m.xhtml#MeshElements) are grouped into Zones is arbitrary. They may be grouped by a single [ansys::CellType](group__typedefs.xhtml#ga2e99665f07441f706e8f9d41461844c1) or may be grouped into a Zone of mixed type [ansys::CFF\_CELL\_TYPE\_MIXED](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a1eed460af26c972bc96e5f71e7d124ba).

There are four types of Zone available ([Cell Zones](_mesh_d_m.xhtml#CellZones), [Face Zones](_mesh_d_m.xhtml#FaceZones), [Edge Zones](_mesh_d_m.xhtml#EdgeZones) and [Node Zones](_mesh_d_m.xhtml#NodeZones)).

In both the [CFF Restart Data Model](_data_models_overview.xhtml#RestartDM) and [CFF Post Data Model](_data_models_overview.xhtml#PostDM) there may be multiple zones of each type, however it is important to understand how the [Zone Connectivity](_mesh_d_m.xhtml#MeshZoneConnectivity) differs.

### <a class="anchor" id="CellZones"></a>Cell Zones

The [Elements](_mesh_d_m.xhtml#MeshElements) are called Cells within a Cell Zone.

The Zone will have a type of [ansys::CFF\_CELL\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba62b22dd5125249182737df29d52bafbd).

The Cells defined within a Zone will depend on the [Mesh Dimensionality](_mesh_d_m.xhtml#MeshDim)

For a [Mesh Dimensionality](_mesh_d_m.xhtml#MeshDim) of 2 the Cells will be of one of the following types:

- [ansys::CFF\_CELL\_TYPE\_TRI](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a8a3384829eda9260c7124d1a38c0d4d4)
- [ansys::CFF\_CELL\_TYPE\_QUAD](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a2cfe72fc4a8e4bcb76ce66d83c29731d)
- [ansys::CFF\_CELL\_TYPE\_POLY](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a8fdc2669a6573bea93685b5c254501a3)
- [ansys::CFF\_CELL\_TYPE\_GHOST](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366ad370376762f10b110048f9b9a68ebe81) (in special circumstances)

For a [Mesh Dimensionality](_mesh_d_m.xhtml#MeshDim) of 3 the Cells will be of one of the following types:

- [ansys::CFF\_CELL\_TYPE\_TET](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a74e6e7dc814f4bba1306fb57abb298bc)
- [ansys::CFF\_CELL\_TYPE\_PYRAMID](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366aaf146e35ade74a8677fa3f518000ea86)
- [ansys::CFF\_CELL\_TYPE\_WEDGE](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a92936a31fa1ba3c57085ac1038a4a879)
- [ansys::CFF\_CELL\_TYPE\_HEX](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a4712808047ad4d1ac0406bac82cac19b)
- [ansys::CFF\_CELL\_TYPE\_POLY](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a8fdc2669a6573bea93685b5c254501a3)
- [ansys::CELL\_TYPE\_TET10](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a82d24e1e1d8038831c87210cad47a650) (in special circumstances)

### <a class="anchor" id="FaceZones"></a>Face Zones

The [Elements](_mesh_d_m.xhtml#MeshElements) are called Faces within a Face Zone.

The Zone will have a type of [ansys::CFF\_FACE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baa6aea3358b01fc54950d21d8af9c01a0)

For a [Mesh Dimensionality](_mesh_d_m.xhtml#MeshDim) of 2 the Faces will be of one of the following types:

- [ansys::CFF\_FACE\_TYPE\_LINEAR](group__enums.xhtml#gga32812d6a5501e53b26fd7200472de3feaca74db7501db7a17b3f0e8febdb3c38b)

For a [Mesh Dimensionality](_mesh_d_m.xhtml#MeshDim) of 3 the Faces will be of one of the following types:

- [ansys::CFF\_FACE\_TYPE\_TRI](group__enums.xhtml#gga32812d6a5501e53b26fd7200472de3fea855b38402da1d6d273345d8fa568738d)
- [ansys::CFF\_FACE\_TYPE\_QUAD](group__enums.xhtml#gga32812d6a5501e53b26fd7200472de3fea21316961f46dd008950f167f033851af)
- [ansys::CFF\_FACE\_TYPE\_POLY](group__enums.xhtml#gga32812d6a5501e53b26fd7200472de3feab80c355ee37c410b32eecc3567fb59c5)
- [ansys::CFF\_FACE\_TYPE\_TRI6](group__enums.xhtml#gga32812d6a5501e53b26fd7200472de3fea4bef0306455596f9497e93f04be95d02) (in special circumstances)

### <a class="anchor" id="EdgeZones"></a>Edge Zones

An Edge Zone will only available where the [Mesh Dimensionality](_mesh_d_m.xhtml#MeshDim) is 3.

The [Elements](_mesh_d_m.xhtml#MeshElements) are called Edges within a Edge Zone. The Edges may have either of the following typpes:

- [ansys::CFF\_EDGE\_TYPE\_LINEAR](group__enums.xhtml#gga1782918710d976acec410e7fcc95875fa94ea4db6da09419de8edd991c25528e3)
- [ansys::CFF\_EDGE\_TYPE\_LINEAR3](group__enums.xhtml#gga1782918710d976acec410e7fcc95875fa60d668d862348844a0dc85b7ae8fd463) (in special circumstances)

The Zone will have a type of [ansys::CFF\_EDGE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baf550346da426ab4fa297c5343dc2b81a)

### <a class="anchor" id="NodeZones"></a>Node Zones

The [Elements](_mesh_d_m.xhtml#MeshElements) are called Nodes within a Node Zone.

The Zone will have a type of [ansys::CFF\_NODE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba8ea3a3242fd587dc97ca2cf83dbf61d7)

## <a class="anchor" id="MeshZoneConnectivity"></a>Zone Connectivity

The Zone Connectivity describes how one [Zone](_mesh_d_m.xhtml#MeshZone) is related to another. A distinction exists between the [CFF Restart Data Model](_data_models_overview.xhtml#RestartDM) and [CFF Post Data Model](_data_models_overview.xhtml#PostDM).

### <a class="anchor" id="RestartDMZones"></a>Zone Connectivity within a Restart Data Model

The Nodes within a [Node Zones](_mesh_d_m.xhtml#NodeZones) in a [CFF Restart Data Model](_data_models_overview.xhtml#RestartDM) will be referenced from multiple [Cell Zones](_mesh_d_m.xhtml#CellZones) and/or [Face Zones](_mesh_d_m.xhtml#FaceZones). However, not all [Node Zones](_mesh_d_m.xhtml#NodeZones) will be necessarily be referened by all Cell or Face Zones.

In a [CFF Restart Data Model](_data_models_overview.xhtml#RestartDM) the [Face Zones](_mesh_d_m.xhtml#FaceZones) bound one or more [Cell Zones](_mesh_d_m.xhtml#CellZones). As any face within one such [Face Zones](_mesh_d_m.xhtml#FaceZones) within the [CFF Restart Data Model](_data_models_overview.xhtml#RestartDM) will have either one or two parent cells (C0 and/or C1), the face will share nodes with the cell.

See also[Cell Representaion](_mesh_d_m.xhtml#MeshCellDefinition)### <a class="anchor" id="PostDMZones"></a>Zone Connectivity within a Post Data Model

In the [CFF Post Data Model](_data_models_overview.xhtml#PostDM) each [Zone](_mesh_d_m.xhtml#MeshZone) is independent, by which we mean that no [Node](_mesh_d_m.xhtml#MeshNodes) will be referenced by more than one [Face Zone](_mesh_d_m.xhtml#FaceZones) or [Cell Zone](_mesh_d_m.xhtml#CellZones). This means that there must be a only one [Cell Zone](_mesh_d_m.xhtml#CellZones) or [Face Zone](_mesh_d_m.xhtml#FaceZones) associated with any [Node Zone](_mesh_d_m.xhtml#NodeZones).

See also[Cell Representaion](_mesh_d_m.xhtml#MeshCellDefinition)## <a class="anchor" id="MeshCellDefinition"></a>Cell Representaion

A cells definition describes how cells are represented within the [Ansys Common Fluids Mesh Data Model](_mesh_d_m.xhtml).

We use the following terminology to describe the representations of Cells: [Cell/Node Definition](_mesh_d_m.xhtml#CellNodeDefinition), [Face/Node Definition](_mesh_d_m.xhtml#FaceNodeDefinition) and [Poly/Face Definition](_mesh_d_m.xhtml#PolyFaceDefinition).

NoteWithin a [CFF Restart Data Model](_data_models_overview.xhtml#RestartDM), only [Cell/Node Definition](_mesh_d_m.xhtml#CellNodeDefinition) and [Face/Node Definition](_mesh_d_m.xhtml#FaceNodeDefinition) are valid.Within a [CFF Post Data Model](_data_models_overview.xhtml#PostDM), only [Cell/Node Definition](_mesh_d_m.xhtml#CellNodeDefinition) and [Poly/Face Definition](_mesh_d_m.xhtml#PolyFaceDefinition) are valid.Typically a specific [CFF Restart Data Model](_data_models_overview.xhtml#RestartDM) will only represent cells using one form of connectivity. This typically leads to the whole [Ansys Common Fluids Mesh Data Model](_mesh_d_m.xhtml) being thought of as having a single type of [Cell Representaion](_mesh_d_m.xhtml#MeshCellDefinition). However, it is best practice to determine how each [Cell Zones](_mesh_d_m.xhtml#CellZones) is represented by checking to see whether it has been represented with [Cell/Node Definition](_mesh_d_m.xhtml#CellNodeDefinition) by calling [ansys::CffProvider::startReadingNodesForCells](classansys_1_1_cff_provider.xhtml#a5bf1bb38de1d080b3ff320c435e41835 "Determine the cell zones for which nodes have been defined and prepare to read the nodes for those zo..."), which will return those [Cell Zones](_mesh_d_m.xhtml#CellZones) that have [Cell/Node Definition](_mesh_d_m.xhtml#CellNodeDefinition). If a [Cell Zones](_mesh_d_m.xhtml#CellZones) is not in this list it will be a [Face/Node Definition](_mesh_d_m.xhtml#FaceNodeDefinition) connectivity.

The same approach can be used with [CFF Post Data Model](_data_models_overview.xhtml#PostDM) but [Cell Zones](_mesh_d_m.xhtml#CellZones) which don't have [Cell/Node Definition](_mesh_d_m.xhtml#CellNodeDefinition) will instead have [Poly/Face Definition](_mesh_d_m.xhtml#PolyFaceDefinition).

### <a class="anchor" id="CellNodeDefinition"></a>Cell/Node Definition

A [Zone](_mesh_d_m.xhtml#MeshZone) with Cell/Node representation defines the connectivity of the Cells using nodes.

Each Cell is well-defined and is defined by a Node Count and an associated sequence of ordered Nodes. It is important to note that Cell/Node connectivity can never be used to represent Polyhedral cells because they are not well defined.

It is possible in a 3D case to represent the 4 basic cell types [CFF\_CELL\_TYPE\_TET](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a74e6e7dc814f4bba1306fb57abb298bc), [CFF\_CELL\_TYPE\_HEX](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a4712808047ad4d1ac0406bac82cac19b), [CFF\_CELL\_TYPE\_PYRAMID](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366aaf146e35ade74a8677fa3f518000ea86) and [CFF\_CELL\_TYPE\_WEDGE](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a92936a31fa1ba3c57085ac1038a4a879). But it is also possible to define a cell with the type [CELL\_TYPE\_TET10](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a82d24e1e1d8038831c87210cad47a650) in this manner.

In a 2D case it is possible to define cells of type [CFF\_CELL\_TYPE\_TRI](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a8a3384829eda9260c7124d1a38c0d4d4) and [CFF\_CELL\_TYPE\_QUAD](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a2cfe72fc4a8e4bcb76ce66d83c29731d) and in particular circumstances [CFF\_CELL\_TYPE\_GHOST](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366ad370376762f10b110048f9b9a68ebe81).

If you wish to represent a Polyhedral Cell it must be done using the [Face/Node Definition](_mesh_d_m.xhtml#FaceNodeDefinition) in a [CFF Restart Data Model](_data_models_overview.xhtml#RestartDM) or the [Poly/Face Definition](_mesh_d_m.xhtml#PolyFaceDefinition) in a [CFF Post Data Model](_data_models_overview.xhtml#PostDM).

#### <a class="anchor" id="CellNodeFaceZones"></a>Face Zones Definitions where Cell Zones define a Cell/Node Definition

When a [Cell Zone](_mesh_d_m.xhtml#CellZones) has been defined using [Cell/Node Definition](_mesh_d_m.xhtml#CellNodeDefinition) a [Face Zone](_mesh_d_m.xhtml#FaceZones) typically represents some or all of the bounding faces of the [Cell Zones](_mesh_d_m.xhtml#CellZones). Interior faces that don't take part in a meaningful bounding region need not be written to an extra [Face Zones](_mesh_d_m.xhtml#FaceZones) as is required by the [Face/Node Definition](_mesh_d_m.xhtml#FaceNodeDefinition) as the Cells are well defined. This can considerably reduce the number of Faces written to the model.

It should be noted that the way [Face Zones](_mesh_d_m.xhtml#FaceZones) are defined is (in general) identical to how they are represented within a [Face Zone Definitions](_mesh_d_m.xhtml#FaceNodeFaceZones). That is that each face within a [Face Zones](_mesh_d_m.xhtml#FaceZones) will be defined by a type, node count, node ids. Within a [CFF Restart Data Model](_data_models_overview.xhtml#RestartDM) parent cell information must always be provided, however, when writing to a [CFF Restart Data Model](_data_models_overview.xhtml#RestartDM) the parent cell information must be ommitted.

#### <a class="anchor" id="RestartDMFaceZonesCN"></a>Definiton within a Restart Data Model

Within a [CFF Restart Data Model](_data_models_overview.xhtml#RestartDM) [Face Zones](_mesh_d_m.xhtml#FaceZones) are defined in the same way as they are defined for a [Face Zone Definitions](_mesh_d_m.xhtml#FaceNodeFaceZones) and will include parent cell(s) references.

NoteIt is important to note that the node ids will be common in numbering with the parent cell.#### <a class="anchor" id="PostDMFaceZonesCN"></a>Definition within a Post Data Model

Within a [CFF Post Data Model](_data_models_overview.xhtml#PostDM) [Face Zones](_mesh_d_m.xhtml#FaceZones) are again defined in the same way as [Face Zone Definitions](_mesh_d_m.xhtml#FaceNodeFaceZones) but there will be no parent cells references (C0 and C1) data as the [Zones](_mesh_d_m.xhtml#MeshZone) will not share the same nodes as they must be defined using independent [Node Zones](_mesh_d_m.xhtml#NodeZones).

### <a class="anchor" id="FaceNodeDefinition"></a>Face/Node Definition

[Cell Zones](_mesh_d_m.xhtml#CellZones) that are defined with Face/Node definition require one or more [Face Zones](_mesh_d_m.xhtml#FaceZones) to be provided that define the each cells local faces. By this we mean that for a Tetrahedal cell for example all four faces that define the cell must be defined in at least one [Face Zone](_mesh_d_m.xhtml#FaceZones).

The faces defining the Cells Topology will contain parent cell reference information that uniquely identifies the face with one cell on side 0 and for interface faces a second cell on side 1. We refer to these faces as C0 and C1 respectively.

Note[Cell Zones](_mesh_d_m.xhtml#CellZones) in this form never provide nodes that define the topoogy of the Cell directly as is done for [Cell/Node Definition](_mesh_d_m.xhtml#CellNodeDefinition).The advantage of this way of defining the cells topology is that the Cell can be defined using an arbitrary number of faces, that is, this method can define polyhedral ([CFF\_CELL\_TYPE\_POLY](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a8fdc2669a6573bea93685b5c254501a3)) cells in addition to the other cell types already mentioned.

#### <a class="anchor" id="FaceNodeFaceZones"></a>Face Zone Definitions

As mentioned in [Face Zones Definitions where Cell Zones define a Cell/Node Definition](_mesh_d_m.xhtml#CellNodeFaceZones), the faces within a [Face Zone](_mesh_d_m.xhtml#FaceZones) are defined in the same manner as a [Face Zone](_mesh_d_m.xhtml#FaceZones) within a [Cell/Node Definition](_mesh_d_m.xhtml#CellNodeDefinition). It should be noted though that it is almost always essential to define at least one interior face zone (that is, zones with type [CFF\_FACE\_ZONE\_TYPE\_INTERIOR](group__enums.xhtml#gga13c2dd97c5e14c90a074a2c603ec2bc3a918616c49ea24c67e38e0403aedd99f5)) that contains the faces that are required to build the cells but do not take part in any bounding face zone.

### <a class="anchor" id="PolyFaceDefinition"></a>Poly/Face Definition

Within the [CFF Post Data Model](_data_models_overview.xhtml#PostDM) any [Cell Zones](_mesh_d_m.xhtml#CellZones) containing Polyhedral Cells must be defined using the Poly/Face definition.

Associated with any [Cell Zone](_mesh_d_m.xhtml#CellZones) defined in this way there will be a single [Face Zone](_mesh_d_m.xhtml#FaceZones). This can make reading and writing the faces easier and faster.

Cells within a [Cell Zone](_mesh_d_m.xhtml#CellZones) defined in this way are specificed using a face count and that number of face ids that can be found in the associated [Face Zone](_mesh_d_m.xhtml#FaceZones).

The associated Face Zone will be define each face using nodes found within a single associated [Node Zone](_mesh_d_m.xhtml#NodeZones).

### <a class="anchor" id="ConnectivityUsage"></a>Usage

Some solvers, such as Ansys Fluent, use the [Face/Node Definition](_mesh_d_m.xhtml#FaceNodeDefinition) and only store solution data on cells and faces. Others, such as Ansys CFX, use the [Cell/Node Definition](_mesh_d_m.xhtml#CellNodeDefinition) and only store solution data on vertices.

How the cell topologies are defined (and subsequently how they are written to a file and later read) will depend on which type of cells are to be used and the applications internal data model.

When writing a mesh you may also need to consider performance issues when writing the data to the [Data Model](_mesh_d_m.xhtml) and file or database that will store it.

Typical considerations that should be taken into account include:

- The dimensionality of the mesh - is it 2D or 3D?
- In the 3D case, are the cell types limited to types such as Tetrahedra, Pyramids, Wedges (Prisms), and Hexahedra or are Polyhedral cells required?
- In the 2D case, are the cell types limited to types such as Quads and Triangles or are Polygons also required?

The answers to these questions will often be found by answering the next question:

- Is it better to store the mesh as Cell/Node (where vertices are stored with the cells and faces) or Face/Node (where vertices are only stored with the face definitions)?

*There is no right or wrong answer to this question and it is possible to store both types of mesh within one file, however we recommend using only one type within a given file as it can simplify the read.*

However in general if the mesh will contain arbitrary polyhedral or polygonal cells then the Face/Node mesh variant is often more useful.

The writing of either type of mesh is the same bu different functions may need to be used, however when reading it is necessary to make queries of the mesh, to determine whether the cells have nodes or whether the cells need to be built from the faces that them.

Mesh Defintion Required Data for Cells Required Data For Faces Cell/Node Node Counts, Node Ids Node Counts, Node Ids, Cell Parent(s) Face/Node Type Type, Node Counts, Node Ids, Cell Parent(s) Poly/Face Type, Face Counts, Face Ids Type, Node Counts, Node Ids NoteRemember to robustly read data from a CFF source it is preferable to perform queries on the data using functions such as [CffProvider::startReadingNodesForCells](classansys_1_1_cff_provider.xhtml#a5bf1bb38de1d080b3ff320c435e41835) and CffProvider::startReadingFacesForCells to determine if the [CellZones](_mesh_d_m.xhtml#CellZones) is defined by nodes ([Cell/Node Definition](_mesh_d_m.xhtml#CellNodeDefinition)) or faces ([Face/Node Definition](_mesh_d_m.xhtml#FaceNodeDefinition) or [Poly/Face Definition](_mesh_d_m.xhtml#PolyFaceDefinition)).It is important to remember that within the [Data Models](_data_models_overview.xhtml), [API](_c_f_f_a_p_i.xhtml), and [File Formats](_file_formats_overview.xhtml) there may be restrictions on which type of mesh that you can write.