Skip to main content
Base class that provides common function used by both CffConsumer and CffProvider classes. #include "CffInterface/CffBase.hpp" Inheritance diagram for ansys::CffBase:

Public Member Functions

Public Member Functions inherited from ansys::CffVersion

Static Public Attributes

Protected Types

Protected Member Functions

Protected Attributes

Additional Inherited Members

Static Public Member Functions inherited from ansys::CffVersion

Detailed Description

Base class that provides common function used by both CffConsumer and CffProvider classes. CffBase cannot be instantiated itself but must be used via the derived classes ansys::CffConsumer (when writing to CFF) and ansys::CffProvider (when reading from CFF).

Member Enumeration Documentation

UpdateMethod

strong protected

Constructor & Destructor Documentation

CffBase()

Constructor. A CffBase object cannot be constructed directly but needs to be constructed by a create an object that has been derived from it.

~CffBase()

virtual Destructor. Destroys an instance of a type CffBase

Member Function Documentation

addSetting()

Sets a specific setting by supplying a key and a value. Parameters Returns
  • True if successully added, false otherwise

addSettingsDataSet()

Defines a set of data that contain the more than one setting. A complete dataset containing multiple settings may be supplied to the interface that are typically in a solvers native language. When called this function parsers the settings uusing the parser appropriate for the solver type supplied, thus breaking the settings into key value pairs, and stores mattched subset of the settings controlled by settingsKeys. A non-default parser may be supplied by the user calling registerSettingsParser prior to this function being called. The settings will override any settings already stored in the dataset Parameters Returns
  • true if a valid parser is found, otherwise false

addTimeLevel()

protected

addVariableOfCategory()

protected

getActivePhase() [1/2]

protected

getActivePhase() [2/2]

protected

getAllFaceZoneFlags()

Get flags for a face zone. Flags are returned in an integer using a ‘C’ style bit pattern. The application developer using the API is assumed to have full knowledge of the bitwise operations in the C programming language and should consider this when writing the flags associated with the face zone. Please note this is a Fluent solver concept for coupled walls to handle baffles or solid zones. Where a zone/shadow zone pair is defined: The first bit is reserved for the major zone. The second bit is reserved for the minor zone. Only if the shadow face zones pair is a wall (i.e. Conjugate Heat Transfer (CHT) case), the third bit is used to indicate that each zone is in fact a wall. Parameters

getApplicationName()

protected Obtains the application name that was set by calling setApplicationName logging when writing a file. Returns
  • The application name

getCellFaceZoneIds()

Get a list of face zones touching a cell zone. Parameters

getCellZoneInfo()

get certain zone level info for a cell zone. Parameters

getEdgeZoneInfo()

get certain zone level info for a edge zone. Parameters

getEdgeZoneType()

get the zone type of a edge zone. Zone types of edges zones indicate edge type of the edge zone. For all defined edge zone types, see CffEdgeZoneType Parameters

getErrors()

returns, as strings, any unprocessed error messages registered Parameters Returns
  • vector of messages

getFaceCellZone0Ids() [1/2]

Get a list of cell zones on side zero of a face zone. Parameters

getFaceCellZone0Ids() [2/2]

protected

getFaceCellZone1Ids() [1/2]

Get a list of cell zones on side one of a face zone. Parameters

getFaceCellZone1Ids() [2/2]

protected

getFaceZoneInfo()

get certain zone level info for a face zone. Parameters

getFaceZoneProp()

getFaceZoneType()

get the zone type of a face zone. Zone types of edges zones indicate face element type of the face zone. For all defined face zone types, see CffFaceZoneType Parameters

getGroupNameForPhase()

protected

getInfos()

returns, as strings, any unprocessed information messages registered Parameters Returns
  • vector of messages

getLocationModel()

Get a query interface to the underlying topology model.

getMeshId()

Get the Identifier of the active mesh. Returns The Id of the active mesh

getMeshSize()

Obtains a value that defines the dimension or the global number of objects of a specific mesh entity. Parameters

getMeshUnits()

Obtains the unit of length the mesh is defined in. By default the units are in the SI unit of length “m” Parameters

getMessageRegistrar()

Obtains a message registrar object so that external plug-ins can register messages with the API. Returns
  • A pointer to the message registration object.
Note: The registrar remains in the ownership of the API and should not be destroyed

getNodeZoneInfo()

get certain zone level info for a node zone.
Parameters

getNumZones()

virtual Returns the number of zones in a specific category. Parameters Returns
  • The number of zones defined of that category.

getPartitionId()

getPhaseIds()

Obtain the Identifiers of all Phase. Parameters

getPhaseName() [1/2]

Obtain the unique name a specific Phase. This function is deprecated in favour of getPhaseName(const PhaseIdType, PhaseName&) const Parameters Returns
  • The unique name obtained.

getPhaseName() [2/2]

Obtain the unique name a specific Phase. Parameters Returns
  • Whether the Phase supplied was valid.

getSolverType()

Obtains the owner of the data in the model. Returns
  • The name of the application that supplied the data.

getSortedMinIdZoneId()

protected

getTarget()

Get the target category for which the data is intended. The target category defines whether the mesh and solution data is written as a CFF Solver Restart data or a CFF Post Processing file. Typically for some applications, such as ANSYS Fluent, restart data may not be used for Post processing without careful understanding of how the restart data has been written. Returns
  • The category of data being processed.

getTimeLevel()

Get the current time level that is being read or written to the results data

getTimeLevels()

Get the time levels that have been read/written to the results data

getWarnings()

returns, as strings, any unprocessed warning messages registered Parameters Returns
  • vector of messages

getZoneCategory()

protected get the zone category of a given zone by zone id Parameters Returns
  • zone category of all the zones indicated by the input argument, all supported zone categories are defined in ZoneCategory

getZoneIds()

virtual Request the collection of zone Ids that are of a specific category.
Parameters Note: zoneIds is correctly sized by the function.

getZoneSizeInfo()

Obtains a size setting of a zone. Zones are defined with a dimension, number of objects, and the object Id range (start Id and end Id). This function allows the user to obtain the value of each individual size setting independently. The type of setting is defined by an enum ZoneSizeType. Parameters

getZoneStringInfo()

Obtains a string value associated with a zone. Typically a mesh zone will have a name that identifies it, it may also have a type represented as a string. To obtaint the appropriate value ZoneStringInfoType is passed to the function to indicate the type of setting being requested. Parameters

hasError()

returns whether there are unprocessed error messages registered. Returns
  • true if messages are unprocessed, false otherwise

hasInfo()

returns whether there are unprocessed informative messages registered. Returns
  • true if messages are unprocessed, false otherwise

hasWarning()

returns whether there are unprocessed warning messages registered. Returns
  • true if messages are unprocessed, false otherwise

initializeVariableAttributeProvider()

protected

initLocationModel()

inline protected virtual

isSupported()

protected Check whether the version can be read by this version of the CFF SDK. Parameters Returns
  • CFF_READABLE_OK if the API can read the data, CFF_READABLE_WARN if the data can be read partially or with warnings, CFF_READABLE_ERROR if the data is incompatible with this version of the API.

locationModel()

protected

registerSettingsParser()

Sets a parser for processing settings. Settings are typically stored within a CFF file as a set of strings in order to provide common access to these settings a settings parser may be provided as an alternative to those installed by default that read the strings, manipulate the settings and return them in a form that is common across all applications. It is unlikley that a user will need to supply an alternative parser Parameters

setActivePhase() [1/2]

protected

setActivePhase() [2/2]

protected

setAllFaceZoneFlags()

Set flags for a face zone. Flags are supplied in an integer using a ‘C’ style bit pattern. The application developer using the API is assumed to have full knowledge of the bitwise operations in the C programming language and should consider this when writing the flags associated with the face zone. Please note this is a Fluent solver concept for coupled walls to handle baffles or solid zones. Where a zone/shadow zone pair is defined: The first bit is reserved for the major zone. The second bit is reserved for the minor zone. Only if the shadow face zones pair is a wall (i.e. Conjugate Heat Transfer (CHT) case), the third bit is used to indicate that each zone is in fact a wall. Parameters

setApplicationName()

Sets an application name for error purposes and when logging to a file. Parameters

setCellFaceZoneIds()

protected Set the face zones ids of all cell zones The face zones of a cell zone are all face zones that adjacent to the cell zone The information provided here will be helpful for quicker establishment of zone level topology when reading the mesh Mesh without those information can still be read, but would be much slower. Parameters

setCellZoneInfo()

set certain zone level info for a cell zone. Parameters

setDebugOn()

virtual Turn on/off debugging information. Parameters

setEdgeZoneInfo()

set certain zone level info for a edge zone. Parameters

setEdgeZoneType()

set zone type of a edge zone.
Zone types of edges zones indicate edge type of the edge zone. For all defined edge zone types, see CffEdgeZoneType Parameters

setFaceCellZone0Ids()

protected Set the c0 cell zones of all face zones The CellZone0 (c0) cell zones are the cell zones adjacent to the face zone and at the side of face normal direction The information provided here will be helpful for quicker establishment of zone level topology when reading the mesh Mesh without those information can still be read, but would be much slower. Parameters

setFaceCellZone1Ids()

protected Set the c1 cell zones of all face zones The CellZone1 (c1) cell zones are the cell zones adjacent to the face zone and at the side opposite to face normal direction The information provided here will be helpful for quicker establishment of zone level topology when reading the mesh Mesh without those information can still be read, but would be much slower. Parameters

setFaceZoneInfo()

set certain zone level info for a face zone. Parameters

setFaceZoneProp()

setFaceZoneType()

set zone type of a face zone. Zone types of edges zones indicate face element type of the face zone. For all defined face zone types, see CffFaceZoneType Parameters

setMeshContext()

protected

setMeshId()

Set the Identifier for active mesh being read or written. Parameters

setMeshSize() [1/2]

protected Set the mesh size info This function is for providing top level meta data: the total mesh size of all zones In case you do not save certain entity, for example, edges, then the input edgesCount should be 0. Parameters

setMeshSize() [2/2]

Sets a value that defines the dimension or the global number of objects of a specific mesh entity. Ahead of any mesh being written, the mesh dimension and global mesh sizes must be set. Typically the number of Cells, Faces and Nodes must be supplied. The type of the data being set is defined using the MeshSizeType enumerated type Parameters

setMeshUnits()

Define the units of length the mesh is defined in. By default the units are in the SI unit of length “m” Parameters

setNodeZoneInfo()

set certain zone level info for a node zone.
Parameters

setPartitionId()

setReadNCIOn()

virtual Turn on/off non-conformal interface reading. Parameters

setSolverType()

virtual Set the name of the application that is supplying the data. When supplyingn a model this function should be called to definie the owner of the data that is in the model. This name is used automatically by the API to determine the CffVariableAttributeProvider that is used to populate the Ansys Common Fluids Solution Data Model. Parameters

setTarget()

Set the target category for which the data is intended. The target category defines whether the mesh and solution data is written as a CFF Solver Restart data or a CFF Post Processing file. Restart data is typically intended for use within the solver that wrote the data. This sometimes means that the data read from the file will not be suitable for Post Processing without further manipulation using domain knowledge. See CFF Restart Format. Post processing data is always written corrected and in a simplified model that makes Post Processing in ANSYS Ensight quicker. See CFF Post Format Parameters

setTimeLevel()

protected

setVariableAttributeProvider()

Register an alternative variable attribute provider. Often the user may wish to supply variable attributes when reading or writing data. In the reading case this may be because the variable attributes are not in the file and a default provider doesn’t exist. When writing the data this may also be the case if the attributes can be supplied from an alternative data source such as a configuration file.
Parameters

setZoneAdjacency()

protected virtual

setZoneCategory()

protected set the zone categories of all zones of the same zone category This function can be used to set zone categories of a batch of zones with the same zone category. Parameters

setZoneIds()

Define the zones that are of a specific category. Zones define collections of nodes, faces or cells. This function defines the zones that exist a specific ZoneCategory. Parameters

setZoneSizeInfo()

Sets a size setting of a zone. Zones are defined with a dimension, number of objects, and the object Id range (start Id and end Id). This function allows the setting of each individual size independently. The type ofsetting is defined by an enum ZoneSizeType. Parameters

setZoneStringInfo()

Sets a string value associated with a zone. Typically a mesh zone will have a name that identifies it, it may also have a type represented as a string. To set the appropriate value ZoneStringInfoType is passed to the function to indicate the type of setting being supplied. Parameters

solutionModel()

protected

updateData()

inline protected virtual

Member Data Documentation

_data

protected

_defaultSettingsPath

static

_varAttrProvider

protected