    

 ## On this page

  

 

 # Ansys Common Fluids Examples 

 Last update: 16.07.2025 

# <a class="anchor" id="ExamplesIntro"></a>Introduction

A number of examples are available to help with understanding how to use the CFF API.

C++ examples

- [Reading Case and Data Files using C++ API](_c_f_f_s_d_k_examples.xhtml#ImportExample)
- [Writing Case and Data Files using C++ API](_c_f_f_s_d_k_examples.xhtml#ExportExample)
- [Reading Settings Using C++ API](_c_f_f_s_d_k_examples.xhtml#SettingImportExample)
- [Reading Discrete Phase Model (DPM) Particle Data Using C++ API](_c_f_f_s_d_k_examples.xhtml#Particles)

C examples

- [Reading a CFF file Using C API](_c_f_f_s_d_k_examples.xhtml#CImportExample)
- [Writing a CFF File Using C API](_c_f_f_s_d_k_examples.xhtml#CExportExample)

## <a class="anchor" id="BuildInstructions"></a>Instructions to Build Examples

- Copy the code and save it as test.cpp or test.c.
- Set the CFF\_SDK\_PATH environment variable to the path of the CFF-SDK directory.
- **On Linux**: To build using the gcc/g++ compiler:
    - For C++ source code, use the following command: &gt;&gt; g++ -o test.exe -O3 -Wall -Wuninitialized -Wunused -Wconversion -fpermissive -Wl,--export-dynamic -DNDEBUG=1 -D_GLIBCXX_USE_CXX11_ABI=1 -D_linx64 -lstdc++ -ldl -I${CFF_SDK_PATH}/include -I/${CFF_SDK_PATH}/example -L${CFF_SDK_PATH}/lib/linx64 -lansysfluidscffinterface -lansysfluidsfactory test.cpp
    - For C source code, use the following command: &gt;&gt; gcc -o test.exe -O3 -Wall -Wuninitialized -Wunused -Wconversion -Wl,--export-dynamic -DNDEBUG=1 -D_GLIBCXX_USE_CXX11_ABI=1 -D_linx64 -lstdc++ -ldl -I${CFF_SDK_PATH}/include -I/${CFF_SDK_PATH}/example -L${CFF_SDK_PATH}/lib/linx64 -lansysfluidscffinterface -lansysfluidsfactory test.c
- **On Windows**: To build using the MSVC compiler:
    - For C++ source code, use the following command: &gt;&gt; cl test.cpp /Fo:test.obj /TP /nologo /Za /EHsc /W3 /MD /O2 /DNDEBUG=1 /D_NT=1 /D_WIN64=1 /I. /I%CFF_SDK_PATH%\include /I%CFF_SDK_PATH%\example /link /nologo /OUT:test.exe /LIBPATH:%CFF_SDK_PATH%\lib\winx64 ansysfluidscffinterface.lib ansysfluidsfactory.lib
    - For C source code, use the following command: &gt;&gt; cl test.c /Fo:test.obj /TC /nologo /Za /EHsc /W3 /MD /O2 /DNDEBUG=1 /D_NT=1 /D_WIN64=1 /I. /I%CFF_SDK_PATH%\include /I%CFF_SDK_PATH%\example /link /nologo /OUT:test.exe /LIBPATH:%CFF_SDK_PATH%\lib\winx64 ansysfluidscffinterface.lib ansysfluidsfactory.lib
- Set the following environment variables to ensure proper loading of dynamically-linked libraries before executing the program:
    - On Linux: `LD_LIBRARY_PATH=${CFF_SDK_PATH}/lib/linx64`
    - On Windows: `PATH=%CFF_SDK_PATH%\lib\winx64;%PATH%`

## <a class="anchor" id="ImportExample"></a>Reading Case and Data Files using C++ API

This example demonstrates how to use the CFF I/O SDK to read case and results files. To use it, you must provide the CFF case and data files on the command line. The following source code can be built using [Instructions to Build Examples](_c_f_f_s_d_k_examples.xhtml#BuildInstructions).

Run the following command to read the case file using the `Zone` method:

&gt;&gt; ./test.exe -O z -c &lt;caseFileName&gt;



 For more information, display the help menu by running the following command:

&gt;&gt; ./test.exe -h



**read\_example.cpp**

/\*

 \* Copyright 2025 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.

 \*/

 

\#include "CffInterface/printVersion.hpp"

\#include "Factory/providers.hpp"

 

\#include &lt;algorithm&gt;

\#include &lt;numeric&gt;

 

\#include "hdf/Common/Output.hpp"

\#include "hdf/Common/Utilities.hpp"

 

\#include "hdf/Import/ReadByElement.hpp"

\#include "hdf/Import/ReadByZoneRange.hpp"

\#include "hdf/Import/ReadByZone.hpp"

 

void

showHelp(const std::string&amp; arg0)

{

 std::string prog(arg0);

 size\_t pos = prog.find_last_of("/\\\\");

 std::string exec = pos == std::string::npos ? prog : prog.substr(pos+1);

 std::cout &lt;&lt; "Usage: " &lt;&lt; exec &lt;&lt; " \[-h\] \[-H\]"

 &lt;&lt; std::endl

 &lt;&lt; " \[-c &lt;cas-file&gt;\] \[-d &lt;dat-file&gt;\]"

 &lt;&lt; std::endl

 &lt;&lt; " \[-q\] "

 &lt;&lt; std::endl

 &lt;&lt; " \[-O &lt;method&gt;\] \[-m &lt;mesh&gt;\] \[-t &lt;target&gt;\]"

 &lt;&lt; std::endl

 &lt;&lt; " -h or -H Show this message."

 &lt;&lt; std::endl;

 std::cout &lt;&lt; " -c &lt;cas-file&gt; Specify the cas file from which to read data."

 &lt;&lt; std::endl

 &lt;&lt; " If -c and -d options are missing 'elbow.cas.h5' will be used."

 &lt;&lt; std::endl;

 std::cout &lt;&lt; " -d &lt;dat-file&gt; Specify the dat file from which to read data."

 &lt;&lt; std::endl

 &lt;&lt; " If -c and -d options are missing 'elbow.dat.h5' will be used."

 &lt;&lt; std::endl;

 std::cout &lt;&lt; " -q Query the available meshes and targets."

 &lt;&lt; std::endl;

 std::cout &lt;&lt; " -O &lt;method&gt; Specifies the method for reading heavy weight data for each zone"

 &lt;&lt; std::endl

 &lt;&lt; " &lt;method&gt; must be either:"

 &lt;&lt; std::endl

 &lt;&lt; " 'E' - read all data element by element."

 &lt;&lt; std::endl

 &lt;&lt; " 'R' - read all data using zone element range."

 &lt;&lt; std::endl

 &lt;&lt; " 'Z' - read all data by zone \[Default\]."

 &lt;&lt; std::endl;

 std::cout &lt;&lt; " -m &lt;mesh&gt; Specifies the mesh with id &lt;mesh&gt; from which to read data."

 &lt;&lt; std::endl;

 std::cout &lt;&lt; " -t &lt;target&gt; Specified the target from which to read data."

 &lt;&lt; std::endl

 &lt;&lt; " &lt;target&gt; must be either:"

 &lt;&lt; std::endl

 &lt;&lt; " 'restart'"

 &lt;&lt; std::endl

 &lt;&lt; " 'post'"

 &lt;&lt; std::endl

 &lt;&lt; std::endl;

}

 

bool

reportErrors([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)* reader, const std::string&amp; eTitle = "")

{

 bool isOk = true;

 if (reader) {

 const auto&amp; errors = reader-&gt;[getErrors](classansys_1_1_cff_base.xhtml#a4ad1f2f007e8a575da4935bbc136ee1a)(false, true);

 if (!errors.empty()) {

 if (!eTitle.empty()) {

 std::cerr &lt;&lt; eTitle &lt;&lt; std::endl;

 }

 for (const auto&amp; e: errors) {

 std::cerr &lt;&lt; " " &lt;&lt; e &lt;&lt; std::endl;

 }

 isOk = false;

 }

 }

 return isOk;

}

 

void

reportWarnings([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)* reader)

{

 if (reader) {

 const auto&amp; warnings = reader-&gt;[getWarnings](classansys_1_1_cff_base.xhtml#ac9b6a55b76b04124c6e0ce8670b27cdf)(false, true);

 if (!warnings.empty()) {

 for (const auto&amp; w: warnings) {

 std::cerr &lt;&lt; w &lt;&lt; std::endl;

 }

 }

 }

}

 

int

main(int argc, char* argv[])

{

 [ansys::printSDKVersion](namespaceansys.xhtml#aa9b8e96c9c3dd83f83d9a40d9721f6a1)();

 

 std::string casFileName;

 std::string datFileName;

 [ansys::MeshIdType](group__typedefs.xhtml#ga9a6c5565b81f965277b48f14355a38ae) meshId = -1;

 [ansys::TargetCategory](group__enums.xhtml#ga2bf8717ca5a1d17190dddf5faf6efa5d) targetCategory = [CFF\_RESTART](group__enums.xhtml#gga2bf8717ca5a1d17190dddf5faf6efa5da5324f9d08717edd9de8d717f9e3d1aa9);

 [ansys::PartitionIdType](group__typedefs.xhtml#gaa0b01fb68d68067022164a7fcb5cb0e5) partitionId = -1;

 bool queryContents = false;

 

 enum class HeavyweightReadMethod { Element, Range, Zone };

 

 HeavyweightReadMethod heavyReadMethod = HeavyweightReadMethod::Element;

 

 if (argc &lt; 2) {

 showHelp(argv[0]);

 exit(0);

 }

 

 for (int n = 1; n != argc; ++n) {

 std::string argValue(argv[n]);

 if (argValue == "-h" || argValue == "-H") {

 showHelp(argv[0]);

 exit(0);

 } else if (argValue == "-q") {

 queryContents = true;

 } else if (argValue == "-c") {

 ++n;

 casFileName = std::string(argv[n]);

 }

 else if (argValue == "-d") {

 ++n;

 datFileName = std::string(argv[n]);

 }

 else if (argValue == "-m") {

 ++n;

 meshId = std::stoi(argv[n]);

 }

 else if (argValue == "-t") {

 ++n;

 std::string target(argv[n]);

 if (target == "restart") {

 targetCategory = [CFF\_RESTART](group__enums.xhtml#gga2bf8717ca5a1d17190dddf5faf6efa5da5324f9d08717edd9de8d717f9e3d1aa9);

 } else if (target == "post") {

 targetCategory = [CFF\_POST](group__enums.xhtml#gga2bf8717ca5a1d17190dddf5faf6efa5da38a97e162e222eea5d33e95b5abed325);

 } else if (target == "partitioned") {

 targetCategory = [CFF\_PARTITIONED\_POST](group__enums.xhtml#gga2bf8717ca5a1d17190dddf5faf6efa5da2ef818bf7baa7f1964722c18fe44e145);

 }

 }

 else if (argValue == "-p") {

 ++n;

 partitionId = std::stoi(argv[n]);

 }

 else if (argValue == "-O") {

 ++n;

 char option = argv[n][0];

 if (option == 'E') {

 heavyReadMethod = HeavyweightReadMethod::Element;

 } else if (option == 'R') {

 heavyReadMethod = HeavyweightReadMethod::Range;

 } else if (option == 'Z') {

 heavyReadMethod = HeavyweightReadMethod::Zone;

 }

 }

 }

 

 // Fallback

 if (casFileName.empty() &amp;&amp; datFileName.empty()) {

 casFileName = "elbow.cas.h5";

 datFileName = "elbow.dat.h5"; 

 }

 

 if (queryContents &amp;&amp; casFileName.empty()) {

 std::cerr &lt;&lt; "Unable to query contents without a case file" &lt;&lt; std::endl;

 exit(1);

 }

 

 std::unique_ptr&lt;ansys::CffFileProvider&gt; readerPtr;

 if (!casFileName.empty()) {

 readerPtr.reset([ansys::getDataProvider](namespaceansys.xhtml#a2f23564ea3eec12f9b204a64356e88c1)(casFileName));

 } else if (!datFileName.empty()) {

 readerPtr.reset([ansys::getDataProvider](namespaceansys.xhtml#a2f23564ea3eec12f9b204a64356e88c1)(datFileName));

 }

 if(!readerPtr) {

 std::cerr &lt;&lt; "Error creating provider for file" &lt;&lt; std::endl;

 return 1;

 }

 [ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader = *readerPtr;

 

 if (queryContents) {

 if (!readerPtr-&gt;startReading(casFileName, [ansys::DataClass::CFF\_CASE](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddba6c8b8209348df38321689fb67cd4b331))) {

 reportErrors(readerPtr.get(), "Error reading case file");

 return 1;

 }

 reportWarnings(readerPtr.get());

 

 DisplayMeshAndTargets(readerPtr.get());

 exit(0);

 }

 

 // Set Mesh Id

 if (meshId != -1) {

 reader.[setMeshId](classansys_1_1_cff_base.xhtml#a7a12ef6589a193f80be541291b0cec4b)(meshId);

 }

 // Set Target

 reader.[setTarget](classansys_1_1_cff_base.xhtml#a8f9c0f2adda371644dfe678da1bdd9a2)(targetCategory);

 // Set Partition Id

 if (partitionId != -1) {

 reader.[setPartitionId](classansys_1_1_cff_base.xhtml#acd0f72767680be525a7445e07fb3b9ba)(partitionId);

 }

 

 // Using default built-in options: debug=false, NCI=false, meshId=-1 (automatic), target = CFF\_RESTART

 //to switch to other format, need to setTarget to correct one.

 if (!casFileName.empty()) {

 if (!readerPtr-&gt;startReading(casFileName, [ansys::DataClass::CFF\_CASE](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddba6c8b8209348df38321689fb67cd4b331))) {

 reportErrors(readerPtr.get(), "Error reading case file");

 return 1;

 }

 reportWarnings(readerPtr.get());

 

 DisplayInfoForCase(readerPtr.get()); 

 DisplayInfoForMesh(readerPtr.get());

 

 DisplayInfoForNodeZones(readerPtr.get());

 

 if (heavyReadMethod == HeavyweightReadMethod::Element) {

 ReadNodeCoordinatesByElement(reader);

 } else if (heavyReadMethod == HeavyweightReadMethod::Range) {

 ReadNodeCoordinatesByZoneRange(reader);

 } else {

 ReadNodeCoordinatesByZone(reader);

 }

 

 // read edge related information

 DisplayInfoForEdgeZones(readerPtr.get());

 if (heavyReadMethod == HeavyweightReadMethod::Element) {

 ReadEdgeNodesByElement(reader);

 } else if (heavyReadMethod == HeavyweightReadMethod::Range) {

 ReadEdgeNodesByZoneRange(reader);

 } else {

 ReadEdgeNodesByZone(reader);

 }

 

 // read face related information

 DisplayInfoForFaceZones(readerPtr.get());

 

 if (heavyReadMethod == HeavyweightReadMethod::Element) {

 ReadFaceNodesByElement(reader);

 ReadFaceCellParentsByElement(reader, 0);

 ReadFaceCellParentsByElement(reader, 1);

 } else if (heavyReadMethod == HeavyweightReadMethod::Range) {

 ReadFaceNodesByZoneRange(reader);

 ReadFaceCellParentsByZoneRange(reader, 0);

 ReadFaceCellParentsByZoneRange(reader, 1);

 } else {

 ReadFaceNodesByZone(reader);

 ReadFaceCellParentsByZone(reader, 0);

 ReadFaceCellParentsByZone(reader, 1);

 }

 

 // read cell related information

 DisplayInfoForCellZones(readerPtr.get());

 if (heavyReadMethod == HeavyweightReadMethod::Element) {

 ReadCellTypesByElement(reader);

 ReadCellNodesByElement(reader);

 ReadCellPartitionsByElement(reader);

 ReadCellFacesByElement(reader);

 } else if (heavyReadMethod == HeavyweightReadMethod::Range) {

 ReadCellTypesByZoneRange(reader);

 ReadCellNodesByZoneRange(reader);

 ReadCellPartitionsByZoneRange(reader);

 ReadCellFacesByZoneRange(reader);

 } else {

 ReadCellTypesByZone(reader);

 ReadCellNodesByZone(reader);

 ReadCellPartitionsByZone(reader);

 ReadCellFacesByZone(reader);

 }

 }

 

 // data-file

 if (!datFileName.empty()) {

 if (!readerPtr-&gt;startReading(datFileName, [ansys::DataClass::CFF\_RESULTS](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddbaacfdbe512195015b6446480e80caf4a4))) {

 reportErrors(readerPtr.get(), "Error reading data file");

 return 1;

 }

 reportWarnings(readerPtr.get());

 if (heavyReadMethod == HeavyweightReadMethod::Element) {

 ReadVariablesByElement(reader);

 } else if (heavyReadMethod == HeavyweightReadMethod::Range) {

 ReadVariablesByZoneRange(reader);

 } else {

 ReadVariablesByZone(reader);

 }

 }

 std::cout &lt;&lt; std::endl &lt;&lt; "All done." &lt;&lt; std::endl;

 

 return 0;

}

[ansys::CffBase::getErrors](classansys_1_1_cff_base.xhtml#a4ad1f2f007e8a575da4935bbc136ee1a)

std::vector&lt; std::string &gt; getErrors(bool formated=true, bool clear=false) const

returns, as strings, any unprocessed error messages registered

**Definition:** CffBaseMethods.cpp:1926



[ansys::CffBase::setMeshId](classansys_1_1_cff_base.xhtml#a7a12ef6589a193f80be541291b0cec4b)

void setMeshId(const MeshIdType meshId)

Set the Identifier for active mesh being read or written.

**Definition:** CffBaseMethods.cpp:364



[ansys::CffBase::setTarget](classansys_1_1_cff_base.xhtml#a8f9c0f2adda371644dfe678da1bdd9a2)

void setTarget(const TargetCategory target)

Set the target category for which the data is intended.

**Definition:** CffBaseMethods.cpp:402



[ansys::CffBase::getWarnings](classansys_1_1_cff_base.xhtml#ac9b6a55b76b04124c6e0ce8670b27cdf)

std::vector&lt; std::string &gt; getWarnings(bool formated=true, bool clear=false) const

returns, as strings, any unprocessed warning messages registered

**Definition:** CffBaseMethods.cpp:1942



[ansys::CffBase::setPartitionId](classansys_1_1_cff_base.xhtml#acd0f72767680be525a7445e07fb3b9ba)

void setPartitionId(const PartitionIdType pId)

**Definition:** CffBaseMethods.cpp:431



[ansys::CffProvider](classansys_1_1_cff_provider.xhtml)

Class that provides functions to access data stored within a CFF database. The database may be stored...

**Definition:** CffProvider.hpp:21



[CffTargetCategory](group__enums.xhtml#ga2bf8717ca5a1d17190dddf5faf6efa5d)

CffTargetCategory

An enumeration that represents the target models available within a CFF database.

**Definition:** CffTypes.h:109



[CFF\_PARTITIONED\_POST](group__enums.xhtml#gga2bf8717ca5a1d17190dddf5faf6efa5da2ef818bf7baa7f1964722c18fe44e145)

@ CFF_PARTITIONED_POST

Partitioned Post model.

**Definition:** CffTypes.h:165



[CFF\_POST](group__enums.xhtml#gga2bf8717ca5a1d17190dddf5faf6efa5da38a97e162e222eea5d33e95b5abed325)

@ CFF_POST

CFF Post model.

**Definition:** CffTypes.h:159



[CFF\_RESTART](group__enums.xhtml#gga2bf8717ca5a1d17190dddf5faf6efa5da5324f9d08717edd9de8d717f9e3d1aa9)

@ CFF_RESTART

CFF Restart model.

**Definition:** CffTypes.h:138



[CFF\_CASE](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddba6c8b8209348df38321689fb67cd4b331)

@ CFF_CASE

**Definition:** CffTypes.h:419



[CFF\_RESULTS](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddbaacfdbe512195015b6446480e80caf4a4)

@ CFF_RESULTS

**Definition:** CffTypes.h:421



[ansys::MeshIdType](group__typedefs.xhtml#ga9a6c5565b81f965277b48f14355a38ae)

CffMeshIdType MeshIdType

Alias for CffMeshIdType ('C++' API only)

**Definition:** Types.hpp:26



[ansys::PartitionIdType](group__typedefs.xhtml#gaa0b01fb68d68067022164a7fcb5cb0e5)

CffPartitionIdType PartitionIdType

Alias for CffPartitionIdType ('C++' API only)

**Definition:** Types.hpp:31



[ansys::getDataProvider](namespaceansys.xhtml#a2f23564ea3eec12f9b204a64356e88c1)

ANSYS_FLUIDS_FACTORY_DLL CffFileProvider * getDataProvider(const std::string &amp;sourceFile)

A function that provides that obtains an instance of an ansys::CffFileProvider that can be used to re...

**Definition:** providers.cpp:105



[ansys::printSDKVersion](namespaceansys.xhtml#aa9b8e96c9c3dd83f83d9a40d9721f6a1)

void ANSYS_FLUIDS_CFFINTERFACE_DLL printSDKVersion()

Writes the ANSYS CFF SDK version message to cout.

**Definition:** printVersion.cpp:69





We recommend using the option to read data by zone. The functions that do this are in the following file:

**ReadByZone.hpp** (This can be found at example/hdf/Import/ReadByZone.hpp in the CFF-SDK directory.)

/\*

 \* Copyright 2025 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.

 \*/

 

void

ReadNodeCoordinatesByZone([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 

 // get which node-zones have coordinate information

 reader.[startReadingCoordinatesForNodes](classansys_1_1_cff_provider.xhtml#a27d53bed5408033d1847519f50054249)(zoneIds);

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Coordinates of node-zones", zoneIds);

 std::cout &lt;&lt; std::endl;

 

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) dimension = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_DIMENSION](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ac797bdd0c993d968d38f0c35b496d207), dimension);

 

 // allocate memory to store coordinates of all the nodes of this zone,

 std::vector&lt;double&gt; coords(numElems * dimension);

 reader.

 getCoordinatesForNodesInZone(zoneIds[iz], coords.data(), coords.size());

 std::cout &lt;&lt; "Coordinates of zone-" &lt;&lt; zoneIds[iz] &lt;&lt; " is read into a "

 &lt;&lt; numElems &lt;&lt; " x " &lt;&lt; dimension &lt;&lt; " buffer." &lt;&lt; std::endl;

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingCoordinatesForNodes](classansys_1_1_cff_provider.xhtml#a711c179a961fce56dbab38bc71e124ab)();

}

 

void

ReadEdgeNodesByZone([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 reader.[startReadingNodesForEdges](classansys_1_1_cff_provider.xhtml#a552888288a8edbb2d73d64c38dc9d7a4)(zoneIds);

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Edge-nodes of edge-zones", zoneIds);

 std::cout &lt;&lt; std::endl;

 

 reader.[startReadingNodeCountsForEdges](classansys_1_1_cff_provider.xhtml#ab45e4776d4e5234a3141c7aa8d578604)();

 std::vector&lt;size_t&gt; zaenc(zoneIds.size());

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 // allocate the memory to store all the node counts for each edge

 std::vector&lt;short&gt; enc(numElems);

 reader.[getNodeCountsForEdgesInZone](classansys_1_1_cff_provider.xhtml#a4bc64d129c65fe6c38b9580fe56859f4)(zoneIds[iz], enc.data(), numElems);

 std::cout &lt;&lt; "Edge-node-counts of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; enc.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 zaenc[iz] = std::accumulate(enc.begin(), enc.end(), 0);

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingNodeCountsForEdges](classansys_1_1_cff_provider.xhtml#a315a4ee6d663824925bd3659a2f5948a)();

 

 reader.[startReadingNodeIdsForEdges](classansys_1_1_cff_provider.xhtml#afdc57f3b7434feb115641d4ef564517c)();

 if (zoneIds.empty()) {

 return;

 }

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 if (0 == zaenc[iz]) {

 continue;

 }

 // allocate the memory to store the nodes of all edges of this zone

 std::vector&lt;ansys::ElemIdType&gt; enid(zaenc[iz]);

 reader.[getNodeIdsForEdgesInZone](classansys_1_1_cff_provider.xhtml#a67d01cbdf8d63d0b835a63eeb9239d8c)(zoneIds[iz], enid.data(), enid.size());

 std::cout &lt;&lt; "Edge-node-ids of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; enid.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingNodeIdsForEdges](classansys_1_1_cff_provider.xhtml#a6eee27f05f46065b0d6fffc47996446e)();

 reader.[endReadingNodesForEdges](classansys_1_1_cff_provider.xhtml#a4aefe599fb5075dad1456b522a77870d)();

}

 

void

ReadFaceNodesByZone([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 reader.[startReadingNodesForFaces](classansys_1_1_cff_provider.xhtml#a398329d63a76748e94252a5aed723ea0)(zoneIds);

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Face-nodes of face-zones", zoneIds);

 std::cout &lt;&lt; std::endl;

 

 reader.[startReadingNodeCountsForFaces](classansys_1_1_cff_provider.xhtml#aa07af19ed77b75267720278d924989fb)();

 std::vector&lt;size_t&gt; zafnc(zoneIds.size());

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 short unc = 0;

 if (reader.[hasUniformNodeCountForFacesInZone](classansys_1_1_cff_provider.xhtml#a00a4cc0096694a30f4ffc319486fed4c)(zoneIds[iz], &amp;unc)) {

 std::cout &lt;&lt; "Faces in zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " have a uniform face-node-count." &lt;&lt; std::endl;

 zafnc[iz] = numElems * unc;

 } else {

 // allocate memory to store node counts for all face in zone

 std::vector&lt;short&gt; fnc(numElems);

 reader.[getNodeCountsForFacesInZone](classansys_1_1_cff_provider.xhtml#a7077cfee35d2812e54469e76950f1892)(zoneIds[iz], fnc.data(), numElems);

 std::cout &lt;&lt; "Face-node-counts of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; fnc.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 zafnc[iz] = std::accumulate(fnc.begin(), fnc.end(), 0);

 }

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingNodeCountsForFaces](classansys_1_1_cff_provider.xhtml#a2145183affbf311349cba44c61497089)();

 

 reader.[startReadingNodeIdsForFaces](classansys_1_1_cff_provider.xhtml#a5ca9bd2cb8fdfd76b02faabc7b6bb09d)();

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 if (0 == zafnc[iz]) {

 continue;

 }

 // allocate the memory to store the nodes of all faces of this zone

 std::vector&lt;ansys::ElemIdType&gt; fnid(zafnc[iz]);

 reader.[getNodeIdsForFacesInZone](classansys_1_1_cff_provider.xhtml#ad53955720f00f23984a40272225bdfea)(zoneIds[iz], &amp;fnid.at(0), fnid.size());

 std::cout &lt;&lt; "Face-node-ids of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; fnid.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingNodeIdsForFaces](classansys_1_1_cff_provider.xhtml#aec4659c0936ed0dbecf4047140411790)();

 reader.[endReadingNodesForFaces](classansys_1_1_cff_provider.xhtml#a0c5a426a9ac6d5348206222a72570eac)();

}

 

void

ReadFaceCellParentsByZone([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader, int side)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 if (side==0) {

 reader.[startReadingCell0sForFaces](classansys_1_1_cff_provider.xhtml#ad66e04a3e7c0016df0722f19bc199dd3)(zoneIds);

 } else {

 reader.[startReadingCell1sForFaces](classansys_1_1_cff_provider.xhtml#ae845f23ea32051d1e880cd9ce70c50de)(zoneIds);

 }

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Cell-" + std::to_string(side) + " of face-zones",

 zoneIds);

 std::cout &lt;&lt; std::endl;

 

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 // allocate the space required to read all parent cells for this face zone

 std::vector&lt;ansys::ElemIdType&gt; fc(numElems);

 if (side==0) {

 reader.[getCell0sForFacesInZone](classansys_1_1_cff_provider.xhtml#a714cc6a00764a3ae2a0a0dda6ae5f63e)(zoneIds[iz], fc.data(), numElems);

 } else {

 reader.[getCell1sForFacesInZone](classansys_1_1_cff_provider.xhtml#af4ded8ab6c5051d04b5c2142bc346048)(zoneIds[iz], fc.data(), numElems);

 }

 std::cout &lt;&lt; "Face-cell" &lt;&lt; side &lt;&lt; "-connectivity of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; fc.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 }

 std::cout &lt;&lt; std::endl;

 if (side==0) {

 reader.[endReadingCell0sForFaces](classansys_1_1_cff_provider.xhtml#a7ecbb5f8ffaac915d9008653ce29d98f)();

 } else {

 reader.[endReadingCell1sForFaces](classansys_1_1_cff_provider.xhtml#ad22d107258d88a354c443e822507830b)();

 }

}

 

void

ReadCellTypesByZone([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 // find which cell-zones have this information

 reader.[startReadingTypesForCells](classansys_1_1_cff_provider.xhtml#a8412293a2d419024be3e6a4a8aa58a97)(zoneIds);

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Cell-types of cell-zones", zoneIds);

 

 // a cell-zone can have uniform cell type (not poly);

 // then, no need to read types of each cells in that zone one-by-one

 std::vector&lt;ansys::CellType&gt; zct(zoneIds.size(), [CFF\_CELL\_TYPE\_MIXED](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a1eed460af26c972bc96e5f71e7d124ba));

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 // check if uniform cell-type; the type is returned in "cellType";

 // if not-uniform, cellType shall have garbage value

 [ansys::CellType](group__enums.xhtml#gac0b3f753b9307362895e46aaa1a9f366) cellType = [CFF\_CELL\_TYPE\_MIXED](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a1eed460af26c972bc96e5f71e7d124ba);

 if (reader.[hasUniformTypeForCellsInZone](classansys_1_1_cff_provider.xhtml#add3567ba1ab18fdc09a22af4c10cd665)(zoneIds[iz], &amp;cellType)) {

 zct[iz] = cellType;

 }

 }

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 std::cout &lt;&lt; "Cell-type ids of zone-" &lt;&lt; zoneIds[iz] &lt;&lt; " is ";

 if ([CFF\_CELL\_TYPE\_MIXED](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a1eed460af26c972bc96e5f71e7d124ba) != zct[iz]) {

 std::cout &lt;&lt; "uniform (" &lt;&lt; static\_cast&lt;short&gt;(zct[iz]) &lt;&lt; ")." &lt;&lt; std::endl;

 continue;

 }

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 // allocate memory to store the cell types for all cells in zone

 std::vector&lt;ansys::CellType&gt; ct(numElems);

 std::cout &lt;&lt; "read into a " &lt;&lt; ct.size() &lt;&lt; " x 1 buffer." &lt;&lt; std::endl;

 reader.[getTypesForCellsInZone](classansys_1_1_cff_provider.xhtml#abc15dfffc53c4b1dd17d238771a79d38)(zoneIds[iz], ct.data(), numElems);

 }

 

 std::cout &lt;&lt; std::endl;

 reader.[endReadingTypesForCells](classansys_1_1_cff_provider.xhtml#a95896b1f785ae80b4e6f661456168fed)();

}

 

void

ReadCellNodesByZone([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 reader.[startReadingNodesForCells](classansys_1_1_cff_provider.xhtml#a5bf1bb38de1d080b3ff320c435e41835)(zoneIds);

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Cell-nodes of cell-zones", zoneIds);

 std::cout &lt;&lt; std::endl;

 

 reader.[startReadingNodeCountsForCells](classansys_1_1_cff_provider.xhtml#a1413cc9bb5438d81293b0d9d01c41220)();

 std::vector&lt;size_t&gt; zacnc(zoneIds.size());

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 short unc = 0;

 if (reader.[hasUniformNodeCountForCellsInZone](classansys_1_1_cff_provider.xhtml#ae6fccf5ab31d1e02b633ddd515126170)(zoneIds[iz], &amp;unc)) {

 std::cout &lt;&lt; "Cells in zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " have a uniform cell-node-count." &lt;&lt; std::endl;

 zacnc[iz] = numElems * unc;

 } else {

 // allocate memory, to store all node counts for cells in this zone

 std::vector&lt;short&gt; cnc(numElems);

 reader.[getNodeCountsForCellsInZone](classansys_1_1_cff_provider.xhtml#ad311547b4c630382a4f6aaba98b7c74f)(zoneIds[iz], cnc.data(), numElems);

 std::cout &lt;&lt; "Cell-node-counts of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; cnc.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 zacnc[iz] = std::accumulate(cnc.begin(), cnc.end(), 0);

 }

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingNodeCountsForCells](classansys_1_1_cff_provider.xhtml#acd5e16e4c4783d56d27635cdc01ebc69)();

 

 reader.[startReadingNodeIdsForCells](classansys_1_1_cff_provider.xhtml#a0ea4768347c60c616af6c03f8504cdb1)();

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 if (0 == zacnc[iz]) {

 continue;

 }

 // allocate the memory to store the nodes of all cells of this zone

 std::vector&lt;ansys::ElemIdType&gt; cnid(zacnc[iz]);

 reader.[getNodeIdsForCellsInZone](classansys_1_1_cff_provider.xhtml#a8e4507e898b237193f1565b1d2147ae1)(zoneIds[iz], &amp;cnid.at(0), cnid.size());

 std::cout &lt;&lt; "Cell-node-ids of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; cnid.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingNodeIdsForCells](classansys_1_1_cff_provider.xhtml#aaaf7294d55c98855c024ba53a950e5a9)();

 reader.[endReadingNodesForCells](classansys_1_1_cff_provider.xhtml#ac3305957b72a077605e33b3e8841eac5)();

}

 

void

ReadCellPartitionsByZone([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 // find which cell-zones have this information

 reader.[startReadingPartitionIdsForCells](classansys_1_1_cff_provider.xhtml#ada00abc25e7f9b4e4a9464cfa4ca1b92)(zoneIds);

 if (zoneIds.empty()) {

 return;

 }

 // store number of partitions of all zones;

 // (this will be same for ANSYS Fluent across zones)

 std::vector&lt;int&gt; znp(zoneIds.size(), 1);

 // to store the cell-partition

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 znp[iz] = reader.[getPartitionCountForZone](classansys_1_1_cff_provider.xhtml#a83a1e0c28c1e11a9797316e1d23efa52)(zoneIds[iz]);

 }

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 std::cout &lt;&lt; "Cell-partition ids of zone-" &lt;&lt; zoneIds[iz] &lt;&lt; " is ";

 if (znp[iz] &lt; 2) {

 std::cout &lt;&lt; "not read as partition-count is " &lt;&lt; znp[iz] &lt;&lt; "."

 &lt;&lt; std::endl;

 continue;

 }

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 // Allocate memory to hold partitions for all cells in the zone

 std::vector&lt;ansys::PartitionIdType&gt; cp(numElems);

 reader.[getPartitionIdsForCellsInZone](classansys_1_1_cff_provider.xhtml#a3d452b0b6f7e9c23a78dd5bf8245f83e)(zoneIds[iz], cp.data(), numElems);

 std::cout &lt;&lt; " read into a " &lt;&lt; cp.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingPartitionIdsForCells](classansys_1_1_cff_provider.xhtml#a4141dc03c1b22bbdc805a082bd9505ee)();

}

 

void

ReadCellFacesByZone([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 reader.[startReadingFacesForCells](classansys_1_1_cff_provider.xhtml#a5650722b9dfd8f53cb5257b269768e47)(zoneIds);

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Cell-faces of cell-zones", zoneIds);

 std::cout &lt;&lt; std::endl;

 

 reader.[startReadingFaceCountsForCells](classansys_1_1_cff_provider.xhtml#a5459bec0b67c257890950e77c8090480)();

 std::vector&lt;size_t&gt; zacfc(zoneIds.size());

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 // allocate memory to store the face counts for each cell in the zone

 std::vector&lt;short&gt; cfc(numElems);

 reader.[getFaceCountsForCellsInZone](classansys_1_1_cff_provider.xhtml#a2392cd3a2cf12cd6e62d58aef21d2740)(zoneIds[iz], cfc.data(), numElems);

 std::cout &lt;&lt; "Cell-face-counts of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; cfc.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 zacfc[iz] = std::accumulate(cfc.begin(), cfc.end(), 0);

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingFaceCountsForCells](classansys_1_1_cff_provider.xhtml#a7a21ca1ed1122136e572b2d39e51b957)();

 

 reader.[startReadingFaceIdsForCells](classansys_1_1_cff_provider.xhtml#ab212deff72f88c5dcf00341eed7d3617)();

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 if (0 == zacfc[iz]) {

 continue;

 }

 // allocate the memory to store the face ids for all cells in this zone

 std::vector&lt;ansys::ElemIdType&gt; cfid(zacfc[iz]);

 reader.[getFaceIdsForCellsInZone](classansys_1_1_cff_provider.xhtml#ac0fcf3fb8797212be6cc5b33cb4fecd4)(zoneIds[iz], cfid.data(), cfid.size());

 std::cout &lt;&lt; "Cell-face-ids of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; cfid.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingFaceIdsForCells](classansys_1_1_cff_provider.xhtml#ab880f84593866d01b17c6d311e9bfaa8)();

 reader.[endReadingFacesForCells](classansys_1_1_cff_provider.xhtml#a85c80e3b0e56fa0a93ff0ed58b40e8fc)();

} 

 

void

ReadVariablesByZone([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::PhaseIds](group__typedefs.xhtml#ga99ff3bf3b76eac538df4d637faab6b4c) phaseIds;

 // find out how many Eulerian phases are there in the data file

 reader.[getPhaseIds](classansys_1_1_cff_base.xhtml#af555905619187578ebedc0da9116ae54)(phaseIds);

 if (phaseIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Reading data of phases", phaseIds);

 std::cout &lt;&lt; std::endl;

 

 // read the phases one-by-one

 for (size\_t ip = 0; ip &lt; phaseIds.size(); ++ip) {

 std::cout &lt;&lt; "Reading data of phase-" &lt;&lt; phaseIds[ip] &lt;&lt; ":" &lt;&lt; std::endl;

 reader.[startReadingPhase](classansys_1_1_cff_provider.xhtml#aac5960659dcd7609d4e192b810238be2)(phaseIds[ip]);

 std::vector&lt;ansys::ZoneCategory&gt; zoneCategories =

 { [CFF\_FACE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baa6aea3358b01fc54950d21d8af9c01a0), [CFF\_CELL\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba62b22dd5125249182737df29d52bafbd), [CFF\_NODE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba8ea3a3242fd587dc97ca2cf83dbf61d7), [CFF\_EDGE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baf550346da426ab4fa297c5343dc2b81a) };

 

 // read the solution variable data one-by-one

 for (const auto&amp; zc : zoneCategories) {

 // get what variables are there under this situation

 std::vector&lt;std::string&gt; varName;

 reader.[getPhaseVariablesOfCategory](classansys_1_1_cff_provider.xhtml#a9058ae75fd226e579e73716be0b2a186)(zc, varName);

 

 if (varName.empty()) {

 continue;

 }

 

 if (zc == [CFF\_FACE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baa6aea3358b01fc54950d21d8af9c01a0)) {

 std::cout &lt;&lt; " Face-Data" &lt;&lt; std::endl;

 } else if (zc == [CFF\_CELL\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba62b22dd5125249182737df29d52bafbd)) {

 std::cout &lt;&lt; " Cell-Data" &lt;&lt; std::endl;

 } else if (zc == [CFF\_NODE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba8ea3a3242fd587dc97ca2cf83dbf61d7)) {

 std::cout &lt;&lt; " Node-Data" &lt;&lt; std::endl;

 } else if (zc == [CFF\_EDGE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baf550346da426ab4fa297c5343dc2b81a)) {

 std::cout &lt;&lt; " Edge-Data" &lt;&lt; std::endl;

 }

 

 [ansys::VariableIds](group__typedefs.xhtml#gad69adea4467dfcbfbc23dac7843118dc) varIds;

 reader.[getPhaseVariablesOfCategory](classansys_1_1_cff_provider.xhtml#a9058ae75fd226e579e73716be0b2a186)(zc, varIds);

 

 // read all the vars one-by-one

 for (size\_t iv = 0; iv &lt; varName.size(); ++iv) {

 [ansys::AttributeValue](group__typedefs.xhtml#ga47c6faffdbbe31551e61373e813bf984) longName;

 if (!reader.[getAttributeValueOfPhaseVariable](classansys_1_1_cff_provider.xhtml#aa185303a2944c8900df1871c43f7c0b0)(varName[iv],

 "Long Name",

 longName)) {

 longName = varName[iv];

 }

 std::cout &lt;&lt; " " &lt;&lt; longName &lt;&lt; "(" &lt;&lt; varIds[iv] &lt;&lt; "):" &lt;&lt; std::endl;

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 

 // find out which zones have this variable and number of data per

 // element

 size\_t numVarsPerElem =

 reader.[startReadingZonesOfCategoryWithPhaseVariable](classansys_1_1_cff_provider.xhtml#a374aff84f4921267d0bfb0a7331f384f)(zc,

 varName[iv],

 zoneIds);

 

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 // allocate memory

 size\_t dataCount = numElems * numVarsPerElem;

 std::vector&lt;double&gt; dataBuf(dataCount);

 reader.[getValuesOfPhaseVariableForElementsInZone](classansys_1_1_cff_provider.xhtml#a94acbd563deb150124b7e35ec5a7d4ed)(zoneIds[iz],

 dataBuf.data(),

 dataBuf.size());

 std::cout &lt;&lt; " Data of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; numElems &lt;&lt; " x "

 &lt;&lt; numVarsPerElem &lt;&lt; " buffer." &lt;&lt; std::endl;

 }

 reader.[endReadingZonesOfCategoryWithPhaseVariable](classansys_1_1_cff_provider.xhtml#a65d8e7788ae0a85799a0c49b7386c08a)();

 }

 }

 reader.[endReadingPhase](classansys_1_1_cff_provider.xhtml#a954fd426cec8dd060989ad76dc86b662)();

 }

}

[ansys::CffBase::getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)

void getZoneSizeInfo(const ZoneIdType zoneId, const ZoneSizeType sizeType, ElemIdType &amp;size) const

Obtains a size setting of a zone.

**Definition:** CffBaseMethods.cpp:1010



[ansys::CffBase::getPhaseIds](classansys_1_1_cff_base.xhtml#af555905619187578ebedc0da9116ae54)

void getPhaseIds(PhaseIds &amp;phaseIds) const

Obtain the Identifiers of all Phase.

**Definition:** CffBaseMethods.cpp:1267



[ansys::CffProvider::hasUniformNodeCountForFacesInZone](classansys_1_1_cff_provider.xhtml#a00a4cc0096694a30f4ffc319486fed4c)

virtual bool hasUniformNodeCountForFacesInZone(const ZoneIdType zoneId, short *const ufnc) const

Query whether all faces in the face zone are defined using a uniform node count. i....

**Definition:** CffProviderMethods.cpp:1168



[ansys::CffProvider::endReadingNodesForFaces](classansys_1_1_cff_provider.xhtml#a0c5a426a9ac6d5348206222a72570eac)

virtual void endReadingNodesForFaces() const

Finish reading the face node data.

**Definition:** CffProviderMethods.cpp:1433



[ansys::CffProvider::startReadingNodeIdsForCells](classansys_1_1_cff_provider.xhtml#a0ea4768347c60c616af6c03f8504cdb1)

virtual void startReadingNodeIdsForCells() const

Start reading the node identifiers for cells.

**Definition:** CffProviderMethods.cpp:2374



[ansys::CffProvider::startReadingNodeCountsForCells](classansys_1_1_cff_provider.xhtml#a1413cc9bb5438d81293b0d9d01c41220)

virtual void startReadingNodeCountsForCells() const

Start reading the cell node counts.

**Definition:** CffProviderMethods.cpp:2214



[ansys::CffProvider::endReadingNodeCountsForFaces](classansys_1_1_cff_provider.xhtml#a2145183affbf311349cba44c61497089)

virtual void endReadingNodeCountsForFaces() const

Finish reading the face node counts.

**Definition:** CffProviderMethods.cpp:1282



[ansys::CffProvider::getFaceCountsForCellsInZone](classansys_1_1_cff_provider.xhtml#a2392cd3a2cf12cd6e62d58aef21d2740)

virtual size_t getFaceCountsForCellsInZone(const ZoneIdType zoneId, short *const cfc, const size_t) const

**Definition:** CffProviderMethods.cpp:2554



[ansys::CffProvider::startReadingCoordinatesForNodes](classansys_1_1_cff_provider.xhtml#a27d53bed5408033d1847519f50054249)

virtual void startReadingCoordinatesForNodes(ZoneIds &amp;zoneIds) const

Determine the node zones for which coordinates have been defined and prepare to read the coordinates ...

**Definition:** CffProviderMethods.cpp:718



[ansys::CffProvider::endReadingNodeCountsForEdges](classansys_1_1_cff_provider.xhtml#a315a4ee6d663824925bd3659a2f5948a)

virtual void endReadingNodeCountsForEdges() const

**Definition:** CffProviderMethods.cpp:957



[ansys::CffProvider::startReadingZonesOfCategoryWithPhaseVariable](classansys_1_1_cff_provider.xhtml#a374aff84f4921267d0bfb0a7331f384f)

virtual size_t startReadingZonesOfCategoryWithPhaseVariable(const ZoneCategory zoneCategory, const VariableIdType varId, ZoneIds &amp;zoneIds) const

Determine the zones in which the phase variable exists, and if valid prepare to read the solution dat...

**Definition:** CffProviderMethods.cpp:3465



[ansys::CffProvider::startReadingNodesForFaces](classansys_1_1_cff_provider.xhtml#a398329d63a76748e94252a5aed723ea0)

virtual void startReadingNodesForFaces(ZoneIds &amp;zoneIds) const

Determine the face zones for which nodes have been defined and prepare to read the nodes for those zo...

**Definition:** CffProviderMethods.cpp:1093



[ansys::CffProvider::getPartitionIdsForCellsInZone](classansys_1_1_cff_provider.xhtml#a3d452b0b6f7e9c23a78dd5bf8245f83e)

virtual size_t getPartitionIdsForCellsInZone(const ZoneIdType, PartitionIdType *const partIds, const size_t) const

**Definition:** CffProviderMethods.cpp:2656



[ansys::CffProvider::endReadingPartitionIdsForCells](classansys_1_1_cff_provider.xhtml#a4141dc03c1b22bbdc805a082bd9505ee)

virtual void endReadingPartitionIdsForCells() const

**Definition:** CffProviderMethods.cpp:2669



[ansys::CffProvider::endReadingNodesForEdges](classansys_1_1_cff_provider.xhtml#a4aefe599fb5075dad1456b522a77870d)

virtual void endReadingNodesForEdges() const

**Definition:** CffProviderMethods.cpp:1007



[ansys::CffProvider::getNodeCountsForEdgesInZone](classansys_1_1_cff_provider.xhtml#a4bc64d129c65fe6c38b9580fe56859f4)

virtual size_t getNodeCountsForEdgesInZone(const ZoneIdType zoneId, short *const fenc, const size_t) const

**Definition:** CffProviderMethods.cpp:944



[ansys::CffProvider::startReadingFaceCountsForCells](classansys_1_1_cff_provider.xhtml#a5459bec0b67c257890950e77c8090480)

virtual void startReadingFaceCountsForCells() const

**Definition:** CffProviderMethods.cpp:2522



[ansys::CffProvider::startReadingNodesForEdges](classansys_1_1_cff_provider.xhtml#a552888288a8edbb2d73d64c38dc9d7a4)

virtual void startReadingNodesForEdges(ZoneIds &amp;zoneIds) const

**Definition:** CffProviderMethods.cpp:893



[ansys::CffProvider::startReadingFacesForCells](classansys_1_1_cff_provider.xhtml#a5650722b9dfd8f53cb5257b269768e47)

virtual void startReadingFacesForCells(ZoneIds &amp;zoneIds) const

**Definition:** CffProviderMethods.cpp:2517



[ansys::CffProvider::startReadingNodesForCells](classansys_1_1_cff_provider.xhtml#a5bf1bb38de1d080b3ff320c435e41835)

virtual void startReadingNodesForCells(ZoneIds &amp;zoneIds) const

Determine the cell zones for which nodes have been defined and prepare to read the nodes for those zo...

**Definition:** CffProviderMethods.cpp:2195



[ansys::CffProvider::startReadingNodeIdsForFaces](classansys_1_1_cff_provider.xhtml#a5ca9bd2cb8fdfd76b02faabc7b6bb09d)

virtual void startReadingNodeIdsForFaces() const

Start reading the face nodes.

**Definition:** CffProviderMethods.cpp:1301



[ansys::CffProvider::endReadingZonesOfCategoryWithPhaseVariable](classansys_1_1_cff_provider.xhtml#a65d8e7788ae0a85799a0c49b7386c08a)

virtual void endReadingZonesOfCategoryWithPhaseVariable() const

End reading solution data for a zone variable previously started by a call to startReadingZonesOfCate...

**Definition:** CffProviderMethods.cpp:3695



[ansys::CffProvider::getNodeIdsForEdgesInZone](classansys_1_1_cff_provider.xhtml#a67d01cbdf8d63d0b835a63eeb9239d8c)

virtual size_t getNodeIdsForEdgesInZone(const ZoneIdType, ElemIdType *const, const size_t) const

**Definition:** CffProviderMethods.cpp:988



[ansys::CffProvider::endReadingNodeIdsForEdges](classansys_1_1_cff_provider.xhtml#a6eee27f05f46065b0d6fffc47996446e)

virtual void endReadingNodeIdsForEdges() const

**Definition:** CffProviderMethods.cpp:1001



[ansys::CffProvider::getNodeCountsForFacesInZone](classansys_1_1_cff_provider.xhtml#a7077cfee35d2812e54469e76950f1892)

virtual size_t getNodeCountsForFacesInZone(const ZoneIdType zoneId, short *const fnc, const size_t) const

Get the node counts for all faces within a face zone.

**Definition:** CffProviderMethods.cpp:1257



[ansys::CffProvider::endReadingCoordinatesForNodes](classansys_1_1_cff_provider.xhtml#a711c179a961fce56dbab38bc71e124ab)

virtual void endReadingCoordinatesForNodes() const

Finish reading coordinates for nodes.

**Definition:** CffProviderMethods.cpp:882



[ansys::CffProvider::getCell0sForFacesInZone](classansys_1_1_cff_provider.xhtml#a714cc6a00764a3ae2a0a0dda6ae5f63e)

virtual size_t getCell0sForFacesInZone(const ZoneIdType zoneId, ElemIdType *const cell0Id, const size_t) const

Obtain cell 0 parents for all faces in zone.

**Definition:** CffProviderMethods.cpp:1560



[ansys::CffProvider::endReadingFaceCountsForCells](classansys_1_1_cff_provider.xhtml#a7a21ca1ed1122136e572b2d39e51b957)

virtual void endReadingFaceCountsForCells() const

**Definition:** CffProviderMethods.cpp:2566



[ansys::CffProvider::endReadingCell0sForFaces](classansys_1_1_cff_provider.xhtml#a7ecbb5f8ffaac915d9008653ce29d98f)

virtual void endReadingCell0sForFaces() const

Finish reading the cell 0 parents.

**Definition:** CffProviderMethods.cpp:1583



[ansys::CffProvider::getPartitionCountForZone](classansys_1_1_cff_provider.xhtml#a83a1e0c28c1e11a9797316e1d23efa52)

virtual int getPartitionCountForZone(const ZoneIdType zoneId) const

**Definition:** CffProviderMethods.cpp:2628



[ansys::CffProvider::startReadingTypesForCells](classansys_1_1_cff_provider.xhtml#a8412293a2d419024be3e6a4a8aa58a97)

virtual void startReadingTypesForCells(ZoneIds &amp;) const

Determine the cell zones for which cell types have been defined and prepare to read the cell types fo...

**Definition:** CffProviderMethods.cpp:1988



[ansys::CffProvider::endReadingFacesForCells](classansys_1_1_cff_provider.xhtml#a85c80e3b0e56fa0a93ff0ed58b40e8fc)

virtual void endReadingFacesForCells() const

**Definition:** CffProviderMethods.cpp:2611



[ansys::CffProvider::getNodeIdsForCellsInZone](classansys_1_1_cff_provider.xhtml#a8e4507e898b237193f1565b1d2147ae1)

virtual size_t getNodeIdsForCellsInZone(const ZoneIdType zoneId, ElemIdType *const cnid, const size_t) const

Get the node identifiers for all cells within a cell zone.

**Definition:** CffProviderMethods.cpp:2462



[ansys::CffProvider::getPhaseVariablesOfCategory](classansys_1_1_cff_provider.xhtml#a9058ae75fd226e579e73716be0b2a186)

virtual void getPhaseVariablesOfCategory(const ZoneCategory, VariableIds &amp;) const

**Definition:** CffProviderMethods.cpp:3047



[ansys::CffProvider::getValuesOfPhaseVariableForElementsInZone](classansys_1_1_cff_provider.xhtml#a94acbd563deb150124b7e35ec5a7d4ed)

virtual size_t getValuesOfPhaseVariableForElementsInZone(const ZoneIdType zoneId, double *const vals, const size_t) const

Read solution data for a zone variable for all elements within a zone requested by the previous call ...

**Definition:** CffProviderMethods.cpp:3584



[ansys::CffProvider::endReadingPhase](classansys_1_1_cff_provider.xhtml#a954fd426cec8dd060989ad76dc86b662)

virtual void endReadingPhase() const

**Definition:** CffProviderMethods.cpp:2960



[ansys::CffProvider::endReadingTypesForCells](classansys_1_1_cff_provider.xhtml#a95896b1f785ae80b4e6f661456168fed)

virtual void endReadingTypesForCells() const

Finish reading the types of cells.

**Definition:** CffProviderMethods.cpp:2107



[ansys::CffProvider::startReadingNodeCountsForFaces](classansys_1_1_cff_provider.xhtml#aa07af19ed77b75267720278d924989fb)

virtual void startReadingNodeCountsForFaces() const

Start reading the face node counts.

**Definition:** CffProviderMethods.cpp:1112



[ansys::CffProvider::getAttributeValueOfPhaseVariable](classansys_1_1_cff_provider.xhtml#aa185303a2944c8900df1871c43f7c0b0)

virtual bool getAttributeValueOfPhaseVariable(VariableIdType, const AttributeName &amp;, AttributeValue &amp;) const

**Definition:** CffProviderMethods.cpp:3223



[ansys::CffProvider::endReadingNodeIdsForCells](classansys_1_1_cff_provider.xhtml#aaaf7294d55c98855c024ba53a950e5a9)

virtual void endReadingNodeIdsForCells() const

Finish reading the node identifiers for cells.

**Definition:** CffProviderMethods.cpp:2487



[ansys::CffProvider::startReadingPhase](classansys_1_1_cff_provider.xhtml#aac5960659dcd7609d4e192b810238be2)

virtual void startReadingPhase(const PhaseIdType=1) const

**Definition:** CffProviderMethods.cpp:2953



[ansys::CffProvider::startReadingFaceIdsForCells](classansys_1_1_cff_provider.xhtml#ab212deff72f88c5dcf00341eed7d3617)

virtual void startReadingFaceIdsForCells() const

**Definition:** CffProviderMethods.cpp:2571



[ansys::CffProvider::startReadingNodeCountsForEdges](classansys_1_1_cff_provider.xhtml#ab45e4776d4e5234a3141c7aa8d578604)

virtual void startReadingNodeCountsForEdges() const

**Definition:** CffProviderMethods.cpp:899



[ansys::CffProvider::endReadingFaceIdsForCells](classansys_1_1_cff_provider.xhtml#ab880f84593866d01b17c6d311e9bfaa8)

virtual void endReadingFaceIdsForCells() const

**Definition:** CffProviderMethods.cpp:2606



[ansys::CffProvider::getTypesForCellsInZone](classansys_1_1_cff_provider.xhtml#abc15dfffc53c4b1dd17d238771a79d38)

virtual size_t getTypesForCellsInZone(const ZoneIdType, CellType *const, const size_t) const

Obtain the types of all cells in a cell zone.

**Definition:** CffProviderMethods.cpp:2086



[ansys::CffProvider::getFaceIdsForCellsInZone](classansys_1_1_cff_provider.xhtml#ac0fcf3fb8797212be6cc5b33cb4fecd4)

virtual size_t getFaceIdsForCellsInZone(const ZoneIdType zoneId, ElemIdType *const cfid, const size_t) const

**Definition:** CffProviderMethods.cpp:2594



[ansys::CffProvider::endReadingNodesForCells](classansys_1_1_cff_provider.xhtml#ac3305957b72a077605e33b3e8841eac5)

virtual void endReadingNodesForCells() const

Finish reading the cell node.

**Definition:** CffProviderMethods.cpp:2503



[ansys::CffProvider::endReadingNodeCountsForCells](classansys_1_1_cff_provider.xhtml#acd5e16e4c4783d56d27635cdc01ebc69)

virtual void endReadingNodeCountsForCells() const

Finish reading the cell node counts.

**Definition:** CffProviderMethods.cpp:2355



[ansys::CffProvider::endReadingCell1sForFaces](classansys_1_1_cff_provider.xhtml#ad22d107258d88a354c443e822507830b)

virtual void endReadingCell1sForFaces() const

Finish reading the cell 1 parents.

**Definition:** CffProviderMethods.cpp:1689



[ansys::CffProvider::getNodeCountsForCellsInZone](classansys_1_1_cff_provider.xhtml#ad311547b4c630382a4f6aaba98b7c74f)

virtual size_t getNodeCountsForCellsInZone(const ZoneIdType zoneId, short *const cnc, const size_t) const

Get the node counts for all cells within a cell zone.

**Definition:** CffProviderMethods.cpp:2329



[ansys::CffProvider::getNodeIdsForFacesInZone](classansys_1_1_cff_provider.xhtml#ad53955720f00f23984a40272225bdfea)

virtual size_t getNodeIdsForFacesInZone(const ZoneIdType, ElemIdType *const, const size_t) const

Get the node identifiers for a all faces within a face zone.

**Definition:** CffProviderMethods.cpp:1389



[ansys::CffProvider::startReadingCell0sForFaces](classansys_1_1_cff_provider.xhtml#ad66e04a3e7c0016df0722f19bc199dd3)

virtual void startReadingCell0sForFaces(ZoneIds &amp;zoneIds) const

Start reading the cell 0 parents.

**Definition:** CffProviderMethods.cpp:1493



[ansys::CffProvider::startReadingPartitionIdsForCells](classansys_1_1_cff_provider.xhtml#ada00abc25e7f9b4e4a9464cfa4ca1b92)

virtual void startReadingPartitionIdsForCells(ZoneIds &amp;) const

**Definition:** CffProviderMethods.cpp:2622



[ansys::CffProvider::hasUniformTypeForCellsInZone](classansys_1_1_cff_provider.xhtml#add3567ba1ab18fdc09a22af4c10cd665)

virtual bool hasUniformTypeForCellsInZone(const ZoneIdType zoneId, CellType *const) const

Query whether all cells in the cell zone have the same cell type.

**Definition:** CffProviderMethods.cpp:2008



[ansys::CffProvider::hasUniformNodeCountForCellsInZone](classansys_1_1_cff_provider.xhtml#ae6fccf5ab31d1e02b633ddd515126170)

virtual bool hasUniformNodeCountForCellsInZone(const ZoneIdType zoneId, short *const ucnc) const

Query whether all cells in the cell zone are defined using a uniform node count.

**Definition:** CffProviderMethods.cpp:2240



[ansys::CffProvider::startReadingCell1sForFaces](classansys_1_1_cff_provider.xhtml#ae845f23ea32051d1e880cd9ce70c50de)

virtual void startReadingCell1sForFaces(ZoneIds &amp;zoneIds) const

Start reading the cell 1 parents.

**Definition:** CffProviderMethods.cpp:1599



[ansys::CffProvider::endReadingNodeIdsForFaces](classansys_1_1_cff_provider.xhtml#aec4659c0936ed0dbecf4047140411790)

virtual void endReadingNodeIdsForFaces() const

Finish reading the node identifiers for faces.

**Definition:** CffProviderMethods.cpp:1414



[ansys::CffProvider::getCell1sForFacesInZone](classansys_1_1_cff_provider.xhtml#af4ded8ab6c5051d04b5c2142bc346048)

virtual size_t getCell1sForFacesInZone(const ZoneIdType zoneId, ElemIdType *const fc1, const size_t) const

Obtain cell 1 parents for all faces in zone.

**Definition:** CffProviderMethods.cpp:1666



[ansys::CffProvider::startReadingNodeIdsForEdges](classansys_1_1_cff_provider.xhtml#afdc57f3b7434feb115641d4ef564517c)

virtual void startReadingNodeIdsForEdges() const

**Definition:** CffProviderMethods.cpp:963



[CffCellType](group__enums.xhtml#gac0b3f753b9307362895e46aaa1a9f366)

CffCellType

An enumeration used to represet the type of a Cell element.

**Definition:** CffTypes.h:608



[CFF\_CELL\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba62b22dd5125249182737df29d52bafbd)

@ CFF_CELL_ZONE

**Definition:** CffTypes.h:205



[CFF\_NODE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba8ea3a3242fd587dc97ca2cf83dbf61d7)

@ CFF_NODE_ZONE

**Definition:** CffTypes.h:199



[CFF\_FACE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baa6aea3358b01fc54950d21d8af9c01a0)

@ CFF_FACE_ZONE

**Definition:** CffTypes.h:203



[CFF\_EDGE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baf550346da426ab4fa297c5343dc2b81a)

@ CFF_EDGE_ZONE

**Definition:** CffTypes.h:201



[CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00)

@ CFF_ZONE_START_ID

**Definition:** CffTypes.h:227



[CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36)

@ CFF_ZONE_SIZE

**Definition:** CffTypes.h:231



[CFF\_ZONE\_DIMENSION](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ac797bdd0c993d968d38f0c35b496d207)

@ CFF_ZONE_DIMENSION

**Definition:** CffTypes.h:233



[CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a)

@ CFF_ZONE_END_ID

**Definition:** CffTypes.h:229



[CFF\_CELL\_TYPE\_MIXED](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a1eed460af26c972bc96e5f71e7d124ba)

@ CFF_CELL_TYPE_MIXED

**Definition:** CffTypes.h:612



[ansys::AttributeValue](group__typedefs.xhtml#ga47c6faffdbbe31551e61373e813bf984)

std::string AttributeValue

Type used to represent the variable attribute value ('C++' API only)

**Definition:** Types.hpp:104



[ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)

std::vector&lt; ZoneIdType &gt; ZoneIds

Type used to represent a number of zone identifiers('C++' API only)

**Definition:** Types.hpp:149



[ansys::PhaseIds](group__typedefs.xhtml#ga99ff3bf3b76eac538df4d637faab6b4c)

std::vector&lt; PhaseIdType &gt; PhaseIds

Type used to represent a number of phase identifiers ids('C++' API only)

**Definition:** Types.hpp:159



[ansys::VariableIds](group__typedefs.xhtml#gad69adea4467dfcbfbc23dac7843118dc)

std::vector&lt; VariableIdType &gt; VariableIds

Type used to represent a number of variable identifiers ('C++' API only)

**Definition:** Types.hpp:189



[ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107)

CffElemIdType ElemIdType

Alias for CffElemIdType ('C++' API only)

**Definition:** Types.hpp:56





Additional files illustrate how to read data by range:

**ReadByZoneRange.hpp** (This can be found at example/hdf/Import/ReadByZoneRange.hpp in the CFF-SDK directory.)

/\*

 \* Copyright 2025 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.

 \*/

 

void

ReadNodeCoordinatesByZoneRange([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 

 // get which node-zones have coordinate information

 reader.[startReadingCoordinatesForNodes](classansys_1_1_cff_provider.xhtml#a27d53bed5408033d1847519f50054249)(zoneIds);

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Coordinates of node-zones", zoneIds);

 std::cout &lt;&lt; std::endl;

 

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) dimension = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_DIMENSION](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ac797bdd0c993d968d38f0c35b496d207), dimension);

 std::vector&lt;double&gt; coords(numElems * dimension);

 reader.[getCoordinatesForNodesInRange](classansys_1_1_cff_provider.xhtml#a09bcd8a8d757eca114b3de78f8b79836)(minId,

 maxId,

 coords.data(),

 coords.size());

 std::cout &lt;&lt; "Coordinates of range: " &lt;&lt; minId &lt;&lt;" - " &lt;&lt; maxId

 &lt;&lt; " is read into a "

 &lt;&lt; numElems &lt;&lt; " x " &lt;&lt; dimension &lt;&lt; " buffer." &lt;&lt; std::endl;

 }

}

 

void

ReadEdgeNodesByZoneRange([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 reader.[startReadingNodesForEdges](classansys_1_1_cff_provider.xhtml#a552888288a8edbb2d73d64c38dc9d7a4)(zoneIds);

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Edge-nodes of edge-zones", zoneIds);

 std::cout &lt;&lt; std::endl;

 

 std::vector&lt;size_t&gt; zafnc(zoneIds.size());

 

 reader.[startReadingNodeCountsForEdges](classansys_1_1_cff_provider.xhtml#ab45e4776d4e5234a3141c7aa8d578604)(); 

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 short unc = 0;

 if (reader.[hasUniformNodeCountForEdgesInRange](classansys_1_1_cff_provider.xhtml#ae4bb2990c06dac5113eae4bdd73a631b)(minId, maxId, &amp;unc)) {

 std::cout &lt;&lt; "Edges in zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " have a uniform edge-node-count." &lt;&lt; std::endl;

 zafnc[iz] = unc * numElems;

 } else {

 std::vector&lt;short&gt; fnc(numElems);

 reader.[getNodeCountsForEdgesInRange](classansys_1_1_cff_provider.xhtml#aef5f548e5fb06fae2ec1da0ead4852d2)(minId, maxId, fnc.data(), fnc.size());

 std::cout &lt;&lt; "Edge-node-counts of range: " &lt;&lt; minId &lt;&lt;" - " &lt;&lt; maxId

 &lt;&lt; " is read into a " &lt;&lt; fnc.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 zafnc[iz] = std::accumulate(fnc.begin(), fnc.end(), 0);

 }

 }

 reader.[endReadingNodeCountsForEdges](classansys_1_1_cff_provider.xhtml#a315a4ee6d663824925bd3659a2f5948a)();

 std::cout &lt;&lt; std::endl;

 

 reader.[startReadingNodeIdsForEdges](classansys_1_1_cff_provider.xhtml#afdc57f3b7434feb115641d4ef564517c)();

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 std::vector&lt;ansys::ElemIdType&gt; fnid(zafnc[iz]);

 reader.[getNodeIdsForEdgesInRange](classansys_1_1_cff_provider.xhtml#af8cfa866da3608fd4cd4c88d45c9915c)(minId, maxId, fnid.data(), fnid.size());

 std::cout &lt;&lt; "Edge-node-ids of range: " &lt;&lt; minId &lt;&lt;" - " &lt;&lt; maxId

 &lt;&lt; " is read into a " &lt;&lt; fnid.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 }

 reader.[endReadingNodeIdsForEdges](classansys_1_1_cff_provider.xhtml#a6eee27f05f46065b0d6fffc47996446e)();

 reader.[endReadingNodesForEdges](classansys_1_1_cff_provider.xhtml#a4aefe599fb5075dad1456b522a77870d)();

 

 std::cout &lt;&lt; std::endl;

}

 

void

ReadFaceNodesByZoneRange([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 reader.[startReadingNodesForFaces](classansys_1_1_cff_provider.xhtml#a398329d63a76748e94252a5aed723ea0)(zoneIds);

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Face-nodes of face-zones", zoneIds);

 std::cout &lt;&lt; std::endl;

 

 std::vector&lt;size_t&gt; zafnc(zoneIds.size());

 

 reader.[startReadingNodeCountsForFaces](classansys_1_1_cff_provider.xhtml#aa07af19ed77b75267720278d924989fb)(); 

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 short unc = 0;

 if (reader.[hasUniformNodeCountForFacesInRange](classansys_1_1_cff_provider.xhtml#ad75f1fd4c76976d52726e13c34743e7c)(minId, maxId, &amp;unc)) {

 std::cout &lt;&lt; "Faces in zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " have a uniform face-node-count." &lt;&lt; std::endl;

 zafnc[iz] = unc * numElems;

 } else {

 std::vector&lt;short&gt; fnc(numElems);

 reader.[getNodeCountsForFacesInRange](classansys_1_1_cff_provider.xhtml#a9c685afa9deec6f2d84ad39531d530b6)(minId, maxId, fnc.data(), fnc.size());

 std::cout &lt;&lt; "Face-node-counts of range: " &lt;&lt; minId &lt;&lt;" - " &lt;&lt; maxId

 &lt;&lt; " is read into a " &lt;&lt; fnc.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 zafnc[iz] = std::accumulate(fnc.begin(), fnc.end(), 0);

 }

 }

 reader.[endReadingNodeCountsForFaces](classansys_1_1_cff_provider.xhtml#a2145183affbf311349cba44c61497089)();

 std::cout &lt;&lt; std::endl;

 

 reader.[startReadingNodeIdsForFaces](classansys_1_1_cff_provider.xhtml#a5ca9bd2cb8fdfd76b02faabc7b6bb09d)();

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 std::vector&lt;ansys::ElemIdType&gt; fnid(zafnc[iz]);

 reader.[getNodeIdsForFacesInRange](classansys_1_1_cff_provider.xhtml#aa3f19dccc34a60dc060dae5c6a305acc)(minId, maxId, fnid.data(), fnid.size());

 std::cout &lt;&lt; "Face-node-ids of range: " &lt;&lt; minId &lt;&lt;" - " &lt;&lt; maxId

 &lt;&lt; " is read into a " &lt;&lt; fnid.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 }

 reader.[endReadingNodeIdsForFaces](classansys_1_1_cff_provider.xhtml#aec4659c0936ed0dbecf4047140411790)();

 reader.[endReadingNodesForFaces](classansys_1_1_cff_provider.xhtml#a0c5a426a9ac6d5348206222a72570eac)();

 

 std::cout &lt;&lt; std::endl;

}

 

void

ReadFaceCellParentsByZoneRange([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader, int side)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 if (side == 0) {

 reader.[startReadingCell0sForFaces](classansys_1_1_cff_provider.xhtml#ad66e04a3e7c0016df0722f19bc199dd3)(zoneIds);

 } else {

 reader.[startReadingCell1sForFaces](classansys_1_1_cff_provider.xhtml#ae845f23ea32051d1e880cd9ce70c50de)(zoneIds);

 }

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Cell-" + std::to_string(side) + " of face-zones",

 zoneIds);

 std::cout &lt;&lt; std::endl;

 

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 std::vector&lt;ansys::ElemIdType&gt; fc(numElems);

 if (side == 0) {

 reader.[getCell0sForFacesInRange](classansys_1_1_cff_provider.xhtml#a168330f08b96e706847fbb52227f2e78)(minId, maxId, fc.data(), fc.size());

 } else {

 reader.[getCell1sForFacesInRange](classansys_1_1_cff_provider.xhtml#a3e1df6299a9d7010dd48c051670b8a90)(minId, maxId, fc.data(), fc.size());

 }

 std::cout &lt;&lt; "Face-cell" &lt;&lt; side &lt;&lt; "-connectivity of range: "

 &lt;&lt; minId &lt;&lt;" - " &lt;&lt; maxId &lt;&lt; " is read into a "

 &lt;&lt; numElems &lt;&lt; " x 1" &lt;&lt; " buffer." &lt;&lt; std::endl; 

 } 

 std::cout &lt;&lt; std::endl;

 if (side == 0) {

 reader.[endReadingCell0sForFaces](classansys_1_1_cff_provider.xhtml#a7ecbb5f8ffaac915d9008653ce29d98f)();

 } else {

 reader.[endReadingCell1sForFaces](classansys_1_1_cff_provider.xhtml#ad22d107258d88a354c443e822507830b)();

 }

}

 

void

ReadCellTypesByZoneRange([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 // find which cell-zones have this information

 reader.[startReadingTypesForCells](classansys_1_1_cff_provider.xhtml#a8412293a2d419024be3e6a4a8aa58a97)(zoneIds);

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Cell-types of cell-zones", zoneIds);

 

 // a cell-zone can have uniform cell type (not poly);

 // then, no need to read types of each cells in that zone one-by-one

 std::vector&lt;ansys::CellType&gt; zct(zoneIds.size(), [CFF\_CELL\_TYPE\_MIXED](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a1eed460af26c972bc96e5f71e7d124ba));

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 // check if uniform cell-type; the type is returned in "cellType";

 // if not-uniform, cellType shall have garbage value

 [ansys::CellType](group__enums.xhtml#gac0b3f753b9307362895e46aaa1a9f366) cellType = [CFF\_CELL\_TYPE\_MIXED](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a1eed460af26c972bc96e5f71e7d124ba);

 if (reader.[hasUniformTypeForCellsInZone](classansys_1_1_cff_provider.xhtml#add3567ba1ab18fdc09a22af4c10cd665)(zoneIds[iz], &amp;cellType)) {

 zct[iz] = cellType;

 }

 }

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 std::cout &lt;&lt; "Cell-type ids of zone-" &lt;&lt; zoneIds[iz] &lt;&lt; " is ";

 if ([CFF\_CELL\_TYPE\_MIXED](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a1eed460af26c972bc96e5f71e7d124ba) != zct[iz]) {

 std::cout &lt;&lt; "uniform (" &lt;&lt; static\_cast&lt;short&gt;(zct[iz]) &lt;&lt; ")."

 &lt;&lt; std::endl;

 continue;

 }

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 // Allocate memory to store all types for cells in this zone

 std::vector&lt;ansys::CellType&gt; ct(numElems);

 reader.[getTypesForCellsInRange](classansys_1_1_cff_provider.xhtml#a6b471287a0ddd80faf844592a0e4ba9e)(minId, maxId, ct.data(), numElems);

 std::cout &lt;&lt; "read into a " &lt;&lt; ct.size() &lt;&lt; " x 1 buffer." &lt;&lt; std::endl;

 }

 reader.[endReadingTypesForCells](classansys_1_1_cff_provider.xhtml#a95896b1f785ae80b4e6f661456168fed)();

 

 std::cout &lt;&lt; std::endl;

}

 

void

ReadCellNodesByZoneRange([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 reader.[startReadingNodesForCells](classansys_1_1_cff_provider.xhtml#a5bf1bb38de1d080b3ff320c435e41835)(zoneIds);

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Cell-nodes of face-zones", zoneIds);

 std::cout &lt;&lt; std::endl;

 

 std::vector&lt;size_t&gt; zafnc(zoneIds.size());

 

 reader.[startReadingNodeCountsForCells](classansys_1_1_cff_provider.xhtml#a1413cc9bb5438d81293b0d9d01c41220)(); 

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 std::vector&lt;short&gt; fnc(numElems);

 reader.[getNodeCountsForCellsInRange](classansys_1_1_cff_provider.xhtml#a1ec255bebd3153f50046b2c5535551d4)(minId, maxId, fnc.data(), fnc.size());

 std::cout &lt;&lt; "Cell-node-counts of range: " &lt;&lt; minId &lt;&lt;" - " &lt;&lt; maxId

 &lt;&lt; " is read into a " &lt;&lt; fnc.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 zafnc[iz] = std::accumulate(fnc.begin(), fnc.end(), 0);

 }

 reader.[endReadingNodeCountsForCells](classansys_1_1_cff_provider.xhtml#acd5e16e4c4783d56d27635cdc01ebc69)();

 std::cout &lt;&lt; std::endl;

 

 reader.[startReadingNodeIdsForCells](classansys_1_1_cff_provider.xhtml#a0ea4768347c60c616af6c03f8504cdb1)();

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 std::vector&lt;ansys::ElemIdType&gt; fnid(zafnc[iz]);

 reader.[getNodeIdsForCellsInRange](classansys_1_1_cff_provider.xhtml#a6b4f52746928b3f5de4a79cb52f42844)(minId, maxId, fnid.data(), fnid.size());

 std::cout &lt;&lt; "Cell-node-ids of range: " &lt;&lt; minId &lt;&lt;" - " &lt;&lt; maxId

 &lt;&lt; " is read into a " &lt;&lt; fnid.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 }

 reader.[endReadingNodeIdsForCells](classansys_1_1_cff_provider.xhtml#aaaf7294d55c98855c024ba53a950e5a9)();

 reader.[endReadingNodesForCells](classansys_1_1_cff_provider.xhtml#ac3305957b72a077605e33b3e8841eac5)();

 

 std::cout &lt;&lt; std::endl;

}

 

void

ReadCellPartitionsByZoneRange([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 reader.[startReadingPartitionIdsForCells](classansys_1_1_cff_provider.xhtml#ada00abc25e7f9b4e4a9464cfa4ca1b92)(zoneIds);

 if (zoneIds.empty()) {

 return;

 }

 std::vector&lt;int&gt; znp(zoneIds.size(), 1);

 // to store the cell-partition

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 znp[iz] = reader.[getPartitionCountForZone](classansys_1_1_cff_provider.xhtml#a83a1e0c28c1e11a9797316e1d23efa52)(zoneIds[iz]);

 }

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 std::cout &lt;&lt; "Cell-partition ids of zone-" &lt;&lt; zoneIds[iz] &lt;&lt; " is ";

 if (znp[iz] &lt; 2) {

 std::cout &lt;&lt; "not read as partition-count is " &lt;&lt; znp[iz] &lt;&lt; "."

 &lt;&lt; std::endl;

 continue;

 }

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 std::vector&lt;ansys::PartitionIdType&gt; cp(numElems * znp[iz]);

 reader.[getPartitionIdsForCellsInRange](classansys_1_1_cff_provider.xhtml#a8957272e6fa7ef3b2a031885ba83ca51)(minId, maxId, cp.data(), cp.size());

 std::cout &lt;&lt; "Cell partition of range: " &lt;&lt; minId &lt;&lt;" - " &lt;&lt; maxId 

 &lt;&lt; " is read into a "

 &lt;&lt; numElems &lt;&lt; " x " &lt;&lt; znp[iz] &lt;&lt; " buffer." &lt;&lt; std::endl;

 } 

 reader.[endReadingPartitionIdsForCells](classansys_1_1_cff_provider.xhtml#a4141dc03c1b22bbdc805a082bd9505ee)();

 

 std::cout &lt;&lt; std::endl;

}

 

void

ReadCellFacesByZoneRange([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 reader.[startReadingFacesForCells](classansys_1_1_cff_provider.xhtml#a5650722b9dfd8f53cb5257b269768e47)(zoneIds);

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Cell-faces of cell-zones", zoneIds);

 std::cout &lt;&lt; std::endl;

 

 // read number of nodes of each faces first for efficient memory

 // allocation;

 // can be skipped to read the face-nodes directly

 reader.[startReadingFaceCountsForCells](classansys_1_1_cff_provider.xhtml#a5459bec0b67c257890950e77c8090480)();

 std::vector&lt;size_t&gt; zacfc(zoneIds.size());

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 // allocate memory, or use previously allocated ones

 std::vector&lt;short&gt; cfc(numElems);

 reader.[getFaceCountsForCellsInRange](classansys_1_1_cff_provider.xhtml#a2f6f064b0868849ad6c5de91ed27939f)(minId, maxId, cfc.data(), cfc.size());

 std::cout &lt;&lt; "Cell-face-counts of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; cfc.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 zacfc[iz] = std::accumulate(cfc.begin(), cfc.end(), 0);

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingFaceCountsForCells](classansys_1_1_cff_provider.xhtml#a7a21ca1ed1122136e572b2d39e51b957)();

 

 reader.[startReadingFaceIdsForCells](classansys_1_1_cff_provider.xhtml#ab212deff72f88c5dcf00341eed7d3617)();

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 if (0 == zacfc[iz]) {

 continue;

 }

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 // allocate the memory to store the nodes of all faces of this zone

 std::vector&lt;ansys::ElemIdType&gt; cfid(zacfc[iz]);

 reader.[getFaceIdsForCellsInRange](classansys_1_1_cff_provider.xhtml#aee39cd506553cc0142d1a926ea222bdc)(minId, maxId, cfid.data(), cfid.size());

 std::cout &lt;&lt; "Cell-face-ids of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; cfid.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 }

 reader.[endReadingFaceIdsForCells](classansys_1_1_cff_provider.xhtml#ab880f84593866d01b17c6d311e9bfaa8)();

 reader.[endReadingFacesForCells](classansys_1_1_cff_provider.xhtml#a85c80e3b0e56fa0a93ff0ed58b40e8fc)();

 

 std::cout &lt;&lt; std::endl;

} 

 

void

ReadVariablesByZoneRange([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::PhaseIds](group__typedefs.xhtml#ga99ff3bf3b76eac538df4d637faab6b4c) phaseIds;

 // find out how many Eulerian phases are there in the data file

 reader.[getPhaseIds](classansys_1_1_cff_base.xhtml#af555905619187578ebedc0da9116ae54)(phaseIds);

 if (phaseIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Reading data of phases", phaseIds);

 std::cout &lt;&lt; std::endl;

 

 // read the phases one-by-one

 for (size\_t ip = 0; ip &lt; phaseIds.size(); ++ip) {

 std::cout &lt;&lt; "Reading data of phase-" &lt;&lt; phaseIds[ip] &lt;&lt; ":" &lt;&lt; std::endl;

 reader.[startReadingPhase](classansys_1_1_cff_provider.xhtml#aac5960659dcd7609d4e192b810238be2)(phaseIds[ip]);

 

 std::vector&lt;ansys::ZoneCategory&gt; zoneCategories =

 { [CFF\_FACE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baa6aea3358b01fc54950d21d8af9c01a0), [CFF\_CELL\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba62b22dd5125249182737df29d52bafbd), [CFF\_NODE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba8ea3a3242fd587dc97ca2cf83dbf61d7), [CFF\_EDGE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baf550346da426ab4fa297c5343dc2b81a) };

 

 // read the solution variable data one-by-one

 for (const auto&amp; zc : zoneCategories) {

 // get what variables are there under this situation

 std::vector&lt;std::string&gt; varName;

 reader.[getPhaseVariablesOfCategory](classansys_1_1_cff_provider.xhtml#a9058ae75fd226e579e73716be0b2a186)(zc, varName);

 

 if (varName.empty()) {

 continue;

 }

 

 if (zc == [CFF\_FACE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baa6aea3358b01fc54950d21d8af9c01a0)) {

 std::cout &lt;&lt; " Face-Data" &lt;&lt; std::endl;

 } else if (zc == [CFF\_CELL\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba62b22dd5125249182737df29d52bafbd)) {

 std::cout &lt;&lt; " Cell-Data" &lt;&lt; std::endl;

 } else if (zc == [CFF\_NODE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba8ea3a3242fd587dc97ca2cf83dbf61d7)) {

 std::cout &lt;&lt; " Node-Data" &lt;&lt; std::endl;

 } else if (zc == [CFF\_EDGE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baf550346da426ab4fa297c5343dc2b81a)) {

 std::cout &lt;&lt; " Edge-Data" &lt;&lt; std::endl;

 }

 

 [ansys::VariableIds](group__typedefs.xhtml#gad69adea4467dfcbfbc23dac7843118dc) varIds;

 reader.[getPhaseVariablesOfCategory](classansys_1_1_cff_provider.xhtml#a9058ae75fd226e579e73716be0b2a186)(zc, varIds);

 

 // read all the vars one-by-one

 for (size\_t iv = 0; iv &lt; varName.size(); ++iv) {

 [ansys::AttributeValue](group__typedefs.xhtml#ga47c6faffdbbe31551e61373e813bf984) longName;

 if (!reader.[getAttributeValueOfPhaseVariable](classansys_1_1_cff_provider.xhtml#aa185303a2944c8900df1871c43f7c0b0)(varName[iv],

 "Long Name",

 longName)) {

 longName = varName[iv];

 }

 std::cout &lt;&lt; " " &lt;&lt; longName &lt;&lt; "(" &lt;&lt; varIds[iv] &lt;&lt; "):" &lt;&lt; std::endl;

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 

 // find out which zones have this variable and number of data per

 // element

 size\_t numVarsPerElem =

 reader.[startReadingZonesOfCategoryWithPhaseVariable](classansys_1_1_cff_provider.xhtml#a374aff84f4921267d0bfb0a7331f384f)(zc,

 varName[iv],

 zoneIds);

 

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 // allocate memory

 std::vector&lt;double&gt; dataBuf(numElems * numVarsPerElem);

 reader.[getValuesOfPhaseVariableForElementsInRange](classansys_1_1_cff_provider.xhtml#a204bc49d2d40117f3cfa22aacdd3cccf)(minId,

 maxId,

 dataBuf.data(),

 dataBuf.size());

 std::cout &lt;&lt; " Data of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; numElems &lt;&lt; " x "

 &lt;&lt; numVarsPerElem &lt;&lt; " buffer." &lt;&lt; std::endl;

 }

 reader.[endReadingZonesOfCategoryWithPhaseVariable](classansys_1_1_cff_provider.xhtml#a65d8e7788ae0a85799a0c49b7386c08a)();

 }

 }

 reader.[endReadingPhase](classansys_1_1_cff_provider.xhtml#a954fd426cec8dd060989ad76dc86b662)();

 }

}

[ansys::CffProvider::getCoordinatesForNodesInRange](classansys_1_1_cff_provider.xhtml#a09bcd8a8d757eca114b3de78f8b79836)

virtual size_t getCoordinatesForNodesInRange(const ElemIdType minid, const ElemIdType maxId, float *const coords, const size_t) const

Obtain the coordinates for a node range.

**Definition:** CffProviderMethods.cpp:841



[ansys::CffProvider::getCell0sForFacesInRange](classansys_1_1_cff_provider.xhtml#a168330f08b96e706847fbb52227f2e78)

virtual size_t getCell0sForFacesInRange(const ElemIdType minId, const ElemIdType maxId, ElemIdType *const cell0Id, const size_t) const

Obtain cell 0 parents for all faces within a face range.

**Definition:** CffProviderMethods.cpp:1537



[ansys::CffProvider::getNodeCountsForCellsInRange](classansys_1_1_cff_provider.xhtml#a1ec255bebd3153f50046b2c5535551d4)

virtual size_t getNodeCountsForCellsInRange(const ElemIdType minId, const ElemIdType maxId, short *const cnc, const size_t) const

Get the node counts for a range of cells.

**Definition:** CffProviderMethods.cpp:2298



[ansys::CffProvider::getValuesOfPhaseVariableForElementsInRange](classansys_1_1_cff_provider.xhtml#a204bc49d2d40117f3cfa22aacdd3cccf)

virtual size_t getValuesOfPhaseVariableForElementsInRange(const ElemIdType minId, const ElemIdType maxId, double *const vals, const size_t) const

Read solution data for a range of elements for the variable being requested by the previous call to s...

**Definition:** CffProviderMethods.cpp:3556



[ansys::CffProvider::getFaceCountsForCellsInRange](classansys_1_1_cff_provider.xhtml#a2f6f064b0868849ad6c5de91ed27939f)

virtual size_t getFaceCountsForCellsInRange(const ElemIdType minId, const ElemIdType maxId, short *const cfc, const size_t dataSize) const

**Definition:** CffProviderMethods.cpp:2544



[ansys::CffProvider::getCell1sForFacesInRange](classansys_1_1_cff_provider.xhtml#a3e1df6299a9d7010dd48c051670b8a90)

virtual size_t getCell1sForFacesInRange(const ElemIdType minId, const ElemIdType maxId, ElemIdType *const cell1, const size_t) const

Obtain cell 1 parents for all faces within a range.

**Definition:** CffProviderMethods.cpp:1643



[ansys::CffProvider::getTypesForCellsInRange](classansys_1_1_cff_provider.xhtml#a6b471287a0ddd80faf844592a0e4ba9e)

virtual size_t getTypesForCellsInRange(const ElemIdType, const ElemIdType, CellType *const, const size_t) const

Obtain the types of all cells in a range.

**Definition:** CffProviderMethods.cpp:2059



[ansys::CffProvider::getNodeIdsForCellsInRange](classansys_1_1_cff_provider.xhtml#a6b4f52746928b3f5de4a79cb52f42844)

virtual size_t getNodeIdsForCellsInRange(const ElemIdType minId, const ElemIdType maxId, ElemIdType *const cnid, const size_t) const

Get the node identifiers for a range of cells.

**Definition:** CffProviderMethods.cpp:2431



[ansys::CffProvider::getPartitionIdsForCellsInRange](classansys_1_1_cff_provider.xhtml#a8957272e6fa7ef3b2a031885ba83ca51)

virtual size_t getPartitionIdsForCellsInRange(const ElemIdType, const ElemIdType, PartitionIdType *const partIds, const size_t) const

**Definition:** CffProviderMethods.cpp:2646



[ansys::CffProvider::getNodeCountsForFacesInRange](classansys_1_1_cff_provider.xhtml#a9c685afa9deec6f2d84ad39531d530b6)

virtual size_t getNodeCountsForFacesInRange(const ElemIdType, const ElemIdType, short *const, const size_t) const

Get the node counts for a range of faces.

**Definition:** CffProviderMethods.cpp:1226



[ansys::CffProvider::getNodeIdsForFacesInRange](classansys_1_1_cff_provider.xhtml#aa3f19dccc34a60dc060dae5c6a305acc)

virtual size_t getNodeIdsForFacesInRange(const ElemIdType, const ElemIdType, ElemIdType *const, const size_t) const

Get the node identifiers for a range of faces.

**Definition:** CffProviderMethods.cpp:1358



[ansys::CffProvider::hasUniformNodeCountForFacesInRange](classansys_1_1_cff_provider.xhtml#ad75f1fd4c76976d52726e13c34743e7c)

virtual bool hasUniformNodeCountForFacesInRange(const ElemIdType minId, const ElemIdType maxId, short *const ufnc) const

Query whether all faces in the face range are defined using a uniform node count. i....

**Definition:** CffProviderMethods.cpp:1139



[ansys::CffProvider::hasUniformNodeCountForEdgesInRange](classansys_1_1_cff_provider.xhtml#ae4bb2990c06dac5113eae4bdd73a631b)

virtual bool hasUniformNodeCountForEdgesInRange(const ElemIdType minId, const ElemIdType maxId, short *const uenc) const

**Definition:** CffProviderMethods.cpp:905



[ansys::CffProvider::getFaceIdsForCellsInRange](classansys_1_1_cff_provider.xhtml#aee39cd506553cc0142d1a926ea222bdc)

virtual size_t getFaceIdsForCellsInRange(const ElemIdType minId, const ElemIdType maxId, ElemIdType *const cfid, const size_t dataSize) const

**Definition:** CffProviderMethods.cpp:2584



[ansys::CffProvider::getNodeCountsForEdgesInRange](classansys_1_1_cff_provider.xhtml#aef5f548e5fb06fae2ec1da0ead4852d2)

virtual size_t getNodeCountsForEdgesInRange(const ElemIdType, const ElemIdType, short *const, const size_t) const

**Definition:** CffProviderMethods.cpp:934



[ansys::CffProvider::getNodeIdsForEdgesInRange](classansys_1_1_cff_provider.xhtml#af8cfa866da3608fd4cd4c88d45c9915c)

virtual size_t getNodeIdsForEdgesInRange(const ElemIdType, const ElemIdType, ElemIdType *const, const size_t) const

**Definition:** CffProviderMethods.cpp:978





Read data by element:

**ReadByElement.hpp** (This can be found at example/hdf/Import/ReadByElement.hpp in the CFF-SDK directory.)

/\*

 \* Copyright 2025 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.

 \*/

 

void

ReadNodeCoordinatesByElement([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 

 // get which node-zones have coordinate information

 reader.[startReadingCoordinatesForNodes](classansys_1_1_cff_provider.xhtml#a27d53bed5408033d1847519f50054249)(zoneIds);

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Coordinates of node-zones", zoneIds);

 std::cout &lt;&lt; std::endl;

 

 // to store coordinates of one node

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) dimension = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_DIMENSION](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ac797bdd0c993d968d38f0c35b496d207), dimension);

 

 // Allocate memory to store coordinates of all the nodes of this zone

 std::vector&lt;double&gt; coords(numElems * dimension);

 std::vector&lt;double&gt; coord(dimension);

 size\_t count = 0;

 for ([ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) elemId = minId; elemId &lt;= maxId; ++elemId) {

 const size\_t numRead =

 reader.[getCoordinatesForNode](classansys_1_1_cff_provider.xhtml#ab8eeb500eea651350746eaab43fcdc31)(elemId, &amp;coord.at(0), coord.size());

 assert(numRead == coord.size());

 std::copy(coord.begin(), coord.end(), coords.begin() + count);

 count += coord.size();

 }

 std::cout &lt;&lt; "Coordinates of zone-" &lt;&lt; zoneIds[iz] &lt;&lt; " is read into a "

 &lt;&lt; numElems &lt;&lt; " x " &lt;&lt; dimension &lt;&lt; " buffer." &lt;&lt; std::endl;

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingCoordinatesForNodes](classansys_1_1_cff_provider.xhtml#a711c179a961fce56dbab38bc71e124ab)();

}

 

void

ReadEdgeNodesByElement([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 reader.[startReadingNodesForEdges](classansys_1_1_cff_provider.xhtml#a552888288a8edbb2d73d64c38dc9d7a4)(zoneIds);

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Edge-nodes of edge-zones", zoneIds);

 std::cout &lt;&lt; std::endl;

 

 reader.[startReadingNodeCountsForEdges](classansys_1_1_cff_provider.xhtml#ab45e4776d4e5234a3141c7aa8d578604)();

 

 std::vector&lt;size_t&gt; zaenc(zoneIds.size());

 std::vector&lt;ansys::ElemIdType&gt; minId(zoneIds.size());

 std::vector&lt;ansys::ElemIdType&gt; maxId(zoneIds.size());

 std::vector&lt;ansys::ElemIdType&gt; numElems(zoneIds.size());

 std::vector&lt;std::vector&lt;short&gt;&gt; enc(zoneIds.size());

 

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId[iz]);

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId[iz]);

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems[iz]);

 

 short unc = 0;

 if (reader.[hasUniformNodeCountForEdgesInZone](classansys_1_1_cff_provider.xhtml#a9360a8a8c057b632d50983026e3193b4)(zoneIds[iz], &amp;unc)) {

 enc[iz].resize(1, unc);

 std::cout &lt;&lt; "Edges in zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " have a uniform edge-node-count." &lt;&lt; std::endl;

 } else {

 enc[iz].resize(numElems[iz]);

 size\_t count = 0;

 for ([ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) elemId = minId[iz]; elemId &lt;= maxId[iz]; ++elemId) {

 enc[iz][count++] = reader.[getNodeCountForEdge](classansys_1_1_cff_provider.xhtml#a0c5ebdcf0b2485aaf73be928702564c5)(elemId);

 }

 std::cout &lt;&lt; "Edge-node-counts of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; enc[iz].size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 }

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingNodeCountsForEdges](classansys_1_1_cff_provider.xhtml#a315a4ee6d663824925bd3659a2f5948a)();

 

 reader.[startReadingNodeIdsForEdges](classansys_1_1_cff_provider.xhtml#afdc57f3b7434feb115641d4ef564517c)();

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 const auto&amp; zenc = enc[iz];

 bool uniform = zenc.size() == 1;

 size\_t zaenc = 0;

 if (uniform) {

 // Uniform

 zaenc = zenc[0] * numElems[iz];

 } else {

 zaenc = std::accumulate(zenc.begin(), zenc.end(), 0);

 }

 if (zaenc == 0) {

 continue;

 }

 // Allocate the memory to store the nodes of all edges of this zone

 std::vector&lt;ansys::ElemIdType&gt; enid(zaenc);

 size\_t eIdx = 0;

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107)* nodeIds = enid.data();

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) elemId = minId[iz];

 if (uniform) {

 for (; elemId &lt;= maxId[iz]; ++elemId) {

 if (reader.[getNodeIdsForEdge](classansys_1_1_cff_provider.xhtml#ad90a01f6966dfbb36b7f8f751a5ba72a)(elemId,

 nodeIds,

 zenc[eIdx]) != (size\_t)zenc[eIdx]) {

 break;

 }

 nodeIds += zenc[eIdx];

 }

 } else {

 for (; elemId &lt;= maxId[iz]; ++elemId) {

 if (reader.[getNodeIdsForEdge](classansys_1_1_cff_provider.xhtml#ad90a01f6966dfbb36b7f8f751a5ba72a)(elemId,

 nodeIds,

 zenc[eIdx]) != (size\_t)zenc[eIdx]) {

 break;

 }

 nodeIds += zenc[eIdx++];

 }

 }

 if (elemId &lt;= maxId[iz]) {

 std::cout &lt;&lt; "Failed to read edge-node-ids for edge " 

 &lt;&lt; elemId &lt;&lt; " in zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; std::endl;

 } else {

 std::cout &lt;&lt; "Edge-node-ids of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; enid.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 }

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingNodeIdsForEdges](classansys_1_1_cff_provider.xhtml#a6eee27f05f46065b0d6fffc47996446e)();

 reader.[endReadingNodesForEdges](classansys_1_1_cff_provider.xhtml#a4aefe599fb5075dad1456b522a77870d)();

}

 

void

ReadFaceNodesByElement([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 reader.[startReadingNodesForFaces](classansys_1_1_cff_provider.xhtml#a398329d63a76748e94252a5aed723ea0)(zoneIds);

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Face-nodes of face-zones", zoneIds);

 std::cout &lt;&lt; std::endl;

 

 // read number of nodes of each faces first for efficient memory

 // allocation;

 // can be skipped to read the face-nodes directly

 reader.[startReadingNodeCountsForFaces](classansys_1_1_cff_provider.xhtml#aa07af19ed77b75267720278d924989fb)();

 

 std::vector&lt;size_t&gt; zafnc(zoneIds.size());

 std::vector&lt;ansys::ElemIdType&gt; minId(zoneIds.size());

 std::vector&lt;ansys::ElemIdType&gt; maxId(zoneIds.size());

 std::vector&lt;ansys::ElemIdType&gt; numElems(zoneIds.size());

 std::vector&lt;std::vector&lt;short&gt;&gt; fnc(zoneIds.size());

 

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId[iz]);

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId[iz]);

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems[iz]);

 

 short unc = 0;

 if (reader.[hasUniformNodeCountForFacesInZone](classansys_1_1_cff_provider.xhtml#a00a4cc0096694a30f4ffc319486fed4c)(zoneIds[iz], &amp;unc)) {

 fnc[iz].resize(1, unc);

 std::cout &lt;&lt; "Faces in zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " have a uniform face-node-count." &lt;&lt; std::endl;

 } else {

 fnc[iz].resize(numElems[iz]);

 size\_t count = 0;

 for ([ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) elemId = minId[iz]; elemId &lt;= maxId[iz]; ++elemId) {

 fnc[iz][count++] = reader.[getNodeCountForFace](classansys_1_1_cff_provider.xhtml#ad24c00fc606bbb4b9c7b079e2d081ef3)(elemId);

 }

 std::cout &lt;&lt; "Face-node-counts of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; fnc[iz].size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 }

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingNodeCountsForFaces](classansys_1_1_cff_provider.xhtml#a2145183affbf311349cba44c61497089)();

 

 reader.[startReadingNodeIdsForFaces](classansys_1_1_cff_provider.xhtml#a5ca9bd2cb8fdfd76b02faabc7b6bb09d)();

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 const auto&amp; zfnc = fnc[iz];

 bool uniform = zfnc.size() == 1;

 size\_t zafnc = 0;

 if (uniform) {

 // Uniform

 zafnc = zfnc[0] * numElems[iz];

 } else {

 zafnc = std::accumulate(zfnc.begin(), zfnc.end(), 0);

 }

 if (zafnc == 0) {

 continue;

 }

 // Allocate the memory to store the nodes of all faces in this zone

 std::vector&lt;ansys::ElemIdType&gt; fnid(zafnc);

 size\_t eIdx = 0;

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107)* nodeIds = fnid.data();

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) elemId = minId[iz];

 if (uniform) {

 for (; elemId &lt;= maxId[iz]; ++elemId) {

 if (reader.[getNodeIdsForFace](classansys_1_1_cff_provider.xhtml#a7ba0f357133194ce64fb2cd5f4731666)(elemId,

 nodeIds,

 zfnc[eIdx]) != (size\_t)zfnc[eIdx]) {

 break;

 }

 nodeIds += zfnc[eIdx];

 }

 } else {

 for (; elemId &lt;= maxId[iz]; ++elemId) {

 if (reader.[getNodeIdsForFace](classansys_1_1_cff_provider.xhtml#a7ba0f357133194ce64fb2cd5f4731666)(elemId,

 nodeIds,

 zfnc[eIdx]) != (size\_t)zfnc[eIdx]) {

 break;

 }

 nodeIds += zfnc[eIdx++];

 }

 }

 if (elemId &lt;= maxId[iz]) {

 std::cout &lt;&lt; "Failed to read face-node-ids for face " 

 &lt;&lt; elemId &lt;&lt; " in zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; std::endl;

 } else {

 std::cout &lt;&lt; "Face-node-ids of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; fnid.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 }

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingNodeIdsForFaces](classansys_1_1_cff_provider.xhtml#aec4659c0936ed0dbecf4047140411790)();

 reader.[endReadingNodesForFaces](classansys_1_1_cff_provider.xhtml#a0c5a426a9ac6d5348206222a72570eac)();

}

 

void

ReadFaceCellParentsByElement([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader, int side)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 // get which face-zones have cell-0 information

 if (side == 0) {

 reader.[startReadingCell0sForFaces](classansys_1_1_cff_provider.xhtml#ad66e04a3e7c0016df0722f19bc199dd3)(zoneIds);

 } else {

 reader.[startReadingCell1sForFaces](classansys_1_1_cff_provider.xhtml#ae845f23ea32051d1e880cd9ce70c50de)(zoneIds);

 }

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Cell-" + std::to_string(side) + " of face-zones",

 zoneIds);

 std::cout &lt;&lt; std::endl;

 

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 std::vector&lt;ansys::ElemIdType&gt; fc(numElems);

 if (side == 0) {

 size\_t count = 0;

 for ([ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) elemId = minId; elemId &lt;= maxId; ++elemId) {

 fc[count++] = reader.[getCell0ForFace](classansys_1_1_cff_provider.xhtml#a24a1c966a1ed07093610e92467255aa2)(elemId);

 }

 } else {

 size\_t count = 0;

 for ([ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) elemId = minId; elemId &lt;= maxId; ++elemId) {

 fc[count++] = reader.[getCell1ForFace](classansys_1_1_cff_provider.xhtml#ab5284c2a86f1aa3c7d243375c8d1e4ad)(elemId);

 }

 }

 std::cout &lt;&lt; "Face-cell" &lt;&lt; side &lt;&lt; "-connectivity of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; fc.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 }

 std::cout &lt;&lt; std::endl;

 if (side == 0) {

 reader.[endReadingCell0sForFaces](classansys_1_1_cff_provider.xhtml#a7ecbb5f8ffaac915d9008653ce29d98f)();

 } else {

 reader.[endReadingCell1sForFaces](classansys_1_1_cff_provider.xhtml#ad22d107258d88a354c443e822507830b)();

 }

}

 

void

ReadCellTypesByElement([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 // find which cell-zones have this information

 reader.[startReadingTypesForCells](classansys_1_1_cff_provider.xhtml#a8412293a2d419024be3e6a4a8aa58a97)(zoneIds);

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Cell-types of cell-zones", zoneIds);

 

 // a cell-zone can have uniform cell type (not poly);

 // then, no need to read types of each cells in that zone one-by-one

 std::vector&lt;ansys::CellType&gt; zct(zoneIds.size(), [CFF\_CELL\_TYPE\_MIXED](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a1eed460af26c972bc96e5f71e7d124ba));

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 // check if uniform cell-type; the type is returned in "cellType";

 // if not-uniform, cellType shall have garbage value

 [ansys::CellType](group__enums.xhtml#gac0b3f753b9307362895e46aaa1a9f366) cellType = [CFF\_CELL\_TYPE\_MIXED](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a1eed460af26c972bc96e5f71e7d124ba);

 if (reader.[hasUniformTypeForCellsInZone](classansys_1_1_cff_provider.xhtml#add3567ba1ab18fdc09a22af4c10cd665)(zoneIds[iz], &amp;cellType)) {

 zct[iz] = cellType;

 }

 }

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 std::cout &lt;&lt; "Cell-type ids of zone-" &lt;&lt; zoneIds[iz] &lt;&lt; " is ";

 if ([CFF\_CELL\_TYPE\_MIXED](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a1eed460af26c972bc96e5f71e7d124ba) != zct[iz]) {

 std::cout &lt;&lt; "uniform (" &lt;&lt; static\_cast&lt;short&gt;(zct[iz]) &lt;&lt; ")." &lt;&lt; std::endl;

 continue;

 }

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 // Allocate memory to store the cell type for each cell in this zone

 std::vector&lt;ansys::CellType&gt; ct(numElems);

 size\_t count = 0;

 for ([ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) elemId = minId; elemId &lt;= maxId; ++elemId, ++count) {

 ct[count] = reader.[getTypeForCell](classansys_1_1_cff_provider.xhtml#a4634839268bd53e759f4f915c4017f1c)(elemId);

 }

 std::cout &lt;&lt; "read into a " &lt;&lt; ct.size() &lt;&lt; " x 1 buffer." &lt;&lt; std::endl;

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingTypesForCells](classansys_1_1_cff_provider.xhtml#a95896b1f785ae80b4e6f661456168fed)();

}

 

void

ReadCellNodesByElement([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 reader.[startReadingNodesForCells](classansys_1_1_cff_provider.xhtml#a5bf1bb38de1d080b3ff320c435e41835)(zoneIds);

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Cell-nodes of cell-zones", zoneIds);

 std::cout &lt;&lt; std::endl;

 

 reader.[startReadingNodeCountsForCells](classansys_1_1_cff_provider.xhtml#a1413cc9bb5438d81293b0d9d01c41220)();

 

 std::vector&lt;size_t&gt; zacnc(zoneIds.size());

 std::vector&lt;ansys::ElemIdType&gt; minId(zoneIds.size());

 std::vector&lt;ansys::ElemIdType&gt; maxId(zoneIds.size());

 std::vector&lt;ansys::ElemIdType&gt; numElems(zoneIds.size());

 std::vector&lt;std::vector&lt;short&gt;&gt; cnc(zoneIds.size());

 

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId[iz]);

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId[iz]);

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems[iz]);

 

 short unc = 0;

 if (reader.[hasUniformNodeCountForCellsInZone](classansys_1_1_cff_provider.xhtml#ae6fccf5ab31d1e02b633ddd515126170)(zoneIds[iz], &amp;unc)) {

 cnc[iz].resize(1, unc);

 std::cout &lt;&lt; "Cells in zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " have a uniform cell-node-count." &lt;&lt; std::endl;

 } else {

 cnc[iz].resize(numElems[iz]);

 size\_t count = 0;

 for ([ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) elemId = minId[iz]; elemId &lt;= maxId[iz]; ++elemId) {

 cnc[iz][count++] = reader.[getNodeCountForCell](classansys_1_1_cff_provider.xhtml#a586f216a35969eae4985b15d27969ea4)(elemId);

 }

 std::cout &lt;&lt; "Cell-node-counts of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; cnc[iz].size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 }

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingNodeCountsForCells](classansys_1_1_cff_provider.xhtml#acd5e16e4c4783d56d27635cdc01ebc69)();

 

 reader.[startReadingNodeIdsForCells](classansys_1_1_cff_provider.xhtml#a0ea4768347c60c616af6c03f8504cdb1)();

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 const auto&amp; zcnc = cnc[iz];

 bool uniform = zcnc.size() == 1;

 size\_t zacnc = 0;

 if (uniform) {

 // Uniform

 zacnc = zcnc[0] * numElems[iz];

 } else {

 zacnc = std::accumulate(zcnc.begin(), zcnc.end(), 0);

 }

 if (zacnc == 0) {

 continue;

 }

 // Allocate the memory to store the nodes of all cells in this zone

 std::vector&lt;ansys::ElemIdType&gt; cnid(zacnc);

 size\_t eIdx = 0;

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107)* nodeIds = cnid.data();

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) elemId = minId[iz];

 if (uniform) {

 for (; elemId &lt;= maxId[iz]; ++elemId) {

 if (reader.[getNodeIdsForCell](classansys_1_1_cff_provider.xhtml#a57260e4410ba1659a4f0be52a4acfe7c)(elemId,

 nodeIds,

 zcnc[eIdx]) != (size\_t)zcnc[eIdx]) {

 break;

 }

 nodeIds += zcnc[eIdx];

 }

 } else {

 for (; elemId &lt;= maxId[iz]; ++elemId) {

 if (reader.[getNodeIdsForCell](classansys_1_1_cff_provider.xhtml#a57260e4410ba1659a4f0be52a4acfe7c)(elemId,

 nodeIds,

 zcnc[eIdx]) != (size\_t)zcnc[eIdx]) {

 break;

 }

 nodeIds += zcnc[eIdx++];

 }

 }

 if (elemId &lt;= maxId[iz]) {

 std::cout &lt;&lt; "Failed to read cell-node-ids for cell " 

 &lt;&lt; elemId &lt;&lt; " in zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; std::endl;

 } else {

 std::cout &lt;&lt; "Cell-node-ids of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; cnid.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 }

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingNodeIdsForCells](classansys_1_1_cff_provider.xhtml#aaaf7294d55c98855c024ba53a950e5a9)();

 reader.[endReadingNodesForCells](classansys_1_1_cff_provider.xhtml#ac3305957b72a077605e33b3e8841eac5)();

}

 

void

ReadCellPartitionsByElement([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 // find which cell-zones have this information

 reader.[startReadingPartitionIdsForCells](classansys_1_1_cff_provider.xhtml#ada00abc25e7f9b4e4a9464cfa4ca1b92)(zoneIds);

 // store number of partitions of all zones;

 // (this will be same for ANSYS Fluent across zones)

 std::vector&lt;int&gt; znp(zoneIds.size(), 1);

 // to store the cell-partition

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 znp[iz] = reader.[getPartitionCountForZone](classansys_1_1_cff_provider.xhtml#a83a1e0c28c1e11a9797316e1d23efa52)(zoneIds[iz]);

 }

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 std::cout &lt;&lt; "Cell-partition ids of zone-" &lt;&lt; zoneIds[iz] &lt;&lt; " is ";

 if (znp[iz] &lt; 2) {

 std::cout &lt;&lt; "not read as partition-count is " &lt;&lt; znp[iz] &lt;&lt; "."

 &lt;&lt; std::endl;

 continue;

 }

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 // Allocate memory to store the partition for each cell in this zone

 std::vector&lt;ansys::PartitionIdType&gt; cp(numElems);

 size\_t count = 0;

 for ([ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) elemId = minId; elemId &lt;= maxId; ++elemId, ++count) {

 cp[count] = reader.[getPartitionIdForCell](classansys_1_1_cff_provider.xhtml#a94b9bdebe06aaf786cd237e5a062daba)(elemId);

 }

 std::cout &lt;&lt; " read into a " &lt;&lt; cp.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingPartitionIdsForCells](classansys_1_1_cff_provider.xhtml#a4141dc03c1b22bbdc805a082bd9505ee)();

}

 

void

ReadCellFacesByElement([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 reader.[startReadingFacesForCells](classansys_1_1_cff_provider.xhtml#a5650722b9dfd8f53cb5257b269768e47)(zoneIds);

 if (zoneIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Cell-faces of cell-zones", zoneIds);

 std::cout &lt;&lt; std::endl;

 

 reader.[startReadingFaceCountsForCells](classansys_1_1_cff_provider.xhtml#a5459bec0b67c257890950e77c8090480)();

 // Allocate space for storing total face counts for zone 

 std::vector&lt;std::vector&lt;short&gt;&gt; zcfc(zoneIds.size());

 std::vector&lt;size_t&gt; zacfc(zoneIds.size());

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 // Allocate memory required to store all face counts for cells in this zone

 auto&amp; cfc = zcfc[iz];

 cfc.resize(numElems);

 size\_t count = 0;

 for ([ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) elemId = minId; elemId &lt;= maxId; ++elemId, ++count) {

 cfc[count] = reader.[getFaceCountForCell](classansys_1_1_cff_provider.xhtml#a13500e622e0d5a55c9ad62dee4ac828a)(elemId);

 }

 std::cout &lt;&lt; "Cell-face-counts of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; cfc.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 zacfc[iz] = std::accumulate(cfc.begin(), cfc.end(), 0);

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingFaceCountsForCells](classansys_1_1_cff_provider.xhtml#a7a21ca1ed1122136e572b2d39e51b957)();

 

 reader.[startReadingFaceIdsForCells](classansys_1_1_cff_provider.xhtml#ab212deff72f88c5dcf00341eed7d3617)();

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 if (0 == zacfc[iz]) {

 continue;

 }

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 // Allocate memory to store the faces for all cells in this zone

 std::vector&lt;ansys::ElemIdType&gt; zcfid(zacfc[iz]);

 auto cfid = zcfid.data();

 // Use previously read face counts while reading faces for cells in zone

 const auto&amp; cfc = zcfc[iz];

 size\_t count = 0;

 for ([ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) elemId = minId; elemId &lt;= maxId; ++elemId, ++count) {

 reader.[getFaceIdsForCell](classansys_1_1_cff_provider.xhtml#aedc8bb71a5402fc86b01dd841bef198f)(elemId, cfid, cfc[count]);

 cfid += cfc[count];

 }

 std::cout &lt;&lt; "Cell-face-ids of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; zcfid.size() &lt;&lt; " x 1 buffer."

 &lt;&lt; std::endl;

 }

 std::cout &lt;&lt; std::endl;

 reader.[endReadingFaceIdsForCells](classansys_1_1_cff_provider.xhtml#ab880f84593866d01b17c6d311e9bfaa8)();

 reader.[endReadingFacesForCells](classansys_1_1_cff_provider.xhtml#a85c80e3b0e56fa0a93ff0ed58b40e8fc)();

} 

 

void

ReadVariablesByElement([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::PhaseIds](group__typedefs.xhtml#ga99ff3bf3b76eac538df4d637faab6b4c) phaseIds;

 // find out how many Eulerian phases are there in the data file

 reader.[getPhaseIds](classansys_1_1_cff_base.xhtml#af555905619187578ebedc0da9116ae54)(phaseIds);

 if (phaseIds.empty()) {

 return;

 }

 PRINT_VECTOR_WITH_COMMA("Reading data of phases", phaseIds);

 std::cout &lt;&lt; std::endl;

 

 // read the phases one-by-one

 for (size\_t ip = 0; ip &lt; phaseIds.size(); ++ip) {

 std::cout &lt;&lt; "Reading data of phase-" &lt;&lt; phaseIds[ip] &lt;&lt; ":" &lt;&lt; std::endl;

 reader.[startReadingPhase](classansys_1_1_cff_provider.xhtml#aac5960659dcd7609d4e192b810238be2)(phaseIds[ip]);

 

 std::vector&lt;ansys::ZoneCategory&gt; zoneCategories =

 { [CFF\_FACE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baa6aea3358b01fc54950d21d8af9c01a0), [CFF\_CELL\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba62b22dd5125249182737df29d52bafbd), [CFF\_NODE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba8ea3a3242fd587dc97ca2cf83dbf61d7), [CFF\_EDGE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baf550346da426ab4fa297c5343dc2b81a) };

 

 // read the solution variable data one-by-one

 for (const auto&amp; zc : zoneCategories) {

 // get what variables are there under this situation

 std::vector&lt;std::string&gt; varName;

 reader.[getPhaseVariablesOfCategory](classansys_1_1_cff_provider.xhtml#a9058ae75fd226e579e73716be0b2a186)(zc, varName);

 

 if (varName.empty()) {

 continue;

 }

 

 if (zc == [CFF\_FACE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baa6aea3358b01fc54950d21d8af9c01a0)) {

 std::cout &lt;&lt; " Face-Data" &lt;&lt; std::endl;

 } else if (zc == [CFF\_CELL\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba62b22dd5125249182737df29d52bafbd)) {

 std::cout &lt;&lt; " Cell-Data" &lt;&lt; std::endl;

 } else if (zc == [CFF\_NODE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba8ea3a3242fd587dc97ca2cf83dbf61d7)) {

 std::cout &lt;&lt; " Node-Data" &lt;&lt; std::endl;

 } else if (zc == [CFF\_EDGE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baf550346da426ab4fa297c5343dc2b81a)) {

 std::cout &lt;&lt; " Edge-Data" &lt;&lt; std::endl;

 }

 

 [ansys::VariableIds](group__typedefs.xhtml#gad69adea4467dfcbfbc23dac7843118dc) varIds;

 reader.[getPhaseVariablesOfCategory](classansys_1_1_cff_provider.xhtml#a9058ae75fd226e579e73716be0b2a186)(zc, varIds);

 

 // read all the vars one-by-one

 for (size\_t iv = 0; iv &lt; varName.size(); ++iv) {

 [ansys::AttributeValue](group__typedefs.xhtml#ga47c6faffdbbe31551e61373e813bf984) longName;

 if (!reader.[getAttributeValueOfPhaseVariable](classansys_1_1_cff_provider.xhtml#aa185303a2944c8900df1871c43f7c0b0)(varName[iv],

 "Long Name",

 longName)) {

 longName = varName[iv];

 }

 std::cout &lt;&lt; " " &lt;&lt; longName &lt;&lt; "(" &lt;&lt; varIds[iv] &lt;&lt; "):" &lt;&lt; std::endl;

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) zoneIds;

 

 // find out which zones have this variable and number of data per

 // element

 size\_t numVarsPerElem =

 reader.[startReadingZonesOfCategoryWithPhaseVariable](classansys_1_1_cff_provider.xhtml#a374aff84f4921267d0bfb0a7331f384f)(zc,

 varName[iv],

 zoneIds);

 

 for (size\_t iz = 0; iz &lt; zoneIds.size(); ++iz) {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) minId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), minId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) maxId = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), maxId);

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) numElems = 0;

 reader.[getZoneSizeInfo](classansys_1_1_cff_base.xhtml#a3288b67c94eebe85133afbf5c6329a73)(zoneIds[iz], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), numElems);

 

 // allocate memory

 std::vector&lt;double&gt; dataBuf(numElems * numVarsPerElem);

 std::vector&lt;double&gt; elemData(numVarsPerElem);

 size\_t count = 0;

 for ([ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) elemId = minId; elemId &lt;= maxId; ++elemId) {

 const size\_t numRead =

 reader.[getValuesOfPhaseVariableForElement](classansys_1_1_cff_provider.xhtml#ad26e7a2a121493f7619f764fd7054ba0)(elemId,

 elemData.data(),

 elemData.size());

 assert(numRead == elemData.size());

 std::copy(elemData.begin(),

 elemData.begin() + numRead,

 dataBuf.begin() + count);

 count += numRead;

 }

 std::cout &lt;&lt; " Data of zone-" &lt;&lt; zoneIds[iz]

 &lt;&lt; " is read into a " &lt;&lt; numElems &lt;&lt; " x "

 &lt;&lt; numVarsPerElem &lt;&lt; " buffer." &lt;&lt; std::endl;

 }

 reader.[endReadingZonesOfCategoryWithPhaseVariable](classansys_1_1_cff_provider.xhtml#a65d8e7788ae0a85799a0c49b7386c08a)();

 }

 }

 reader.[endReadingPhase](classansys_1_1_cff_provider.xhtml#a954fd426cec8dd060989ad76dc86b662)();

 }

}

[ansys::CffProvider::getNodeCountForEdge](classansys_1_1_cff_provider.xhtml#a0c5ebdcf0b2485aaf73be928702564c5)

virtual short getNodeCountForEdge(const ElemIdType edgeId) const

**Definition:** CffProviderMethods.cpp:922



[ansys::CffProvider::getFaceCountForCell](classansys_1_1_cff_provider.xhtml#a13500e622e0d5a55c9ad62dee4ac828a)

virtual short getFaceCountForCell(const ElemIdType cellId) const

**Definition:** CffProviderMethods.cpp:2534



[ansys::CffProvider::getCell0ForFace](classansys_1_1_cff_provider.xhtml#a24a1c966a1ed07093610e92467255aa2)

virtual ElemIdType getCell0ForFace(const ElemIdType faceId) const

Obtain cell 0 parent for specified face.

**Definition:** CffProviderMethods.cpp:1510



[ansys::CffProvider::getTypeForCell](classansys_1_1_cff_provider.xhtml#a4634839268bd53e759f4f915c4017f1c)

virtual CellType getTypeForCell(const ElemIdType cellId) const

Query the type for a cell.

**Definition:** CffProviderMethods.cpp:2030



[ansys::CffProvider::getNodeIdsForCell](classansys_1_1_cff_provider.xhtml#a57260e4410ba1659a4f0be52a4acfe7c)

virtual size_t getNodeIdsForCell(const ElemIdType cellId, ElemIdType *const cnid, const size_t) const

Get the node identifiers for a specific cell.

**Definition:** CffProviderMethods.cpp:2400



[ansys::CffProvider::getNodeCountForCell](classansys_1_1_cff_provider.xhtml#a586f216a35969eae4985b15d27969ea4)

virtual short getNodeCountForCell(const ElemIdType cellId) const

Get the node count for a sepcific cell.

**Definition:** CffProviderMethods.cpp:2265



[ansys::CffProvider::getNodeIdsForFace](classansys_1_1_cff_provider.xhtml#a7ba0f357133194ce64fb2cd5f4731666)

virtual size_t getNodeIdsForFace(const ElemIdType faceId, ElemIdType *const fnid, const size_t) const

Get the node identifiers for a specific face.

**Definition:** CffProviderMethods.cpp:1327



[ansys::CffProvider::hasUniformNodeCountForEdgesInZone](classansys_1_1_cff_provider.xhtml#a9360a8a8c057b632d50983026e3193b4)

virtual bool hasUniformNodeCountForEdgesInZone(const ZoneIdType zoneId, short *const uenc) const

**Definition:** CffProviderMethods.cpp:914



[ansys::CffProvider::getPartitionIdForCell](classansys_1_1_cff_provider.xhtml#a94b9bdebe06aaf786cd237e5a062daba)

virtual PartitionIdType getPartitionIdForCell(const ElemIdType cellId) const

**Definition:** CffProviderMethods.cpp:2635



[ansys::CffProvider::getCell1ForFace](classansys_1_1_cff_provider.xhtml#ab5284c2a86f1aa3c7d243375c8d1e4ad)

virtual ElemIdType getCell1ForFace(const ElemIdType faceId) const

Obtain cell 1 parent for specified face.

**Definition:** CffProviderMethods.cpp:1616



[ansys::CffProvider::getCoordinatesForNode](classansys_1_1_cff_provider.xhtml#ab8eeb500eea651350746eaab43fcdc31)

virtual size_t getCoordinatesForNode(const ElemIdType nodeId, float *const coord, const size_t) const

Obtain the coordinates for a specific node.

**Definition:** CffProviderMethods.cpp:817



[ansys::CffProvider::getNodeCountForFace](classansys_1_1_cff_provider.xhtml#ad24c00fc606bbb4b9c7b079e2d081ef3)

virtual short getNodeCountForFace(const ElemIdType faceId) const

Get the node count for a sepcific face.

**Definition:** CffProviderMethods.cpp:1193



[ansys::CffProvider::getValuesOfPhaseVariableForElement](classansys_1_1_cff_provider.xhtml#ad26e7a2a121493f7619f764fd7054ba0)

virtual size_t getValuesOfPhaseVariableForElement(const ElemIdType elemId, double *const vals, const size_t) const

Read solution data for a single element within a zone that contains the variable being requested by t...

**Definition:** CffProviderMethods.cpp:3528



[ansys::CffProvider::getNodeIdsForEdge](classansys_1_1_cff_provider.xhtml#ad90a01f6966dfbb36b7f8f751a5ba72a)

virtual size_t getNodeIdsForEdge(const ElemIdType edgeId, ElemIdType *const enid, const size_t) const

**Definition:** CffProviderMethods.cpp:969



[ansys::CffProvider::getFaceIdsForCell](classansys_1_1_cff_provider.xhtml#aedc8bb71a5402fc86b01dd841bef198f)

virtual size_t getFaceIdsForCell(const ElemIdType cellId, ElemIdType *const cfid, const size_t dataSize) const

**Definition:** CffProviderMethods.cpp:2576





## <a class="anchor" id="ExportExample"></a>Writing Case and Data Files using C++ API

The following example demonstrates how to use the CFF API to write case and results files. The following source code can be built using [Instructions to Build Examples](_c_f_f_s_d_k_examples.xhtml#BuildInstructions).

Run the following command to write case and data files using the C++ API:

&gt;&gt; ./test.exe



**write\_example.cpp**

/\*

 \* Copyright 2025 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.

 \*/

 

\#include "CffInterface/printVersion.hpp"

\#include "Factory/consumers.hpp"

\#include "hdf/Common/CasAndDatCreator.hpp"

 

\#include &lt;iostream&gt;

\#include &lt;memory&gt;

\#include &lt;vector&gt;

 

int

main(int argc, char* argv[])

{

 [ansys::printSDKVersion](namespaceansys.xhtml#aa9b8e96c9c3dd83f83d9a40d9721f6a1)();

 std::unique_ptr&lt;ansys::CffFileConsumer&gt; writerPtr(

 [ansys::getDataConsumer](namespaceansys.xhtml#ab581ca82a4d1ec785c07a865ee73d1fd)([CFF\_HDF](group__enums.xhtml#gga9d98ab88553e163862440763fc91c76aa07723f3ffb199eb4f791d1f74b5ac567)));

 [ansys::CffConsumer](classansys_1_1_cff_consumer.xhtml)&amp; writer = *writerPtr;

 writer.[setMeshId](classansys_1_1_cff_base.xhtml#a7a12ef6589a193f80be541291b0cec4b)(1);

 writer.[setDataPrecision](classansys_1_1_cff_consumer.xhtml#ad74e63316298fa4468f604c380dbd6cf)([CFF\_PRECISION\_DOUBLE](group__enums.xhtml#gga2ecbf04cb65f31fde87a9c60a5bab3d6a583d6d67a6ee03f067b1dc6b717de7e6));

 writer.[setDebugOn](classansys_1_1_cff_base.xhtml#a762f990aefce5b11164a58d2721bd350)(true);

 writer.[setCompression](classansys_1_1_cff_consumer.xhtml#a638307acbea7d99082f60e12f8868c90)(1);

 writer.[setSolverType](classansys_1_1_cff_base.xhtml#a30ca8450d5f621a2decc2dde0ff9207f)("ANSYS\_FLUENT");

 

 writer.[setApplicationName](classansys_1_1_cff_base.xhtml#a37ac2d23d1b21376117cb574ea5aecd5)("CFF API 'C++' Export Example");

 

 const std::string casName = "write\_new.cas.h5";

 const std::string datName = "write\_new.dat.h5";

 

 bool ok =

 writerPtr-&gt;startWriting(casName, [ansys::DataClass::CFF\_CASE](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddba6c8b8209348df38321689fb67cd4b331));

 if(!ok) {

 std::cout &lt;&lt; "Error writing to case file" &lt;&lt; std::endl;

 return 1;

 }

 ok =

 writerPtr-&gt;startWriting(datName, [ansys::DataClass::CFF\_RESULTS](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddbaacfdbe512195015b6446480e80caf4a4));

 if(!ok) {

 std::cout &lt;&lt; "Error writing to data file" &lt;&lt; std::endl;

 return 1;

 }

 

 // top-level mesh information

 size\_t meshDimension, nodeCount, faceCount, cellCount;

 

 // create those information

 CreateMeshInfo(meshDimension, nodeCount, faceCount, cellCount);

 

 // set these information in the writer

 writer.[setMeshSize](classansys_1_1_cff_base.xhtml#a259b65322ef0d42859d988166eed23d7)([CFF\_MESH\_DIMENSION](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002a79c9861f0c03a03f476e399d0a17917d), meshDimension);

 writer.[setMeshSize](classansys_1_1_cff_base.xhtml#a259b65322ef0d42859d988166eed23d7)([CFF\_MESH\_NODE\_COUNT](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002a3697b449f26bbbea1b7248da1f8634db), nodeCount);

 writer.[setMeshSize](classansys_1_1_cff_base.xhtml#a259b65322ef0d42859d988166eed23d7)([CFF\_MESH\_FACE\_COUNT](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002aeda7214eb896ae699e426d0bbc5b30ab), faceCount);

 writer.[setMeshSize](classansys_1_1_cff_base.xhtml#a259b65322ef0d42859d988166eed23d7)([CFF\_MESH\_CELL\_COUNT](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002ab58756bc6e4e7c3e46f2c53ce722b1ef), cellCount);

 

 std::string units;

 CreateMeshUnits(units);

 

 writer.[setMeshUnits](classansys_1_1_cff_base.xhtml#ae323125334ed9fb3d4d62796e08a8451)(units);

 

 // write those information

 writer.[writeMeshAttributes](classansys_1_1_cff_consumer.xhtml#ae7b1724d61296f25be88f63476872fda)();

 

 // nodes

 {

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) nodeZone;

 std::vector&lt;ansys::ElemIdType&gt; startId;

 std::vector&lt;ansys::ElemIdType&gt; endId;

 std::vector&lt;short&gt; dimension;

 std::vector&lt;std::string&gt; names;

 

 // create zone-level information of nodes

 CreateNodeZones(nodeZone, startId, endId, dimension, names);

 

 // set the node-zones

 writer.[setZoneIds](classansys_1_1_cff_base.xhtml#a39f93ca4fe18b77774bf8e8de49761e0)([CFF\_NODE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba8ea3a3242fd587dc97ca2cf83dbf61d7), nodeZone);

 for (size\_t iz = 0; iz &lt; nodeZone.size(); ++iz) {

 writer.[setZoneSizeInfo](classansys_1_1_cff_base.xhtml#ab004b191ee5ecb3c4e601e8fdad56c1a)(

 nodeZone[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), startId[iz]);

 writer.[setZoneSizeInfo](classansys_1_1_cff_base.xhtml#ab004b191ee5ecb3c4e601e8fdad56c1a)(

 nodeZone[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), endId[iz]);

 writer.[setZoneSizeInfo](classansys_1_1_cff_base.xhtml#ab004b191ee5ecb3c4e601e8fdad56c1a)(

 nodeZone[iz], [CFF\_ZONE\_DIMENSION](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ac797bdd0c993d968d38f0c35b496d207), dimension[iz]);

 writer.[setZoneStringInfo](classansys_1_1_cff_base.xhtml#a41dad7e9d021bdda73c87fe328dc8165)(

 nodeZone[iz], [CFF\_ZONE\_STRING\_NAME](group__enums.xhtml#gga7fe67117cb23bbcbb4ff2d5b55c3a704a3df2bc03cc26299fd9a017226d0fa127), names[iz]);

 }

 

 // start writing about these node-zones

 writer.[startWritingNodes](classansys_1_1_cff_consumer.xhtml#a1343500f387f502a9f526018c098188a)(nodeZone);

 //Example showing usage of error status check, ideally such call should be called after every API call

 if (writer.[hasError](classansys_1_1_cff_base.xhtml#ae21605b67de8dfdc99ed2dd2436c8276)())

 {

 for (auto err : writer.[getErrors](classansys_1_1_cff_base.xhtml#a4ad1f2f007e8a575da4935bbc136ee1a)())

 std::cout &lt;&lt; err &lt;&lt; std::endl;

 }

 

 //User can opt to check info and warning messages, these are more for future extension if needed.

 if (writer.[hasWarning](classansys_1_1_cff_base.xhtml#a0c21e26398dc9974f47ca3483ddf5511)())

 {

 for (auto war : writer.[getWarnings](classansys_1_1_cff_base.xhtml#ac9b6a55b76b04124c6e0ce8670b27cdf)())

 std::cout &lt;&lt; war &lt;&lt; std::endl;

 }

 

 if (writer.[hasInfo](classansys_1_1_cff_base.xhtml#a9951a635748839427d6f0025ffe52624)())

 {

 for (auto inf : writer.[getInfos](classansys_1_1_cff_base.xhtml#a082d2c3d4dc0c44c918764d25adcadda)())

 std::cout &lt;&lt; inf &lt;&lt; std::endl;

 }

 

 

 // node coordinates

 {

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) nodeCoordsZone;

 std::vector&lt;std::vector&lt;double&gt; &gt; coords;

 

 // create node coordinates of appropriate zones

 CreateNodeCoords(nodeCoordsZone, coords);

 

 // start writing coordinates of these node-zones

 writer.[startWritingCoordinatesForNodes](classansys_1_1_cff_consumer.xhtml#a0caf47b26c27b85aabc920428d0d1229)(nodeCoordsZone);

 

 // write the coordinates

 for (size\_t iz = 0; iz &lt; nodeCoordsZone.size(); ++iz) {

 writer.[setCoordinatesForNodesInZone](classansys_1_1_cff_consumer.xhtml#a22505ad0fe2b5bd55800733de96894aa)(

 nodeCoordsZone[iz], &amp;(coords[iz].at(0)), coords[iz].size());

 }

 

 // end writing the coordinates

 writer.[endWritingCoordinatesForNodes](classansys_1_1_cff_consumer.xhtml#a720cf2a53b71c1b99ff26ca5f73d8c22)();

 }

 

 // end writing about the node-zones

 writer.[endWritingNodes](classansys_1_1_cff_consumer.xhtml#a23365b7cec8e065e64e89fe712ca2dcc)();

 }

 

 // faces

 {

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) faceZone;

 std::vector&lt;ansys::ElemIdType&gt; startId;

 std::vector&lt;ansys::ElemIdType&gt; endId;

 std::vector&lt;short&gt; dimension;

 std::vector&lt;ansys::ZoneIdType&gt; shadowZoneId;

 std::vector&lt;ansys::ZoneIdType&gt; childZoneId;

 std::vector&lt;ansys::FaceZoneType&gt; zoneType;

 std::vector&lt;ansys::FaceType&gt; elementType;

 std::vector&lt;short&gt; flags;

 std::vector&lt;std::string&gt; name;

 std::vector&lt;std::string&gt; stringZoneType;

 std::vector&lt;ansys::ZoneIds&gt; fzcz0;

 std::vector&lt;ansys::ZoneIds&gt; fzcz1;

 

 // create zone-level information of faces

 CreateFaceZones(faceZone,

 startId,

 endId,

 dimension,

 shadowZoneId,

 childZoneId,

 zoneType,

 elementType,

 flags,

 name,

 stringZoneType,

 fzcz0,

 fzcz1);

 

 writer.[setZoneIds](classansys_1_1_cff_base.xhtml#a39f93ca4fe18b77774bf8e8de49761e0)([CFF\_FACE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baa6aea3358b01fc54950d21d8af9c01a0), faceZone);

 for (size\_t iz = 0; iz &lt; faceZone.size(); ++iz) {

 writer.[setZoneSizeInfo](classansys_1_1_cff_base.xhtml#ab004b191ee5ecb3c4e601e8fdad56c1a)(

 faceZone[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), startId[iz]);

 writer.[setZoneSizeInfo](classansys_1_1_cff_base.xhtml#ab004b191ee5ecb3c4e601e8fdad56c1a)(

 faceZone[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), endId[iz]);

 writer.[setZoneSizeInfo](classansys_1_1_cff_base.xhtml#ab004b191ee5ecb3c4e601e8fdad56c1a)(

 faceZone[iz], [CFF\_ZONE\_DIMENSION](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ac797bdd0c993d968d38f0c35b496d207), dimension[iz]);

 if (shadowZoneId[iz] &gt; 0) {

 writer.[setFaceZoneInfo](classansys_1_1_cff_base.xhtml#a5c7a587b4206497cf6b9608c41d6b543)(

 faceZone[iz],

 [CFF\_FACE\_ZONE\_SHADOW\_ZONE\_ID](group__enums.xhtml#gga90bd9c961be9a1b7e7d014e9f04588e3ac79d815228e144ab9b7b7d482e68730e),

 shadowZoneId[iz]);

 }

 if (childZoneId[iz] &gt; 0) {

 writer.[setFaceZoneInfo](classansys_1_1_cff_base.xhtml#a5c7a587b4206497cf6b9608c41d6b543)(faceZone[iz],

 [CFF\_FACE\_ZONE\_CHILD\_ZONE\_ID](group__enums.xhtml#gga90bd9c961be9a1b7e7d014e9f04588e3a10eff2aafb191d93e55e74caa015b262),

 childZoneId[iz]);

 }

 if (zoneType[iz] &gt; -1) {

 writer.[setFaceZoneInfo](classansys_1_1_cff_base.xhtml#a5c7a587b4206497cf6b9608c41d6b543)(faceZone[iz],

 [CFF\_FACE\_ZONE\_TYPE](group__enums.xhtml#gga90bd9c961be9a1b7e7d014e9f04588e3a2fa7a530982c6473ca2193d43d5c55af),

 zoneType[iz]);

 }

 if (elementType[iz] &gt; -1) {

 writer.[setFaceZoneInfo](classansys_1_1_cff_base.xhtml#a5c7a587b4206497cf6b9608c41d6b543)(faceZone[iz],

 [CFF\_FACE\_ZONE\_FACE\_TYPE](group__enums.xhtml#gga90bd9c961be9a1b7e7d014e9f04588e3a96a4944c9088c0307aefafab1bcfc200),

 elementType[iz]);

 }

 if (!name[iz].empty()) {

 writer.[setZoneStringInfo](classansys_1_1_cff_base.xhtml#a41dad7e9d021bdda73c87fe328dc8165)(faceZone[iz],

 [CFF\_ZONE\_STRING\_NAME](group__enums.xhtml#gga7fe67117cb23bbcbb4ff2d5b55c3a704a3df2bc03cc26299fd9a017226d0fa127),

 name[iz]);

 }

 if (!stringZoneType[iz].empty()) {

 writer.[setZoneStringInfo](classansys_1_1_cff_base.xhtml#a41dad7e9d021bdda73c87fe328dc8165)(faceZone[iz],

 [CFF\_ZONE\_STRING\_TYPE](group__enums.xhtml#gga7fe67117cb23bbcbb4ff2d5b55c3a704a7dd4555e422dcca8321082de07732b2e),

 stringZoneType[iz]);

 }

 

 writer.[setAllFaceZoneFlags](classansys_1_1_cff_base.xhtml#abb3c12f95d090dd9df153008b6515ed7)(faceZone[iz], flags[iz]);

 

 writer.[setFaceCellZone0Ids](classansys_1_1_cff_consumer.xhtml#a9d5a27766219dd8a2c4a1f9e6147f5e4)(faceZone[iz], fzcz0[iz]);

 writer.[setFaceCellZone1Ids](classansys_1_1_cff_consumer.xhtml#ab876d7ac1180ae97348feec934af6b72)(faceZone[iz], fzcz1[iz]);

 

 }

 

 // start writing about thses face-zones

 writer.[startWritingFaces](classansys_1_1_cff_consumer.xhtml#a5e96f8ea852d406a8323559a1d71316c)(faceZone);

 

 // face-nodes

 {

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) faceNodesZone;

 std::vector&lt;std::vector&lt;short&gt; &gt; numNodes;

 std::vector&lt;std::vector&lt;ansys::ElemIdType&gt; &gt; nodes;

 

 // create face-node information of appropriate zones

 CreateFaceNodes(faceNodesZone, numNodes, nodes);

 

 writer.[startWritingNodesForFaces](classansys_1_1_cff_consumer.xhtml#ab1bc3a711cc41e8e3e902436f68f64f4)(faceNodesZone);

 

 writer.[startWritingNodeCountsForFaces](classansys_1_1_cff_consumer.xhtml#a0b627f3b4c48a5d85a0531588a9e2702)();

 for (size\_t iz = 0; iz &lt; faceNodesZone.size(); ++iz) {

 writer.[setNodeCountsForFacesInZone](classansys_1_1_cff_consumer.xhtml#ac8bb1e467c3609e2e152ff2bebbf275d)(

 faceNodesZone[iz], &amp;(numNodes[iz].at(0)), numNodes[iz].size());

 }

 writer.[endWritingNodeCountsForFaces](classansys_1_1_cff_consumer.xhtml#a996757c12475874c4a0e8e4a6c8268cf)();

 

 writer.[startWritingNodeIdsForFaces](classansys_1_1_cff_consumer.xhtml#a1dc11ee2be93f0cba4e33d2d3c946db5)();

 for (size\_t iz = 0; iz &lt; faceNodesZone.size(); ++iz) {

 writer.[setNodeIdsForFacesInZone](classansys_1_1_cff_consumer.xhtml#a322325986e561aa23053e9db6b441d66)(

 faceNodesZone[iz], &amp;(nodes[iz].at(0)), nodes[iz].size());

 }

 writer.[endWritingNodeIdsForFaces](classansys_1_1_cff_consumer.xhtml#a1164f37dd80796d408b261f592eef91a)();

 

 writer.[endWritingNodesForFaces](classansys_1_1_cff_consumer.xhtml#ad7ca52810679ccec7356c03be6fe874a)();

 }

 

 // face-cell-0 s

 {

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) faceC0Zone;

 std::vector&lt;std::vector&lt;ansys::ElemIdType&gt; &gt; faceC0s;

 

 CreateFaceC0s(faceC0Zone, faceC0s);

 

 writer.[startWritingCell0sForFaces](classansys_1_1_cff_consumer.xhtml#a22d0f0b4fe70b1cf95973b420983550f)(faceC0Zone);

 for (size\_t iz = 0; iz &lt; faceC0Zone.size(); ++iz) {

 writer.[setCell0sForFacesInZone](classansys_1_1_cff_consumer.xhtml#a5964decbfeef1890cee7162955ee81ff)(

 faceC0Zone[iz], &amp;(faceC0s[iz].at(0)), faceC0s[iz].size());

 }

 writer.[endWritingCell0sForFaces](classansys_1_1_cff_consumer.xhtml#aa41cc30d1cea747ff9af61b9ca183cc2)();

 }

 

 // face-cell-1 s

 {

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) faceC1Zone;

 std::vector&lt;std::vector&lt;ansys::ElemIdType&gt; &gt; faceC1s;

 

 CreateFaceC1s(faceC1Zone, faceC1s);

 

 writer.[startWritingCell1sForFaces](classansys_1_1_cff_consumer.xhtml#a4a4b8f638ec2d87cd2b99b0e09344673)(faceC1Zone);

 for (size\_t iz = 0; iz &lt; faceC1Zone.size(); ++iz) {

 writer.[setCell1sForFacesInZone](classansys_1_1_cff_consumer.xhtml#acb74ee258ed3caca0b27f3a135d4854b)(

 faceC1Zone[iz], &amp;(faceC1s[iz].at(0)), faceC1s[iz].size());

 }

 writer.[endWritingCell1sForFaces](classansys_1_1_cff_consumer.xhtml#a88421cb579890fe1e6d9450c7e0a2c47)();

 }

 

 writer.[endWritingFaces](classansys_1_1_cff_consumer.xhtml#acfce986f538e17519279c4443a444ea8)();

 }

 

 // cells

 {

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) cellZone;

 std::vector&lt;ansys::ElemIdType&gt; startId;

 std::vector&lt;ansys::ElemIdType&gt; endId;

 std::vector&lt;short&gt; dimension;

 std::vector&lt;ansys::ZoneIdType&gt; childZoneId;

 std::vector&lt;ansys::CellType&gt; elementType;

 std::vector&lt;std::string&gt; name;

 std::vector&lt;std::string&gt; stringZoneType;

 

 // create zone-level information of cells

 CreateCellZones(

 cellZone, startId, endId, dimension, childZoneId, elementType, name, stringZoneType);

 

 // set the cell zones

 writer.[setZoneIds](classansys_1_1_cff_base.xhtml#a39f93ca4fe18b77774bf8e8de49761e0)([CFF\_CELL\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba62b22dd5125249182737df29d52bafbd), cellZone);

 for (size\_t iz = 0; iz &lt; cellZone.size(); ++iz) {

 writer.[setZoneSizeInfo](classansys_1_1_cff_base.xhtml#ab004b191ee5ecb3c4e601e8fdad56c1a)(

 cellZone[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), startId[iz]);

 writer.[setZoneSizeInfo](classansys_1_1_cff_base.xhtml#ab004b191ee5ecb3c4e601e8fdad56c1a)(

 cellZone[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), endId[iz]);

 writer.[setZoneSizeInfo](classansys_1_1_cff_base.xhtml#ab004b191ee5ecb3c4e601e8fdad56c1a)(

 cellZone[iz], [CFF\_ZONE\_DIMENSION](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ac797bdd0c993d968d38f0c35b496d207), dimension[iz]);

 if (elementType[iz] &gt;= 0)

 writer.[setCellZoneInfo](classansys_1_1_cff_base.xhtml#a4fad271e6ee24cc9de5fca8e0990e558)(cellZone[iz],

 [CFF\_CELL\_ZONE\_CELL\_TYPE](group__enums.xhtml#ggaaffda1f82c7b51d603aff684c9ab0cd2ae307b5717f564f83314c104ac0132440),

 elementType[iz]);

 if (childZoneId[iz] &gt; 0) {

 writer.[setCellZoneInfo](classansys_1_1_cff_base.xhtml#a4fad271e6ee24cc9de5fca8e0990e558)(cellZone[iz],

 [CFF\_CELL\_ZONE\_CHILD\_ZONE\_ID](group__enums.xhtml#ggaaffda1f82c7b51d603aff684c9ab0cd2adbc6fee74f7a3ad84f5ed5d3fbeaa55f),

 childZoneId[iz]);

 }

 if (!name[iz].empty()) {

 writer.[setZoneStringInfo](classansys_1_1_cff_base.xhtml#a41dad7e9d021bdda73c87fe328dc8165)(cellZone[iz],

 [CFF\_ZONE\_STRING\_NAME](group__enums.xhtml#gga7fe67117cb23bbcbb4ff2d5b55c3a704a3df2bc03cc26299fd9a017226d0fa127),

 name[iz]);

 }

 if (!stringZoneType[iz].empty()) {

 writer.[setZoneStringInfo](classansys_1_1_cff_base.xhtml#a41dad7e9d021bdda73c87fe328dc8165)(cellZone[iz],

 [CFF\_ZONE\_STRING\_TYPE](group__enums.xhtml#gga7fe67117cb23bbcbb4ff2d5b55c3a704a7dd4555e422dcca8321082de07732b2e),

 stringZoneType[iz]);

 }

 }

 

 // start writing about these cell-zones

 writer.[startWritingCells](classansys_1_1_cff_consumer.xhtml#abfce48f72ab748472442d0378b0ab558)(cellZone);

 

 // cell-types

 {

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) cellTypeZone;

 std::vector&lt;ansys::CellType&gt; zoneCellTypes;

 std::vector&lt;std::vector&lt;ansys::CellType&gt; &gt; allCellTypes;

 

 // create cell-type information of appropriate zones;

 CreateCellTypes(cellTypeZone, zoneCellTypes, allCellTypes);

 

 writer.[startWritingTypesForCells](classansys_1_1_cff_consumer.xhtml#ae40b4a5f63b1c57aaea793827eeffed1)(cellTypeZone, zoneCellTypes);

 for (size\_t iz = 0; iz &lt; cellTypeZone.size(); ++iz) {

 if ([CFF\_CELL\_TYPE\_MIXED](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a1eed460af26c972bc96e5f71e7d124ba) != zoneCellTypes[iz]) {

 continue;

 }

 writer.[setTypesForCellsInZone](classansys_1_1_cff_consumer.xhtml#a6395f7bcc27c03238f5c4b9a2ed4ec56)(cellTypeZone[iz],

 &amp;(allCellTypes[iz].at(0)),

 allCellTypes[iz].size());

 }

 writer.[endWritingTypesForCells](classansys_1_1_cff_consumer.xhtml#a2f09f429cf9e52f160932a5301028cb0)();

 }

 

 // cell-partitions

 {

 int numPartitions;

 std::vector&lt;ansys::ZoneIdType&gt; cellPartitionZone;

 std::vector&lt; std::vector&lt;ansys::PartitionIdType&gt; &gt; cellPartitions;

 

 // create cell-partition information of appropriate zones;

 CreateCellPartitions(cellPartitionZone, numPartitions, cellPartitions);

 

 writer.[startWritingPartitionIdsForCells](classansys_1_1_cff_consumer.xhtml#a3fc03a75a657c01bedaa388aace7b9f0)(cellPartitionZone,

 numPartitions);

 if (numPartitions &gt; 1) {

 for (size\_t iz = 0; iz &lt; cellPartitionZone.size(); ++iz) {

 writer.[setPartitionIdsForCellsInZone](classansys_1_1_cff_consumer.xhtml#a0444944d41d5361b99527444100f8aea)(cellPartitionZone[iz],

 &amp;(cellPartitions[iz].at(0)),

 cellPartitions[iz].size());

 }

 }

 writer.[endWritingPartitionIdsForCells](classansys_1_1_cff_consumer.xhtml#abd2b1617c3b8849d10716773bafd0e88)();

 }

 

 writer.[endWritingCells](classansys_1_1_cff_consumer.xhtml#acf2719ef1746fe424adbd25eb2865b57)();

 }

 

 writer.[endWriting](classansys_1_1_cff_consumer.xhtml#ae4443a3ec02f80e0b2b718220347a4ea)([ansys::DataClass::CFF\_CASE](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddba6c8b8209348df38321689fb67cd4b331));

 

 // data-file

 {

 [ansys::PhaseNames](group__typedefs.xhtml#ga0fd5a01583470684274d967989f7172c) phaseNames;

 

 // create the phases and get their ids

 CreatePhases(phaseNames);

 

 [ansys::PhaseIds](group__typedefs.xhtml#ga99ff3bf3b76eac538df4d637faab6b4c) phaseIds;

 writer.[setPhaseNames](classansys_1_1_cff_consumer.xhtml#ab5dd586e7146b9a776c9a7a90381dfe2)(phaseNames,phaseIds);

 for (size\_t ip = 0; ip &lt; phaseIds.size(); ++ip) {

 writer.[startWritingPhase](classansys_1_1_cff_consumer.xhtml#a47b4f9fdb291b208f1b22e2024d1f73f)(phaseIds[ip]);

 

 std::vector&lt;ansys::ZoneCategory&gt; zoneCategory(2);

 zoneCategory[0] = [CFF\_CELL\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba62b22dd5125249182737df29d52bafbd);

 zoneCategory[1] = [CFF\_FACE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baa6aea3358b01fc54950d21d8af9c01a0);

 for (size\_t izc = 0; izc &lt; zoneCategory.size(); ++izc) {

 std::vector&lt;std::string&gt; varName;

 std::vector&lt;int&gt; varXFID;

 

 CreateVarNames(phaseIds[ip], zoneCategory[izc], varName, varXFID);

 writer.[setPhaseVariablesOfCategory](classansys_1_1_cff_consumer.xhtml#a3971a27135e4547f49ca0f49fbb29298)(zoneCategory[izc], varName);

 

 for (size\_t iv = 0; iv &lt; varName.size(); ++iv) {

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) phaseCategoryVarZone;

 size\_t numColumns;

 std::vector&lt;std::vector&lt;double&gt; &gt; data;

 CreateVarsForThisCategory(phaseIds[ip],

 zoneCategory[izc],

 varXFID[iv],

 phaseCategoryVarZone,

 numColumns,

 data);

 

 writer.[startWritingPhaseVariableInZonesOfCategory](classansys_1_1_cff_consumer.xhtml#aa8ed95ace22971899dba34a0da50c633)(

 zoneCategory[izc], varName[iv], phaseCategoryVarZone, numColumns);

 for (size\_t iz = 0; iz &lt; phaseCategoryVarZone.size(); ++iz) {

 writer.[setValuesOfPhaseVariableForElementsInZone](classansys_1_1_cff_consumer.xhtml#a92a71afe8f9855090d4cb8c1f07c4ae8)(

 phaseCategoryVarZone[iz], &amp;(data[iz].at(0)), data[iz].size());

 }

 writer.[endWritingPhaseVariableInZonesOfCategory](classansys_1_1_cff_consumer.xhtml#a728b453632154ff97445bd09e421d6da)();

 }

 }

 writer.[endWritingPhase](classansys_1_1_cff_consumer.xhtml#a5de197702a57c70600e73e7934d9f4e4)();

 }

 

 /\*

 \* Write settings

 \*

 \* Note: It is recommended that the mapping below is always added to a

 \* results data file as it helps applications reading your data

 \* to determine the name of the case file automatically.

 \*/

 std::vector&lt;std::pair&lt;std::string, std::string&gt;&gt; dataSetToContents = {

 { "Case File", casName },

 };

 

 writer.[writeSettingStrings](classansys_1_1_cff_consumer.xhtml#aa7b2ec625efd20196b718fdaf1e1daa1)(dataSetToContents, [CFF\_RESULTS](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddbaacfdbe512195015b6446480e80caf4a4));

 

 writer.[endWriting](classansys_1_1_cff_consumer.xhtml#ae4443a3ec02f80e0b2b718220347a4ea)([ansys::DataClass::CFF\_RESULTS](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddbaacfdbe512195015b6446480e80caf4a4));

 }

 

 /\* How to add an attribute to a specific group within an existing file\*/

 if (!writer.[addStringAttribute](classansys_1_1_cff_consumer.xhtml#a38f0be852eeac3ccd76f278cc7a4e926)(casName,

 "/meshes/1/faces",

 "groupAtt",

 "xyz")) {

 std::cout &lt;&lt; "Unable to write attribute to group within file" &lt;&lt; std::endl;

 }

 

 /\* How to add attribute to a specific dataset within an existing file\*/

 if (writer.[addStringAttribute](classansys_1_1_cff_consumer.xhtml#a38f0be852eeac3ccd76f278cc7a4e926)(datName,

 "/results/1/phase-1/faces/SV\_FLUX/1",

 "dsAtt",

 "abcd")) {

 std::cout &lt;&lt; "Unable to write attribute to dataset within file" &lt;&lt; std::endl;

 }

 

 return 0;

}

[ansys::CffBase::getInfos](classansys_1_1_cff_base.xhtml#a082d2c3d4dc0c44c918764d25adcadda)

std::vector&lt; std::string &gt; getInfos(bool formated=true, bool clear=false) const

returns, as strings, any unprocessed information messages registered

**Definition:** CffBaseMethods.cpp:1958



[ansys::CffBase::hasWarning](classansys_1_1_cff_base.xhtml#a0c21e26398dc9974f47ca3483ddf5511)

bool hasWarning() const

returns whether there are unprocessed warning messages registered.

**Definition:** CffBaseMethods.cpp:1903



[ansys::CffBase::setMeshSize](classansys_1_1_cff_base.xhtml#a259b65322ef0d42859d988166eed23d7)

void setMeshSize(const MeshSizeType type, const ElemIdType size)

Sets a value that defines the dimension or the global number of objects of a specific mesh entity.

**Definition:** CffBaseMethods.cpp:458



[ansys::CffBase::setSolverType](classansys_1_1_cff_base.xhtml#a30ca8450d5f621a2decc2dde0ff9207f)

virtual void setSolverType(SolverType solverType)

Set the name of the application that is supplying the data.

**Definition:** CffBaseMethods.cpp:1715



[ansys::CffBase::setApplicationName](classansys_1_1_cff_base.xhtml#a37ac2d23d1b21376117cb574ea5aecd5)

void setApplicationName(const std::string &amp;applicationName)

Sets an application name for error purposes and when logging to a file.

**Definition:** CffBaseMethods.cpp:288



[ansys::CffBase::setZoneIds](classansys_1_1_cff_base.xhtml#a39f93ca4fe18b77774bf8e8de49761e0)

void setZoneIds(const ZoneCategory zoneCategory, const ZoneIds &amp;zonesIds)

Define the zones that are of a specific category.

**Definition:** CffBaseMethods.cpp:559



[ansys::CffBase::setZoneStringInfo](classansys_1_1_cff_base.xhtml#a41dad7e9d021bdda73c87fe328dc8165)

void setZoneStringInfo(const ZoneIdType zoneId, const ZoneStringInfoType type, const std::string &amp;info)

Sets a string value associated with a zone.

**Definition:** CffBaseMethods.cpp:1150



[ansys::CffBase::setCellZoneInfo](classansys_1_1_cff_base.xhtml#a4fad271e6ee24cc9de5fca8e0990e558)

void setCellZoneInfo(const ZoneIdType cellZoneId, const CellZoneInfoType cellZoneInfoType, const int info)

set certain zone level info for a cell zone.

**Definition:** CffBaseMethods.cpp:1050



[ansys::CffBase::setFaceZoneInfo](classansys_1_1_cff_base.xhtml#a5c7a587b4206497cf6b9608c41d6b543)

void setFaceZoneInfo(const ZoneIdType faceZoneId, const FaceZoneInfoType faceZoneInfoType, const int info) const

set certain zone level info for a face zone.

**Definition:** CffBaseMethods.cpp:886



[ansys::CffBase::setDebugOn](classansys_1_1_cff_base.xhtml#a762f990aefce5b11164a58d2721bd350)

virtual void setDebugOn(bool debug)

Turn on/off debugging information.

**Definition:** CffBaseMethods.cpp:81



[ansys::CffBase::hasInfo](classansys_1_1_cff_base.xhtml#a9951a635748839427d6f0025ffe52624)

bool hasInfo() const

returns whether there are unprocessed informative messages registered.

**Definition:** CffBaseMethods.cpp:1913



[ansys::CffBase::setZoneSizeInfo](classansys_1_1_cff_base.xhtml#ab004b191ee5ecb3c4e601e8fdad56c1a)

void setZoneSizeInfo(const ZoneIdType zoneId, const ZoneSizeType sizeType, const ElemIdType size)

Sets a size setting of a zone.

**Definition:** CffBaseMethods.cpp:970



[ansys::CffBase::setAllFaceZoneFlags](classansys_1_1_cff_base.xhtml#abb3c12f95d090dd9df153008b6515ed7)

void setAllFaceZoneFlags(const ZoneIdType faceZoneId, const int allFlags)

Set flags for a face zone.

**Definition:** CffBaseMethods.cpp:696



[ansys::CffBase::hasError](classansys_1_1_cff_base.xhtml#ae21605b67de8dfdc99ed2dd2436c8276)

bool hasError() const

returns whether there are unprocessed error messages registered.

**Definition:** CffBaseMethods.cpp:1893



[ansys::CffBase::setMeshUnits](classansys_1_1_cff_base.xhtml#ae323125334ed9fb3d4d62796e08a8451)

void setMeshUnits(const std::string &amp;units="m")

Define the units of length the mesh is defined in.

**Definition:** CffBaseMethods.cpp:526



[ansys::CffConsumer](classansys_1_1_cff_consumer.xhtml)

Class that provides functions to write data within a CFF database. The database may be stored within ...

**Definition:** CffConsumer.hpp:18



[ansys::CffConsumer::setPartitionIdsForCellsInZone](classansys_1_1_cff_consumer.xhtml#a0444944d41d5361b99527444100f8aea)

virtual void setPartitionIdsForCellsInZone(const ZoneIdType, const PartitionIdType *const partIds, const size_t) const

set the partition ids for all cells in an cells zone

**Definition:** CffConsumerMethods.cpp:2197



[ansys::CffConsumer::startWritingNodeCountsForFaces](classansys_1_1_cff_consumer.xhtml#a0b627f3b4c48a5d85a0531588a9e2702)

virtual void startWritingNodeCountsForFaces() const

Start writing node counts for faces.

**Definition:** CffConsumerMethods.cpp:950



[ansys::CffConsumer::startWritingCoordinatesForNodes](classansys_1_1_cff_consumer.xhtml#a0caf47b26c27b85aabc920428d0d1229)

virtual void startWritingCoordinatesForNodes(const ZoneIds &amp;zoneIds) const

Start writing the coorindinates for nodes.

**Definition:** CffConsumerMethods.cpp:320



[ansys::CffConsumer::endWritingNodeIdsForFaces](classansys_1_1_cff_consumer.xhtml#a1164f37dd80796d408b261f592eef91a)

virtual void endWritingNodeIdsForFaces() const

End of writing faces node ids.

**Definition:** CffConsumerMethods.cpp:1158



[ansys::CffConsumer::startWritingNodes](classansys_1_1_cff_consumer.xhtml#a1343500f387f502a9f526018c098188a)

virtual void startWritingNodes(const ZoneIds &amp;zoneIds) const

**Definition:** CffConsumerMethods.cpp:286



[ansys::CffConsumer::startWritingNodeIdsForFaces](classansys_1_1_cff_consumer.xhtml#a1dc11ee2be93f0cba4e33d2d3c946db5)

virtual void startWritingNodeIdsForFaces() const

Start writing faces node ids.

**Definition:** CffConsumerMethods.cpp:1093



[ansys::CffConsumer::setCoordinatesForNodesInZone](classansys_1_1_cff_consumer.xhtml#a22505ad0fe2b5bd55800733de96894aa)

virtual void setCoordinatesForNodesInZone(const ZoneIdType zoneId, const float *const coords, const size_t) const

Provide the coordinates for all nodes in zone.

**Definition:** CffConsumerMethods.cpp:458



[ansys::CffConsumer::startWritingCell0sForFaces](classansys_1_1_cff_consumer.xhtml#a22d0f0b4fe70b1cf95973b420983550f)

virtual void startWritingCell0sForFaces(const ZoneIds &amp;zoneIds) const

Start writing cell0 cell ids for faces.

**Definition:** CffConsumerMethods.cpp:1184



[ansys::CffConsumer::endWritingNodes](classansys_1_1_cff_consumer.xhtml#a23365b7cec8e065e64e89fe712ca2dcc)

virtual void endWritingNodes() const

End writing nodes.

**Definition:** CffConsumerMethods.cpp:300



[ansys::CffConsumer::endWritingTypesForCells](classansys_1_1_cff_consumer.xhtml#a2f09f429cf9e52f160932a5301028cb0)

virtual void endWritingTypesForCells() const

End of writing cell types.

**Definition:** CffConsumerMethods.cpp:1746



[ansys::CffConsumer::setNodeIdsForFacesInZone](classansys_1_1_cff_consumer.xhtml#a322325986e561aa23053e9db6b441d66)

virtual void setNodeIdsForFacesInZone(const ZoneIdType zoneId, const ElemIdType *const nodeIds, const size_t) const

set the node ids for all faces in a face zone

**Definition:** CffConsumerMethods.cpp:1143



[ansys::CffConsumer::addStringAttribute](classansys_1_1_cff_consumer.xhtml#a38f0be852eeac3ccd76f278cc7a4e926)

virtual bool addStringAttribute(const std::string &amp;file, const std::string &amp;path, const std::string &amp;name, const std::string &amp;strAtt)

**Definition:** CffConsumerMethods.cpp:113



[ansys::CffConsumer::setPhaseVariablesOfCategory](classansys_1_1_cff_consumer.xhtml#a3971a27135e4547f49ca0f49fbb29298)

virtual bool setPhaseVariablesOfCategory(const ZoneCategory zoneCategory, const VariableIds &amp;ids) const

Add the variables in the currently active phase to zones of the category.

**Definition:** CffConsumerMethods.cpp:2740



[ansys::CffConsumer::startWritingPartitionIdsForCells](classansys_1_1_cff_consumer.xhtml#a3fc03a75a657c01bedaa388aace7b9f0)

virtual void startWritingPartitionIdsForCells(const ZoneIds &amp;, const int) const

Start writing partition ids for cells.

**Definition:** CffConsumerMethods.cpp:2145



[ansys::CffConsumer::startWritingPhase](classansys_1_1_cff_consumer.xhtml#a47b4f9fdb291b208f1b22e2024d1f73f)

virtual void startWritingPhase(const PhaseIdType phaseId=1) const

Start writing a phase.

**Definition:** CffConsumerMethods.cpp:2618



[ansys::CffConsumer::startWritingCell1sForFaces](classansys_1_1_cff_consumer.xhtml#a4a4b8f638ec2d87cd2b99b0e09344673)

virtual void startWritingCell1sForFaces(const ZoneIds &amp;zoneIds) const

Start writing cell1 cell ids for faces.

**Definition:** CffConsumerMethods.cpp:1258



[ansys::CffConsumer::setCell0sForFacesInZone](classansys_1_1_cff_consumer.xhtml#a5964decbfeef1890cee7162955ee81ff)

virtual void setCell0sForFacesInZone(const ZoneIdType zoneId, const ElemIdType *const faceC0s, const size_t) const

set the c0 cell ids for all faces in a face zone

**Definition:** CffConsumerMethods.cpp:1234



[ansys::CffConsumer::endWritingPhase](classansys_1_1_cff_consumer.xhtml#a5de197702a57c70600e73e7934d9f4e4)

virtual void endWritingPhase() const

End of writing solution data for certain phase.

**Definition:** CffConsumerMethods.cpp:2629



[ansys::CffConsumer::startWritingFaces](classansys_1_1_cff_consumer.xhtml#a5e96f8ea852d406a8323559a1d71316c)

virtual void startWritingFaces(const ZoneIds &amp;zoneIds) const

Start of writing faces.

**Definition:** CffConsumerMethods.cpp:902



[ansys::CffConsumer::setCompression](classansys_1_1_cff_consumer.xhtml#a638307acbea7d99082f60e12f8868c90)

virtual void setCompression(int compression)

**Definition:** CffConsumer.hpp:30



[ansys::CffConsumer::setTypesForCellsInZone](classansys_1_1_cff_consumer.xhtml#a6395f7bcc27c03238f5c4b9a2ed4ec56)

virtual void setTypesForCellsInZone(const ZoneIdType, const CellType *const cellTypes, const size_t) const

set the cell element types for all cells in a cell zone

**Definition:** CffConsumerMethods.cpp:1731



[ansys::CffConsumer::endWritingCoordinatesForNodes](classansys_1_1_cff_consumer.xhtml#a720cf2a53b71c1b99ff26ca5f73d8c22)

virtual void endWritingCoordinatesForNodes() const

Finish writing coordinates for nodes.

**Definition:** CffConsumerMethods.cpp:476



[ansys::CffConsumer::endWritingPhaseVariableInZonesOfCategory](classansys_1_1_cff_consumer.xhtml#a728b453632154ff97445bd09e421d6da)

virtual void endWritingPhaseVariableInZonesOfCategory() const

End of writing one variable in certain zone category.

**Definition:** CffConsumerMethods.cpp:3061



[ansys::CffConsumer::endWritingCell1sForFaces](classansys_1_1_cff_consumer.xhtml#a88421cb579890fe1e6d9450c7e0a2c47)

virtual void endWritingCell1sForFaces() const

End of writing cell1 of faces.

**Definition:** CffConsumerMethods.cpp:1323



[ansys::CffConsumer::setValuesOfPhaseVariableForElementsInZone](classansys_1_1_cff_consumer.xhtml#a92a71afe8f9855090d4cb8c1f07c4ae8)

virtual void setValuesOfPhaseVariableForElementsInZone(const ZoneIdType zoneId, const double *const vals, const size_t dataSize) const

Set the solution data values for all elements in certain range.

**Definition:** CffConsumerMethods.cpp:3027



[ansys::CffConsumer::endWritingNodeCountsForFaces](classansys_1_1_cff_consumer.xhtml#a996757c12475874c4a0e8e4a6c8268cf)

virtual void endWritingNodeCountsForFaces() const

End writing faces node counts.

**Definition:** CffConsumerMethods.cpp:1084



[ansys::CffConsumer::setFaceCellZone0Ids](classansys_1_1_cff_consumer.xhtml#a9d5a27766219dd8a2c4a1f9e6147f5e4)

virtual void setFaceCellZone0Ids(const ZoneIdType zoneId, const ZoneIds &amp;cellZoneIds) const

Set the cell zones adjacent on side 0 of the supplied face zone.

**Definition:** CffConsumerMethods.cpp:858



[ansys::CffConsumer::endWritingCell0sForFaces](classansys_1_1_cff_consumer.xhtml#aa41cc30d1cea747ff9af61b9ca183cc2)

virtual void endWritingCell0sForFaces() const

End of writing cell0 of faces.

**Definition:** CffConsumerMethods.cpp:1249



[ansys::CffConsumer::writeSettingStrings](classansys_1_1_cff_consumer.xhtml#aa7b2ec625efd20196b718fdaf1e1daa1)

virtual void writeSettingStrings(const std::vector&lt; std::pair&lt; std::string, std::string &gt; &gt; &amp;, DataClass=DataClass::CFF_CASE, const std::string &amp;=CffBase::_defaultSettingsPath) const

Write settings to the CFF consumer.

**Definition:** CffConsumerMethods.cpp:135



[ansys::CffConsumer::startWritingPhaseVariableInZonesOfCategory](classansys_1_1_cff_consumer.xhtml#aa8ed95ace22971899dba34a0da50c633)

virtual void startWritingPhaseVariableInZonesOfCategory(const ZoneCategory zoneCategory, const VariableIdType varId, ZoneIds &amp;zoneIds, const size_t numCols) const

Start writing data for certain variable.

**Definition:** CffConsumerMethods.cpp:2904



[ansys::CffConsumer::startWritingNodesForFaces](classansys_1_1_cff_consumer.xhtml#ab1bc3a711cc41e8e3e902436f68f64f4)

virtual void startWritingNodesForFaces(const ZoneIds &amp;zoneIds) const

Start writing faces nodes.

**Definition:** CffConsumerMethods.cpp:934



[ansys::CffConsumer::setPhaseNames](classansys_1_1_cff_consumer.xhtml#ab5dd586e7146b9a776c9a7a90381dfe2)

virtual bool setPhaseNames(const PhaseNames &amp;phaseNames, PhaseIds &amp;phaseIds) const

Define the set of unique phase names (all existing phase names and associated variables are deleted)

**Definition:** CffConsumerMethods.cpp:2550



[ansys::CffConsumer::setFaceCellZone1Ids](classansys_1_1_cff_consumer.xhtml#ab876d7ac1180ae97348feec934af6b72)

virtual void setFaceCellZone1Ids(const ZoneIdType zoneId, const ZoneIds &amp;cellZoneIds) const

Set the cell zones adjacent on side 1 of the supplied face zone.

**Definition:** CffConsumerMethods.cpp:879



[ansys::CffConsumer::endWritingPartitionIdsForCells](classansys_1_1_cff_consumer.xhtml#abd2b1617c3b8849d10716773bafd0e88)

virtual void endWritingPartitionIdsForCells() const

End of writing partition ids for cells.

**Definition:** CffConsumerMethods.cpp:2212



[ansys::CffConsumer::startWritingCells](classansys_1_1_cff_consumer.xhtml#abfce48f72ab748472442d0378b0ab558)

virtual void startWritingCells(const ZoneIds &amp;) const

Start writing cells.

**Definition:** CffConsumerMethods.cpp:1653



[ansys::CffConsumer::setNodeCountsForFacesInZone](classansys_1_1_cff_consumer.xhtml#ac8bb1e467c3609e2e152ff2bebbf275d)

virtual void setNodeCountsForFacesInZone(const ZoneIdType zoneId, const short *const nodeCounts, const size_t) const

Define the node count for the faces in the zone.

**Definition:** CffConsumerMethods.cpp:1016



[ansys::CffConsumer::setCell1sForFacesInZone](classansys_1_1_cff_consumer.xhtml#acb74ee258ed3caca0b27f3a135d4854b)

virtual void setCell1sForFacesInZone(const ZoneIdType zoneId, const ElemIdType *const faceC1s, const size_t) const

set the c1 cell ids for all faces in a face zone

**Definition:** CffConsumerMethods.cpp:1308



[ansys::CffConsumer::endWritingCells](classansys_1_1_cff_consumer.xhtml#acf2719ef1746fe424adbd25eb2865b57)

virtual void endWritingCells() const

End of writing cells.

**Definition:** CffConsumerMethods.cpp:1664



[ansys::CffConsumer::endWritingFaces](classansys_1_1_cff_consumer.xhtml#acfce986f538e17519279c4443a444ea8)

virtual void endWritingFaces() const

End of writing face data.

**Definition:** CffConsumerMethods.cpp:913



[ansys::CffConsumer::setDataPrecision](classansys_1_1_cff_consumer.xhtml#ad74e63316298fa4468f604c380dbd6cf)

void setDataPrecision(DataPrecisionType ptype)

Sets the precision for solution data.

**Definition:** CffConsumerMethods.cpp:4532



[ansys::CffConsumer::endWritingNodesForFaces](classansys_1_1_cff_consumer.xhtml#ad7ca52810679ccec7356c03be6fe874a)

virtual void endWritingNodesForFaces() const

End of writing faces nodes.

**Definition:** CffConsumerMethods.cpp:1168



[ansys::CffConsumer::startWritingTypesForCells](classansys_1_1_cff_consumer.xhtml#ae40b4a5f63b1c57aaea793827eeffed1)

virtual void startWritingTypesForCells(const ZoneIds &amp;, const std::vector&lt; CellType &gt; &amp;) const

Start writing cells types.

**Definition:** CffConsumerMethods.cpp:1679



[ansys::CffConsumer::endWriting](classansys_1_1_cff_consumer.xhtml#ae4443a3ec02f80e0b2b718220347a4ea)

virtual bool endWriting(DataClass dataClass)

**Definition:** CffConsumer.hpp:34



[ansys::CffConsumer::writeMeshAttributes](classansys_1_1_cff_consumer.xhtml#ae7b1724d61296f25be88f63476872fda)

virtual void writeMeshAttributes() const

Write the global mesh size attributes and units to the active mesh.

**Definition:** CffConsumerMethods.cpp:185



[CFF\_PRECISION\_DOUBLE](group__enums.xhtml#gga2ecbf04cb65f31fde87a9c60a5bab3d6a583d6d67a6ee03f067b1dc6b717de7e6)

@ CFF_PRECISION_DOUBLE

**Definition:** CffTypes.h:436



[CFF\_ZONE\_STRING\_NAME](group__enums.xhtml#gga7fe67117cb23bbcbb4ff2d5b55c3a704a3df2bc03cc26299fd9a017226d0fa127)

@ CFF_ZONE_STRING_NAME

**Definition:** CffTypes.h:369



[CFF\_ZONE\_STRING\_TYPE](group__enums.xhtml#gga7fe67117cb23bbcbb4ff2d5b55c3a704a7dd4555e422dcca8321082de07732b2e)

@ CFF_ZONE_STRING_TYPE

**Definition:** CffTypes.h:375



[CFF\_FACE\_ZONE\_CHILD\_ZONE\_ID](group__enums.xhtml#gga90bd9c961be9a1b7e7d014e9f04588e3a10eff2aafb191d93e55e74caa015b262)

@ CFF_FACE_ZONE_CHILD_ZONE_ID

**Definition:** CffTypes.h:281



[CFF\_FACE\_ZONE\_TYPE](group__enums.xhtml#gga90bd9c961be9a1b7e7d014e9f04588e3a2fa7a530982c6473ca2193d43d5c55af)

@ CFF_FACE_ZONE_TYPE

**Definition:** CffTypes.h:301



[CFF\_FACE\_ZONE\_FACE\_TYPE](group__enums.xhtml#gga90bd9c961be9a1b7e7d014e9f04588e3a96a4944c9088c0307aefafab1bcfc200)

@ CFF_FACE_ZONE_FACE_TYPE

**Definition:** CffTypes.h:277



[CFF\_FACE\_ZONE\_SHADOW\_ZONE\_ID](group__enums.xhtml#gga90bd9c961be9a1b7e7d014e9f04588e3ac79d815228e144ab9b7b7d482e68730e)

@ CFF_FACE_ZONE_SHADOW_ZONE_ID

**Definition:** CffTypes.h:294



[CFF\_HDF](group__enums.xhtml#gga9d98ab88553e163862440763fc91c76aa07723f3ffb199eb4f791d1f74b5ac567)

@ CFF_HDF

**Definition:** CffTypes.h:648



[CFF\_CELL\_ZONE\_CHILD\_ZONE\_ID](group__enums.xhtml#ggaaffda1f82c7b51d603aff684c9ab0cd2adbc6fee74f7a3ad84f5ed5d3fbeaa55f)

@ CFF_CELL_ZONE_CHILD_ZONE_ID

**Definition:** CffTypes.h:329



[CFF\_CELL\_ZONE\_CELL\_TYPE](group__enums.xhtml#ggaaffda1f82c7b51d603aff684c9ab0cd2ae307b5717f564f83314c104ac0132440)

@ CFF_CELL_ZONE_CELL_TYPE

**Definition:** CffTypes.h:325



[CFF\_MESH\_NODE\_COUNT](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002a3697b449f26bbbea1b7248da1f8634db)

@ CFF_MESH_NODE_COUNT

**Definition:** CffTypes.h:179



[CFF\_MESH\_DIMENSION](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002a79c9861f0c03a03f476e399d0a17917d)

@ CFF_MESH_DIMENSION

**Definition:** CffTypes.h:177



[CFF\_MESH\_CELL\_COUNT](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002ab58756bc6e4e7c3e46f2c53ce722b1ef)

@ CFF_MESH_CELL_COUNT

**Definition:** CffTypes.h:185



[CFF\_MESH\_FACE\_COUNT](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002aeda7214eb896ae699e426d0bbc5b30ab)

@ CFF_MESH_FACE_COUNT

**Definition:** CffTypes.h:183



[ansys::PhaseNames](group__typedefs.xhtml#ga0fd5a01583470684274d967989f7172c)

std::vector&lt; PhaseName &gt; PhaseNames

Type used to represent a number of phase names ('C++' API only)

**Definition:** Types.hpp:169



[ansys::getDataConsumer](namespaceansys.xhtml#ab581ca82a4d1ec785c07a865ee73d1fd)

ANSYS_FLUIDS_FACTORY_DLL CffFileConsumer * getDataConsumer(const FileFormatType consumerType)

**Definition:** consumers.cpp:17





The function uses data that is made available from some functions in a separate utility source file.

**CasAndDatCreator.hpp** (This can be found at example/hdf/Common/CasAndDatCreator.hpp in the CFF-SDK directory.)

/\*

\* Copyright 2025 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.

\*/

 

\#ifndef CASANDDATCREATOR\_HPP\_

\#define CASANDDATCREATOR\_HPP\_

 

\#include "CffInterface/Types.hpp"

\#include &lt;iostream&gt;

\#include &lt;memory&gt;

\#include &lt;vector&gt;

\#include &lt;algorithm&gt;

\#include &lt;iterator&gt;

 

int

CreateMeshInfo(size\_t&amp; meshDimension,

 size\_t&amp; nodeCount,

 size\_t&amp; faceCount,

 size\_t&amp; cellCount)

{

 meshDimension = 3;

 

 nodeCount = 268;

 faceCount = 811;

 cellCount = 226;

 

 return 0;

}

 

int

CreateMeshUnits(std::string&amp; units)

{

 units = "mm";

 

 return 0;

}

 

int

CreateNodeZones([ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)&amp; zoneIds,

 std::vector&lt;ansys::ElemIdType&gt;&amp; startId,

 std::vector&lt;ansys::ElemIdType&gt;&amp; endId,

 std::vector&lt;short&gt;&amp; dimension,

 std::vector&lt;std::string&gt;&amp; names)

{

 zoneIds.resize(1);

 startId.resize(1);

 endId.resize(1);

 dimension.resize(1);

 names.resize(1);

 

 zoneIds[0] = 1;

 startId[0] = 1;

 endId[0] = 268;

 dimension[0] = 3;

 names[0] = "nodes";

 

 return 0;

}

 

int

CreateNodeCoords([ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)&amp; zoneIds,

 std::vector&lt;std::vector&lt;double&gt; &gt;&amp; coords)

{

 zoneIds.resize(1);

 coords.resize(1);

 

 zoneIds[0] = 1;

 {

 double coordArray[804] = {

 4, 5, -5, 5, 5, -5,

 4.2949, 4.29203, -5, 5, 4, -5,

 -5, 5, -5, -4, 5, -5,

 -4.28449, 4.29336, -5, -5, 4, -5,

 3.36679, 4.01827, -5, 3, 5, -5,

 -3.4074, 4.16032, -5, -3, 5, -5,

 4.16391, 3.425, -5, 5, 3, -5,

 -3.99814, 3.36568, -5, -5, 3, -5,

 4.13207, 2.43224, -5, 5, 2, -5,

 -4.11523, 2.32634, -5, -5, 2, -5,

 2.32413, 4.14427, -5, 2, 5, -5,

 -2.4011, 4.12412, -5, -2, 5, -5,

 1.33151, 4.17863, -5, 1, 5, -5,

 4.15412, 1.43927, -5, 5, 1, -5,

 -4.12597, 1.32028, -5, -5, 1, -5,

 -1.37779, 4.12701, -5, -1, 5, -5,

 -0.361047, 4.17443, -5, 0, 5, -5,

 -4.1715, 0.314437, -5, 5, -1, -5,

 4.00137, -0.334686, -5, 5, 0, -5,

 4.28603, 0.554, -5, 0.489886, 4.33415, -5,

 3.27584, 2.89718, -5, 2.56937, 3.33611, -5,

 1.6395, 3.29373, -5, 0.485803, 3.42122, -5,

 3.23962, 1.84968, -5, 3.36809, 0.72585, -5,

 -2.85446, 3.26947, -5, -3.28514, 2.57466, -5,

 -3.22381, 1.67259, -5, -3.27848, 0.608651, -5,

 -1.79511, 3.22421, -5, -0.692263, 3.29081, -5,

 -3.41982, -0.566414, -5, 3.16692, -0.971077, -5,

 3.03932, -0.14658, -5, -2.27922, 2.22601, -5,

 2.23483, 2.36929, -5, -1.14069, 2.39528, -5,

 2.38029, 1.25286, -5, -2.34839, 1.05757, -5,

 1.04639, 2.4209, -5, -1.40628, 1.43654, -5,

 1.51141, 1.58652, -5, 2.13619, -0.51801, -5,

 2.45026, 0.378916, -5, -2.42638, -0.0500925, -5,

 -0.0340174, 2.44186, -5, 1.45748, 0.535142, -5,

 -0.507031, 1.69288, -5, -1.47973, 0.405438, -5,

 0.487921, 1.38142, -5, -0.51817, 0.821268, -5,

 0.352882, 0.252772, -5, 5, 5, -4,

 4.2949, 4.29203, -4, 4, 5, -4,

 5, 4, -4, -4, 5, -4,

 -4.28449, 4.29336, -4, -5, 5, -4,

 -5, 4, -4, 3.36679, 4.01827, -4,

 3, 5, -4, -3.4074, 4.16032, -4,

 -3, 5, -4, 4.16391, 3.425, -4,

 5, 3, -4, -3.99814, 3.36568, -4,

 -5, 3, -4, 4.13207, 2.43224, -4,

 5, 2, -4, -4.11523, 2.32634, -4,

 -5, 2, -4, 2.32413, 4.14427, -4,

 2, 5, -4, -2.4011, 4.12412, -4,

 -2, 5, -4, 1.33151, 4.17863, -4,

 1, 5, -4, 4.15412, 1.43927, -4,

 5, 1, -4, -4.12597, 1.32028, -4,

 -5, 1, -4, -1.37779, 4.12701, -4,

 -1, 5, -4, -0.361047, 4.17443, -4,

 0, 5, -4, -4.1715, 0.314437, -4,

 4.00137, -0.334686, -4, 5, -1, -4,

 5, 0, -4, 4.28603, 0.554, -4,

 0.489886, 4.33415, -4, 3.27584, 2.89718, -4,

 2.56937, 3.33611, -4, 1.6395, 3.29373, -4,

 0.485803, 3.42122, -4, 3.23962, 1.84968, -4,

 3.36809, 0.72585, -4, -2.85446, 3.26947, -4,

 -3.28514, 2.57466, -4, -3.22381, 1.67259, -4,

 -3.27848, 0.608651, -4, -1.79511, 3.22421, -4,

 -0.692263, 3.29081, -4, 3.16692, -0.971077, -4,

 -3.41982, -0.566414, -4, 3.03932, -0.14658, -4,

 -2.27922, 2.22601, -4, 2.23483, 2.36929, -4,

 -1.14069, 2.39528, -4, 2.38029, 1.25286, -4,

 -2.34839, 1.05757, -4, 1.04639, 2.4209, -4,

 -1.40628, 1.43654, -4, 1.51141, 1.58652, -4,

 2.13619, -0.51801, -4, 2.45026, 0.378916, -4,

 -2.42638, -0.0500925, -4, -0.0340174, 2.44186, -4,

 1.45748, 0.535142, -4, -0.507031, 1.69288, -4,

 -1.47973, 0.405438, -4, 0.487921, 1.38142, -4,

 -0.51817, 0.821268, -4, 0.352882, 0.252772, -4,

 -4, -5, -5, -5, -5, -5,

 -4.30102, -4.28573, -5, -5, -4, -5,

 5, -4, -5, 5, -5, -5,

 4.29688, -4.29686, -5, 4, -5, -5,

 -3.38547, -4.00046, -5, -3, -5, -5,

 4.1662, -3.4372, -5, 5, -3, -5,

 -4.17682, -3.40839, -5, -5, -3, -5,

 3.37048, -4.03056, -5, 3, -5, -5,

 -2.35127, -4.11775, -5, -2, -5, -5,

 4.12722, -2.45332, -5, 5, -2, -5,

 -4.15054, -2.39953, -5, -5, -2, -5,

 2.32841, -4.14959, -5, 2, -5, -5,

 -1.35007, -4.123, -5, -1, -5, -5,

 4.09022, -1.43744, -5, -4.17527, -1.38782, -5,

 -5, -1, -5, 1.33589, -4.17482, -5,

 1, -5, -5, -0.348806, -4.1639, -5,

 0, -5, -5, -5, 0, -5,

 -4.33211, -0.528578, -5, 0.495674, -4.3258, -5,

 3.27911, -2.93579, -5, 2.57619, -3.35689, -5,

 1.64848, -3.2995, -5, 0.493433, -3.39937, -5,

 3.2283, -1.95621, -5, -3.31463, -2.85404, -5,

 -2.62181, -3.29356, -5, -1.73064, -3.2261, -5,

 -0.673956, -3.26263, -5, -3.28714, -1.76643, -5,

 2.24511, -2.41062, -5, -2.31288, -2.30325, -5,

 2.45719, -1.46343, -5, -2.45086, -1.14567, -5,

 -1.15733, -2.34335, -5, 1.0706, -2.41316, -5,

 -1.60901, -1.56005, -5, 1.5713, -1.4756, -5,

 -0.0570161, -2.37276, -5, -1.5263, -0.640689, -5,

 -0.612207, -1.33597, -5, 0.522457, -1.48437, -5,

 -0.619336, -0.197472, -5, 1.05492, -0.543938, -5,

 0.133292, -0.666839, -5, -5, -5, -4,

 -4.30102, -4.28573, -4, -4, -5, -4,

 -5, -4, -4, 5, -5, -4,

 4.29688, -4.29686, -4, 5, -4, -4,

 4, -5, -4, -3.38547, -4.00046, -4,

 -3, -5, -4, 4.1662, -3.4372, -4,

 5, -3, -4, -4.17682, -3.40839, -4,

 -5, -3, -4, 3.37048, -4.03056, -4,

 3, -5, -4, -2.35127, -4.11775, -4,

 -2, -5, -4, 4.12722, -2.45332, -4,

 5, -2, -4, -4.15054, -2.39953, -4,

 -5, -2, -4, 2.32841, -4.14959, -4,

 2, -5, -4, -1.35007, -4.123, -4,

 -1, -5, -4, 4.09022, -1.43744, -4,

 -4.17527, -1.38782, -4, -5, -1, -4,

 1.33589, -4.17482, -4, 1, -5, -4,

 -0.348806, -4.1639, -4, 0, -5, -4,

 -5, 0, -4, -4.33211, -0.528578, -4,

 0.495674, -4.3258, -4, 3.27911, -2.93579, -4,

 2.57619, -3.35689, -4, 1.64848, -3.2995, -4,

 0.493433, -3.39937, -4, 3.2283, -1.95621, -4,

 -3.31463, -2.85404, -4, -2.62181, -3.29356, -4,

 -1.73064, -3.2261, -4, -0.673956, -3.26263, -4,

 -3.28714, -1.76643, -4, 2.24511, -2.41062, -4,

 -2.31288, -2.30325, -4, 2.45719, -1.46343, -4,

 -2.45086, -1.14567, -4, -1.15733, -2.34335, -4,

 1.0706, -2.41316, -4, -1.60901, -1.56005, -4,

 1.5713, -1.4756, -4, -0.0570161, -2.37276, -4,

 -1.5263, -0.640689, -4, -0.612207, -1.33597, -4,

 0.522457, -1.48437, -4, -0.619336, -0.197472, -4,

 1.05492, -0.543938, -4, 0.133292, -0.666839, -4};

 

 coords[0].assign(coordArray, coordArray + 804);

 }

 

 return 0;

}

 

int

CreateFaceZones([ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)&amp; zoneIds,

 std::vector&lt;ansys::ElemIdType&gt;&amp; startId,

 std::vector&lt;ansys::ElemIdType&gt;&amp; endId,

 std::vector&lt;short&gt;&amp; dimension,

 std::vector&lt;ansys::ZoneIdType&gt;&amp; shadowZoneId,

 std::vector&lt;ansys::ZoneIdType&gt;&amp; childZoneId,

 std::vector&lt;ansys::FaceZoneType&gt;&amp; zoneType,

 std::vector&lt;ansys::FaceType&gt;&amp; elementType,

 std::vector&lt;short&gt;&amp; flags,

 std::vector&lt;std::string&gt;&amp; name,

 std::vector&lt;std::string&gt;&amp; stringZoneType,

 std::vector&lt;ansys::ZoneIds&gt;&amp; fzcz0,

 std::vector&lt;ansys::ZoneIds&gt;&amp; fzcz1)

{

 zoneIds.resize(7, 0);

 startId.resize(7, 0);

 endId.resize(7, 0);

 dimension.resize(7, 0);

 shadowZoneId.resize(7, 0);

 childZoneId.resize(7, 0);

 zoneType.resize(7, [CFF\_FACE\_ZONE\_TYPE\_MIN](group__enums.xhtml#gga13c2dd97c5e14c90a074a2c603ec2bc3ada4701042d033b2c1e6d8d41f8f7a26d));

 elementType.resize(7, [CFF\_FACE\_TYPE\_MIN](group__enums.xhtml#gga32812d6a5501e53b26fd7200472de3fea02409ef4059c9e05a32e2f918032bdef));

 flags.resize(7, 0);

 name.resize(7);

 stringZoneType.resize(7);

 fzcz0.resize(7);

 fzcz1.resize(7);

 

 size\_t zoneIdx = 0;

 

 zoneIds[zoneIdx] = 7;

 startId[zoneIdx] = 1;

 endId[zoneIdx] = 226;

 dimension[zoneIdx] = 3;

 zoneType[zoneIdx] = [CFF\_FACE\_ZONE\_TYPE\_WALL](group__enums.xhtml#gga13c2dd97c5e14c90a074a2c603ec2bc3affa7b842290a6b5303c8449944b64fa3);

 elementType[zoneIdx] = [CFF\_FACE\_TYPE\_TRI](group__enums.xhtml#gga32812d6a5501e53b26fd7200472de3fea855b38402da1d6d273345d8fa568738d);

 flags[zoneIdx] = 0;

 name[zoneIdx] = "wall-1";

 stringZoneType[zoneIdx]= "wall";

 fzcz0[zoneIdx] = [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)(1, 18);

 fzcz1[zoneIdx] = [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)();

 

 zoneIdx++;

 zoneIds[zoneIdx] = 20;

 startId[zoneIdx] = 227;

 endId[zoneIdx] = 545;

 dimension[zoneIdx] = 3;

 zoneType[zoneIdx] = [CFF\_FACE\_ZONE\_TYPE\_INTERIOR](group__enums.xhtml#gga13c2dd97c5e14c90a074a2c603ec2bc3a918616c49ea24c67e38e0403aedd99f5);

 elementType[zoneIdx] = [CFF\_FACE\_TYPE\_QUAD](group__enums.xhtml#gga32812d6a5501e53b26fd7200472de3fea21316961f46dd008950f167f033851af);

 flags[zoneIdx] = 0;

 name[zoneIdx] = "interior-20";

 stringZoneType[zoneIdx]= "interior";

 fzcz0[zoneIdx] = [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)(1, 18);

 fzcz1[zoneIdx] = [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)(1, 18);

 

 zoneIdx++;

 zoneIds[zoneIdx] = 28;

 startId[zoneIdx] = 546;

 endId[zoneIdx] = 771;

 dimension[zoneIdx] = 3;

 zoneType[zoneIdx] = [CFF\_FACE\_ZONE\_TYPE\_WALL](group__enums.xhtml#gga13c2dd97c5e14c90a074a2c603ec2bc3affa7b842290a6b5303c8449944b64fa3);

 elementType[zoneIdx] = [CFF\_FACE\_TYPE\_TRI](group__enums.xhtml#gga32812d6a5501e53b26fd7200472de3fea855b38402da1d6d273345d8fa568738d);

 flags[zoneIdx] = 0;

 name[zoneIdx] = "prism-cap-28";

 stringZoneType[zoneIdx]= "wall";

 fzcz0[zoneIdx] = [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)(1, 18);

 fzcz1[zoneIdx] = [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)();

 

 zoneIdx++;

 zoneIds[zoneIdx] = 31;

 startId[zoneIdx] = 772;

 endId[zoneIdx] = 781;

 dimension[zoneIdx] = 3;

 zoneType[zoneIdx] = [CFF\_FACE\_ZONE\_TYPE\_WALL](group__enums.xhtml#gga13c2dd97c5e14c90a074a2c603ec2bc3affa7b842290a6b5303c8449944b64fa3);

 elementType[zoneIdx] = [CFF\_FACE\_TYPE\_QUAD](group__enums.xhtml#gga32812d6a5501e53b26fd7200472de3fea21316961f46dd008950f167f033851af);

 flags[zoneIdx] = 0;

 name[zoneIdx] = "wall-3-quad-32";

 stringZoneType[zoneIdx]= "wall";

 fzcz0[zoneIdx] = [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)(1, 18);

 fzcz1[zoneIdx] = [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)();

 

 zoneIdx++;

 zoneIds[zoneIdx] = 32;

 startId[zoneIdx] = 782;

 endId[zoneIdx] = 791;

 dimension[zoneIdx] = 3;

 zoneType[zoneIdx] = [CFF\_FACE\_ZONE\_TYPE\_WALL](group__enums.xhtml#gga13c2dd97c5e14c90a074a2c603ec2bc3affa7b842290a6b5303c8449944b64fa3);

 elementType[zoneIdx] = [CFF\_FACE\_TYPE\_QUAD](group__enums.xhtml#gga32812d6a5501e53b26fd7200472de3fea21316961f46dd008950f167f033851af);

 flags[zoneIdx] = 0;

 name[zoneIdx] = "wall-4-quad-32";

 stringZoneType[zoneIdx]= "wall";

 fzcz0[zoneIdx] = [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)(1, 18);

 fzcz1[zoneIdx] = [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)();

 

 zoneIdx++;

 zoneIds[zoneIdx] = 33;

 startId[zoneIdx] = 792;

 endId[zoneIdx] = 801;

 dimension[zoneIdx] = 3;

 zoneType[zoneIdx] = [CFF\_FACE\_ZONE\_TYPE\_WALL](group__enums.xhtml#gga13c2dd97c5e14c90a074a2c603ec2bc3affa7b842290a6b5303c8449944b64fa3);

 elementType[zoneIdx] = [CFF\_FACE\_TYPE\_QUAD](group__enums.xhtml#gga32812d6a5501e53b26fd7200472de3fea21316961f46dd008950f167f033851af);

 flags[zoneIdx] = 0;

 name[zoneIdx] = "wall-5-quad-33";

 stringZoneType[zoneIdx]= "wall";

 fzcz0[zoneIdx] = [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)(1, 18);

 fzcz1[zoneIdx] = [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)();

 

 zoneIdx++;

 zoneIds[zoneIdx] = 34;

 startId[zoneIdx] = 802;

 endId[zoneIdx] = 811;

 dimension[zoneIdx] = 3;

 zoneType[zoneIdx] = [CFF\_FACE\_ZONE\_TYPE\_WALL](group__enums.xhtml#gga13c2dd97c5e14c90a074a2c603ec2bc3affa7b842290a6b5303c8449944b64fa3);

 elementType[zoneIdx] = [CFF\_FACE\_TYPE\_QUAD](group__enums.xhtml#gga32812d6a5501e53b26fd7200472de3fea21316961f46dd008950f167f033851af);

 flags[zoneIdx] = 0;

 name[zoneIdx] = "wall-6-quad-34";

 stringZoneType[zoneIdx]= "wall";

 fzcz0[zoneIdx] = [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)(1, 18);

 fzcz1[zoneIdx] = [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)();

 

 return 0;

}

 

int

CreateFaceNodes([ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)&amp; zoneIds,

 std::vector&lt;std::vector&lt;short&gt; &gt;&amp; numNodes,

 std::vector&lt;std::vector&lt;ansys::ElemIdType&gt; &gt;&amp; nodes)

{

 zoneIds.resize(7, 0);

 numNodes.resize(7);

 nodes.resize(7);

 

 zoneIds[0] = 7;

 numNodes[0].resize(226, 3);

 {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) nodesArray[678] = {

 3, 2, 1, 4, 2, 3, 7, 6, 5, 8, 7, 5, 9, 3,

 1, 10, 9, 1, 11, 6, 7, 12, 6, 11, 13, 4, 3, 14,

 4, 13, 15, 7, 8, 16, 15, 8, 17, 14, 13, 18, 14, 17,

 19, 15, 16, 20, 19, 16, 21, 9, 10, 22, 21, 10, 23, 12,

 11, 24, 12, 23, 25, 21, 22, 26, 25, 22, 27, 18, 17, 28,

 18, 27, 29, 19, 20, 30, 29, 20, 31, 24, 23, 32, 24, 31,

 33, 32, 31, 34, 32, 33, 35, 29, 30, 38, 37, 36, 39, 28,

 27, 38, 28, 39, 40, 25, 26, 34, 40, 26, 37, 38, 39, 33,

 40, 34, 11, 7, 15, 9, 13, 3, 41, 17, 13, 9, 41, 13,

 42, 9, 21, 41, 9, 42, 43, 21, 25, 42, 21, 43, 44, 25,

 40, 43, 25, 44, 45, 27, 17, 41, 45, 17, 46, 39, 27, 45,

 46, 27, 47, 23, 11, 15, 47, 11, 48, 15, 19, 47, 15, 48,

 49, 19, 29, 48, 19, 49, 50, 29, 35, 49, 29, 50, 51, 31,

 23, 47, 51, 23, 52, 33, 31, 51, 52, 31, 33, 44, 40, 44,

 33, 52, 53, 50, 35, 46, 37, 39, 55, 54, 37, 46, 55, 37,

 56, 51, 47, 48, 56, 47, 56, 48, 49, 57, 41, 42, 45, 41,

 57, 57, 42, 43, 58, 52, 51, 56, 58, 51, 59, 46, 45, 57,

 59, 45, 60, 49, 50, 56, 49, 60, 61, 43, 44, 57, 43, 61,

 62, 56, 60, 58, 56, 62, 63, 57, 61, 59, 57, 63, 64, 54,

 55, 65, 55, 46, 59, 65, 46, 50, 53, 66, 66, 60, 50, 67,

 44, 52, 58, 67, 52, 67, 61, 44, 65, 64, 55, 68, 59, 63,

 65, 59, 68, 69, 67, 58, 62, 69, 58, 70, 60, 66, 70, 62,

 60, 71, 61, 67, 69, 71, 67, 71, 63, 61, 71, 68, 63, 68,

 64, 65, 72, 62, 70, 69, 62, 72, 72, 71, 69, 73, 68, 71,

 72, 73, 71, 149, 148, 147, 150, 148, 149, 153, 152, 151, 154, 152,

 153, 155, 149, 147, 156, 155, 147, 157, 153, 151, 158, 157, 151, 159,

 150, 149, 160, 150, 159, 161, 154, 153, 162, 154, 161, 163, 155, 156,

 164, 163, 156, 165, 157, 158, 166, 165, 158, 167, 160, 159, 168, 160,

 167, 169, 162, 161, 170, 162, 169, 171, 163, 164, 172, 171, 164, 173,

 165, 166, 36, 173, 166, 174, 168, 167, 175, 168, 174, 176, 170, 169,

 177, 170, 176, 178, 171, 172, 179, 178, 172, 180, 35, 30, 181, 175,

 174, 180, 175, 181, 37, 173, 36, 182, 177, 176, 179, 177, 182, 35,

 180, 181, 182, 178, 179, 157, 161, 153, 155, 159, 149, 183, 157, 165,

 161, 157, 183, 184, 169, 161, 183, 184, 161, 185, 176, 169, 184, 185,

 169, 186, 182, 176, 185, 186, 176, 187, 165, 173, 183, 165, 187, 54,

 173, 37, 187, 173, 54, 188, 167, 159, 155, 188, 159, 189, 155, 163,

 188, 155, 189, 190, 163, 171, 189, 163, 190, 191, 171, 178, 190, 171,

 191, 192, 174, 167, 188, 192, 167, 53, 181, 174, 192, 53, 174, 186,

 178, 182, 186, 191, 178, 53, 35, 181, 193, 184, 183, 187, 193, 183,

 193, 185, 184, 194, 192, 188, 189, 194, 188, 194, 189, 190, 195, 187,

 54, 193, 187, 195, 196, 53, 192, 194, 196, 192, 197, 190, 191, 194,

 190, 197, 198, 186, 185, 193, 198, 185, 199, 194, 197, 196, 194, 199,

 200, 193, 195, 198, 193, 200, 195, 54, 64, 66, 53, 196, 201, 186,

 198, 191, 186, 201, 201, 197, 191, 200, 195, 64, 202, 196, 199, 66,

 196, 202, 202, 70, 66, 203, 199, 197, 201, 203, 197, 204, 201, 198,

 203, 201, 204, 204, 198, 200, 203, 202, 199, 205, 70, 202, 72, 70,

 205, 206, 200, 64, 204, 200, 206, 207, 203, 204, 206, 207, 204, 206,

 64, 68, 205, 202, 203, 205, 203, 207, 73, 72, 205, 73, 207, 206,

 68, 73, 206, 205, 207, 73};

 

 nodes[0].assign(nodesArray, nodesArray + 678);

 }

 

 zoneIds[1] = 20;

 numNodes[1].resize(319, 4);

 {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) nodesArray[1276] = {

 3, 75, 74, 2, 1, 76, 75, 3, 3, 75, 77, 4, 7, 79,

 78, 6, 5, 80, 79, 7, 8, 81, 79, 7, 9, 82, 75, 3,

 1, 76, 82, 9, 10, 83, 82, 9, 11, 84, 78, 6, 7, 79,

 84, 11, 11, 84, 85, 12, 13, 86, 77, 4, 3, 75, 86, 13,

 13, 86, 87, 14, 15, 88, 79, 7, 8, 81, 88, 15, 16, 89,

 88, 15, 17, 90, 87, 14, 13, 86, 90, 17, 17, 90, 91, 18,

 19, 92, 88, 15, 16, 89, 92, 19, 20, 93, 92, 19, 21, 94,

 82, 9, 10, 83, 94, 21, 22, 95, 94, 21, 23, 96, 85, 12,

 11, 84, 96, 23, 23, 96, 97, 24, 25, 98, 94, 21, 22, 95,

 98, 25, 26, 99, 98, 25, 27, 100, 91, 18, 17, 90, 100, 27,

 27, 100, 101, 28, 29, 102, 92, 19, 20, 93, 102, 29, 30, 103,

 102, 29, 31, 104, 97, 24, 23, 96, 104, 31, 31, 104, 105, 32,

 33, 106, 105, 32, 31, 104, 106, 33, 33, 106, 107, 34, 35, 108,

 102, 29, 30, 103, 108, 35, 36, 110, 109, 37, 38, 111, 109, 37,

 39, 112, 101, 28, 27, 100, 112, 39, 39, 112, 111, 38, 40, 113,

 98, 25, 26, 99, 113, 40, 34, 107, 113, 40, 39, 112, 109, 37,

 33, 106, 113, 40, 15, 88, 84, 11, 9, 82, 86, 13, 41, 114,

 90, 17, 13, 86, 114, 41, 9, 82, 114, 41, 42, 115, 82, 9,

 21, 94, 115, 42, 42, 115, 114, 41, 43, 116, 94, 21, 25, 98,

 116, 43, 43, 116, 115, 42, 44, 117, 98, 25, 40, 113, 117, 44,

 44, 117, 116, 43, 45, 118, 100, 27, 17, 90, 118, 45, 41, 114,

 118, 45, 46, 119, 112, 39, 27, 100, 119, 46, 45, 118, 119, 46,

 47, 120, 96, 23, 11, 84, 120, 47, 15, 88, 120, 47, 48, 121,

 88, 15, 19, 92, 121, 48, 48, 121, 120, 47, 49, 122, 92, 19,

 29, 102, 122, 49, 49, 122, 121, 48, 50, 123, 102, 29, 35, 108,

 123, 50, 50, 123, 122, 49, 51, 124, 104, 31, 23, 96, 124, 51,

 47, 120, 124, 51, 52, 125, 106, 33, 31, 104, 125, 52, 51, 124,

 125, 52, 37, 109, 126, 54, 33, 106, 117, 44, 52, 125, 117, 44,

 53, 127, 108, 35, 53, 127, 123, 50, 46, 119, 109, 37, 55, 128,

 126, 54, 37, 109, 128, 55, 46, 119, 128, 55, 56, 129, 124, 51,

 47, 120, 129, 56, 48, 121, 129, 56, 49, 122, 129, 56, 57, 130,

 114, 41, 42, 115, 130, 57, 57, 130, 118, 45, 43, 116, 130, 57,

 58, 131, 125, 52, 51, 124, 131, 58, 56, 129, 131, 58, 59, 132,

 119, 46, 45, 118, 132, 59, 57, 130, 132, 59, 60, 133, 122, 49,

 50, 123, 133, 60, 60, 133, 129, 56, 61, 134, 116, 43, 44, 117,

 134, 61, 61, 134, 130, 57, 62, 135, 129, 56, 60, 133, 135, 62,

 62, 135, 131, 58, 63, 136, 130, 57, 61, 134, 136, 63, 63, 136,

 132, 59, 64, 137, 126, 54, 55, 128, 137, 64, 65, 138, 128, 55,

 46, 119, 138, 65, 59, 132, 138, 65, 66, 139, 127, 53, 66, 139,

 123, 50, 66, 139, 133, 60, 67, 140, 117, 44, 52, 125, 140, 67,

 58, 131, 140, 67, 67, 140, 134, 61, 65, 138, 137, 64, 68, 141,

 132, 59, 63, 136, 141, 68, 68, 141, 138, 65, 69, 142, 140, 67,

 58, 131, 142, 69, 62, 135, 142, 69, 70, 143, 133, 60, 66, 139,

 143, 70, 70, 143, 135, 62, 71, 144, 134, 61, 67, 140, 144, 71,

 69, 142, 144, 71, 71, 144, 136, 63, 71, 144, 141, 68, 68, 141,

 137, 64, 72, 145, 135, 62, 70, 143, 145, 72, 72, 145, 142, 69,

 72, 145, 144, 71, 73, 146, 141, 68, 71, 144, 146, 73, 72, 145,

 146, 73, 149, 209, 208, 148, 147, 210, 209, 149, 149, 209, 211, 150,

 153, 213, 212, 152, 151, 214, 213, 153, 153, 213, 215, 154, 155, 216,

 209, 149, 147, 210, 216, 155, 156, 217, 216, 155, 157, 218, 213, 153,

 151, 214, 218, 157, 158, 219, 218, 157, 159, 220, 211, 150, 149, 209,

 220, 159, 159, 220, 221, 160, 161, 222, 215, 154, 153, 213, 222, 161,

 161, 222, 223, 162, 163, 224, 216, 155, 156, 217, 224, 163, 164, 225,

 224, 163, 165, 226, 218, 157, 158, 219, 226, 165, 166, 227, 226, 165,

 167, 228, 221, 160, 159, 220, 228, 167, 167, 228, 229, 168, 169, 230,

 223, 162, 161, 222, 230, 169, 169, 230, 231, 170, 171, 232, 224, 163,

 164, 225, 232, 171, 172, 233, 232, 171, 173, 234, 226, 165, 166, 227,

 234, 173, 36, 110, 234, 173, 174, 235, 229, 168, 167, 228, 235, 174,

 174, 235, 236, 175, 176, 237, 231, 170, 169, 230, 237, 176, 176, 237,

 238, 177, 178, 239, 232, 171, 172, 233, 239, 178, 179, 240, 239, 178,

 180, 241, 108, 35, 181, 242, 236, 175, 174, 235, 242, 181, 181, 242,

 241, 180, 37, 109, 234, 173, 182, 243, 238, 177, 176, 237, 243, 182,

 182, 243, 240, 179, 181, 242, 108, 35, 182, 243, 239, 178, 157, 218,

 222, 161, 155, 216, 220, 159, 183, 244, 218, 157, 165, 226, 244, 183,

 183, 244, 222, 161, 184, 245, 230, 169, 161, 222, 245, 184, 183, 244,

 245, 184, 185, 246, 237, 176, 169, 230, 246, 185, 184, 245, 246, 185,

 186, 247, 243, 182, 176, 237, 247, 186, 185, 246, 247, 186, 187, 248,

 226, 165, 173, 234, 248, 187, 187, 248, 244, 183, 54, 126, 234, 173,

 54, 126, 248, 187, 188, 249, 228, 167, 159, 220, 249, 188, 155, 216,

 249, 188, 189, 250, 216, 155, 163, 224, 250, 189, 189, 250, 249, 188,

 190, 251, 224, 163, 171, 232, 251, 190, 190, 251, 250, 189, 191, 252,

 232, 171, 178, 239, 252, 191, 191, 252, 251, 190, 192, 253, 235, 174,

 167, 228, 253, 192, 188, 249, 253, 192, 53, 127, 242, 181, 174, 235,

 127, 53, 192, 253, 127, 53, 186, 247, 239, 178, 186, 247, 252, 191,

 193, 254, 245, 184, 183, 244, 254, 193, 187, 248, 254, 193, 193, 254,

 246, 185, 194, 255, 253, 192, 188, 249, 255, 194, 189, 250, 255, 194,

 190, 251, 255, 194, 195, 256, 248, 187, 54, 126, 256, 195, 195, 256,

 254, 193, 196, 257, 127, 53, 192, 253, 257, 196, 194, 255, 257, 196,

 197, 258, 251, 190, 191, 252, 258, 197, 197, 258, 255, 194, 198, 259,

 247, 186, 185, 246, 259, 198, 193, 254, 259, 198, 199, 260, 255, 194,

 197, 258, 260, 199, 199, 260, 257, 196, 200, 261, 254, 193, 195, 256,

 261, 200, 200, 261, 259, 198, 64, 137, 256, 195, 196, 257, 139, 66,

 201, 262, 247, 186, 198, 259, 262, 201, 201, 262, 252, 191, 201, 262,

 258, 197, 64, 137, 261, 200, 202, 263, 257, 196, 199, 260, 263, 202,

 202, 263, 139, 66, 202, 263, 143, 70, 203, 264, 260, 199, 197, 258,

 264, 203, 201, 262, 264, 203, 204, 265, 262, 201, 198, 259, 265, 204,

 204, 265, 264, 203, 200, 261, 265, 204, 203, 264, 263, 202, 205, 266,

 143, 70, 202, 263, 266, 205, 205, 266, 145, 72, 206, 267, 261, 200,

 64, 137, 267, 206, 206, 267, 265, 204, 207, 268, 264, 203, 204, 265,

 268, 207, 206, 267, 268, 207, 68, 141, 267, 206, 203, 264, 266, 205,

 207, 268, 266, 205, 205, 266, 146, 73, 73, 146, 268, 207, 206, 267,

 146, 73};

 

 nodes[1].assign(nodesArray, nodesArray + 1276);

 }

 

 zoneIds[2] = 28;

 numNodes[2].resize(226, 3);

 {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) nodesArray[678] = {

 76, 74, 75, 75, 74, 77, 80, 78, 79, 80, 79, 81, 76, 75,

 82, 76, 82, 83, 79, 78, 84, 84, 78, 85, 75, 77, 86, 86,

 77, 87, 81, 79, 88, 81, 88, 89, 86, 87, 90, 90, 87, 91,

 89, 88, 92, 89, 92, 93, 83, 82, 94, 83, 94, 95, 84, 85,

 96, 96, 85, 97, 95, 94, 98, 95, 98, 99, 90, 91, 100, 100,

 91, 101, 93, 92, 102, 93, 102, 103, 96, 97, 104, 104, 97, 105,

 104, 105, 106, 106, 105, 107, 103, 102, 108, 110, 109, 111, 100, 101,

 112, 112, 101, 111, 99, 98, 113, 99, 113, 107, 112, 111, 109, 107,

 113, 106, 88, 79, 84, 75, 86, 82, 86, 90, 114, 86, 114, 82,

 94, 82, 115, 115, 82, 114, 98, 94, 116, 116, 94, 115, 113, 98,

 117, 117, 98, 116, 90, 100, 118, 90, 118, 114, 100, 112, 119, 100,

 119, 118, 84, 96, 120, 84, 120, 88, 92, 88, 121, 121, 88, 120,

 102, 92, 122, 122, 92, 121, 108, 102, 123, 123, 102, 122, 96, 104,

 124, 96, 124, 120, 104, 106, 125, 104, 125, 124, 113, 117, 106, 125,

 106, 117, 108, 123, 127, 112, 109, 119, 109, 126, 128, 109, 128, 119,

 120, 124, 129, 120, 129, 121, 122, 121, 129, 115, 114, 130, 130, 114,

 118, 116, 115, 130, 124, 125, 131, 124, 131, 129, 118, 119, 132, 118,

 132, 130, 123, 122, 133, 133, 122, 129, 117, 116, 134, 134, 116, 130,

 133, 129, 135, 135, 129, 131, 134, 130, 136, 136, 130, 132, 128, 126,

 137, 119, 128, 138, 119, 138, 132, 139, 127, 123, 123, 133, 139, 125,

 117, 140, 125, 140, 131, 117, 134, 140, 128, 137, 138, 136, 132, 141,

 141, 132, 138, 131, 140, 142, 131, 142, 135, 139, 133, 143, 133, 135,

 143, 140, 134, 144, 140, 144, 142, 134, 136, 144, 136, 141, 144, 138,

 137, 141, 143, 135, 145, 145, 135, 142, 142, 144, 145, 144, 141, 146,

 144, 146, 145, 210, 208, 209, 209, 208, 211, 214, 212, 213, 213, 212,

 215, 210, 209, 216, 210, 216, 217, 214, 213, 218, 214, 218, 219, 209,

 211, 220, 220, 211, 221, 213, 215, 222, 222, 215, 223, 217, 216, 224,

 217, 224, 225, 219, 218, 226, 219, 226, 227, 220, 221, 228, 228, 221,

 229, 222, 223, 230, 230, 223, 231, 225, 224, 232, 225, 232, 233, 227,

 226, 234, 227, 234, 110, 228, 229, 235, 235, 229, 236, 230, 231, 237,

 237, 231, 238, 233, 232, 239, 233, 239, 240, 103, 108, 241, 235, 236,

 242, 242, 236, 241, 110, 234, 109, 237, 238, 243, 243, 238, 240, 242,

 241, 108, 240, 239, 243, 213, 222, 218, 209, 220, 216, 226, 218, 244,

 244, 218, 222, 222, 230, 245, 222, 245, 244, 230, 237, 246, 230, 246,

 245, 237, 243, 247, 237, 247, 246, 234, 226, 248, 248, 226, 244, 109,

 234, 126, 126, 234, 248, 220, 228, 249, 220, 249, 216, 224, 216, 250,

 250, 216, 249, 232, 224, 251, 251, 224, 250, 239, 232, 252, 252, 232,

 251, 228, 235, 253, 228, 253, 249, 235, 242, 127, 235, 127, 253, 243,

 239, 247, 239, 252, 247, 242, 108, 127, 244, 245, 254, 244, 254, 248,

 245, 246, 254, 249, 253, 255, 249, 255, 250, 251, 250, 255, 126, 248,

 256, 256, 248, 254, 253, 127, 257, 253, 257, 255, 252, 251, 258, 258,

 251, 255, 246, 247, 259, 246, 259, 254, 258, 255, 260, 260, 255, 257,

 256, 254, 261, 261, 254, 259, 137, 126, 256, 257, 127, 139, 259, 247,

 262, 262, 247, 252, 252, 258, 262, 137, 256, 261, 260, 257, 263, 263,

 257, 139, 139, 143, 263, 258, 260, 264, 258, 264, 262, 259, 262, 265,

 265, 262, 264, 261, 259, 265, 260, 263, 264, 263, 143, 266, 266, 143,

 145, 137, 261, 267, 267, 261, 265, 265, 264, 268, 265, 268, 267, 141,

 137, 267, 264, 263, 266, 268, 264, 266, 266, 145, 146, 267, 268, 146,

 267, 146, 141, 146, 268, 266};

 

 nodes[2].assign(nodesArray, nodesArray + 678);

 }

 

 zoneIds[3] = 31;

 numNodes[3].resize(10, 4);

 {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) nodesArray[40] = {2, 74, 76, 1, 6, 78, 80, 5, 1, 76,

 83, 10, 12, 85, 78, 6, 10, 83, 95, 22,

 24, 97, 85, 12, 22, 95, 99, 26, 32, 105,

 97, 24, 34, 107, 105, 32, 26, 99, 107, 34};

 

 nodes[3].assign(nodesArray, nodesArray + 40);

 }

 

 zoneIds[4] = 32;

 numNodes[4].resize(10, 4);

 {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) nodesArray[40] = {4, 77, 74, 2, 14, 87, 77, 4, 18, 91,

 87, 14, 28, 101, 91, 18, 36, 110, 111, 38,

 38, 111, 101, 28, 152, 212, 214, 151, 151, 214,

 219, 158, 158, 219, 227, 166, 166, 227, 110, 36};

 

 nodes[4].assign(nodesArray, nodesArray + 40);

 }

 

 zoneIds[5] = 33;

 numNodes[5].resize(10, 4);

 {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) nodesArray[40] = {5, 80, 81, 8, 8, 81, 89, 16, 16, 89,

 93, 20, 20, 93, 103, 30, 150, 211, 208, 148,

 160, 221, 211, 150, 168, 229, 221, 160, 175, 236,

 229, 168, 30, 103, 241, 180, 180, 241, 236, 175};

 

 nodes[5].assign(nodesArray, nodesArray + 40);

 }

 

 zoneIds[6] = 34;

 numNodes[6].resize(10, 4);

 {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) nodesArray[40] = {148, 208, 210, 147, 154, 215, 212, 152, 147, 210,

 217, 156, 162, 223, 215, 154, 156, 217, 225, 164,

 170, 231, 223, 162, 164, 225, 233, 172, 177, 238,

 231, 170, 172, 233, 240, 179, 179, 240, 238, 177};

 

 nodes[6].assign(nodesArray, nodesArray + 40);

 }

 

 return 0;

}

 

int

CreateFaceC0s([ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)&amp; zoneIds,

 std::vector&lt;std::vector&lt;ansys::ElemIdType&gt; &gt;&amp; faceC0s)

{

 zoneIds.resize(7, 0);

 faceC0s.resize(7);

 

 zoneIds[0] = 7;

 {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) c0Array[226] = {

 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,

 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,

 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,

 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,

 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,

 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,

 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,

 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,

 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,

 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,

 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,

 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,

 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,

 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,

 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,

 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,

 225, 226};

 

 faceC0s[0].assign(c0Array, c0Array + 226);

 }

 

 zoneIds[1] = 20;

 {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) c0Array[319] = {

 1, 1, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 9, 9,

 10, 11, 11, 12, 13, 13, 14, 15, 15, 16, 17, 17, 18, 19,

 19, 20, 21, 21, 22, 23, 23, 24, 25, 25, 26, 27, 27, 28,

 29, 29, 30, 31, 31, 147, 32, 33, 33, 34, 35, 35, 36, 37,

 38, 39, 40, 41, 41, 42, 43, 43, 44, 45, 45, 46, 47, 47,

 48, 49, 49, 50, 51, 51, 52, 53, 53, 54, 55, 55, 56, 57,

 57, 58, 59, 59, 60, 61, 61, 62, 63, 63, 64, 164, 65, 66,

 180, 67, 68, 69, 69, 70, 71, 71, 72, 73, 74, 74, 75, 76,

 77, 77, 78, 79, 79, 80, 81, 81, 82, 83, 83, 84, 85, 85,

 86, 87, 87, 88, 89, 89, 90, 90, 91, 200, 92, 93, 94, 94,

 95, 96, 97, 98, 98, 99, 100, 100, 101, 102, 102, 103, 104, 104,

 105, 106, 107, 108, 109, 109, 110, 111, 112, 112, 113, 114, 114, 115,

 116, 116, 117, 118, 118, 119, 120, 120, 121, 122, 122, 123, 124, 124,

 125, 126, 126, 127, 128, 128, 129, 130, 130, 131, 132, 132, 133, 134,

 134, 135, 136, 136, 137, 138, 138, 139, 140, 140, 141, 142, 142, 143,

 144, 145, 145, 146, 147, 148, 148, 149, 150, 151, 152, 153, 154, 154,

 155, 156, 156, 157, 158, 158, 159, 160, 160, 161, 162, 162, 163, 164,

 165, 166, 166, 167, 168, 168, 169, 170, 170, 171, 172, 172, 173, 174,

 174, 175, 176, 176, 177, 178, 179, 181, 181, 182, 183, 184, 184, 185,

 186, 187, 187, 188, 189, 189, 190, 191, 191, 192, 193, 193, 194, 195,

 195, 196, 197, 197, 198, 199, 200, 201, 201, 202, 203, 204, 205, 205,

 206, 207, 208, 208, 209, 210, 210, 211, 212, 213, 214, 214, 215, 216,

 216, 217, 218, 218, 219, 220, 221, 222, 223, 224, 224};

 

 faceC0s[1].assign(c0Array, c0Array + 319);

 }

 

 zoneIds[2] = 28;

 {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) c0Array[226] = {

 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,

 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,

 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,

 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,

 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,

 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,

 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,

 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,

 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,

 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,

 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,

 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,

 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,

 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,

 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,

 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,

 225, 226};

 

 faceC0s[2].assign(c0Array, c0Array + 226);

 }

 

 zoneIds[3] = 31;

 {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) c0Array[10] = {1, 3, 6, 8, 18, 20, 22, 28, 30, 36};

 

 faceC0s[3].assign(c0Array, c0Array + 10);

 }

 

 zoneIds[4] = 32;

 {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) c0Array[10] = {2, 10, 14, 24, 32, 34, 116, 121, 129, 137};

 

 faceC0s[4].assign(c0Array, c0Array + 10);

 }

 

 zoneIds[5] = 33;

 {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) c0Array[10] = {4, 12, 16, 26, 115, 123, 131, 139, 144, 146};

 

 faceC0s[5].assign(c0Array, c0Array + 10);

 }

 

 zoneIds[6] = 34;

 {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) c0Array[10] = {114, 117, 119, 125, 127, 133, 135, 141, 143, 149};

 

 faceC0s[6].assign(c0Array, c0Array + 10);

 }

 

 return 0;

}

 

int

CreateFaceC1s([ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)&amp; zoneIds,

 std::vector&lt;std::vector&lt;ansys::ElemIdType&gt; &gt;&amp; faceC1s)

{

 zoneIds.resize(1, 0);

 faceC1s.resize(1);

 

 zoneIds[0] = 20;

 {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) c1Array[319] = {

 2, 5, 9, 7, 4, 11, 40, 6, 17, 8, 39, 19, 10, 40,

 13, 39, 12, 15, 14, 41, 23, 55, 16, 25, 43, 18, 21, 20,

 53, 27, 45, 22, 35, 24, 49, 33, 57, 26, 31, 28, 61, 29,

 30, 63, 38, 59, 144, 32, 37, 34, 51, 37, 47, 36, 38, 68,

 65, 54, 42, 50, 42, 44, 44, 46, 74, 46, 48, 76, 48, 65,

 83, 52, 50, 75, 68, 52, 79, 62, 54, 56, 56, 58, 72, 58,

 60, 73, 60, 67, 81, 64, 62, 71, 66, 64, 77, 69, 66, 94,

 67, 92, 70, 89, 70, 90, 78, 72, 73, 82, 75, 76, 80, 84,

 95, 78, 86, 91, 80, 88, 82, 93, 85, 84, 96, 87, 86, 103,

 101, 88, 106, 98, 199, 97, 97, 91, 99, 92, 93, 102, 96, 95,

 100, 104, 108, 99, 107, 108, 105, 101, 110, 103, 207, 109, 106, 105,

 111, 107, 112, 220, 110, 215, 111, 113, 225, 113, 223, 115, 118, 122,

 117, 120, 124, 153, 119, 126, 152, 121, 128, 123, 153, 130, 125, 152,

 132, 168, 127, 134, 154, 129, 136, 131, 166, 138, 133, 156, 140, 170,

 135, 142, 162, 137, 147, 139, 174, 145, 141, 158, 148, 172, 143, 151,

 150, 146, 176, 150, 164, 149, 160, 151, 180, 178, 155, 167, 155, 163,

 157, 159, 157, 181, 161, 159, 183, 178, 161, 193, 163, 165, 182, 165,

 187, 175, 167, 169, 169, 171, 185, 171, 173, 186, 173, 179, 191, 177,

 175, 184, 180, 177, 189, 179, 202, 183, 182, 188, 194, 190, 185, 186,

 192, 188, 199, 197, 200, 190, 196, 192, 203, 195, 201, 194, 198, 196,

 208, 205, 198, 204, 212, 204, 206, 202, 210, 203, 209, 216, 206, 213,

 207, 214, 213, 209, 211, 211, 212, 218, 217, 221, 215, 221, 223, 217,

 220, 219, 222, 219, 224, 225, 222, 226, 226, 226, 225};

 

 faceC1s[0].assign(c1Array, c1Array + 319);

 }

 

 return 0;

}

 

int

CreateCellZones([ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)&amp; zoneIds,

 std::vector&lt;ansys::ElemIdType&gt;&amp; startId,

 std::vector&lt;ansys::ElemIdType&gt;&amp; endId,

 std::vector&lt;short&gt;&amp; dimension,

 std::vector&lt;ansys::ZoneIdType&gt;&amp; childZoneId,

 std::vector&lt;ansys::CellType&gt;&amp; elementType,

 std::vector&lt;std::string&gt;&amp; name,

 std::vector&lt;std::string&gt;&amp; stringZoneType)

{

 zoneIds.resize(1, 0);

 startId.resize(1, 0);

 endId.resize(1, 0);

 dimension.resize(1, 0);

 childZoneId.resize(1, 0);

 elementType.resize(1, [CFF\_CELL\_TYPE\_MIN](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a58c00a54277d6ba91303af48841a4754));

 name.resize(1);

 stringZoneType.resize(1);

 

 zoneIds[0] = 18;

 startId[0] = 1;

 endId[0] = 226;

 dimension[0] = 3;

 elementType[0] = [CFF\_CELL\_TYPE\_WEDGE](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a92936a31fa1ba3c57085ac1038a4a879);

 name[0] = "prism-cells-18";

 stringZoneType[0] = "fluid";

 

 return 0;

}

 

int

CreateCellTypes([ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)&amp; zoneIds,

 std::vector&lt;ansys::CellType&gt;&amp; zoneCellTypes,

 std::vector&lt;std::vector&lt;ansys::CellType&gt; &gt;&amp; allCellTypes)

{

 zoneIds.resize(1, 0);

 zoneCellTypes.resize(1, [CFF\_CELL\_TYPE\_MIXED](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a1eed460af26c972bc96e5f71e7d124ba));

 allCellTypes.resize(1);

 

 zoneIds[0] = 18;

 zoneCellTypes[0] = [CFF\_CELL\_TYPE\_WEDGE](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a92936a31fa1ba3c57085ac1038a4a879);

 allCellTypes[0].clear();

 

 return 0;

}

 

void setCellFaces(const [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) startId,

 const std::vector&lt;ansys::ElemIdType&gt;&amp; cxArray,

 std::vector&lt;std::vector&lt;ansys::ElemIdType&gt; &gt;&amp; tempFId)

{

 size\_t i = 0;

 for (const auto elem : cxArray)

 {

 tempFId.at(elem - 1).push_back(startId + i);

 i++;

 } 

}

 

void

createCellFaces([ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)&amp; zoneIds, 

 std::vector&lt;std::vector&lt;ansys::ElemIdType&gt; &gt;&amp; lCellConn, 

 std::vector&lt;std::vector&lt;short&gt; &gt;&amp; lCellCounts)

{

 zoneIds.clear();

 zoneIds.push_back(18);

 

 std::vector&lt;std::vector&lt;ansys::ElemIdType&gt; &gt; tempFId(226);

 

 {

 std::vector&lt;ansys::ElemIdType&gt;c1Array {

 2, 5, 9, 7, 4, 11, 40, 6, 17, 8, 39, 19, 10, 40,

 13, 39, 12, 15, 14, 41, 23, 55, 16, 25, 43, 18, 21, 20,

 53, 27, 45, 22, 35, 24, 49, 33, 57, 26, 31, 28, 61, 29,

 30, 63, 38, 59, 144, 32, 37, 34, 51, 37, 47, 36, 38, 68,

 65, 54, 42, 50, 42, 44, 44, 46, 74, 46, 48, 76, 48, 65,

 83, 52, 50, 75, 68, 52, 79, 62, 54, 56, 56, 58, 72, 58,

 60, 73, 60, 67, 81, 64, 62, 71, 66, 64, 77, 69, 66, 94,

 67, 92, 70, 89, 70, 90, 78, 72, 73, 82, 75, 76, 80, 84,

 95, 78, 86, 91, 80, 88, 82, 93, 85, 84, 96, 87, 86, 103,

 101, 88, 106, 98, 199, 97, 97, 91, 99, 92, 93, 102, 96, 95,

 100, 104, 108, 99, 107, 108, 105, 101, 110, 103, 207, 109, 106, 105,

 111, 107, 112, 220, 110, 215, 111, 113, 225, 113, 223, 115, 118, 122,

 117, 120, 124, 153, 119, 126, 152, 121, 128, 123, 153, 130, 125, 152,

 132, 168, 127, 134, 154, 129, 136, 131, 166, 138, 133, 156, 140, 170,

 135, 142, 162, 137, 147, 139, 174, 145, 141, 158, 148, 172, 143, 151,

 150, 146, 176, 150, 164, 149, 160, 151, 180, 178, 155, 167, 155, 163,

 157, 159, 157, 181, 161, 159, 183, 178, 161, 193, 163, 165, 182, 165,

 187, 175, 167, 169, 169, 171, 185, 171, 173, 186, 173, 179, 191, 177,

 175, 184, 180, 177, 189, 179, 202, 183, 182, 188, 194, 190, 185, 186,

 192, 188, 199, 197, 200, 190, 196, 192, 203, 195, 201, 194, 198, 196,

 208, 205, 198, 204, 212, 204, 206, 202, 210, 203, 209, 216, 206, 213,

 207, 214, 213, 209, 211, 211, 212, 218, 217, 221, 215, 221, 223, 217,

 220, 219, 222, 219, 224, 225, 222, 226, 226, 226, 225};

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) startId = 227; 

 setCellFaces(startId, c1Array, tempFId);

 }

 

 {

 std::vector&lt;ansys::ElemIdType&gt;c0Array{

 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,

 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,

 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,

 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,

 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,

 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,

 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,

 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,

 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,

 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,

 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,

 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,

 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,

 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,

 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,

 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,

 225, 226};

 

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) startId = 1;

 setCellFaces(startId, c0Array, tempFId); 

 }

 

 {

 std::vector&lt;ansys::ElemIdType&gt; c0Array{

 1, 1, 2, 3, 3, 4, 5, 5, 6, 7, 7, 8, 9, 9,

 10, 11, 11, 12, 13, 13, 14, 15, 15, 16, 17, 17, 18, 19,

 19, 20, 21, 21, 22, 23, 23, 24, 25, 25, 26, 27, 27, 28,

 29, 29, 30, 31, 31, 147, 32, 33, 33, 34, 35, 35, 36, 37,

 38, 39, 40, 41, 41, 42, 43, 43, 44, 45, 45, 46, 47, 47,

 48, 49, 49, 50, 51, 51, 52, 53, 53, 54, 55, 55, 56, 57,

 57, 58, 59, 59, 60, 61, 61, 62, 63, 63, 64, 164, 65, 66,

 180, 67, 68, 69, 69, 70, 71, 71, 72, 73, 74, 74, 75, 76,

 77, 77, 78, 79, 79, 80, 81, 81, 82, 83, 83, 84, 85, 85,

 86, 87, 87, 88, 89, 89, 90, 90, 91, 200, 92, 93, 94, 94,

 95, 96, 97, 98, 98, 99, 100, 100, 101, 102, 102, 103, 104, 104,

 105, 106, 107, 108, 109, 109, 110, 111, 112, 112, 113, 114, 114, 115,

 116, 116, 117, 118, 118, 119, 120, 120, 121, 122, 122, 123, 124, 124,

 125, 126, 126, 127, 128, 128, 129, 130, 130, 131, 132, 132, 133, 134,

 134, 135, 136, 136, 137, 138, 138, 139, 140, 140, 141, 142, 142, 143,

 144, 145, 145, 146, 147, 148, 148, 149, 150, 151, 152, 153, 154, 154,

 155, 156, 156, 157, 158, 158, 159, 160, 160, 161, 162, 162, 163, 164,

 165, 166, 166, 167, 168, 168, 169, 170, 170, 171, 172, 172, 173, 174,

 174, 175, 176, 176, 177, 178, 179, 181, 181, 182, 183, 184, 184, 185,

 186, 187, 187, 188, 189, 189, 190, 191, 191, 192, 193, 193, 194, 195,

 195, 196, 197, 197, 198, 199, 200, 201, 201, 202, 203, 204, 205, 205,

 206, 207, 208, 208, 209, 210, 210, 211, 212, 213, 214, 214, 215, 216,

 216, 217, 218, 218, 219, 220, 221, 222, 223, 224, 224};

 

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) startId = 227;

 setCellFaces(startId, c0Array, tempFId); 

 }

 

 {

 std::vector&lt;ansys::ElemIdType&gt; c0Array{

 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,

 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28,

 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,

 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56,

 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,

 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84,

 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98,

 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,

 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126,

 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140,

 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,

 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168,

 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182,

 183, 184, 185, 186, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,

 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210,

 211, 212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224,

 225, 226};

 

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) startId = 546;

 setCellFaces(startId, c0Array, tempFId); 

 }

 

 {

 std::vector&lt;ansys::ElemIdType&gt; c0Array{1, 3, 6, 8, 18, 20, 22, 28, 30, 36};

 

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) startId = 772;

 setCellFaces(startId, c0Array, tempFId); 

 }

 

 {

 std::vector&lt;ansys::ElemIdType&gt; c0Array{2, 10, 14, 24, 32, 34, 116, 121, 129, 137};

 

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) startId = 782;

 setCellFaces(startId, c0Array, tempFId); 

 }

 

 {

 std::vector&lt;ansys::ElemIdType&gt; c0Array{4, 12, 16, 26, 115, 123, 131, 139, 144, 146};

 

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) startId = 792;

 setCellFaces(startId, c0Array, tempFId); 

 }

 

 {

 std::vector&lt;ansys::ElemIdType&gt; c0Array{114, 117, 119, 125, 127, 133, 135, 141, 143, 149};

 

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) startId = 802;

 setCellFaces(startId, c0Array, tempFId); 

 }

 

 lCellCounts.resize(1);

 lCellCounts.at(0).clear();

 lCellConn.resize(1);

 lCellConn.at(0).clear();

 for (const auto&amp; vec : tempFId)

 {

 lCellCounts.at(0).push_back(static\_cast&lt;short&gt;(vec.size()));

 std::copy(vec.begin(), vec.end(), std::back_inserter(lCellConn.at(0)));

 }

}

 

int

CreateCellPartitions([ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)&amp; zoneIds,

 int&amp; numPartitions,

 std::vector&lt;std::vector&lt;ansys::PartitionIdType&gt; &gt;&amp; cellPartitions)

{

 zoneIds.resize(1, 0);

 cellPartitions.resize(1);

 

 numPartitions = 2;

 

 zoneIds[0] = 18;

 {

 [ansys::PartitionIdType](group__typedefs.xhtml#gaa0b01fb68d68067022164a7fcb5cb0e5) cellPartitionsArray[226] = {

 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,

 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1,

 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,

 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,

 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,

 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,

 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};

 

 cellPartitions[0].assign(cellPartitionsArray, cellPartitionsArray + 226);

 }

 

 return 0;

}

 

int

CreatePhases([ansys::PhaseNames](group__typedefs.xhtml#ga0fd5a01583470684274d967989f7172c)&amp; phaseNames)

{

 phaseNames.resize(1, "phase-1");

 return 0;

}

 

int

CreateVarNames(const [ansys::PhaseIdType](group__typedefs.xhtml#gac3312714419db4aa206bdeda4efa9223) phaseId,

 const [ansys::ZoneCategory](group__enums.xhtml#ga1e26b7f9299129cd1edc8fdf99f2917b) zoneCategory,

 [ansys::VariableNames](group__typedefs.xhtml#ga0f1f2a7436a48ebc6dbd9b96b61295fb)&amp; vars,

 std::vector&lt;int&gt;&amp; xfIds)

{

 switch (phaseId) {

 case 1:

 switch (zoneCategory) {

 case [CFF\_FACE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baa6aea3358b01fc54950d21d8af9c01a0):

 vars.resize(11);

 xfIds.resize(11);

 vars[0] = "SV\_DT\_BC\_SOURCE";

 vars[1] = "SV\_FLUX";

 vars[2] = "SV\_HEAT\_FLUX";

 vars[3] = "SV\_P";

 vars[4] = "SV\_RAD\_HEAT\_FLUX";

 vars[5] = "SV\_U";

 vars[6] = "SV\_V";

 vars[7] = "SV\_W";

 vars[8] = "SV\_WALL\_SHEAR";

 vars[9] = "SV\_WALL\_V";

 vars[10] = "SV\_WALL\_VV";

 xfIds[0] = 1328;

 xfIds[1] = 18;

 xfIds[2] = 20;

 xfIds[3] = 1;

 xfIds[4] = 21;

 xfIds[5] = 111;

 xfIds[6] = 112;

 xfIds[7] = 113;

 xfIds[8] = 19;

 xfIds[9] = 114;

 xfIds[10] = 8553;

 break;

 case [CFF\_CELL\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba62b22dd5125249182737df29d52bafbd):

 vars.resize(8);

 xfIds.resize(8);

 vars[0] = "SV\_BF\_V";

 vars[1] = "SV\_DENSITY";

 vars[2] = "SV\_DPM\_PARTITION";

 vars[3] = "SV\_MU\_LAM";

 vars[4] = "SV\_P";

 vars[5] = "SV\_U";

 vars[6] = "SV\_V";

 vars[7] = "SV\_W";

 xfIds[0] = 15;

 xfIds[1] = 101;

 xfIds[2] = 420;

 xfIds[3] = 102;

 xfIds[4] = 1;

 xfIds[5] = 111;

 xfIds[6] = 112;

 xfIds[7] = 113;

 break;

 default:;

 }

 break;

 case 2:

 switch (zoneCategory) {

 case [CFF\_FACE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baa6aea3358b01fc54950d21d8af9c01a0):

 vars.resize(11);

 xfIds.resize(11);

 vars[0] = "SV\_DT\_BC\_SOURCE";

 vars[1] = "SV\_FLUX";

 vars[2] = "SV\_HEAT\_FLUX";

 vars[3] = "SV\_P";

 vars[4] = "SV\_RAD\_HEAT\_FLUX";

 vars[5] = "SV\_U";

 vars[6] = "SV\_V";

 vars[7] = "SV\_W";

 vars[8] = "SV\_WALL\_SHEAR";

 vars[9] = "SV\_WALL\_V";

 vars[10] = "SV\_WALL\_VV";

 xfIds[0] = 1328;

 xfIds[1] = 18;

 xfIds[2] = 20;

 xfIds[3] = 1;

 xfIds[4] = 21;

 xfIds[5] = 111;

 xfIds[6] = 112;

 xfIds[7] = 113;

 xfIds[8] = 19;

 xfIds[9] = 114;

 xfIds[10] = 8553;

 break;

 case [CFF\_CELL\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba62b22dd5125249182737df29d52bafbd):

 vars.resize(8);

 xfIds.resize(8);

 vars[0] = "SV\_BF\_V";

 vars[1] = "SV\_DENSITY";

 vars[2] = "SV\_DPM\_PARTITION";

 vars[3] = "SV\_MU\_LAM";

 vars[4] = "SV\_P";

 vars[5] = "SV\_U";

 vars[6] = "SV\_V";

 vars[7] = "SV\_W";

 xfIds[0] = 15;

 xfIds[1] = 101;

 xfIds[2] = 420;

 xfIds[3] = 102;

 xfIds[4] = 1;

 xfIds[5] = 111;

 xfIds[6] = 112;

 xfIds[7] = 113;

 break;

 default:;

 }

 break; 

 default:

 std::cout &lt;&lt; "No need to write phase-" &lt;&lt; phaseId &lt;&lt; "." &lt;&lt; std::endl;

 break;

 }

 

 return 0;

}

 

int

CreateVarsForThisCategory(const [ansys::PhaseIdType](group__typedefs.xhtml#gac3312714419db4aa206bdeda4efa9223) phaseId,

 const [ansys::ZoneCategory](group__enums.xhtml#ga1e26b7f9299129cd1edc8fdf99f2917b) zoneCategory,

 const [ansys::VariableIdType](group__typedefs.xhtml#gae1bb05c41fbbd2e21c7b62cbe214b4be) varId,

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)&amp; zoneIds,

 size\_t&amp; numColumns,

 std::vector&lt;std::vector&lt;double&gt; &gt;&amp; data)

{

 switch (phaseId) {

 case 1:

 switch (zoneCategory) {

 case [CFF\_FACE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baa6aea3358b01fc54950d21d8af9c01a0):

 switch (varId) {

 case 1328:

 // "2nd Grad Bc Source"

 zoneIds.resize(6);

 data.resize(6);

 zoneIds[0] = 7;

 zoneIds[1] = 28;

 zoneIds[2] = 31;

 zoneIds[3] = 32;

 zoneIds[4] = 33;

 zoneIds[5] = 34;

 numColumns = 1;

 data[0].resize(226, 0.0);

 data[1].resize(226, 0.0);

 data[2].resize(10, 0.0);

 data[3].resize(10, 0.0);

 data[4].resize(10, 0.0);

 data[5].resize(10, 0.0);

 break;

 case 18:

 // "Mass Flux"

 zoneIds.resize(7);

 data.resize(7);

 zoneIds[0] = 7;

 zoneIds[1] = 20;

 zoneIds[2] = 28;

 zoneIds[3] = 31;

 zoneIds[4] = 32;

 zoneIds[5] = 33;

 zoneIds[6] = 34;

 numColumns = 1;

 data[0].resize(226, 0.0);

 data[1].resize(319, 0.0);

 data[2].resize(226, 0.0);

 data[3].resize(10, 0.0);

 data[4].resize(10, 0.0);

 data[5].resize(10, 0.0);

 data[6].resize(10, 0.0);

 break;

 case 20:

 // "Boundary heat flux":

 zoneIds.resize(6);

 data.resize(6);

 zoneIds[0] = 7;

 zoneIds[1] = 28;

 zoneIds[2] = 31;

 zoneIds[3] = 32;

 zoneIds[4] = 33;

 zoneIds[5] = 34;

 numColumns = 1;

 data[0].resize(226, 0.0);

 data[1].resize(226, 0.0);

 data[2].resize(10, 0.0);

 data[3].resize(10, 0.0);

 data[4].resize(10, 0.0);

 data[5].resize(10, 0.0);

 break;

 case 1:

 // "Pressure"

 zoneIds.resize(7);

 data.resize(7);

 zoneIds[0] = 7;

 zoneIds[1] = 20;

 zoneIds[2] = 28;

 zoneIds[3] = 31;

 zoneIds[4] = 32;

 zoneIds[5] = 33;

 zoneIds[6] = 34;

 numColumns = 1;

 data[0].resize(226, 0.0);

 data[1].resize(319, 0.0);

 data[2].resize(226, 0.0);

 data[3].resize(10, 0.0);

 data[4].resize(10, 0.0);

 data[5].resize(10, 0.0);

 data[6].resize(10, 0.0);

 break;

 case 21:

 // "Boundary rad heat flux"

 zoneIds.resize(6);

 data.resize(6);

 zoneIds[0] = 7;

 zoneIds[1] = 28;

 zoneIds[2] = 31;

 zoneIds[3] = 32;

 zoneIds[4] = 33;

 zoneIds[5] = 34;

 numColumns = 1;

 data[0].resize(226, 0.0);

 data[1].resize(226, 0.0);

 data[2].resize(10, 0.0);

 data[3].resize(10, 0.0);

 data[4].resize(10, 0.0);

 data[5].resize(10, 0.0);

 break;

 case 111:

 // "X Velocity"

 zoneIds.resize(6);

 data.resize(6);

 zoneIds[0] = 7;

 zoneIds[1] = 28;

 zoneIds[2] = 31;

 zoneIds[3] = 32;

 zoneIds[4] = 33;

 zoneIds[5] = 34;

 numColumns = 1;

 data[0].resize(226, 0.0);

 data[1].resize(226, 0.0);

 data[2].resize(10, 0.0);

 data[3].resize(10, 0.0);

 data[4].resize(10, 0.0);

 data[5].resize(10, 0.0);

 break;

 case 112:

 // "Y Velocity"

 zoneIds.resize(6);

 data.resize(6);

 zoneIds[0] = 7;

 zoneIds[1] = 28;

 zoneIds[2] = 31;

 zoneIds[3] = 32;

 zoneIds[4] = 33;

 zoneIds[5] = 34;

 numColumns = 1;

 data[0].resize(226, 0.0);

 data[1].resize(226, 0.0);

 data[2].resize(10, 0.0);

 data[3].resize(10, 0.0);

 data[4].resize(10, 0.0);

 data[5].resize(10, 0.0);

 break;

 case 113:

 // "Z Velocity"

 zoneIds.resize(6);

 data.resize(6);

 zoneIds[0] = 7;

 zoneIds[1] = 28;

 zoneIds[2] = 31;

 zoneIds[3] = 32;

 zoneIds[4] = 33;

 zoneIds[5] = 34;

 numColumns = 1;

 data[0].resize(226, 0.0);

 data[1].resize(226, 0.0);

 data[2].resize(10, 0.0);

 data[3].resize(10, 0.0);

 data[4].resize(10, 0.0);

 data[5].resize(10, 0.0);

 break;

 case 19:

 // "Wall shear"

 zoneIds.resize(6);

 data.resize(6);

 zoneIds[0] = 7;

 zoneIds[1] = 28;

 zoneIds[2] = 31;

 zoneIds[3] = 32;

 zoneIds[4] = 33;

 zoneIds[5] = 34;

 numColumns = 3;

 data[0].resize(678, 0.0);

 data[1].resize(678, 0.0);

 data[2].resize(30, 0.0);

 data[3].resize(30, 0.0);

 data[4].resize(30, 0.0);

 data[5].resize(30, 0.0);

 break;

 case 114:

 // "Wall Velocity"

 zoneIds.resize(6);

 data.resize(6);

 zoneIds[0] = 7;

 zoneIds[1] = 28;

 zoneIds[2] = 31;

 zoneIds[3] = 32;

 zoneIds[4] = 33;

 zoneIds[5] = 34;

 numColumns = 3;

 data[0].resize(678, 0.0);

 data[1].resize(678, 0.0);

 data[2].resize(30, 0.0);

 data[3].resize(30, 0.0);

 data[4].resize(30, 0.0);

 data[5].resize(30, 0.0);

 break;

 case 8553:

 // "Original Wall Velocity"

 zoneIds.resize(6);

 data.resize(6);

 zoneIds[0] = 7;

 zoneIds[1] = 28;

 zoneIds[2] = 31;

 zoneIds[3] = 32;

 zoneIds[4] = 33;

 zoneIds[5] = 34;

 numColumns = 3;

 data[0].resize(678, 0.0);

 data[1].resize(678, 0.0);

 data[2].resize(30, 0.0);

 data[3].resize(30, 0.0);

 data[4].resize(30, 0.0);

 data[5].resize(30, 0.0);

 break;

 default:;

 }

 break;

 case [CFF\_CELL\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba62b22dd5125249182737df29d52bafbd):

 switch (varId) {

 case 15:

 // "Body Force"

 zoneIds.resize(1);

 data.resize(1);

 zoneIds[0] = 18;

 numColumns = 3;

 data[0].resize(678, 0.0);

 break;

 case 101:

 // "Density"

 zoneIds.resize(1);

 data.resize(1);

 zoneIds[0] = 18;

 numColumns = 1;

 data[0].resize(226, 1.225);

 break;

 case 420:

 // "DPM-partition"

 zoneIds.resize(1);

 data.resize(1);

 zoneIds[0] = 18;

 numColumns = 1;

 data[0].resize(226, 0.0);

 break;

 case 102:

 // "Laminar Viscosity"

 zoneIds.resize(1);

 data.resize(1);

 zoneIds[0] = 18;

 numColumns = 1;

 data[0].resize(226, 0.000018);

 break;

 case 1:

 // "Pressure"

 zoneIds.resize(1);

 data.resize(1);

 zoneIds[0] = 18;

 numColumns = 1;

 data[0].resize(226, 0.0);

 break;

 case 111:

 // "X Velocity"

 zoneIds.resize(1);

 data.resize(1);

 zoneIds[0] = 18;

 numColumns = 1;

 data[0].resize(226, 0.0);

 break;

 case 112:

 // "Y Velocity"

 zoneIds.resize(1);

 data.resize(1);

 zoneIds[0] = 18;

 numColumns = 1;

 data[0].resize(226, 0.0);

 break;

 case 113:

 // "Z Velocity"

 zoneIds.resize(1);

 data.resize(1);

 zoneIds[0] = 18;

 numColumns = 1;

 data[0].resize(226, 0.0);

 break;

 default:;

 }

 break;

 default:;

 }

 break;

 case 2:

 switch (zoneCategory) {

 case [CFF\_FACE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baa6aea3358b01fc54950d21d8af9c01a0):

 switch (varId) {

 case 1328:

 // "2nd Grad Bc Source"

 zoneIds.resize(6);

 data.resize(6);

 zoneIds[0] = 7;

 zoneIds[1] = 28;

 zoneIds[2] = 31;

 zoneIds[3] = 32;

 zoneIds[4] = 33;

 zoneIds[5] = 34;

 numColumns = 1;

 data[0].resize(226, 0.0);

 data[1].resize(226, 0.0);

 data[2].resize(10, 0.0);

 data[3].resize(10, 0.0);

 data[4].resize(10, 0.0);

 data[5].resize(10, 0.0);

 break;

 case 18:

 // "Mass Flux"

 zoneIds.resize(7);

 data.resize(7);

 zoneIds[0] = 7;

 zoneIds[1] = 20;

 zoneIds[2] = 28;

 zoneIds[3] = 31;

 zoneIds[4] = 32;

 zoneIds[5] = 33;

 zoneIds[6] = 34;

 numColumns = 1;

 data[0].resize(226, 0.0);

 data[1].resize(319, 0.0);

 data[2].resize(226, 0.0);

 data[3].resize(10, 0.0);

 data[4].resize(10, 0.0);

 data[5].resize(10, 0.0);

 data[6].resize(10, 0.0);

 break;

 case 20:

 // "Boundary heat flux":

 zoneIds.resize(6);

 data.resize(6);

 zoneIds[0] = 7;

 zoneIds[1] = 28;

 zoneIds[2] = 31;

 zoneIds[3] = 32;

 zoneIds[4] = 33;

 zoneIds[5] = 34;

 numColumns = 1;

 data[0].resize(226, 0.0);

 data[1].resize(226, 0.0);

 data[2].resize(10, 0.0);

 data[3].resize(10, 0.0);

 data[4].resize(10, 0.0);

 data[5].resize(10, 0.0);

 break;

 case 1:

 // "Pressure"

 zoneIds.resize(7);

 data.resize(7);

 zoneIds[0] = 7;

 zoneIds[1] = 20;

 zoneIds[2] = 28;

 zoneIds[3] = 31;

 zoneIds[4] = 32;

 zoneIds[5] = 33;

 zoneIds[6] = 34;

 numColumns = 1;

 data[0].resize(226, 0.0);

 data[1].resize(319, 0.0);

 data[2].resize(226, 0.0);

 data[3].resize(10, 0.0);

 data[4].resize(10, 0.0);

 data[5].resize(10, 0.0);

 data[6].resize(10, 0.0);

 break;

 case 21:

 // "Boundary rad heat flux"

 zoneIds.resize(6);

 data.resize(6);

 zoneIds[0] = 7;

 zoneIds[1] = 28;

 zoneIds[2] = 31;

 zoneIds[3] = 32;

 zoneIds[4] = 33;

 zoneIds[5] = 34;

 numColumns = 1;

 data[0].resize(226, 0.0);

 data[1].resize(226, 0.0);

 data[2].resize(10, 0.0);

 data[3].resize(10, 0.0);

 data[4].resize(10, 0.0);

 data[5].resize(10, 0.0);

 break;

 case 111:

 // "X Velocity"

 zoneIds.resize(6);

 data.resize(6);

 zoneIds[0] = 7;

 zoneIds[1] = 28;

 zoneIds[2] = 31;

 zoneIds[3] = 32;

 zoneIds[4] = 33;

 zoneIds[5] = 34;

 numColumns = 1;

 data[0].resize(226, 0.0);

 data[1].resize(226, 0.0);

 data[2].resize(10, 0.0);

 data[3].resize(10, 0.0);

 data[4].resize(10, 0.0);

 data[5].resize(10, 0.0);

 break;

 case 112:

 // "Y Velocity"

 zoneIds.resize(6);

 data.resize(6);

 zoneIds[0] = 7;

 zoneIds[1] = 28;

 zoneIds[2] = 31;

 zoneIds[3] = 32;

 zoneIds[4] = 33;

 zoneIds[5] = 34;

 numColumns = 1;

 data[0].resize(226, 0.0);

 data[1].resize(226, 0.0);

 data[2].resize(10, 0.0);

 data[3].resize(10, 0.0);

 data[4].resize(10, 0.0);

 data[5].resize(10, 0.0);

 break;

 case 113:

 // "Z Velocity"

 zoneIds.resize(6);

 data.resize(6);

 zoneIds[0] = 7;

 zoneIds[1] = 28;

 zoneIds[2] = 31;

 zoneIds[3] = 32;

 zoneIds[4] = 33;

 zoneIds[5] = 34;

 numColumns = 1;

 data[0].resize(226, 0.0);

 data[1].resize(226, 0.0);

 data[2].resize(10, 0.0);

 data[3].resize(10, 0.0);

 data[4].resize(10, 0.0);

 data[5].resize(10, 0.0);

 break;

 case 19:

 // "Wall shear"

 zoneIds.resize(6);

 data.resize(6);

 zoneIds[0] = 7;

 zoneIds[1] = 28;

 zoneIds[2] = 31;

 zoneIds[3] = 32;

 zoneIds[4] = 33;

 zoneIds[5] = 34;

 numColumns = 3;

 data[0].resize(678, 0.0);

 data[1].resize(678, 0.0);

 data[2].resize(30, 0.0);

 data[3].resize(30, 0.0);

 data[4].resize(30, 0.0);

 data[5].resize(30, 0.0);

 break;

 case 114:

 // "Wall Velocity"

 zoneIds.resize(6);

 data.resize(6);

 zoneIds[0] = 7;

 zoneIds[1] = 28;

 zoneIds[2] = 31;

 zoneIds[3] = 32;

 zoneIds[4] = 33;

 zoneIds[5] = 34;

 numColumns = 3;

 data[0].resize(678, 0.0);

 data[1].resize(678, 0.0);

 data[2].resize(30, 0.0);

 data[3].resize(30, 0.0);

 data[4].resize(30, 0.0);

 data[5].resize(30, 0.0);

 break;

 case 8553:

 // "Original Wall Velocity"

 zoneIds.resize(6);

 data.resize(6);

 zoneIds[0] = 7;

 zoneIds[1] = 28;

 zoneIds[2] = 31;

 zoneIds[3] = 32;

 zoneIds[4] = 33;

 zoneIds[5] = 34;

 numColumns = 3;

 data[0].resize(678, 0.0);

 data[1].resize(678, 0.0);

 data[2].resize(30, 0.0);

 data[3].resize(30, 0.0);

 data[4].resize(30, 0.0);

 data[5].resize(30, 0.0);

 break;

 default:;

 }

 break;

 case [CFF\_CELL\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba62b22dd5125249182737df29d52bafbd):

 switch (varId) {

 case 15:

 // "Body Force"

 zoneIds.resize(1);

 data.resize(1);

 zoneIds[0] = 18;

 numColumns = 3;

 data[0].resize(678, 0.0);

 break;

 case 101:

 // "Density"

 zoneIds.resize(1);

 data.resize(1);

 zoneIds[0] = 18;

 numColumns = 1;

 data[0].resize(226, 1.225);

 break;

 case 420:

 // "DPM-partition"

 zoneIds.resize(1);

 data.resize(1);

 zoneIds[0] = 18;

 numColumns = 1;

 data[0].resize(226, 0.0);

 break;

 case 102:

 // "Laminar Viscosity"

 zoneIds.resize(1);

 data.resize(1);

 zoneIds[0] = 18;

 numColumns = 1;

 data[0].resize(226, 0.000018);

 break;

 case 1:

 // "Pressure"

 zoneIds.resize(1);

 data.resize(1);

 zoneIds[0] = 18;

 numColumns = 1;

 data[0].resize(226, 0.0);

 break;

 case 111:

 // "X Velocity"

 zoneIds.resize(1);

 data.resize(1);

 zoneIds[0] = 18;

 numColumns = 1;

 data[0].resize(226, 0.0);

 break;

 case 112:

 // "Y Velocity"

 zoneIds.resize(1);

 data.resize(1);

 zoneIds[0] = 18;

 numColumns = 1;

 data[0].resize(226, 0.0);

 break;

 case 113:

 // "Z Velocity"

 zoneIds.resize(1);

 data.resize(1);

 zoneIds[0] = 18;

 numColumns = 1;

 data[0].resize(226, 0.0);

 break;

 default:;

 }

 break;

 default:;

 }

 break; 

 default:

 std::cout &lt;&lt; "No need to write phase-" &lt;&lt; phaseId &lt;&lt; "." &lt;&lt; std::endl;

 break;

 }

 

 return 0;

}

 

void createSetsDataForFace(std::vector&lt;std::vector&lt;ansys::ElemIdType&gt; &gt;&amp; elemIds, 

 std::vector&lt;ansys::ElemIdType&gt;&amp; minIds, 

 std::vector&lt;ansys::ElemIdType&gt;&amp; maxIds,

 std::vector&lt;ansys::ElemIdType&gt;&amp; minIndices, 

 std::vector&lt;ansys::ElemIdType&gt;&amp; maxIndices,

 std::vector&lt;size_t&gt;&amp; elemNum, 

 std::vector&lt;std::vector&lt;double&gt; &gt;&amp; doubleData, 

 size\_t&amp; doubleDim,

 std::vector&lt; std::vector&lt;char&gt; &gt;&amp; unsingedCharData, 

 size\_t&amp; unsingedCharDim,

 std::vector&lt; std::vector&lt;int&gt; &gt;&amp; intData,

 std::vector&lt; std::vector&lt;ansys::CountType&gt; &gt;&amp; intDataCounts)

{

 elemIds.resize(3);

 minIds.clear();

 maxIds.clear();

 minIndices.clear();

 maxIndices.clear();

 elemNum.clear();

 doubleData.resize(3);

 doubleDim = 5;

 unsingedCharData.resize(3);

 unsingedCharDim = 1;

 intData.resize(3);

 intDataCounts.resize(3);

 

 //Two face zones are one section

 elemIds.at(0).clear();

 for (int i = 0; i &lt; 545; i++)

 elemIds[0].push_back(i+1);

 minIds.push_back(1);

 maxIds.push_back(545);

 minIndices.push_back(1);

 maxIndices.push_back(545);

 elemNum.push_back(545);

 doubleData.at(0).clear();

 unsingedCharData.at(0).clear();

 intData.at(0).clear();

 intDataCounts.at(0).clear();

 for (int i = 0; i &lt; 545; i++)

 {

 for (int j = 0; j &lt; 5; j++)

 doubleData.at(0).push_back(0.1);

 unsingedCharData.at(0).push_back('k');

 if (i % 3 == 0)

 {

 intData.at(0).push_back(1);

 intData.at(0).push_back(2);

 intData.at(0).push_back(3);

 intDataCounts.at(0).push_back(3);

 }

 else if (i % 3 == 1)

 {

 intData.at(0).push_back(10);

 intData.at(0).push_back(20);

 intData.at(0).push_back(30);

 intData.at(0).push_back(40);

 intDataCounts.at(0).push_back(4); 

 }

 else if (i % 3 == 2)

 {

 intData.at(0).push_back(100);

 intData.at(0).push_back(200);

 intDataCounts.at(0).push_back(2); 

 } 

 }

 

 //One face zone with discontinuous ids can also be one section

 elemIds[1].clear();

 for (int i = 0; i &lt; 226; i = i + 2)

 elemIds[1].push_back(i + 546);

 minIds.push_back(546);

 maxIds.push_back(546 + 226 - 2);

 minIndices.push_back(546);

 maxIndices.push_back(546 + 112);

 elemNum.push_back(226/2);

 doubleData.at(1).clear();

 unsingedCharData.at(1).clear();

 intData.at(1).clear();

 intDataCounts.at(1).clear();

 for (int i = 0; i &lt; 226/2; i++)

 {

 for (int j = 0; j &lt; 5; j++)

 doubleData.at(1).push_back(0.1);

 unsingedCharData.at(1).push_back('p');

 if (i % 3 == 0)

 {

 intData.at(1).push_back(1);

 intData.at(1).push_back(2);

 intData.at(1).push_back(3);

 intDataCounts.at(1).push_back(3);

 }

 else if (i % 3 == 1)

 {

 intData.at(1).push_back(10);

 intData.at(1).push_back(20);

 intData.at(1).push_back(30);

 intData.at(1).push_back(40);

 intDataCounts.at(1).push_back(4); 

 }

 else if (i % 3 == 2)

 {

 intData.at(1).push_back(100);

 intData.at(1).push_back(200);

 intDataCounts.at(1).push_back(2); 

 } 

 }

 

 // Third section

 elemIds[2].clear();

 for (int i = 0; i &lt; 10; i++)

 elemIds[2].push_back(i + 772);

 minIds.push_back(772);

 maxIds.push_back(781);

 minIndices.push_back(546 + 112 + 1);

 maxIndices.push_back(546 + 112 + 10);

 elemNum.push_back(10);

 

 doubleData.at(2).clear();

 unsingedCharData.at(2).clear();

 intData.at(2).clear();

 intDataCounts.at(2).clear();

 for (int i = 0; i &lt; 10; i++){

 for (int j = 0; j &lt; 5; j++)

 doubleData.at(2).push_back(0.1);

 unsingedCharData.at(2).push_back('h'); 

 if (i % 3 == 0)

 {

 intData.at(2).push_back(1);

 intData.at(2).push_back(2);

 intData.at(2).push_back(3);

 intDataCounts.at(2).push_back(3);

 }

 else if (i % 3 == 1)

 {

 intData.at(2).push_back(10);

 intData.at(2).push_back(20);

 intData.at(2).push_back(30);

 intData.at(2).push_back(40);

 intDataCounts.at(2).push_back(4); 

 }

 else if (i % 3 == 2)

 {

 intData.at(2).push_back(100);

 intData.at(2).push_back(200);

 intDataCounts.at(2).push_back(2); 

 }

 }

}

 

template &lt;typename Dtype&gt;

void createOtherData(std::string&amp; otherName, 

 std::vector&lt;Dtype&gt;&amp; otherData, 

 size\_t&amp; numCols, 

 size\_t&amp; numRows)

{

 otherName = "TryOther";

 numCols = 4;

 numRows = 120;

 otherData.clear();

 for (size\_t i = 0; i &lt; numRows*numCols; i++)

 {

 if (i % 4 == 0){

 otherData.push_back(1);

 }

 else if (i % 4 == 1) {

 otherData.push_back(5);

 }

 else if (i % 4 == 2) {

 otherData.push_back(100);

 }

 else if (i % 4 == 3) {

 otherData.push_back(72);

 } 

 }

}

 

void createStringData(std::string&amp; stringName, std::string&amp; stringData)

{

 stringName = "tryString";

 stringData = "abcdfhdjghuegsdfgjkdhsdkfgskldghsjkdghd 34435u32iq 10 12 13.65! (xlds) ";

}

\#endif /\* CASANDDATCREATOR\_HPP\_ \*/

[CffZoneCategory](group__enums.xhtml#ga1e26b7f9299129cd1edc8fdf99f2917b)

CffZoneCategory

An enumeration that is used with ansys::CffBase::getNumZones, ansys::CffBase::getZoneIds,...

**Definition:** CffTypes.h:195



[CFF\_FACE\_ZONE\_TYPE\_INTERIOR](group__enums.xhtml#gga13c2dd97c5e14c90a074a2c603ec2bc3a918616c49ea24c67e38e0403aedd99f5)

@ CFF_FACE_ZONE_TYPE_INTERIOR

**Definition:** CffTypes.h:513



[CFF\_FACE\_ZONE\_TYPE\_MIN](group__enums.xhtml#gga13c2dd97c5e14c90a074a2c603ec2bc3ada4701042d033b2c1e6d8d41f8f7a26d)

@ CFF_FACE_ZONE_TYPE_MIN

**Definition:** CffTypes.h:509



[CFF\_FACE\_ZONE\_TYPE\_WALL](group__enums.xhtml#gga13c2dd97c5e14c90a074a2c603ec2bc3affa7b842290a6b5303c8449944b64fa3)

@ CFF_FACE_ZONE_TYPE_WALL

**Definition:** CffTypes.h:517



[CFF\_FACE\_TYPE\_MIN](group__enums.xhtml#gga32812d6a5501e53b26fd7200472de3fea02409ef4059c9e05a32e2f918032bdef)

@ CFF_FACE_TYPE_MIN

**Definition:** CffTypes.h:581



[CFF\_FACE\_TYPE\_QUAD](group__enums.xhtml#gga32812d6a5501e53b26fd7200472de3fea21316961f46dd008950f167f033851af)

@ CFF_FACE_TYPE_QUAD

**Definition:** CffTypes.h:589



[CFF\_FACE\_TYPE\_TRI](group__enums.xhtml#gga32812d6a5501e53b26fd7200472de3fea855b38402da1d6d273345d8fa568738d)

@ CFF_FACE_TYPE_TRI

**Definition:** CffTypes.h:587



[CFF\_CELL\_TYPE\_MIN](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a58c00a54277d6ba91303af48841a4754)

@ CFF_CELL_TYPE_MIN

**Definition:** CffTypes.h:610



[CFF\_CELL\_TYPE\_WEDGE](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a92936a31fa1ba3c57085ac1038a4a879)

@ CFF_CELL_TYPE_WEDGE

**Definition:** CffTypes.h:624



[ansys::VariableNames](group__typedefs.xhtml#ga0f1f2a7436a48ebc6dbd9b96b61295fb)

std::vector&lt; VariableName &gt; VariableNames

Type used to represent a number of variable names ('C++' API only)

**Definition:** Types.hpp:199



[ansys::PhaseIdType](group__typedefs.xhtml#gac3312714419db4aa206bdeda4efa9223)

CffPhaseIdType PhaseIdType

Alias for CffPhaseIdType ('C++' API only)

**Definition:** Types.hpp:154



[ansys::VariableIdType](group__typedefs.xhtml#gae1bb05c41fbbd2e21c7b62cbe214b4be)

CffVariableIdType VariableIdType

Type used to represent the identifier of a variable ('C++' API only)

**Definition:** Types.hpp:184





## <a class="anchor" id="SettingImportExample"></a>Reading Settings Using C++ API

This example demonstrates how to use the CFF API to read settings from a cas.h5 file. The following source code can be built using [Instructions to Build Examples](_c_f_f_s_d_k_examples.xhtml#BuildInstructions).

Run the following command to read settings from the case file:

&gt;&gt; ./test.exe -c &lt;caseFileName&gt;



**settings\_import.cpp**

/\*

 \* Copyright 2025 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.

 \*/

 

\#include "CffInterface/printVersion.hpp"

\#include "Factory/providers.hpp"

 

\#include &lt;algorithm&gt;

\#include &lt;cassert&gt;

\#include &lt;iostream&gt;

\#include &lt;vector&gt;

 

\#include "hdf/Common/Output.hpp"

\#include "hdf/Common/Utilities.hpp"

 

namespace

{

 const std::string c_fluent = "ANSYS\_FLUENT";

}

 

void

displayFluentMeshSettings(const [ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{ 

 [ansys::DataClass](group__enums.xhtml#gab852cc24891eb831942fb8da764d8ddb) dataClass = [ansys::DataClass::CFF\_CASE](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddba6c8b8209348df38321689fb67cd4b331);

 

 std::cout &lt;&lt; "The following non standard settings are also available:"

 &lt;&lt; std::endl;

 

 // ----------------------------------- face zones

 std::string key = "faceZones";

 // get the face zones as one string comma separated

 std::string value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, key);

 PRINT_VALUE(key, value);

 // get the face zones as a string vector

 std::vector&lt;std::string&gt; values = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, key);

 PRINT_VECTOR_WITH_NEW_LINE(key, values);

 

 ansys::CffVariant var;

 key += "/";

 if (!values.empty()) {

 key += values[0];

 var = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, key);

 

 // cells zones of the first face zone

 values = var.cellZones();

 PRINT_VECTOR_WITH_NEW_LINE(key + " cellZones", values);

 

 // face zones of the first face zone

 values = var.faceZones();

 PRINT_VECTOR_WITH_NEW_LINE(key + " faceZones", values);

 

 // node zones of the first face zone

 values = var.nodeZones();

 PRINT_VECTOR_WITH_NEW_LINE(key + " nodeZones", values);

 

 // get the face zones as one string comma separated for phase 2, empty here

 key = "faceZones";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, key, 2);

 PRINT_VALUE(key + " for phase 2", value); 

 

 // ----------------------------------- cell zones

 key = "cellZones";

 // get the cell zones as one string comma separated

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass,key);

 PRINT_VALUE(key, value);

 // get the cell zones as a string vector

 values = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass,key);

 PRINT_VECTOR_WITH_NEW_LINE(key, values);

 

 // for a cell zone, to find the bounding zones

 key += "/";

 if (!values.empty()) {

 key += values[0];

 var = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass,key);

 values = var.bounds();

 PRINT_VECTOR_WITH_NEW_LINE(key + " bounds", values);

 // for a cell zone, to find the cell zones

 values = var.cellZones();

 PRINT_VECTOR_WITH_NEW_LINE(key + " cellZones", values);

 // for a cell zone, to find the face zones

 values = var.faceZones();

 PRINT_VECTOR_WITH_NEW_LINE(key + " faceZones", values);

 // for a cell zone, to find the node zones

 values = var.nodeZones();

 PRINT_VECTOR_WITH_NEW_LINE(key + " nodeZones", values);

 

 // get cell zone material

 std::string material = key + "/material";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass,material);

 PRINT_VALUE(material, value);

 // get cell zone ID

 std::string id = key + "/id";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, id);

 PRINT_VALUE(id, value);

 //To get rotational speed, will be zero if domain is not rotating

 key = key + "/velocity/angular";

 std::string rot = key + "/magnitude";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, rot);

 PRINT_VALUE(rot, value);

 //To get rotational axis origin

 key = key + "/axis";

 std::string axs = key + "/origin/x";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, axs);

 PRINT_VALUE(axs, value); 

 axs = key + "/origin/y";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, axs);

 PRINT_VALUE(axs, value); 

 axs = key + "/origin/z";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, axs);

 PRINT_VALUE(axs, value); 

 //To get rotational axis direction

 axs = key + "/direction/x";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, axs);

 PRINT_VALUE(axs, value);

 axs = key + "/direction/y";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, axs);

 PRINT_VALUE(axs, value); 

 axs = key + "/direction/z";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, axs);

 PRINT_VALUE(axs, value); 

 }

 

 // ----------------------------------- node zones

 key = "nodeZones";

 // get the node zones as one string comma separated

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, key);

 PRINT_VALUE(key, value); 

 

 // get the node zones as a string vector

 values = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, key);

 PRINT_VECTOR_WITH_NEW_LINE(key, values); 

 

 key += "/";

 if (!values.empty()) {

 key += values[0];

 var = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass,key);

 values = var.cellZones();

 PRINT_VECTOR_WITH_NEW_LINE(key + " cellZones", values);

 // for a cell zone, to find the face zones

 values = var.faceZones();

 PRINT_VECTOR_WITH_NEW_LINE(key + " faceZones", values);

 // for a cell zone, to find the node zones

 values = var.nodeZones();

 PRINT_VECTOR_WITH_NEW_LINE(key + " nodeZones", values);

 }

 }

 

 std::cout &lt;&lt; std::endl;

}

 

void

displayStandardCaseSettings(const [ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader,

 bool showAllStandardPhysics)

{

 std::cout &lt;&lt; "Standard settings:" &lt;&lt; std::endl;

 

 [ansys::DataClass](group__enums.xhtml#gab852cc24891eb831942fb8da764d8ddb) dataClass = [ansys::DataClass::CFF\_CASE](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddba6c8b8209348df38321689fb67cd4b331);

 ansys::CffVariant var;

 

 // ----------------------------------- domains

 std::string key = "domains";

 std::vector&lt;std::string&gt; values = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, key);

 PRINT_VECTOR_WITH_NEW_LINE(key, values); 

 

 if (!values.empty()) {

 std::vector&lt;std::string&gt; objects;

 if (showAllStandardPhysics) {

 objects.swap(values);

 } else {

 objects.push_back(values[0]);

 }

 for (const auto&amp; o : objects) {

 std::string lkey = key;

 lkey += "/";

 lkey += o;

 var = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, lkey);

 values = var.location();

 PRINT_VECTOR_WITH_NEW_LINE(lkey + " location", values);

 

 values = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass,lkey + "/type").asStringVector();

 PRINT_VECTOR_WITH_NEW_LINE(lkey + " type", values);

 

 std::vector&lt;std::string&gt; transformationKeys;

 transformationKeys.

 push_back("meshMotion/linearTransformation/displacement");

 transformationKeys.

 push_back("meshMotion/linearTransformation/position");

 transformationKeys.

 push_back("meshMotion/linearTransformation/velocity");

 transformationKeys.

 push_back("meshMotion/rotationalTransformation/axisStart");

 transformationKeys.

 push_back("meshMotion/rotationalTransformation/axisEnd");

 transformationKeys.

 push_back("meshMotion/rotationalTransformation/relativeRotationAngle");

 

 // TO DO - replace this when the data is coming through correctly

 for (const auto&amp; tkey : transformationKeys) {

 values = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, lkey + "/" + tkey).asStringVector();

 PRINT_VECTOR_WITH_NEW_LINE(lkey + " " + tkey, values);

 }

 }

 }

 // ----------------------------------- boundaries

 key = "boundaries";

 values = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, key);

 std::sort(values.begin(), values.end());

 PRINT_VECTOR_WITH_NEW_LINE(key, values); 

 

 if (!values.empty()) {

 std::vector&lt;std::string&gt; objects;

 if (showAllStandardPhysics) {

 objects.swap(values);

 } else {

 objects.push_back(values[0]);

 }

 for (const auto&amp; o : objects) {

 std::string lkey = key;

 lkey += "/";

 lkey += o;

 values =

 reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, lkey + "/location").asStringVector();

 PRINT_VECTOR_WITH_NEW_LINE(lkey + "/location", values);

 

 values = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, lkey + "/type").asStringVector();

 PRINT_VECTOR_WITH_NEW_LINE(lkey + "/type", values);

 

 values = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, lkey + "/domain").asStringVector();

 PRINT_VECTOR_WITH_NEW_LINE(lkey + "/domain", values);

 }

 }

 // ----------------------------------- subdomains

 key = "subdomains";

 values = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, key);

 PRINT_VECTOR_WITH_NEW_LINE(key, values); 

 

 if (!values.empty()) {

 std::vector&lt;std::string&gt; objects;

 if (showAllStandardPhysics) {

 objects.swap(values);

 } else {

 objects.push_back(values[0]);

 }

 for (const auto&amp; o : objects) {

 std::string lkey = key;

 lkey += "/";

 lkey += o;

 values =

 reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, lkey + "/location").asStringVector();

 PRINT_VECTOR_WITH_NEW_LINE(lkey + "/location", values);

 

 values = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, lkey + "/type").asStringVector();

 PRINT_VECTOR_WITH_NEW_LINE(lkey + "/type", values);

 

 values = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, lkey + "/domain").asStringVector();

 PRINT_VECTOR_WITH_NEW_LINE(lkey + "/domain", values);

 }

 }

 // ----------------------------------- interfaces

 key = "interfaces";

 values = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, key);

 PRINT_VECTOR_WITH_NEW_LINE(key, values); 

 

 if (!values.empty()) {

 std::vector&lt;std::string&gt; objects;

 if (showAllStandardPhysics) {

 objects.swap(values);

 } else {

 objects.push_back(values[0]);

 }

 {

 std::vector&lt;std::string&gt; ikeys;

 ikeys.push_back("/type");

 ikeys.push_back("/conformal");

 ikeys.push_back("/domainsSide1");

 ikeys.push_back("/boundariesSide1");

 ikeys.push_back("/domainsSide2");

 ikeys.push_back("/boundariesSide2");

 ikeys.push_back("/model/periodic/type");

 ikeys.push_back("/model/periodic/axisStart");

 ikeys.push_back("/model/periodic/axisEnd");

 ikeys.push_back("/model/periodic/velocity/magnitude");

 for (const auto&amp; o : objects) {

 std::string lkey = key;

 lkey += "/";

 lkey += o;

 

 for (const auto&amp; ikey: ikeys) {

 values = 

 reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, lkey + ikey).asStringVector();

 if (!values.empty()) {

 PRINT_VECTOR_WITH_NEW_LINE(lkey + ikey, values);

 }

 }

 }

 }

 }

 

 key = "dimensionalUnits";

 values = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, key).asStringVector();

 PRINT_VECTOR_WITH_NEW_LINE(key, values);

 

 std::cout &lt;&lt; std::endl;

}

 

void

displayFluentCaseSettings(const [ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 [ansys::DataClass](group__enums.xhtml#gab852cc24891eb831942fb8da764d8ddb) dataClass = [ansys::DataClass::CFF\_CASE](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddba6c8b8209348df38321689fb67cd4b331);

 std::cout &lt;&lt; "The following non standard settings are also available:"

 &lt;&lt; std::endl;

 

 {

 std::cout &lt;&lt; "Reading other rpVars ...." &lt;&lt; std::endl;

 

 std::string key = "settings/config";

 // get the face zones as a string vector

 std::vector&lt;std::string&gt; values = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, key);

 PRINT_VECTOR_WITH_NEW_LINE(key, values);

 

 for (const auto&amp; elem : values)

 {

 std::string newKey = key + "/";

 newKey += elem;

 std::string value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 }

 

 key = "settings/";

 std::string newKey = key + "initial/pressure";

 std::string value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 

 key = "settings/";

 key += "reference/";

 newKey = key + "adiabaticIndex";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 newKey = key + "velocity";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 newKey = key + "viscosity";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 newKey = key + "temperature";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 newKey = key + "density";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 newKey = key + "depth";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 key = "settings/";

 key += "farField/";

 newKey = key + "SoundSpeed";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 newKey = key + "pressure";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 newKey = key + "density";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 key = "settings/";

 newKey = key + "operatingPressure";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 newKey = key + "xVelocity/default";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 newKey = key + "yVelocity/default";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 

 newKey = key + "zVelocity/default";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 

 newKey = key + "unitSystem";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 

 newKey = key + "shell/thread-ids";

 values = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VECTOR_WITH_NEW_LINE(newKey, values);

 

 key = "fluentDomains/";

 newKey = key;

 values = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VECTOR_WITH_NEW_LINE(newKey, values);

 

 for (const auto&amp; elem : values)

 {

 newKey = key + elem;

 std::string dKey = newKey + "/name";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, dKey);

 PRINT_VALUE(dKey, value);

 

 dKey = newKey + "/type";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, dKey);

 PRINT_VALUE(dKey, value);

 

 dKey = newKey + "/material";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, dKey);

 PRINT_VALUE(dKey, value); 

 

 dKey = newKey + "/parentId";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, dKey);

 PRINT_VALUE(dKey, value); 

 

 dKey = newKey + "/childrenIds";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, dKey);

 PRINT_VALUE(dKey, value); 

 }

 

 //Access of general rpVars

 key = "settings/";

 key += "rpvar/";

 std::cout &lt;&lt; "Reading rpVars ..." &lt;&lt; std::endl;

 newKey = key + "operating-pressure";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 

 newKey = key + "initial-operating-pressure";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 

 newKey = key + "reference-gamma";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 newKey = key + "reference-velocity";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 newKey = key + "reference-viscosity";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 newKey = key + "reference-temperature";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 newKey = key + "reference-density";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 newKey = key + "far-field-sound-speed";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 newKey = key + "far-field-pressure";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 

 newKey = key + "far-field-density";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 newKey = key + "x-velocity/default";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 newKey = key + "y-velocity/default";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 newKey = key + "z-velocity/default";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 

 newKey = key + "case-file-units";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 newKey = key + "shell/thread-ids";

 values = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VECTOR_WITH_NEW_LINE(newKey, values); 

 

 newKey = key + "domains";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 }

 //Material properties

 {

 std::cout &lt;&lt; "Reading material properties ..." &lt;&lt; std::endl;

 

 std::string key = "materials";

 // get the face zones as a string vector

 std::vector&lt;std::string&gt; values = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, key);

 

 if (!values.empty())

 {

 PRINT_VECTOR_WITH_NEW_LINE(key, values);

 

 key += "/";

 

 for (const auto&amp; elem : values)

 {

 std::string subKey = key + elem;

 

 std::string value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, subKey + "/phase-type" );

 PRINT_VALUE(subKey + "/phase-type", value);

 

 std::string newKey = subKey + "/chemicalFormula";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey );

 PRINT_VALUE(newKey, value);

 

 newKey = subKey + "/density/constant";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey );

 PRINT_VALUE(newKey, value);

 

 newKey = subKey + "/viscosity/constant";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey );

 PRINT_VALUE(newKey, value);

 

 newKey = subKey + "/molecularWeight/constant";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey );

 PRINT_VALUE(newKey, value);

 

 newKey = subKey + "/specificHeat/constant";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey );

 PRINT_VALUE(newKey, value); 

 

 newKey = subKey + "/species/names";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey );

 PRINT_VALUE(newKey, value);

 }

 } 

 }

 std::cout &lt;&lt; std::endl;

 

 // Sliding Interfaces

 {

 std::cout &lt;&lt; "Reading sliding interfaces ..." &lt;&lt; std::endl;

 

 std::string key = "settings/slidingInterfaces";

 std::vector&lt;std::string&gt; values = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, key);

 

 if (!values.empty())

 {

 PRINT_VECTOR_WITH_NEW_LINE(key, values);

 for (const auto&amp; value: values) {

 std::string newKey = key + "/" + value + "/side1/zoneIds";

 std::vector&lt;std::string&gt; zones = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VECTOR_WITH_NEW_LINE(newKey, zones);

 

 newKey = key + "/" + value + "/side2/zoneIds";

 zones = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VECTOR_WITH_NEW_LINE(newKey, zones);

 }

 }

 }

 std::cout &lt;&lt; std::endl;

}

 

void

displayStandardResultsSettings(const [ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 std::cout &lt;&lt; "Standard settings:" &lt;&lt; std::endl;

 

 [ansys::DataClass](group__enums.xhtml#gab852cc24891eb831942fb8da764d8ddb) dataClass = [ansys::DataClass::CFF\_RESULTS](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddbaacfdbe512195015b6446480e80caf4a4);

 {

 std::string value;

 std::string key = "simulation";

 

 std::string newKey = key + "/type";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 

 newKey = key + "/dataFile";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 

 newKey = key + "/caseFile";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 

 newKey = key + "/timeStep";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 

 newKey = key + "/time";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 

 newKey = key + "/crankAngle";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 

 newKey = key + "/iteration";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value); 

 } 

 std::string key = "dimensionalUnits";

 std::vector&lt;std::string&gt; values =

 reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, key).asStringVector();

 PRINT_VECTOR_WITH_NEW_LINE(key, values);

 

 std::cout &lt;&lt; std::endl;

}

 

void

displayFluentResultsSettings(const [ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader)

{

 std::cout &lt;&lt; "The following non standard settings are also available:"

 &lt;&lt; std::endl;

 

 //Access of general data Vars from data file

 [ansys::DataClass](group__enums.xhtml#gab852cc24891eb831942fb8da764d8ddb) dataClass = [ansys::DataClass::CFF\_RESULTS](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddbaacfdbe512195015b6446480e80caf4a4);

 {

 std::string value;

 std::string key = "settings/";

 key += "dtvar/";

 std::cout &lt;&lt; "Reading rpVars ..." &lt;&lt; std::endl;

 

 std::string newKey = key + "flow-time";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 

 newKey = key + "time-step";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 

 newKey = key + "physical-time-step-m1";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 

 key = "simulation";

 

 newKey = key + "/history/dataFiles";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 

 newKey = key + "/history/caseFiles";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 

 newKey = key + "/history/timeSteps";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 

 newKey = key + "/history/times";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value);

 

 newKey = key + "/history/crankAngles";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value) 

 

 newKey = key + "/history/iterations";

 value = reader.[getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)(dataClass, newKey);

 PRINT_VALUE(newKey, value) 

 }

 

 std::cout &lt;&lt; std::endl;

}

 

void

displayCaseSettings(const [ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader, 

 bool showAllStandardPhysics,

 bool showSolverSettings)

{

 // get the top-level mesh-information

 {

 [ansys::ElemIdType](group__typedefs.xhtml#gae50a482a800bfe94fe6b210685908107) nodeCount = 0, faceCount = 0, cellCount = 0,

 meshDimension = 0;

 

 reader.[getMeshSize](classansys_1_1_cff_base.xhtml#acaf3eef987d98a7af34c15b9b7954abc)([CFF\_MESH\_NODE\_COUNT](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002a3697b449f26bbbea1b7248da1f8634db), nodeCount);

 std::cout &lt;&lt; "Node-count = " &lt;&lt; nodeCount &lt;&lt; std::endl;

 reader.[getMeshSize](classansys_1_1_cff_base.xhtml#acaf3eef987d98a7af34c15b9b7954abc)([CFF\_MESH\_FACE\_COUNT](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002aeda7214eb896ae699e426d0bbc5b30ab), faceCount);

 std::cout &lt;&lt; "Face-count = " &lt;&lt; faceCount &lt;&lt; std::endl;

 reader.[getMeshSize](classansys_1_1_cff_base.xhtml#acaf3eef987d98a7af34c15b9b7954abc)([CFF\_MESH\_CELL\_COUNT](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002ab58756bc6e4e7c3e46f2c53ce722b1ef), cellCount);

 std::cout &lt;&lt; "Cell-count = " &lt;&lt; cellCount &lt;&lt; std::endl;

 

 // set the dimension of the problem

 reader.[getMeshSize](classansys_1_1_cff_base.xhtml#acaf3eef987d98a7af34c15b9b7954abc)([CFF\_MESH\_DIMENSION](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002a79c9861f0c03a03f476e399d0a17917d), meshDimension);

 std::cout &lt;&lt; "Dimension = " &lt;&lt; meshDimension &lt;&lt; std::endl;

 std::cout &lt;&lt; std::endl;

 

 // allocate memory according to your program

 }

 

 // zone and other light-weight information

 if (showSolverSettings) {

 if (reader.[getSolverType](classansys_1_1_cff_base.xhtml#aac055e13c1b7040833aa2d981a606486)() == c_fluent) {

 displayFluentMeshSettings(reader);

 }

 }

 

 displayStandardCaseSettings(reader, showAllStandardPhysics);

 

 if (showSolverSettings) {

 // Other Non Standard settings

 if (reader.[getSolverType](classansys_1_1_cff_base.xhtml#aac055e13c1b7040833aa2d981a606486)() == c_fluent) {

 displayFluentCaseSettings(reader);

 }

 }

}

 

void

displayResultsSettings(const [ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader, bool showSolverSettings)

{

 displayStandardResultsSettings(reader);

 

 if (showSolverSettings) {

 if (reader.[getSolverType](classansys_1_1_cff_base.xhtml#aac055e13c1b7040833aa2d981a606486)() == c_fluent) {

 displayFluentResultsSettings(reader);

 }

 }

}

 

int

main(int argc, char* argv[])

{

 [ansys::printSDKVersion](namespaceansys.xhtml#aa9b8e96c9c3dd83f83d9a40d9721f6a1)();

 

 std::string casFileName;

 std::string datFileName;

 std::string optFileName;

 bool showAllStandardPhysics = false;

 bool showSolverSettings = true;

 

 for (int n = 1; n != argc; ++n) {

 std::string argValue(argv[n]);

 if (argValue == "-c") {

 ++n;

 casFileName = std::string(argv[n]);

 }

 else if (argValue == "-d") {

 ++n;

 datFileName = std::string(argv[n]);

 }

 else if (argValue == "-o") {

 ++n;

 optFileName = std::string(argv[n]);

 }

 else if (argValue == "-S") {

 showSolverSettings = false;

 }

 else if (argValue == "-a") {

 showAllStandardPhysics = true;

 } else if (argValue == "-h" ||

 argValue == "--help") {

 std::cout &lt;&lt; "Usage:" &lt;&lt; std::endl;

 std::string appName(argv[0]);

 std::string::size_type sep = appName.find_last_of("'\\\\/");

 if (sep != std::string::npos) {

 appName = appName.substr(sep+1);

 }

 std::cout &lt;&lt; appName &lt;&lt; " \[-c &lt;cas file&gt;\] \[-d &lt;dat file&gt;\] \[-s\] \[-a\]"

 &lt;&lt; std::endl;

 std::cout

 &lt;&lt; " -c &lt;cas file&gt; Read settings from supplied case file" &lt;&lt; std::endl

 &lt;&lt; " -d &lt;dat file&gt; Read settings from supplied data file" &lt;&lt; std::endl

 &lt;&lt; " -S Ignore solver specific settings" &lt;&lt; std::endl

 &lt;&lt; " -a Show settings for all physics objects" &lt;&lt; std::endl

 &lt;&lt; " Default is to just show first object of each type"

 &lt;&lt; std::endl;

 exit(0);

 }

 }

 

 if (casFileName.empty() &amp;&amp; datFileName.empty() &amp;&amp; optFileName.empty()) {

 casFileName = "elbow.cas.h5";

 datFileName = "elbow.dat.h5";

 }

 

 std::string sourceFile;

 if (!casFileName.empty()) {

 sourceFile = casFileName;

 } else if (!datFileName.empty()) {

 sourceFile = datFileName;

 } else if (!optFileName.empty()) {

 sourceFile = optFileName;

 }

 

 std::unique_ptr&lt;ansys::CffFileProvider&gt;

 readerPtr([ansys::getDataProvider](namespaceansys.xhtml#a2f23564ea3eec12f9b204a64356e88c1)(sourceFile));

 if (!readerPtr) {

 std::cerr &lt;&lt; "Unable to open file '" &lt;&lt; sourceFile &lt;&lt; "'" &lt;&lt; std::endl;

 exit(1);

 }

 

 [ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader = *readerPtr;

 

 // Default built-in options: debug=false, NCI=false, meshId=-1 (automatic), skipReadingZoneTopology = false

 bool skipzt = false;

 readerPtr-&gt;[setSkipReadZoneTopology](classansys_1_1_cff_provider.xhtml#a71fd3217e4040df8fdac86fe44d591d0)(skipzt);

 

 if (!casFileName.empty()) {

 bool lOK = readerPtr-&gt;startReading(casFileName, [ansys::DataClass::CFF\_CASE](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddba6c8b8209348df38321689fb67cd4b331));

 if (!lOK) {

 std::cout &lt;&lt; "Error reading case file" &lt;&lt; std::endl;

 return 1;

 } else {

 std::string caseVersion;

 readerPtr-&gt;getFileVersion([ansys::DataClass::CFF\_CASE](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddba6c8b8209348df38321689fb67cd4b331), caseVersion);

 std::cout &lt;&lt; "Case-file version = " &lt;&lt; caseVersion &lt;&lt; std::endl &lt;&lt; std::endl;

 

 displayCaseSettings(reader, showAllStandardPhysics, showSolverSettings);

 }

 }

 

 if (!datFileName.empty()) {

 [ansys::DataClass](group__enums.xhtml#gab852cc24891eb831942fb8da764d8ddb) dataClass = [ansys::DataClass::CFF\_RESULTS](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddbaacfdbe512195015b6446480e80caf4a4);

 bool lOK = readerPtr-&gt;startReading(datFileName, dataClass);

 if (!lOK) {

 std::cout &lt;&lt; "Error reading data file" &lt;&lt; std::endl;

 return 1;

 }

 

 std::string resultsVersion;

 readerPtr-&gt;getFileVersion([ansys::DataClass::CFF\_RESULTS](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddbaacfdbe512195015b6446480e80caf4a4), resultsVersion);

 std::cout &lt;&lt; "Data-file version = " &lt;&lt; resultsVersion &lt;&lt; std::endl &lt;&lt; std::endl;

 

 displayResultsSettings(reader, showSolverSettings);

 }

 

 //Optional read another data file with the same case file

 if (!optFileName.empty()) {

 [ansys::DataClass](group__enums.xhtml#gab852cc24891eb831942fb8da764d8ddb) dataClass = [ansys::DataClass::CFF\_RESULTS](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddbaacfdbe512195015b6446480e80caf4a4);

 bool lOK = readerPtr-&gt;startReading(optFileName, dataClass);

 if (!lOK)

 {

 std::cout &lt;&lt; "Error reading second data file: " &lt;&lt; optFileName

 &lt;&lt; std::endl;

 return 1;

 }

 

 std::string resultsVersion;

 readerPtr-&gt;getFileVersion([ansys::DataClass::CFF\_RESULTS](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddbaacfdbe512195015b6446480e80caf4a4), resultsVersion);

 std::cout &lt;&lt; "Data-file version = " &lt;&lt; resultsVersion &lt;&lt; std::endl &lt;&lt; std::endl;

 

 displayResultsSettings(reader, showSolverSettings);

 }

 

 std::cout &lt;&lt; std::endl &lt;&lt; "All done." &lt;&lt; std::endl;

 

 return 0;

}

[ansys::CffBase::getSolverType](classansys_1_1_cff_base.xhtml#aac055e13c1b7040833aa2d981a606486)

SolverType getSolverType() const

Obtains the owner of the data in the model.

**Definition:** CffBaseMethods.cpp:1729



[ansys::CffBase::getMeshSize](classansys_1_1_cff_base.xhtml#acaf3eef987d98a7af34c15b9b7954abc)

void getMeshSize(const MeshSizeType type, ElemIdType &amp;size) const

Obtains a value that defines the dimension or the global number of objects of a specific mesh entity.

**Definition:** CffBaseMethods.cpp:490



[ansys::CffProvider::setSkipReadZoneTopology](classansys_1_1_cff_provider.xhtml#a71fd3217e4040df8fdac86fe44d591d0)

virtual void setSkipReadZoneTopology(bool skip)

Set whether mesh zone to mesh zone topology topology should be constructed when the case data is read...

**Definition:** CffProviderMethods.cpp:87



[ansys::CffProvider::getSettings](classansys_1_1_cff_provider.xhtml#ac1d7c0645d0ebab207214d92126b49c6)

CffVariant getSettings(const DataClass type, const std::string &amp;key, const PhaseIdType phaseId=1) const

Return the value as a variable for a specific key in the Ansys Common Fluids Settings Data Model.

**Definition:** CffProviderMethods.cpp:330



[CffDataClass](group__enums.xhtml#gab852cc24891eb831942fb8da764d8ddb)

CffDataClass

An enumeration that is used within the API to caterorize types of CFF data.

**Definition:** CffTypes.h:415





## <a class="anchor" id="Particles"></a>Reading Discrete Phase Model (DPM) Particle Data Using C++ API

This example demonstrates how to use the CFF API to read discrete phase model (DPM) particle data. To execute this example, you must supply a data file that has DPM particle data in it. Ansys Fluent writes such data files for cases in which an injection is defined, and the files are in a compatible format by default. The following source code can be built using [Instructions to Build Examples](_c_f_f_s_d_k_examples.xhtml#BuildInstructions).

Run the following command to read particle data from the data file:

&gt;&gt; ./test.exe -d &lt;dataFileName&gt;



**read\_example.cpp**

/\*

 \* Copyright 2025 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.

 \*/

 

\#include "CffInterface/printVersion.hpp"

\#include "Factory/providers.hpp"

 

\#include &lt;memory&gt;

\#include &lt;algorithm&gt;

\#include &lt;cassert&gt;

\#include &lt;iostream&gt;

\#include &lt;list&gt;

\#include &lt;map&gt;

\#include &lt;numeric&gt;

\#include &lt;utility&gt;

\#include &lt;vector&gt;

 

\#include "hdf/Common/Output.hpp"

\#include "hdf/Common/Utilities.hpp"

 

bool readAllParticles([ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader, const [ansys::PhaseIdType](group__typedefs.xhtml#gac3312714419db4aa206bdeda4efa9223) phaseId = 0)

{

 std::cout &lt;&lt; "Reading particle data from phase" &lt;&lt; phaseId &lt;&lt; std::endl;

 bool hasParticles = false;

 if (phaseId == 0)

 hasParticles = reader.[startReadingParticles](classansys_1_1_cff_provider.xhtml#aa50bb3eaf988ffc069e67f775d6efb41)();

 else

 hasParticles = reader.[startReadingParticles](classansys_1_1_cff_provider.xhtml#aa50bb3eaf988ffc069e67f775d6efb41)(phaseId);

 

 if (!hasParticles)

 {

 std::cout &lt;&lt; "No particle data in phase: " &lt;&lt; phaseId &lt;&lt; std::endl;

 return false;

 }

 

 // get injection names

 std::vector&lt;std::string&gt; injName;

 reader.[getInjectionNames](classansys_1_1_cff_provider.xhtml#a3b8e76ae7ce7d87819457ee3ff960a1b)(injName);

 

 for (auto&amp; inj : injName)

 {

 std::cout &lt;&lt; " Reading data for " &lt;&lt; inj &lt;&lt; ":" &lt;&lt; std::endl;

 // get what variables are there under this situation

 [ansys::VariableNames](group__typedefs.xhtml#ga0f1f2a7436a48ebc6dbd9b96b61295fb) varName;

 reader.[getVariablesOfInjection](classansys_1_1_cff_provider.xhtml#a3d8e6b27aed59178f0f76e8c0679aac9)(inj, varName);

 [ansys::VariableIds](group__typedefs.xhtml#gad69adea4467dfcbfbc23dac7843118dc) varIds;

 reader.[getVariablesOfInjection](classansys_1_1_cff_provider.xhtml#a3d8e6b27aed59178f0f76e8c0679aac9)(inj, varIds);

 size\_t particlesNum = reader.[getNumOfParticlesInInjection](classansys_1_1_cff_provider.xhtml#a1b27c168ae6fe696ba63b26605a94d51)(inj);

 // read all the vars one-by-one

 for (size\_t iv = 0; iv &lt; varName.size(); ++iv) {

 // find out number of data per particles and dataTypes

 [ansys::PlainDataType](group__enums.xhtml#gaa26eac1911cb4a05854b39ca3d909615) dataType;

 size\_t numVarsPerParticle = reader.[startReadingVariableForParticlesInInjection](classansys_1_1_cff_provider.xhtml#a4217f5763114c543a69974d43b50a14d)(inj, varName[iv], dataType);

 

 switch (dataType){

 case [ansys::PlainDataType::CFF\_DATATYPE\_UCHAR](group__enums.xhtml#ggaa26eac1911cb4a05854b39ca3d909615a3dda1a79dc8b791600f5da58e0f15c13):

 {

 std::vector&lt;unsigned char&gt; dataBuf(particlesNum * numVarsPerParticle); 

 reader.[getValuesOfVariableForParticlesInInjection](classansys_1_1_cff_provider.xhtml#aaa20da8561eb4cebda6a62480777b54a)(dataBuf.data(), particlesNum * numVarsPerParticle);

 break;

 }

 case [ansys::PlainDataType::CFF\_DATATYPE\_CHAR](group__enums.xhtml#ggaa26eac1911cb4a05854b39ca3d909615af867dd62853d5517dcc524d9e454a94f):

 {

 std::vector&lt;char&gt; dataBuf(particlesNum * numVarsPerParticle); 

 reader.[getValuesOfVariableForParticlesInInjection](classansys_1_1_cff_provider.xhtml#aaa20da8561eb4cebda6a62480777b54a)(dataBuf.data(), particlesNum * numVarsPerParticle);

 break;

 } 

 case [ansys::PlainDataType::CFF\_DATATYPE\_DOUBLE](group__enums.xhtml#ggaa26eac1911cb4a05854b39ca3d909615af2d607c8aa0ec559e71676327992909d):

 {

 std::vector&lt;double&gt; dataBuf(particlesNum * numVarsPerParticle); 

 reader.[getValuesOfVariableForParticlesInInjection](classansys_1_1_cff_provider.xhtml#aaa20da8561eb4cebda6a62480777b54a)(dataBuf.data(), particlesNum * numVarsPerParticle);

 break;

 }

 case [ansys::PlainDataType::CFF\_DATATYPE\_FLOAT](group__enums.xhtml#ggaa26eac1911cb4a05854b39ca3d909615ad68d74ac0c1834f15f56653733d7256a):

 {

 std::vector&lt;float&gt; dataBuf(particlesNum * numVarsPerParticle); 

 reader.[getValuesOfVariableForParticlesInInjection](classansys_1_1_cff_provider.xhtml#aaa20da8561eb4cebda6a62480777b54a)(dataBuf.data(), particlesNum * numVarsPerParticle);

 break;

 }

 case [ansys::PlainDataType::CFF\_DATATYPE\_INT](group__enums.xhtml#ggaa26eac1911cb4a05854b39ca3d909615ad624b2d08e943c5598b93a25bd730e45):

 {

 std::vector&lt;int&gt; dataBuf(particlesNum * numVarsPerParticle); 

 reader.[getValuesOfVariableForParticlesInInjection](classansys_1_1_cff_provider.xhtml#aaa20da8561eb4cebda6a62480777b54a)(dataBuf.data(), particlesNum * numVarsPerParticle);

 break;

 } 

 case [ansys::PlainDataType::CFF\_DATATYPE\_UINT](group__enums.xhtml#ggaa26eac1911cb4a05854b39ca3d909615abff47995b06b896aa7385e5170f0cd67):

 {

 std::vector&lt;unsigned int&gt; dataBuf(particlesNum * numVarsPerParticle); 

 reader.[getValuesOfVariableForParticlesInInjection](classansys_1_1_cff_provider.xhtml#aaa20da8561eb4cebda6a62480777b54a)(dataBuf.data(), particlesNum * numVarsPerParticle);

 break;

 } 

 case [ansys::PlainDataType::CFF\_DATATYPE\_LONG](group__enums.xhtml#ggaa26eac1911cb4a05854b39ca3d909615ad843c863f154935c3ee7b749d3a24bb1):

 {

 std::vector&lt;long&gt; dataBuf(particlesNum * numVarsPerParticle); 

 reader.[getValuesOfVariableForParticlesInInjection](classansys_1_1_cff_provider.xhtml#aaa20da8561eb4cebda6a62480777b54a)(dataBuf.data(), particlesNum * numVarsPerParticle);

 break;

 } 

 case [ansys::PlainDataType::CFF\_DATATYPE\_LLONG](group__enums.xhtml#ggaa26eac1911cb4a05854b39ca3d909615a8984a9f1f42492ec14c03162340562ce):

 {

 std::vector&lt;long long&gt; dataBuf(particlesNum * numVarsPerParticle); 

 reader.[getValuesOfVariableForParticlesInInjection](classansys_1_1_cff_provider.xhtml#aaa20da8561eb4cebda6a62480777b54a)(dataBuf.data(), particlesNum * numVarsPerParticle);

 break;

 } 

 case [ansys::PlainDataType::CFF\_DATATYPE\_SIZE\_T](group__enums.xhtml#ggaa26eac1911cb4a05854b39ca3d909615af67af8d6b99802e38a1302e96c9bc2ed):

 {

 std::vector&lt;size_t&gt; dataBuf(particlesNum * numVarsPerParticle); 

 reader.[getValuesOfVariableForParticlesInInjection](classansys_1_1_cff_provider.xhtml#aaa20da8561eb4cebda6a62480777b54a)(dataBuf.data(), particlesNum * numVarsPerParticle);

 break;

 } 

 default:

 {

 std::cout &lt;&lt; "unknown data type, skip reading!" &lt;&lt;std::endl;

 }

 }

 

 std::cout &lt;&lt; " Data of " &lt;&lt; varName[iv] &lt;&lt; "(" &lt;&lt; varIds[iv] &lt;&lt; ")"

 &lt;&lt; " is read into a " &lt;&lt; particlesNum &lt;&lt; " x "

 &lt;&lt; numVarsPerParticle &lt;&lt; " buffer." &lt;&lt; std::endl;

 reader.[endReadingVariableForParticlesInInjection](classansys_1_1_cff_provider.xhtml#a96b7e5eb8f86c034a6c34ff307b104c0)();

 }

 }

 reader.[endReadingParticles](classansys_1_1_cff_provider.xhtml#a734fb2df70e2772c60eb00e545863186)();

 return true;

}

 

int

main(int argc, char* argv[])

{

 [ansys::printSDKVersion](namespaceansys.xhtml#aa9b8e96c9c3dd83f83d9a40d9721f6a1)();

 

 std::string casFileName;

 std::string datFileName;

 [ansys::MeshIdType](group__typedefs.xhtml#ga9a6c5565b81f965277b48f14355a38ae) meshId = -1;

 [ansys::TargetCategory](group__enums.xhtml#ga2bf8717ca5a1d17190dddf5faf6efa5d) targetCategory = [CFF\_RESTART](group__enums.xhtml#gga2bf8717ca5a1d17190dddf5faf6efa5da5324f9d08717edd9de8d717f9e3d1aa9);

 [ansys::PartitionIdType](group__typedefs.xhtml#gaa0b01fb68d68067022164a7fcb5cb0e5) partitionId = -1;

 bool queryContents = false;

 

 for (int n = 1; n != argc; ++n) {

 std::string argValue(argv[n]);

 if (argValue == "-q") {

 queryContents = true;

 } else if (argValue == "-c") {

 ++n;

 casFileName = std::string(argv[n]);

 }

 else if (argValue == "-d") {

 ++n;

 datFileName = std::string(argv[n]);

 }

 else if (argValue == "-m") {

 ++n;

 meshId = std::stoi(argv[n]);

 }

 else if (argValue == "-t") {

 ++n;

 std::string target(argv[n]);

 if (target == "restart") {

 targetCategory = [CFF\_RESTART](group__enums.xhtml#gga2bf8717ca5a1d17190dddf5faf6efa5da5324f9d08717edd9de8d717f9e3d1aa9);

 } else if (target == "post") {

 targetCategory = [CFF\_POST](group__enums.xhtml#gga2bf8717ca5a1d17190dddf5faf6efa5da38a97e162e222eea5d33e95b5abed325);

 } else if (target == "partitioned") {

 targetCategory = [CFF\_PARTITIONED\_POST](group__enums.xhtml#gga2bf8717ca5a1d17190dddf5faf6efa5da2ef818bf7baa7f1964722c18fe44e145);

 }

 }

 else if (argValue == "-p") {

 ++n;

 partitionId = std::stoi(argv[n]);

 }

 }

 

 // Fallback

 if (casFileName.empty() &amp;&amp; datFileName.empty()) {

 casFileName = "ice\_2m.cas.h5";

 datFileName = "ice\_2m.dat.h5"; 

 }

 

 if (queryContents &amp;&amp; casFileName.empty()) {

 std::cerr &lt;&lt; "Unable to query contents without a case file" &lt;&lt; std::endl;

 exit(1);

 }

 

 std::unique_ptr&lt;ansys::CffFileProvider&gt; readerPtr;

 if (!casFileName.empty()) {

 readerPtr.reset([ansys::getDataProvider](namespaceansys.xhtml#a2f23564ea3eec12f9b204a64356e88c1)(casFileName));

 } else if (!datFileName.empty()) {

 readerPtr.reset([ansys::getDataProvider](namespaceansys.xhtml#a2f23564ea3eec12f9b204a64356e88c1)(datFileName));

 }

 if(!readerPtr) {

 std::cout &lt;&lt; "Error creating provider for file" &lt;&lt; std::endl;

 return 1;

 }

 [ansys::CffProvider](classansys_1_1_cff_provider.xhtml)&amp; reader = *readerPtr;

 

 if (queryContents) {

 if (!readerPtr-&gt;startReading(casFileName, [ansys::DataClass::CFF\_CASE](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddba6c8b8209348df38321689fb67cd4b331))) {

 std::cout &lt;&lt; "Error reading case file" &lt;&lt; std::endl;

 return 1;

 }

 DisplayMeshAndTargets(readerPtr.get());

 exit(0);

 }

 

 // Set Mesh Id

 if (meshId != -1) {

 reader.[setMeshId](classansys_1_1_cff_base.xhtml#a7a12ef6589a193f80be541291b0cec4b)(meshId);

 }

 // Set Target

 reader.[setTarget](classansys_1_1_cff_base.xhtml#a8f9c0f2adda371644dfe678da1bdd9a2)(targetCategory);

 // Set Partition Id

 if (partitionId != -1) {

 reader.[setPartitionId](classansys_1_1_cff_base.xhtml#acd0f72767680be525a7445e07fb3b9ba)(partitionId);

 }

 

 // Using default built-in options: debug=false, NCI=false, meshId=-1 (automatic), target = CFF\_RESTART

 //to switch to other format, need to setTarget to correct one.

 if (!casFileName.empty()) {

 if (!readerPtr-&gt;startReading(casFileName, [ansys::DataClass::CFF\_CASE](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddba6c8b8209348df38321689fb67cd4b331))) {

 std::cout &lt;&lt; "Error reading case file" &lt;&lt; std::endl;

 return 1;

 }

 DisplayInfoForCase(readerPtr.get()); 

 DisplayInfoForMesh(readerPtr.get());

 }

 

 // data-file

 if (!datFileName.empty()) {

 if (!readerPtr-&gt;startReading(datFileName, [ansys::DataClass::CFF\_RESULTS](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddbaacfdbe512195015b6446480e80caf4a4))) {

 std::cout &lt;&lt; "Error reading data file" &lt;&lt; std::endl;

 return 1;

 }

 

 //Reading particle data

 [ansys::PhaseIds](group__typedefs.xhtml#ga99ff3bf3b76eac538df4d637faab6b4c) phaseIds;

 reader.[getPhaseIds](classansys_1_1_cff_base.xhtml#af555905619187578ebedc0da9116ae54)(phaseIds); 

 for (auto phaseId : phaseIds)

 {

 // Scenario 1: user want to read particle data and other cell zone data / face zone data

 reader.[startReadingPhase](classansys_1_1_cff_provider.xhtml#aac5960659dcd7609d4e192b810238be2)(phaseId);

 //Here user can insert code for reading cell zone data or face zone data

 if (reader.[hasParticles](classansys_1_1_cff_provider.xhtml#a58efaafb144ded73314a8803a129f2da)())

 readAllParticles(reader);

 

 reader.[endReadingPhase](classansys_1_1_cff_provider.xhtml#a954fd426cec8dd060989ad76dc86b662)();

 

 // Scenario 2: user only want to read particle data

 if (reader.[hasParticles](classansys_1_1_cff_provider.xhtml#a58efaafb144ded73314a8803a129f2da)(phaseId))

 readAllParticles(reader, phaseId); 

 }

 std::cout &lt;&lt; std::endl &lt;&lt; "All done." &lt;&lt; std::endl;

 }

 

 return 0;

}

[ansys::CffProvider::getNumOfParticlesInInjection](classansys_1_1_cff_provider.xhtml#a1b27c168ae6fe696ba63b26605a94d51)

virtual size_t getNumOfParticlesInInjection(const InjectionName &amp;name) const

**Definition:** CffProviderMethods.cpp:3762



[ansys::CffProvider::getInjectionNames](classansys_1_1_cff_provider.xhtml#a3b8e76ae7ce7d87819457ee3ff960a1b)

virtual void getInjectionNames(InjectionNames &amp;) const

**Definition:** CffProviderMethods.cpp:3745



[ansys::CffProvider::getVariablesOfInjection](classansys_1_1_cff_provider.xhtml#a3d8e6b27aed59178f0f76e8c0679aac9)

virtual void getVariablesOfInjection(const InjectionName &amp;name, VariableNames &amp;varNames) const

**Definition:** CffProviderMethods.cpp:3750



[ansys::CffProvider::startReadingVariableForParticlesInInjection](classansys_1_1_cff_provider.xhtml#a4217f5763114c543a69974d43b50a14d)

virtual size_t startReadingVariableForParticlesInInjection(const InjectionName &amp;injName, const VariableName &amp;varName, PlainDataType &amp;dataType) const

**Definition:** CffProviderMethods.cpp:3768



[ansys::CffProvider::hasParticles](classansys_1_1_cff_provider.xhtml#a58efaafb144ded73314a8803a129f2da)

virtual bool hasParticles() const

**Definition:** CffProviderMethods.cpp:3705



[ansys::CffProvider::endReadingParticles](classansys_1_1_cff_provider.xhtml#a734fb2df70e2772c60eb00e545863186)

virtual void endReadingParticles() const

**Definition:** CffProviderMethods.cpp:3872



[ansys::CffProvider::endReadingVariableForParticlesInInjection](classansys_1_1_cff_provider.xhtml#a96b7e5eb8f86c034a6c34ff307b104c0)

virtual void endReadingVariableForParticlesInInjection() const

**Definition:** CffProviderMethods.cpp:3867



[ansys::CffProvider::startReadingParticles](classansys_1_1_cff_provider.xhtml#aa50bb3eaf988ffc069e67f775d6efb41)

virtual bool startReadingParticles() const

**Definition:** CffProviderMethods.cpp:3723



[ansys::CffProvider::getValuesOfVariableForParticlesInInjection](classansys_1_1_cff_provider.xhtml#aaa20da8561eb4cebda6a62480777b54a)

virtual size_t getValuesOfVariableForParticlesInInjection(double *const vals, size_t const dataSize) const

**Definition:** CffProviderMethods.cpp:3786



[CffPlainDataType](group__enums.xhtml#gaa26eac1911cb4a05854b39ca3d909615)

CffPlainDataType

Datatypes available in certain CFF functions.

**Definition:** CffTypes.h:383



[CFF\_DATATYPE\_UCHAR](group__enums.xhtml#ggaa26eac1911cb4a05854b39ca3d909615a3dda1a79dc8b791600f5da58e0f15c13)

@ CFF_DATATYPE_UCHAR

**Definition:** CffTypes.h:389



[CFF\_DATATYPE\_LLONG](group__enums.xhtml#ggaa26eac1911cb4a05854b39ca3d909615a8984a9f1f42492ec14c03162340562ce)

@ CFF_DATATYPE_LLONG

**Definition:** CffTypes.h:405



[CFF\_DATATYPE\_UINT](group__enums.xhtml#ggaa26eac1911cb4a05854b39ca3d909615abff47995b06b896aa7385e5170f0cd67)

@ CFF_DATATYPE_UINT

**Definition:** CffTypes.h:395



[CFF\_DATATYPE\_INT](group__enums.xhtml#ggaa26eac1911cb4a05854b39ca3d909615ad624b2d08e943c5598b93a25bd730e45)

@ CFF_DATATYPE_INT

**Definition:** CffTypes.h:393



[CFF\_DATATYPE\_FLOAT](group__enums.xhtml#ggaa26eac1911cb4a05854b39ca3d909615ad68d74ac0c1834f15f56653733d7256a)

@ CFF_DATATYPE_FLOAT

**Definition:** CffTypes.h:399



[CFF\_DATATYPE\_LONG](group__enums.xhtml#ggaa26eac1911cb4a05854b39ca3d909615ad843c863f154935c3ee7b749d3a24bb1)

@ CFF_DATATYPE_LONG

**Definition:** CffTypes.h:397



[CFF\_DATATYPE\_DOUBLE](group__enums.xhtml#ggaa26eac1911cb4a05854b39ca3d909615af2d607c8aa0ec559e71676327992909d)

@ CFF_DATATYPE_DOUBLE

**Definition:** CffTypes.h:401



[CFF\_DATATYPE\_SIZE\_T](group__enums.xhtml#ggaa26eac1911cb4a05854b39ca3d909615af67af8d6b99802e38a1302e96c9bc2ed)

@ CFF_DATATYPE_SIZE_T

**Definition:** CffTypes.h:403



[CFF\_DATATYPE\_CHAR](group__enums.xhtml#ggaa26eac1911cb4a05854b39ca3d909615af867dd62853d5517dcc524d9e454a94f)

@ CFF_DATATYPE_CHAR

**Definition:** CffTypes.h:387





## <a class="anchor" id="CImportExample"></a>Reading a CFF file Using C API

This example demonstrates how to use the CFF API wrapper in C code to read a CFF file. The following source code can be built using [Instructions to Build Examples](_c_f_f_s_d_k_examples.xhtml#BuildInstructions).

Run the following command to read case file using the C API:

&gt;&gt; ./test.exe -c &lt;caseFileName&gt;



**read\_example.c**

/\*

 \* Copyright 2025 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.

 \*/

 

\#include "Factory/CffCAPI.h"

\#include "CffInterface/CffTypes.h"

 

\#include &lt;stdio.h&gt;

\#include &lt;string.h&gt;

 

void

displayZoneIds(const char* cat, const [CffZoneIds](group__typedefs.xhtml#ga6097e775e360276522e7e6731546167d) zoneIds, size\_t numZoneIds)

{

 fprintf(stdout, "%s : ", cat);

 for (size\_t n = 0; n != numZoneIds; ++n) {

 if (n != 0) {

 fprintf(stdout, ", %u", zoneIds[n]);

 } else {

 fprintf(stdout, "%u", zoneIds[n]);

 }

 }

 fprintf(stdout, ".\\n\\n");

}

 

int main(int argc, char* argv[])

{

 char* casFileName = NULL;

 

 for (int n = 1; n != argc; ++n) {

 if (!strcmp(argv[n], "-c")) {

 ++n;

 casFileName = argv[n];

 }

 }

 

 if (!casFileName || !strlen(casFileName)) {

 casFileName = "elbow.cas.h5";

 }

 

 CffReader* reader = (CffReader*)malloc(sizeof(CffReader));

 

 int ret = cffInitializeReader(reader, casFileName);

 if (!ret) {

 fprintf(stderr, "Unable to initialize reader from %s\\n", casFileName);

 exit(1);

 }

 

 [CffDataClass](group__enums.xhtml#gab852cc24891eb831942fb8da764d8ddb) data_class = [CFF\_CASE](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddba6c8b8209348df38321689fb67cd4b331);

 cffStartReadingFile(reader, casFileName, data_class);

 

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) dim = 0;

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) nodeCount = 0, edgeCount = 0, faceCount = 0, cellCount = 0;

 cffGetMeshSize(reader, [CFF\_MESH\_DIMENSION](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002a79c9861f0c03a03f476e399d0a17917d), &amp;dim);

 cffGetMeshSize(reader, [CFF\_MESH\_NODE\_COUNT](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002a3697b449f26bbbea1b7248da1f8634db), &amp;nodeCount);

 cffGetMeshSize(reader, [CFF\_MESH\_EDGE\_COUNT](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002a29f6ee3353045f01c56c538704cdc863), &amp;edgeCount);

 cffGetMeshSize(reader, [CFF\_MESH\_FACE\_COUNT](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002aeda7214eb896ae699e426d0bbc5b30ab), &amp;faceCount);

 cffGetMeshSize(reader, [CFF\_MESH\_CELL\_COUNT](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002ab58756bc6e4e7c3e46f2c53ce722b1ef), &amp;cellCount);

 fprintf(stdout, 

 "Node-count = %zu\\nEdge-count = %zu\\nFace-count = %zu\\nCell-count = %zu\\nDimension = %zu\\n\\n",

 nodeCount,

 edgeCount,

 faceCount,

 cellCount,

 dim);

 

 /\* Process Node Zones \*/

 size\_t numNodeZones = 0;

 cffGetNumZones(reader, [CFF\_NODE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba8ea3a3242fd587dc97ca2cf83dbf61d7), &amp;numNodeZones);

 if (numNodeZones) {

 [CffZoneIds](group__typedefs.xhtml#ga6097e775e360276522e7e6731546167d) nodeZones =

 ([CffZoneIds](group__typedefs.xhtml#ga6097e775e360276522e7e6731546167d))malloc(sizeof([CffZoneIdType](group__typedefs.xhtml#ga66a5d1b93ef250b01f99e78e49b56528))*numNodeZones);

 cffGetZoneIds(reader, [CFF\_NODE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba8ea3a3242fd587dc97ca2cf83dbf61d7), nodeZones);

 

 displayZoneIds("Node-zone id", nodeZones, numNodeZones);

 for (size\_t n = 0; n != numNodeZones; ++n) {

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) startId = 0;

 cffGetZoneSizeInfo(reader, nodeZones[n], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), &amp;startId);

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) endId = 0;

 cffGetZoneSizeInfo(reader, nodeZones[n], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), &amp;endId);

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) dimension = 0;

 cffGetZoneSizeInfo(reader, nodeZones[n], [CFF\_ZONE\_DIMENSION](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ac797bdd0c993d968d38f0c35b496d207), &amp;dimension);

 

 fprintf(stdout, "Node-zone %u:\\n", nodeZones[n]);

 fprintf(stdout, " minId = %zu\\n", startId);

 fprintf(stdout, " maxId = %zu\\n", endId);

 fprintf(stdout, " dimension = %zu\\n\\n", dimension);

 }

 

 displayZoneIds("Coordinates of node-zones", nodeZones, numNodeZones);

 

 cffStartReadingCoordinatesForNodes(reader);

 for (size\_t n = 0; n != numNodeZones; ++n) {

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) startId = 0;

 cffGetZoneSizeInfo(reader, nodeZones[n], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), &amp;startId);

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) endId = 0;

 cffGetZoneSizeInfo(reader, nodeZones[n], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), &amp;endId);

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) count = 0;

 cffGetZoneSizeInfo(reader, nodeZones[n], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), &amp;count);

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) dimension = 0;

 cffGetZoneSizeInfo(reader, nodeZones[n], [CFF\_ZONE\_DIMENSION](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ac797bdd0c993d968d38f0c35b496d207), &amp;dimension);

 

 size\_t coordsSZ = count * dimension;

 double* coords = (double*)malloc(sizeof(double) * coordsSZ);

 cffGetCoordinatesForNodesInRange(reader, startId, endId, coords, coordsSZ);

 fprintf(stdout,

 "Coordinates of zone-%u is read into a %zu x %zu buffer.\\n\\n",

 nodeZones[n],

 count,

 dimension);

 }

 }

 

 /\* Process Edge Zones \*/

 size\_t numEdgeZones = 0;

 cffGetNumZones(reader, [CFF\_EDGE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baf550346da426ab4fa297c5343dc2b81a), &amp;numEdgeZones);

 if (numEdgeZones) {

 [CffZoneIds](group__typedefs.xhtml#ga6097e775e360276522e7e6731546167d) edgeZones =

 ([CffZoneIds](group__typedefs.xhtml#ga6097e775e360276522e7e6731546167d))malloc(sizeof([CffZoneIdType](group__typedefs.xhtml#ga66a5d1b93ef250b01f99e78e49b56528))*numEdgeZones);

 cffGetZoneIds(reader, [CFF\_EDGE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baf550346da426ab4fa297c5343dc2b81a), edgeZones);

 

 displayZoneIds("Edge-zone id", edgeZones, numEdgeZones);

 

 for (size\_t n = 0; n &lt; numEdgeZones; ++n) {

 

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) startId = 0;

 cffGetZoneSizeInfo(reader, edgeZones[n], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), &amp;startId);

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) endId = 0;

 cffGetZoneSizeInfo(reader, edgeZones[n], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), &amp;endId);

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) dimension = 0;

 cffGetZoneSizeInfo(reader, edgeZones[n], [CFF\_ZONE\_DIMENSION](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ac797bdd0c993d968d38f0c35b496d207), &amp;dimension);

 int zoneType = 0;

 cffGetEdgeZoneInfo(reader, edgeZones[n], [CFF\_EDGE\_ZONE\_TYPE](group__enums.xhtml#ggab5510fa8ae80e1c0e3f4d17207ac2cf8aee47089b31281a95f6b1c875fe77ddda), &amp;zoneType);

 int elementType = 0;

 cffGetEdgeZoneInfo(reader, edgeZones[n], [CFF\_EDGE\_ZONE\_EDGE\_TYPE](group__enums.xhtml#ggab5510fa8ae80e1c0e3f4d17207ac2cf8aca207f4cd4e05d5dea844659c77b4761), &amp;elementType);

 const char* name =

 cffGetZoneStringInfo(reader, edgeZones[n], [CFF\_ZONE\_STRING\_NAME](group__enums.xhtml#gga7fe67117cb23bbcbb4ff2d5b55c3a704a3df2bc03cc26299fd9a017226d0fa127));

 

 fprintf(stdout, "Edge-zone %u:\\n", edgeZones[n]);

 fprintf(stdout, " minId = %zu\\n", startId);

 fprintf(stdout, " maxId = %zu\\n", endId);

 fprintf(stdout, " dimension = %zu\\n", dimension);

 if (zoneType &gt; -1) {

 fprintf(stdout, " edge-zone-type = %d\\n", zoneType);

 }

 if (elementType &gt; -1) {

 fprintf(stdout, " edge-type = %d\\n", elementType);

 }

 if (name) {

 fprintf(stdout, " name = %s\\n", name);

 free((char*)name);

 name = NULL;

 }

 }

 }

 

 /\* Process Face Zones \*/

 size\_t numFaceZones = 0;

 cffGetNumZones(reader, [CFF\_FACE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baa6aea3358b01fc54950d21d8af9c01a0), &amp;numFaceZones);

 if (numFaceZones) {

 [CffZoneIds](group__typedefs.xhtml#ga6097e775e360276522e7e6731546167d) faceZones =

 ([CffZoneIds](group__typedefs.xhtml#ga6097e775e360276522e7e6731546167d))malloc(sizeof([CffZoneIdType](group__typedefs.xhtml#ga66a5d1b93ef250b01f99e78e49b56528))*numFaceZones);

 if (!faceZones) {

 fprintf(stderr, "Unable to allocate memory for face zones\\n");

 exit(1);

 }

 cffGetZoneIds(reader, [CFF\_FACE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baa6aea3358b01fc54950d21d8af9c01a0), faceZones);

 displayZoneIds("Face-zone id", faceZones, numFaceZones);

 

 for (size\_t n = 0; n &lt; numFaceZones; ++n) {

 

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) startId = 0;

 cffGetZoneSizeInfo(reader, faceZones[n], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), &amp;startId);

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) endId = 0;

 cffGetZoneSizeInfo(reader, faceZones[n], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), &amp;endId);

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) dimension = 0;

 cffGetZoneSizeInfo(reader, faceZones[n], [CFF\_ZONE\_DIMENSION](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ac797bdd0c993d968d38f0c35b496d207), &amp;dimension);

 int shadowZoneId = 0;

 cffGetFaceZoneInfo(reader, faceZones[n], [CFF\_FACE\_ZONE\_SHADOW\_ZONE\_ID](group__enums.xhtml#gga90bd9c961be9a1b7e7d014e9f04588e3ac79d815228e144ab9b7b7d482e68730e),

 &amp;shadowZoneId);

 int childZoneId = 0;

 cffGetFaceZoneInfo(reader, faceZones[n], [CFF\_FACE\_ZONE\_CHILD\_ZONE\_ID](group__enums.xhtml#gga90bd9c961be9a1b7e7d014e9f04588e3a10eff2aafb191d93e55e74caa015b262),

 &amp;childZoneId);

 int zoneType = 0;

 cffGetFaceZoneInfo(reader, faceZones[n], [CFF\_FACE\_ZONE\_TYPE](group__enums.xhtml#gga90bd9c961be9a1b7e7d014e9f04588e3a2fa7a530982c6473ca2193d43d5c55af), &amp;zoneType);

 int elementType = 0;

 cffGetFaceZoneInfo(reader, faceZones[n], [CFF\_FACE\_ZONE\_FACE\_TYPE](group__enums.xhtml#gga90bd9c961be9a1b7e7d014e9f04588e3a96a4944c9088c0307aefafab1bcfc200),

 &amp;elementType);

 int flags = 0;

 cffGetAllFaceZoneFlags(reader, faceZones[n], &amp;flags);

 

 const char* name =

 cffGetZoneStringInfo(reader, faceZones[n], [CFF\_ZONE\_STRING\_NAME](group__enums.xhtml#gga7fe67117cb23bbcbb4ff2d5b55c3a704a3df2bc03cc26299fd9a017226d0fa127));

 const char* type =

 cffGetZoneStringInfo(reader, faceZones[n], [CFF\_ZONE\_STRING\_TYPE](group__enums.xhtml#gga7fe67117cb23bbcbb4ff2d5b55c3a704a7dd4555e422dcca8321082de07732b2e));

 

 fprintf(stdout, "Face-zone %u:\\n", faceZones[n]);

 fprintf(stdout, " minId = %zu\\n", startId);

 fprintf(stdout, " maxId = %zu\\n", endId);

 fprintf(stdout, " dimension = %zu\\n", dimension);

 if (shadowZoneId &gt; 0) {

 fprintf(stdout, " shadow-zone-id = %u\\n", shadowZoneId);

 }

 if (childZoneId &gt; 0) {

 fprintf(stdout, " child-zone-id = %u\\n", childZoneId);

 }

 if (zoneType &gt; -1) {

 fprintf(stdout, " face-zone-type = %d\\n", zoneType);

 }

 if (elementType &gt; -1) {

 fprintf(stdout, " face-type = %d\\n", elementType);

 }

 fprintf(stdout, " flags = %d\\n", flags);

 if (name) {

 if (strlen(name)) {

 fprintf(stdout, " name = %s\\n", name);

 }

 free((char*)name);

 name = NULL;

 }

 if (type) {

 if (strlen(type)) {

 fprintf(stdout, " type = %s\\n", type);

 }

 free((char*)type);

 type = NULL;

 }

 

 }

 fprintf(stdout, "\\n");

 

 for (size\_t n = 0; n &lt; numFaceZones; ++n) {

 

 size\_t numCellZones = 0;

 cffGetNumFaceCellZone0Ids(reader, faceZones[n], &amp;numCellZones);

 if (numCellZones) {

 [CffZoneIds](group__typedefs.xhtml#ga6097e775e360276522e7e6731546167d) cellZones = 

 ([CffZoneIds](group__typedefs.xhtml#ga6097e775e360276522e7e6731546167d))malloc(sizeof([CffZoneIdType](group__typedefs.xhtml#ga66a5d1b93ef250b01f99e78e49b56528))*numCellZones);

 cffGetFaceCellZone0Ids(reader, faceZones[n], cellZones, numCellZones);

 fprintf(stdout,

 "Face-zone-%d to cell-zone-0 connectivity:", 

 faceZones[n]);

 for (size\_t n = 0; n != numCellZones; ++n) {

 fprintf(stdout, " %d", cellZones[n]);

 }

 fprintf(stdout, "\\n");

 free(cellZones);

 }

 

 cffGetNumFaceCellZone1Ids(reader, faceZones[n], &amp;numCellZones);

 if (numCellZones) {

 [CffZoneIds](group__typedefs.xhtml#ga6097e775e360276522e7e6731546167d) cellZones = 

 ([CffZoneIds](group__typedefs.xhtml#ga6097e775e360276522e7e6731546167d))malloc(sizeof([CffZoneIdType](group__typedefs.xhtml#ga66a5d1b93ef250b01f99e78e49b56528))*numCellZones);

 cffGetFaceCellZone1Ids(reader, faceZones[n], cellZones, numCellZones);

 fprintf(stdout,

 "Face-zone-%d to cell-zone-1 connectivity:", 

 faceZones[n]);

 for (size\_t n = 0; n != numCellZones; ++n) {

 fprintf(stdout, " %d", cellZones[n]);

 }

 fprintf(stdout, "\\n");

 free(cellZones);

 }

 }

 fprintf(stdout, "\\n");

 

 [CffZoneIds](group__typedefs.xhtml#ga6097e775e360276522e7e6731546167d) available =

 ([CffZoneIds](group__typedefs.xhtml#ga6097e775e360276522e7e6731546167d))malloc(sizeof([CffZoneIdType](group__typedefs.xhtml#ga66a5d1b93ef250b01f99e78e49b56528))*numFaceZones);

 if (!available) {

 fprintf(stderr, "Unable to allocate memory for availability array\\n");

 exit(1);

 }

 

 cffStartReadingNodesForFaces(reader, available, numFaceZones);

 size\_t numAvailable = numFaceZones;

 for (size\_t n = 0; n != numFaceZones; ++n) {

 if (!available[n]) {

 numAvailable = n;

 break;

 }

 } 

 if (numAvailable) {

 /\* Read face/node zones \*/

 displayZoneIds("Face-nodes of face-zones", available, numAvailable);

 cffStartReadingNodeCountsForFaces(reader);

 size\_t* szNodeIds = 

 (size\_t*)calloc(numAvailable, sizeof(size\_t));

 if (!szNodeIds) {

 fprintf(stderr, "Unable to allocate memory for face node counts\\n");

 exit(1);

 }

 /\* Now read face node counts for each face zone \*/

 for (size\_t n = 0; n != numAvailable; ++n) {

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) numFaces = 0;

 cffGetZoneSizeInfo(reader, available[n], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), &amp;numFaces);

 short* nodeCounts = (short*)malloc(sizeof(short) * numFaces);

 if (!nodeCounts) {

 fprintf(stderr, "Unable to allocate memory for face node counts\\n");

 exit(1);

 }

 cffGetNodeCountsForFacesInZone(reader,

 available[n],

 nodeCounts,

 numFaces);

 fprintf(stdout,

 "Face-node-counts of zone-%u is read into a %zu x 1 buffer.\\n",

 available[n],

 numFaces);

 /\* Cache size so we know the number of node ids too read \*/

 szNodeIds[n] = 0;

 for (size\_t ni = 0; ni != numFaces; ++ni) {

 szNodeIds[n] += (size_t)nodeCounts[ni];

 }

 free(nodeCounts);

 }

 cffEndReadingNodeCountsForFaces(reader); 

 

 fprintf(stdout, "\\n");

 

 /\* Now read face node ids for each face zone \*/

 cffStartReadingNodeIdsForFaces(reader); 

 for (size\_t n = 0; n != numAvailable; ++n) {

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8)* nodeIds =

 ([CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8)*)malloc(sizeof([CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8)) * szNodeIds[n]);

 if (!nodeIds) {

 fprintf(stderr, "Unable to allocate memory for face node ids\\n");

 exit(1);

 }

 cffGetNodeIdsForFacesInZone(reader,

 available[n],

 nodeIds,

 szNodeIds[n]);

 fprintf(stdout,

 "Face-node-ids of zone-%u is read into a %zu x 1 buffer.\\n",

 available[n],

 szNodeIds[n]);

 free(nodeIds);

 }

 cffEndReadingNodeIdsForFaces(reader); 

 free(szNodeIds);

 fprintf(stdout, "\\n");

 }

 cffEndReadingNodesForFaces(reader); 

 

 /\* Cell parents - C0 \*/

 cffStartReadingCell0sForFaces(reader, available, numFaceZones);

 numAvailable = numFaceZones;

 for (size\_t n = 0; n != numFaceZones; ++n) {

 if (!available[n]) {

 numAvailable = n;

 break;

 }

 } 

 if (numAvailable) {

 displayZoneIds("Cell-0 of face-zones", available, numAvailable);

 for (size\_t n = 0; n != numAvailable; ++n) {

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) numFaces = 0;

 cffGetZoneSizeInfo(reader, available[n], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), &amp;numFaces);

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8)* c0s =

 ([CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8)*)malloc(sizeof([CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8)) * numFaces);

 if (!c0s) {

 fprintf(stderr, "Unable to allocate memory for c0 array\\n");

 exit(1);

 }

 cffGetCell0sForFacesInZone(reader, available[n], c0s, numFaces);

 fprintf(stdout,

 "Face-cell0-connectivity of zone-%u is read into a %zu x 1 buffer.\\n",

 available[n],

 numFaces);

 free(c0s);

 }

 fprintf(stdout, "\\n");

 }

 cffEndReadingCell0sForFaces(reader);

 

 /\* Cell parents - C1 \*/

 cffStartReadingCell1sForFaces(reader, available, numFaceZones);

 numAvailable = numFaceZones;

 for (size\_t n = 0; n != numFaceZones; ++n) {

 if (!available[n]) {

 numAvailable = n;

 break;

 }

 } 

 if (numAvailable) {

 displayZoneIds("Cell-1 of face-zones", available, numAvailable);

 for (size\_t n = 0; n != numAvailable; ++n) {

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) numFaces = 0;

 cffGetZoneSizeInfo(reader, available[n], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), &amp;numFaces);

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8)* c1s =

 ([CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8)*)malloc(sizeof([CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8)) * numFaces);

 if (!c1s) {

 fprintf(stderr, "Unable to allocate memory for c1 array\\n");

 exit(1);

 }

 cffGetCell1sForFacesInZone(reader, available[n], c1s, numFaces);

 fprintf(stdout,

 "Face-cell1-connectivity of zone-%u is read into a %zu x 1 buffer.\\n",

 available[n],

 numFaces);

 free(c1s);

 }

 fprintf(stdout, "\\n");

 }

 cffEndReadingCell1sForFaces(reader);

 

 free(available);

 }

 

 /\* Process Cell Zones \*/

 size\_t numCellZones = 0;

 cffGetNumZones(reader, [CFF\_CELL\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba62b22dd5125249182737df29d52bafbd), &amp;numCellZones);

 if (numCellZones) {

 [CffZoneIds](group__typedefs.xhtml#ga6097e775e360276522e7e6731546167d) cellZones =

 ([CffZoneIds](group__typedefs.xhtml#ga6097e775e360276522e7e6731546167d))malloc(sizeof([CffZoneIdType](group__typedefs.xhtml#ga66a5d1b93ef250b01f99e78e49b56528))*numCellZones);

 if (!cellZones) {

 fprintf(stderr, "Unable to allocate memory for cell zones\\n");

 exit(1);

 }

 cffGetZoneIds(reader, [CFF\_CELL\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba62b22dd5125249182737df29d52bafbd), cellZones);

 displayZoneIds("Cell-zone id", cellZones, numCellZones);

 

 for (size\_t n = 0; n &lt; numCellZones; ++n) {

 

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) startId = 0;

 cffGetZoneSizeInfo(reader, cellZones[n], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), &amp;startId);

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) endId = 0;

 cffGetZoneSizeInfo(reader, cellZones[n], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), &amp;endId);

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) dimension = 0;

 cffGetZoneSizeInfo(reader, cellZones[n], [CFF\_ZONE\_DIMENSION](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ac797bdd0c993d968d38f0c35b496d207), &amp;dimension);

 int childZoneId = 0;

 cffGetCellZoneInfo(reader, cellZones[n], [CFF\_CELL\_ZONE\_CHILD\_ZONE\_ID](group__enums.xhtml#ggaaffda1f82c7b51d603aff684c9ab0cd2adbc6fee74f7a3ad84f5ed5d3fbeaa55f),

 &amp;childZoneId);

 const char* name =

 cffGetZoneStringInfo(reader, cellZones[n], [CFF\_ZONE\_STRING\_NAME](group__enums.xhtml#gga7fe67117cb23bbcbb4ff2d5b55c3a704a3df2bc03cc26299fd9a017226d0fa127));

 const char* type =

 cffGetZoneStringInfo(reader, cellZones[n], [CFF\_ZONE\_STRING\_TYPE](group__enums.xhtml#gga7fe67117cb23bbcbb4ff2d5b55c3a704a7dd4555e422dcca8321082de07732b2e));

 

 fprintf(stdout, "Cell-zone %u:\\n", cellZones[n]);

 fprintf(stdout, " minId = %zu\\n", startId);

 fprintf(stdout, " maxId = %zu\\n", endId);

 fprintf(stdout, " dimension = %zu\\n", dimension);

 if (childZoneId &gt; 0) {

 fprintf(stdout, " child-zone-id = %u\\n", childZoneId);

 }

 if (name) {

 if (strlen(name)) {

 fprintf(stdout, " name = %s\\n", name);

 }

 free((char*)name);

 name = NULL;

 }

 if (type) {

 if (strlen(type)) {

 fprintf(stdout, " zone-type-name = %s\\n", type);

 }

 free((char*)type);

 type = NULL;

 }

 }

 fprintf(stdout, "\\n");

 

 [CffZoneIds](group__typedefs.xhtml#ga6097e775e360276522e7e6731546167d) available =

 ([CffZoneIds](group__typedefs.xhtml#ga6097e775e360276522e7e6731546167d))malloc(sizeof([CffZoneIdType](group__typedefs.xhtml#ga66a5d1b93ef250b01f99e78e49b56528))*numCellZones);

 if (!available) {

 fprintf(stderr, "Unable to allocate memory for availability array\\n");

 exit(1);

 }

 

 /\* Read cell types \*/

 cffStartReadingTypesForCells(reader, available, numCellZones);

 size\_t numAvailable = numCellZones;

 for (size\_t n = 0; n != numCellZones; ++n) {

 if (!available[n]) {

 numAvailable = n;

 break;

 }

 } 

 if (numAvailable) {

 displayZoneIds("Cell-types of cell-zones", available, numAvailable);

 for (size\_t n = 0; n != numAvailable; ++n) {

 

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) numCells = 0;

 cffGetZoneSizeInfo(reader, available[n], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), &amp;numCells);

 

 [CffCellType](group__enums.xhtml#gac0b3f753b9307362895e46aaa1a9f366)* types =

 ([CffCellType](group__enums.xhtml#gac0b3f753b9307362895e46aaa1a9f366)*)malloc(numCells * sizeof([CffCellType](group__enums.xhtml#gac0b3f753b9307362895e46aaa1a9f366)));

 cffGetTypesForCellsInZone(reader, available[n], types, numCells);

 fprintf(stdout,

 "Cell-type ids of zone-%u is read into a %zu x 1 buffer.\\n",

 available[n],

 numCells);

 free(types);

 }

 fprintf(stdout, "\\n");

 }

 cffEndReadingTypesForCells(reader);

 

 /\* Read cell node ids \*/

 cffStartReadingNodesForCells(reader, available, numCellZones);

 numAvailable = numCellZones;

 for (size\_t n = 0; n != numCellZones; ++n) {

 if (!available[n]) {

 numAvailable = n;

 break;

 }

 } 

 if (numAvailable) {

 /\* Read cell/node zones \*/

 displayZoneIds("Cell-nodes of cell-zones", available, numAvailable);

 cffStartReadingNodeCountsForCells(reader);

 size\_t* szNodeIds = 

 (size\_t*)calloc(numAvailable, sizeof(size\_t));

 if (!szNodeIds) {

 fprintf(stderr, "Unable to allocate memory for cell node counts\\n");

 exit(1);

 }

 /\* Now read cell node counts for each cell zone \*/

 for (size\_t n = 0; n != numAvailable; ++n) {

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) numCells = 0;

 cffGetZoneSizeInfo(reader, available[n], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), &amp;numCells);

 short* nodeCounts = (short*)malloc(sizeof(short) * numCells);

 if (!nodeCounts) {

 fprintf(stderr, "Unable to allocate memory for cell node counts\\n");

 exit(1);

 }

 cffGetNodeCountsForCellsInZone(reader,

 available[n],

 nodeCounts,

 numCells);

 fprintf(stdout,

 "Cell-node-counts of zone-%u is read into a %zu x 1 buffer.\\n",

 available[n],

 numCells);

 /\* Cache size so we know the number of node ids too read \*/

 szNodeIds[n] = 0;

 for (size\_t ni = 0; ni != numCells; ++ni) {

 szNodeIds[n] += (size_t)nodeCounts[ni];

 }

 free(nodeCounts);

 }

 cffEndReadingNodeCountsForCells(reader); 

 

 fprintf(stdout, "\\n");

 

 /\* Now read cell node ids for each cell zone \*/

 cffStartReadingNodeIdsForCells(reader); 

 for (size\_t n = 0; n != numAvailable; ++n) {

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8)* nodeIds =

 ([CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8)*)malloc(sizeof([CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8)) * szNodeIds[n]);

 if (!nodeIds) {

 fprintf(stderr, "Unable to allocate memory for cell node ids\\n");

 exit(1);

 }

 cffGetNodeIdsForCellsInZone(reader,

 available[n],

 nodeIds,

 szNodeIds[n]);

 fprintf(stdout,

 "Cell-node-ids of zone-%u is read into a %zu x 1 buffer.\\n",

 available[n],

 szNodeIds[n]);

 free(nodeIds);

 }

 cffEndReadingNodeIdsForCells(reader); 

 free(szNodeIds);

 fprintf(stdout, "\\n");

 }

 cffEndReadingNodesForCells(reader); 

 

 /\* Read cell partion ids \*/

 cffStartReadingPartitionIdsForCells(reader, available, numCellZones);

 numAvailable = numCellZones;

 for (size\_t n = 0; n != numCellZones; ++n) {

 if (!available[n]) {

 numAvailable = n;

 break;

 }

 } 

 if (numAvailable) {

 displayZoneIds("Cell-partition-ids of cell-zones",

 available,

 numAvailable);

 for (size\_t n = 0; n != numAvailable; ++n) {

 fprintf(stdout, "Cell-partition ids of zone-%u is ", available[n]);

 

 int partitionCount = cffGetPartitionCountForZone(reader, available[n]);

 if (partitionCount &lt; 2) {

 fprintf(stdout,

 "not read as partition-count is %d.\\n",

 partitionCount);

 continue;

 }

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) numCells = 0;

 cffGetZoneSizeInfo(reader, available[n], [CFF\_ZONE\_SIZE](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12aa0c5d918dc02f2fc3c7bff5820013b36), &amp;numCells);

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) minId = 0;

 cffGetZoneSizeInfo(reader, available[n], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), &amp;minId);

 [CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8) maxId = 0;

 cffGetZoneSizeInfo(reader, available[n], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), &amp;maxId);

 

 [CffPartitionIdType](group__typedefs.xhtml#gaa2900d4098613674b18dedb187b15bc8)* partitions = 

 ([CffPartitionIdType](group__typedefs.xhtml#gaa2900d4098613674b18dedb187b15bc8)*)malloc(numCells * sizeof([CffPartitionIdType](group__typedefs.xhtml#gaa2900d4098613674b18dedb187b15bc8)));

 cffGetPartitionIdsForCellsInRange(reader,

 minId,

 maxId,

 partitions,

 numCells);

 fprintf(stdout, "read into a %zu x 1 buffer.\\n", numCells);

 free(partitions);

 }

 fprintf(stdout, "\\n");

 }

 cffEndReadingPartitionIdsForCells(reader);

 }

 

 cffEndReading(reader, data_class);

 cffFinalizeReader(reader);

 

 printf("All done.\\n");

 return 0;

}

 

[CFF\_EDGE\_ZONE\_EDGE\_TYPE](group__enums.xhtml#ggab5510fa8ae80e1c0e3f4d17207ac2cf8aca207f4cd4e05d5dea844659c77b4761)

@ CFF_EDGE_ZONE_EDGE_TYPE

**Definition:** CffTypes.h:263



[CFF\_EDGE\_ZONE\_TYPE](group__enums.xhtml#ggab5510fa8ae80e1c0e3f4d17207ac2cf8aee47089b31281a95f6b1c875fe77ddda)

@ CFF_EDGE_ZONE_TYPE

**Definition:** CffTypes.h:261



[CFF\_MESH\_EDGE\_COUNT](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002a29f6ee3353045f01c56c538704cdc863)

@ CFF_MESH_EDGE_COUNT

**Definition:** CffTypes.h:181



[CffZoneIds](group__typedefs.xhtml#ga6097e775e360276522e7e6731546167d)

CffZoneIdType * CffZoneIds

Type used to represent pointer to multiple zone ids ('C' API only)

**Definition:** CffTypes.h:753



[CffZoneIdType](group__typedefs.xhtml#ga66a5d1b93ef250b01f99e78e49b56528)

int CffZoneIdType

Type used to represent the identifier of a zone.

**Definition:** CffTypes.h:747



[CffPartitionIdType](group__typedefs.xhtml#gaa2900d4098613674b18dedb187b15bc8)

int CffPartitionIdType

Type of a variable used to represent the identifier of a partition.

**Definition:** CffTypes.h:673



[CffElemIdType](group__typedefs.xhtml#gae0443d06671ffe5d095a04d641d834c8)

size_t CffElemIdType

Type used when representing the identifier of an element or the size of a zone.

**Definition:** CffTypes.h:707





## <a class="anchor" id="CExportExample"></a>Writing a CFF File Using C API

This example demonstrates how to use the CFF API wrapper in C code to write a CFF file. The following source code can be built using [Instructions to Build Examples](_c_f_f_s_d_k_examples.xhtml#BuildInstructions).

Run the following command to write case and data files using the C API:

&gt;&gt; ./test.exe



**write\_example.cpp**

/\*

 \* Copyright 2025 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.

 \*/

 

\#include "Factory/CffCAPI.h"

\#include "hdf/Common/CasAndDatCreator.hpp"

 

/\* This is for convenience of creating the mesh, for C this is not needed \*/

\#include &lt;iostream&gt;

\#include &lt;memory&gt;

\#include &lt;vector&gt;

 

int main(const int argc, const char** argv)

{

 CffWriter writer = {0};

 

 if (cffInitializeWriter(&amp;writer, [CFF\_HDF](group__enums.xhtml#gga9d98ab88553e163862440763fc91c76aa07723f3ffb199eb4f791d1f74b5ac567)))

 {

 cffSetMeshId(&amp;writer, 1);

 cffSetDataPrecision(&amp;writer, [CFF\_PRECISION\_DOUBLE](group__enums.xhtml#gga2ecbf04cb65f31fde87a9c60a5bab3d6a583d6d67a6ee03f067b1dc6b717de7e6));

 cffSetDebugOn(&amp;writer, 1);

 cffSetCompression(&amp;writer, 1);

 cffSetSolverType(&amp;writer, "ANSYS\_FLUENT");

 

 cffSetApplicationName(&amp;writer, "CFF API 'C' Export Example");

 

 if (!cffStartWritingFile(&amp;writer, "write\_new.cas.h5", [CFF\_CASE](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddba6c8b8209348df38321689fb67cd4b331)))

 {

 std::cout &lt;&lt; "Error writing to case file" &lt;&lt; std::endl;

 return 1;

 }

 

 if (!cffStartWritingFile(&amp;writer, "write\_new.dat.h5", [CFF\_RESULTS](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddbaacfdbe512195015b6446480e80caf4a4)))

 {

 std::cout &lt;&lt; "Error writing to data file" &lt;&lt; std::endl;

 return 1;

 }

 }

 else

 {

 std::cout &lt;&lt; "Error initialize writer" &lt;&lt; std::endl;

 return 1; 

 }

 

 // top-level mesh information

 size\_t meshDimension, nodeCount, faceCount, cellCount;

 

 // create those information

 CreateMeshInfo(meshDimension, nodeCount, faceCount, cellCount);

 

 // set these information in the writer

 cffSetMeshSize(&amp;writer, [CFF\_MESH\_DIMENSION](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002a79c9861f0c03a03f476e399d0a17917d), meshDimension);

 cffSetMeshSize(&amp;writer, [CFF\_MESH\_NODE\_COUNT](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002a3697b449f26bbbea1b7248da1f8634db), nodeCount);

 cffSetMeshSize(&amp;writer, [CFF\_MESH\_FACE\_COUNT](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002aeda7214eb896ae699e426d0bbc5b30ab), faceCount);

 cffSetMeshSize(&amp;writer, [CFF\_MESH\_CELL\_COUNT](group__enums.xhtml#ggaf5d669ab21b6699ea497958b17c32002ab58756bc6e4e7c3e46f2c53ce722b1ef), cellCount);

 

 // write those information

 cffWriteMeshSize(&amp;writer);

 

 // nodes

 {

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) nodeZone;

 std::vector&lt;ansys::ElemIdType&gt; startId;

 std::vector&lt;ansys::ElemIdType&gt; endId;

 std::vector&lt;short&gt; dimension;

 std::vector&lt;std::string&gt; names;

 

 // create zone-level information of nodes

 CreateNodeZones(nodeZone, startId, endId, dimension, names);

 

 // set the node-zones

 cffSetZoneIds(&amp;writer, [CFF\_NODE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba8ea3a3242fd587dc97ca2cf83dbf61d7), nodeZone.data(), nodeZone.size());

 for (size\_t iz = 0; iz &lt; nodeZone.size(); ++iz) {

 cffSetZoneSizeInfo(&amp;writer, 

 nodeZone[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), startId[iz]);

 cffSetZoneSizeInfo(&amp;writer, 

 nodeZone[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), endId[iz]);

 cffSetZoneSizeInfo(&amp;writer, 

 nodeZone[iz], [CFF\_ZONE\_DIMENSION](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ac797bdd0c993d968d38f0c35b496d207), dimension[iz]);

 cffSetZoneStringInfo(&amp;writer, 

 nodeZone[iz], [CFF\_ZONE\_STRING\_NAME](group__enums.xhtml#gga7fe67117cb23bbcbb4ff2d5b55c3a704a3df2bc03cc26299fd9a017226d0fa127), names[iz].data());

 }

 

 // start writing about these node-zones

 cffStartWritingNodes(&amp;writer, nodeZone.data(), nodeZone.size());

 

 // node coordinates

 {

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) nodeCoordsZone;

 std::vector&lt;std::vector&lt;double&gt; &gt; coords;

 

 // create node coordinates of appropriate zones

 CreateNodeCoords(nodeCoordsZone, coords);

 

 // start writing coordinates of these node-zones

 cffStartWritingCoordinatesForNodes(&amp;writer, nodeCoordsZone.data(), nodeCoordsZone.size());

 

 // write the coordinates

 for (size\_t iz = 0; iz &lt; nodeCoordsZone.size(); ++iz) {

 cffSetCoordinatesForNodesInZone(&amp;writer, 

 nodeCoordsZone[iz], &amp;(coords[iz].at(0)), coords[iz].size());

 }

 

 // end writing the coordinates

 cffEndWritingCoordinatesForNodes(&amp;writer);

 }

 

 // end writing about the node-zones

 cffEndWritingNodes(&amp;writer);

 }

 

 // faces

 {

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) faceZone;

 std::vector&lt;ansys::ElemIdType&gt; startId;

 std::vector&lt;ansys::ElemIdType&gt; endId;

 std::vector&lt;short&gt; dimension;

 std::vector&lt;ansys::ZoneIdType&gt; shadowZoneId;

 std::vector&lt;ansys::ZoneIdType&gt; childZoneId;

 std::vector&lt;ansys::FaceZoneType&gt; zoneType;

 std::vector&lt;ansys::FaceType&gt; elementType;

 std::vector&lt;short&gt; flags;

 std::vector&lt;std::string&gt; name;

 std::vector&lt;std::string&gt; stringZoneType;

 std::vector&lt;ansys::ZoneIds&gt; fzcz0;

 std::vector&lt;ansys::ZoneIds&gt; fzcz1;

 

 // create zone-level information of faces

 CreateFaceZones(faceZone,

 startId,

 endId,

 dimension,

 shadowZoneId,

 childZoneId,

 zoneType,

 elementType,

 flags,

 name,

 stringZoneType,

 fzcz0,

 fzcz1);

 

 // set the face zones

 cffSetZoneIds(&amp;writer, [CFF\_FACE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baa6aea3358b01fc54950d21d8af9c01a0), faceZone.data(), faceZone.size());

 for (size\_t iz = 0; iz &lt; faceZone.size(); ++iz) {

 cffSetZoneSizeInfo(&amp;writer, 

 faceZone[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), startId[iz]);

 cffSetZoneSizeInfo(&amp;writer, 

 faceZone[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), endId[iz]);

 cffSetZoneSizeInfo(&amp;writer, 

 faceZone[iz], [CFF\_ZONE\_DIMENSION](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ac797bdd0c993d968d38f0c35b496d207), dimension[iz]);

 if (shadowZoneId[iz] &gt; 0) {

 cffSetFaceZoneInfo(&amp;writer, 

 faceZone[iz],

 [CFF\_FACE\_ZONE\_SHADOW\_ZONE\_ID](group__enums.xhtml#gga90bd9c961be9a1b7e7d014e9f04588e3ac79d815228e144ab9b7b7d482e68730e),

 shadowZoneId[iz]);

 }

 if (childZoneId[iz] &gt; 0) {

 cffSetFaceZoneInfo(&amp;writer, faceZone[iz],

 [CFF\_FACE\_ZONE\_CHILD\_ZONE\_ID](group__enums.xhtml#gga90bd9c961be9a1b7e7d014e9f04588e3a10eff2aafb191d93e55e74caa015b262),

 childZoneId[iz]);

 }

 if (zoneType[iz] &gt; -1) {

 cffSetFaceZoneInfo(&amp;writer, faceZone[iz],

 [CFF\_FACE\_ZONE\_TYPE](group__enums.xhtml#gga90bd9c961be9a1b7e7d014e9f04588e3a2fa7a530982c6473ca2193d43d5c55af),

 zoneType[iz]);

 }

 if (elementType[iz] &gt; -1) {

 cffSetFaceZoneInfo(&amp;writer, faceZone[iz],

 [CFF\_FACE\_ZONE\_FACE\_TYPE](group__enums.xhtml#gga90bd9c961be9a1b7e7d014e9f04588e3a96a4944c9088c0307aefafab1bcfc200),

 elementType[iz]);

 }

 if (!name[iz].empty()) {

 cffSetZoneStringInfo(&amp;writer, faceZone[iz],

 [CFF\_ZONE\_STRING\_NAME](group__enums.xhtml#gga7fe67117cb23bbcbb4ff2d5b55c3a704a3df2bc03cc26299fd9a017226d0fa127),

 name[iz].data());

 }

 if (!stringZoneType[iz].empty()) {

 cffSetZoneStringInfo(&amp;writer, faceZone[iz],

 [CFF\_ZONE\_STRING\_TYPE](group__enums.xhtml#gga7fe67117cb23bbcbb4ff2d5b55c3a704a7dd4555e422dcca8321082de07732b2e),

 stringZoneType[iz].data());

 }

 cffSetFaceCellZone0Ids(&amp;writer,

 faceZone[iz],

 fzcz0[iz].data(),

 fzcz0[iz].size());

 cffSetFaceCellZone1Ids(&amp;writer,

 faceZone[iz],

 fzcz1[iz].data(),

 fzcz1[iz].size());

 }

 

 // start writing about these face-zones

 cffStartWritingFaces(&amp;writer, faceZone.data(), faceZone.size());

 

 // face-nodes

 {

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) faceNodesZone;

 std::vector&lt;std::vector&lt;short&gt; &gt; numNodes;

 std::vector&lt;std::vector&lt;ansys::ElemIdType&gt; &gt; nodes;

 

 // create face-node information of appropriate zones

 CreateFaceNodes(faceNodesZone, numNodes, nodes);

 

 cffStartWritingNodesForFaces(&amp;writer, faceNodesZone.data(), faceNodesZone.size());

 

 cffStartWritingNodeCountsForFaces(&amp;writer);

 for (size\_t iz = 0; iz &lt; faceNodesZone.size(); ++iz) {

 cffSetNodeCountsForFacesInZone(&amp;writer, 

 faceNodesZone[iz], &amp;(numNodes[iz].at(0)), numNodes[iz].size());

 }

 cffEndWritingNodeCountsForFaces(&amp;writer);

 

 cffStartWritingNodeIdsForFaces(&amp;writer);

 for (size\_t iz = 0; iz &lt; faceNodesZone.size(); ++iz) {

 cffSetNodeIdsForFacesInZone(&amp;writer, 

 faceNodesZone[iz], &amp;(nodes[iz].at(0)), nodes[iz].size());

 }

 cffEndWritingNodeIdsForFaces(&amp;writer);

 

 cffEndWritingNodesForFaces(&amp;writer);

 }

 

 // face-cell-0 s

 {

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) faceC0Zone;

 std::vector&lt;std::vector&lt;ansys::ElemIdType&gt; &gt; faceC0s;

 

 CreateFaceC0s(faceC0Zone, faceC0s);

 

 cffStartWritingCell0sForFaces(&amp;writer, faceC0Zone.data(), faceC0Zone.size());

 for (size\_t iz = 0; iz &lt; faceC0Zone.size(); ++iz) {

 cffSetCell0sForFacesInZone(&amp;writer, 

 faceC0Zone[iz], &amp;(faceC0s[iz].at(0)), faceC0s[iz].size());

 }

 cffEndWritingCell0sForFaces(&amp;writer);

 }

 

 // face-cell-1 s

 {

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) faceC1Zone;

 std::vector&lt;std::vector&lt;ansys::ElemIdType&gt; &gt; faceC1s;

 

 CreateFaceC1s(faceC1Zone, faceC1s);

 

 cffStartWritingCell1sForFaces(&amp;writer, faceC1Zone.data(), faceC1Zone.size());

 for (size\_t iz = 0; iz &lt; faceC1Zone.size(); ++iz) {

 cffSetCell1sForFacesInZone(&amp;writer, 

 faceC1Zone[iz], &amp;(faceC1s[iz].at(0)), faceC1s[iz].size());

 }

 cffEndWritingCell1sForFaces(&amp;writer);

 }

 

 cffEndWritingFaces(&amp;writer);

 }

 

 // cells

 {

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) cellZone;

 std::vector&lt;ansys::ElemIdType&gt; startId;

 std::vector&lt;ansys::ElemIdType&gt; endId;

 std::vector&lt;short&gt; dimension;

 std::vector&lt;ansys::ZoneIdType&gt; childZoneId;

 std::vector&lt;ansys::CellType&gt; elementType;

 std::vector&lt;std::string&gt; name;

 std::vector&lt;std::string&gt; stringZoneType;

 

 // create zone-level information of cells

 CreateCellZones(

 cellZone, startId, endId, dimension, childZoneId, elementType, name, stringZoneType);

 

 // set the cell zones

 cffSetZoneIds(&amp;writer, [CFF\_CELL\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba62b22dd5125249182737df29d52bafbd), cellZone.data(), cellZone.size());

 for (size\_t iz = 0; iz &lt; cellZone.size(); ++iz) {

 cffSetZoneSizeInfo(&amp;writer, 

 cellZone[iz], [CFF\_ZONE\_START\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12a79d59ca619126744f5dcce0401f2bf00), startId[iz]);

 cffSetZoneSizeInfo(&amp;writer, 

 cellZone[iz], [CFF\_ZONE\_END\_ID](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ae1c4a42d14520b1baeaaff14a389556a), endId[iz]);

 cffSetZoneSizeInfo(&amp;writer, 

 cellZone[iz], [CFF\_ZONE\_DIMENSION](group__enums.xhtml#gga54ba682a6deedd60cb203d1963a0ac12ac797bdd0c993d968d38f0c35b496d207), dimension[iz]);

 if (elementType[iz] &gt;= 0)

 cffSetCellZoneInfo(&amp;writer, cellZone[iz],

 [CFF\_CELL\_ZONE\_CELL\_TYPE](group__enums.xhtml#ggaaffda1f82c7b51d603aff684c9ab0cd2ae307b5717f564f83314c104ac0132440),

 elementType[iz]);

 if (childZoneId[iz] &gt; 0) {

 cffSetCellZoneInfo(&amp;writer, cellZone[iz],

 [CFF\_CELL\_ZONE\_CHILD\_ZONE\_ID](group__enums.xhtml#ggaaffda1f82c7b51d603aff684c9ab0cd2adbc6fee74f7a3ad84f5ed5d3fbeaa55f),

 childZoneId[iz]);

 }

 if (!name[iz].empty()) {

 cffSetZoneStringInfo(&amp;writer, cellZone[iz],

 [CFF\_ZONE\_STRING\_NAME](group__enums.xhtml#gga7fe67117cb23bbcbb4ff2d5b55c3a704a3df2bc03cc26299fd9a017226d0fa127),

 name[iz].data());

 }

 if (!stringZoneType[iz].empty()) {

 cffSetZoneStringInfo(&amp;writer, cellZone[iz],

 [CFF\_ZONE\_STRING\_TYPE](group__enums.xhtml#gga7fe67117cb23bbcbb4ff2d5b55c3a704a7dd4555e422dcca8321082de07732b2e),

 stringZoneType[iz].data());

 }

 }

 

 // start writing about these cell-zones

 cffStartWritingCells(&amp;writer, cellZone.data(), cellZone.size());

 

 // cell-types

 {

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) cellTypeZone;

 std::vector&lt;ansys::CellType&gt; zoneCellTypes;

 std::vector&lt;std::vector&lt;ansys::CellType&gt; &gt; allCellTypes;

 

 // create cell-type information of appropriate zones;

 CreateCellTypes(cellTypeZone, zoneCellTypes, allCellTypes);

 

 cffStartWritingTypesForCells(&amp;writer, cellTypeZone.data(), cellTypeZone.size(), zoneCellTypes.data(), zoneCellTypes.size());

 for (size\_t iz = 0; iz &lt; cellTypeZone.size(); ++iz) {

 if ([CFF\_CELL\_TYPE\_MIXED](group__enums.xhtml#ggac0b3f753b9307362895e46aaa1a9f366a1eed460af26c972bc96e5f71e7d124ba) != zoneCellTypes[iz]) {

 continue;

 }

 cffSetTypesForCellsInZone(&amp;writer, cellTypeZone[iz],

 &amp;(allCellTypes[iz].at(0)),

 allCellTypes[iz].size());

 }

 cffEndWritingTypesForCells(&amp;writer);

 }

 

 // cell-partitions

 {

 int numPartitions;

 std::vector&lt;ansys::ZoneIdType&gt; cellPartitionZone;

 std::vector&lt; std::vector&lt;ansys::PartitionIdType&gt; &gt; cellPartitions;

 

 // create cell-partition information of appropriate zones;

 CreateCellPartitions(cellPartitionZone, numPartitions, cellPartitions);

 

 cffStartWritingPartitionIdsForCells(&amp;writer, cellPartitionZone.data(), cellPartitionZone.size(),

 numPartitions);

 if (numPartitions &gt; 1) {

 for (size\_t iz = 0; iz &lt; cellPartitionZone.size(); ++iz) {

 cffSetPartitionIdsForCellsInZone(&amp;writer, cellPartitionZone[iz],

 &amp;(cellPartitions[iz].at(0)),

 cellPartitions[iz].size());

 }

 }

 cffEndWritingPartitionIdsForCells(&amp;writer);

 }

 

 cffEndWritingCells(&amp;writer);

 }

 

 cffEndWriting(&amp;writer, [CFF\_CASE](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddba6c8b8209348df38321689fb67cd4b331));

 

 // data-file

 {

 [ansys::PhaseNames](group__typedefs.xhtml#ga0fd5a01583470684274d967989f7172c) phaseNames;

 std::vector&lt;const char*&gt; phaseNamesChar;

 std::vector&lt;const char*&gt; varNamesChar;

 

 

 // create the phases and get their ids

 CreatePhases(phaseNames);

 phaseNamesChar.resize(phaseNames.size());

 for(size\_t i = 0; i&lt;phaseNames.size(); i++)

 phaseNamesChar[i] = phaseNames[i].data();

 

 [ansys::PhaseIds](group__typedefs.xhtml#ga99ff3bf3b76eac538df4d637faab6b4c) phaseIds(phaseNames.size());

 cffSetPhaseNames(&amp;writer, (const [CffPhaseNames](group__typedefs.xhtml#ga5f359c824a4c10b6b757a987b306f441))phaseNamesChar.data(), phaseNamesChar.size(), phaseIds.data());

 for (size\_t ip = 0; ip &lt; phaseIds.size(); ++ip) {

 cffStartWritingPhase(&amp;writer, phaseIds[ip]);

 

 std::vector&lt;ansys::ZoneCategory&gt; zoneCategory(2);

 zoneCategory[0] = [CFF\_CELL\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917ba62b22dd5125249182737df29d52bafbd);

 zoneCategory[1] = [CFF\_FACE\_ZONE](group__enums.xhtml#gga1e26b7f9299129cd1edc8fdf99f2917baa6aea3358b01fc54950d21d8af9c01a0);

 for (size\_t izc = 0; izc &lt; zoneCategory.size(); ++izc) {

 std::vector&lt;std::string&gt; varName;

 std::vector&lt;int&gt; varXFID;

 

 CreateVarNames(phaseIds[ip], zoneCategory[izc], varName, varXFID);

 varNamesChar.resize(varName.size());

 for(size\_t i = 0; i&lt;varName.size(); i++) {

 varNamesChar[i] = varName[i].data();

 }

 cffSetPhaseVariablesOfCategoryName(&amp;writer, zoneCategory[izc], (const [CffVariableNames](group__typedefs.xhtml#gafd41d6f7891e879cc6f8d1a2b0c764e8))varNamesChar.data(), varNamesChar.size());

 

 for (size\_t iv = 0; iv &lt; varName.size(); ++iv) {

 [ansys::ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa) phaseCategoryVarZone;

 size\_t numColumns;

 std::vector&lt;std::vector&lt;double&gt; &gt; data;

 CreateVarsForThisCategory(phaseIds[ip],

 zoneCategory[izc],

 varXFID[iv],

 phaseCategoryVarZone,

 numColumns,

 data);

 

 cffStartWritingPhaseVariableInZonesOfCategory(&amp;writer, 

 zoneCategory[izc], (const [CffVariableName](group__typedefs.xhtml#gae1cd499fc66dfc3c6416a8795cf48446))varName[iv].data(), phaseCategoryVarZone.data(), phaseCategoryVarZone.size(), numColumns);

 for (size\_t iz = 0; iz &lt; phaseCategoryVarZone.size(); ++iz) {

 cffSetValuesOfPhaseVariableForElementsInZone(&amp;writer, 

 phaseCategoryVarZone[iz], &amp;(data[iz].at(0)), data[iz].size());

 }

 cffEndWritingPhaseVariableInZonesOfCategory(&amp;writer);

 }

 }

 cffEndWritingPhase(&amp;writer);

 }

 

 cffWriteGenericSettings(&amp;writer, [CFF\_RESULTS](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddbaacfdbe512195015b6446480e80caf4a4), "Case File", "write\_new.cas.h5");

 cffEndWriting(&amp;writer, [CFF\_RESULTS](group__enums.xhtml#ggab852cc24891eb831942fb8da764d8ddbaacfdbe512195015b6446480e80caf4a4));

 }

 

 if (cffAddStringAttribute(&amp;writer, "write\_new.cas.h5", "/meshes/1/faces", "groupAtt", "xyz"))

 std::cout &lt;&lt;"writing of groupAtt successful!" &lt;&lt; std::endl;

 

 cffFinalizeWriter(&amp;writer);

 

 return 0;

}

[CffPhaseNames](group__typedefs.xhtml#ga5f359c824a4c10b6b757a987b306f441)

CffPhaseName * CffPhaseNames

Type used to represent pointer to multiple phase names ('C' API only)

**Definition:** CffTypes.h:777



[CffVariableName](group__typedefs.xhtml#gae1cd499fc66dfc3c6416a8795cf48446)

char * CffVariableName

Type used to represent the name of a variable ('C' API only)

**Definition:** CffTypes.h:806



[CffVariableNames](group__typedefs.xhtml#gafd41d6f7891e879cc6f8d1a2b0c764e8)

CffVariableName * CffVariableNames

Type used to represent pointer to multiple variable names ('C' API only)

**Definition:** CffTypes.h:812