    

 ## On this page

  

 

 # CffLocationModel

 Last update: 16.07.2025 

<a id="l00001" name="l00001"></a> 1/\*

<a id="l00002" name="l00002"></a> 2 \* Copyright ANSYS. All Rights Reserved.

<a id="l00003" name="l00003"></a> 3 \*/

<a id="l00004" name="l00004"></a> 4 

<a id="l00005" name="l00005"></a> 5\#ifndef CFFSDK\_CFFINTERFACE\_LOCATIONMODEL\_HPP\_

<a id="l00006" name="l00006"></a> 6\#define CFFSDK\_CFFINTERFACE\_LOCATIONMODEL\_HPP\_

<a id="l00007" name="l00007"></a> 7 

<a id="l00008" name="l00008"></a> 8\#include "LibraryType.hpp"

<a id="l00009" name="l00009"></a> 9 

<a id="l00010" name="l00010"></a> 10\#include "Types.hpp"

<a id="l00011" name="l00011"></a> 11 

<a id="l00012" name="l00012"></a> 12\#include &lt;memory&gt;

<a id="l00013" name="l00013"></a> 13 

<a id="l00014" name="l00014"></a> 14\#if defined(\_WIN32)

<a id="l00015" name="l00015"></a> 15\#pragma warning(push)

<a id="l00016" name="l00016"></a> 16\#pragma warning(disable:4251)

<a id="l00017" name="l00017"></a> 17\#endif

<a id="l00018" name="l00018"></a> 18 

<a id="l00019" name="l00019"></a> 19namespace [ansys](namespaceansys.xhtml) {

<a id="l00020" name="l00020"></a> 20 

<a id="l00021" name="l00021"></a> 21 struct LocationModelData;

<a id="l00022" name="l00022"></a> 22 

<a id="l00023" name="l00023"></a> 23 typedef [CffMeshIdType](group__typedefs.xhtml#ga9be1a8a186916d6989ca9cb5478f7e0a) MeshId;

<a id="l00024" name="l00024"></a> 24 

<a id="l00025" name="l00025"></a> 25 typedef int Dimensionality;

<a id="l00026" name="l00026"></a> 26 

<a id="l00027" name="l00027"></a> 27 typedef int CffPartId;

<a id="l00028" name="l00028"></a> 28 typedef CffPartId* CffPartIds;

<a id="l00029" name="l00029"></a> 29 

<a id="l00030" name="l00030"></a> 30 typedef CffPartId PartId;

<a id="l00031" name="l00031"></a> 31 typedef std::vector&lt;PartId&gt; PartIds;

<a id="l00032" name="l00032"></a> 32 

<a id="l00033" name="l00033"></a> 33 typedef int CffBodyId;

<a id="l00034" name="l00034"></a> 34 typedef CffBodyId* CffBodyIds;

<a id="l00035" name="l00035"></a> 35 

<a id="l00036" name="l00036"></a> 36 typedef CffBodyId BodyId;

<a id="l00037" name="l00037"></a> 37 typedef std::vector&lt;BodyId&gt; BodyIds;

<a id="l00038" name="l00038"></a> 38 

<a id="l00039" name="l00039"></a> 39 typedef int CffFaceId;

<a id="l00040" name="l00040"></a> 40 typedef CffFaceId* CffFaceIds;

<a id="l00041" name="l00041"></a> 41 

<a id="l00042" name="l00042"></a> 42 typedef CffFaceId FaceId;

<a id="l00043" name="l00043"></a> 43 typedef std::vector&lt;FaceId&gt; FaceIds;

<a id="l00044" name="l00044"></a> 44 

<a id="l00045" name="l00045"></a> 45 typedef int CffFaceUseId;

<a id="l00046" name="l00046"></a> 46 typedef CffFaceUseId* CffFaceUseIds;

<a id="l00047" name="l00047"></a> 47 

<a id="l00048" name="l00048"></a> 48 typedef CffFaceUseId FaceUseId;

<a id="l00049" name="l00049"></a> 49 typedef std::vector&lt;FaceUseId&gt; FaceUseIds;

<a id="l00050" name="l00050"></a> 50 

<a id="l00051" name="l00051"></a> 51 typedef int CffCompositeId;

<a id="l00052" name="l00052"></a> 52 typedef CffCompositeId* CffCompositeIds;

<a id="l00053" name="l00053"></a> 53 

<a id="l00054" name="l00054"></a> 54 typedef CffCompositeId CompositeId;

<a id="l00055" name="l00055"></a> 55 typedef std::vector&lt;CompositeId&gt; CompositeIds;

<a id="l00056" name="l00056"></a> 56 

<a id="l00057" name="l00057"></a> 57 typedef int CffZoneSideId;

<a id="l00058" name="l00058"></a> 58 typedef CffZoneSideId* CffZoneSideIds;

<a id="l00059" name="l00059"></a> 59 

<a id="l00060" name="l00060"></a> 60 typedef CffZoneSideId ZoneSideId;

<a id="l00061" name="l00061"></a> 61 typedef std::vector&lt;ZoneSideId&gt; ZoneSideIds;

<a id="l00062" name="l00062"></a> 62 

<a id="l00063" name="l00063"></a> 63 

<a id="l00064" name="l00064"></a>[ 64](classansys_1_1_cff_location_model.xhtml) class ANSYS_FLUIDS_CFFINTERFACE_DLL [CffLocationModel](classansys_1_1_cff_location_model.xhtml) {

<a id="l00065" name="l00065"></a> 65 public:

<a id="l00066" name="l00066"></a> 66 [CffLocationModel](classansys_1_1_cff_location_model.xhtml)();

<a id="l00067" name="l00067"></a> 67 

<a id="l00068" name="l00068"></a> 68 [~CffLocationModel](classansys_1_1_cff_location_model.xhtml)();

<a id="l00069" name="l00069"></a> 69 

<a id="l00070" name="l00070"></a> 70 void getParts(PartIds&amp;) const;

<a id="l00071" name="l00071"></a> 71 bool findPart(const std::string&amp;, PartId&amp;) const;

<a id="l00072" name="l00072"></a> 72 

<a id="l00073" name="l00073"></a> 73 void clearTopology();

<a id="l00074" name="l00074"></a> 74 void createPart(Dimensionality, const std::string&amp;, PartId&amp;);

<a id="l00075" name="l00075"></a> 75 

<a id="l00076" name="l00076"></a> 76 bool getPartName(PartId, std::string&amp;) const;

<a id="l00077" name="l00077"></a> 77 bool getPartDimensionality(PartId, Dimensionality&amp;) const;

<a id="l00078" name="l00078"></a> 78 bool getPartBodies(PartId, BodyIds&amp;) const;

<a id="l00079" name="l00079"></a> 79 bool getPartFaces(PartId, FaceIds&amp;) const;

<a id="l00080" name="l00080"></a> 80 bool getPartFaceUses(PartId, FaceUseIds&amp;) const;

<a id="l00081" name="l00081"></a> 81 bool getPartComposites(PartId, CompositeIds&amp;) const;

<a id="l00082" name="l00082"></a> 82 

<a id="l00083" name="l00083"></a> 83 bool findBody(PartId, const std::string&amp;, BodyId&amp;) const;

<a id="l00084" name="l00084"></a> 84 bool findFace(PartId, const std::string&amp;, FaceId&amp;) const;

<a id="l00085" name="l00085"></a> 85 bool findFaceUse(PartId, const std::string&amp;, FaceUseId&amp;) const;

<a id="l00086" name="l00086"></a> 86 bool findComposite(PartId, const std::string&amp;, CompositeId&amp;) const;

<a id="l00087" name="l00087"></a> 87 

<a id="l00088" name="l00088"></a> 88 bool createBody(PartId, const std::string&amp;, BodyId&amp;);

<a id="l00089" name="l00089"></a> 89 bool createFace(PartId, const std::string&amp;, FaceId&amp;);

<a id="l00090" name="l00090"></a> 90 bool createComposite(PartId, const std::string&amp;, CompositeId&amp;);

<a id="l00091" name="l00091"></a> 91 bool setPartName(PartId, const std::string&amp;);

<a id="l00092" name="l00092"></a> 92 bool deletePart(PartId);

<a id="l00093" name="l00093"></a> 93 

<a id="l00094" name="l00094"></a> 94 bool getBodyPart(BodyId, PartId&amp;) const;

<a id="l00095" name="l00095"></a> 95 bool getBodyName(BodyId, std::string&amp;) const;

<a id="l00096" name="l00096"></a> 96 bool getBodyBoundary(BodyId, FaceUseIds&amp;) const;

<a id="l00097" name="l00097"></a> 97 bool getBodyZones(BodyId, MeshId, [ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)&amp;) const;

<a id="l00098" name="l00098"></a> 98 

<a id="l00099" name="l00099"></a> 99 bool setBodyZones(BodyId, MeshId, const [ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)&amp;);

<a id="l00100" name="l00100"></a> 100 bool setBodyName(BodyId, const std::string&amp;);

<a id="l00101" name="l00101"></a> 101 bool deleteBody(BodyId);

<a id="l00102" name="l00102"></a> 102 

<a id="l00103" name="l00103"></a> 103 bool getFacePart(FaceId, PartId&amp;) const;

<a id="l00104" name="l00104"></a> 104 bool getFaceName(FaceId, std::string&amp;) const;

<a id="l00105" name="l00105"></a> 105 bool getFaceZones(FaceId, MeshId, [ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)&amp;) const;

<a id="l00106" name="l00106"></a> 106 bool getFaceSides(FaceId, FaceUseId&amp;, FaceUseId&amp;) const;

<a id="l00107" name="l00107"></a> 107 

<a id="l00108" name="l00108"></a> 108 bool setFaceZones(FaceId, MeshId, const [ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)&amp;);

<a id="l00109" name="l00109"></a> 109 bool setFaceName(FaceId, const std::string&amp;);

<a id="l00110" name="l00110"></a> 110 bool deleteFace(FaceId);

<a id="l00111" name="l00111"></a> 111 

<a id="l00112" name="l00112"></a> 112 bool getFaceUsePart(FaceUseId, PartId&amp;) const;

<a id="l00113" name="l00113"></a> 113 bool getFaceUseDefinition(FaceUseId, BodyId&amp;, FaceId&amp;, int&amp; side) const;

<a id="l00114" name="l00114"></a> 114 bool getFaceUseName(FaceUseId, std::string&amp;) const;

<a id="l00115" name="l00115"></a> 115 bool getFaceUseRelativeName(FaceUseId, std::string&amp;) const;

<a id="l00116" name="l00116"></a> 116 bool getFaceUseZoneSides(FaceUseId, MeshId, ZoneSideIds&amp;) const;

<a id="l00117" name="l00117"></a> 117 

<a id="l00118" name="l00118"></a> 118 bool createFaceUse(BodyId, FaceId, int side, FaceUseId&amp;);

<a id="l00119" name="l00119"></a> 119 bool setFaceUseZoneSides(FaceUseId, MeshId, const ZoneSideIds&amp;);

<a id="l00120" name="l00120"></a> 120 bool setFaceUseName(FaceUseId, const std::string&amp;);

<a id="l00121" name="l00121"></a> 121 bool deleteFaceUse(FaceUseId);

<a id="l00122" name="l00122"></a> 122 

<a id="l00123" name="l00123"></a> 123 bool getCompositeComponents(CompositeId, BodyIds&amp;, FaceIds&amp;,

<a id="l00124" name="l00124"></a> 124 FaceUseIds&amp;, CompositeIds&amp;) const;

<a id="l00125" name="l00125"></a> 125 bool resolveComposite(CompositeId, BodyIds&amp;, FaceIds&amp;, FaceUseIds&amp;) const;

<a id="l00126" name="l00126"></a> 126 bool getCompositeName(CompositeId, std::string&amp;) const;

<a id="l00127" name="l00127"></a> 127 

<a id="l00128" name="l00128"></a> 128 bool setCompositeComponents(CompositeId, const BodyIds&amp;, const FaceIds&amp;,

<a id="l00129" name="l00129"></a> 129 const FaceUseIds&amp;, const CompositeIds&amp;);

<a id="l00130" name="l00130"></a> 130 bool setCompositeName(CompositeId, const std::string&amp;);

<a id="l00131" name="l00131"></a> 131 bool deleteComposite(CompositeId);

<a id="l00132" name="l00132"></a> 132 

<a id="l00133" name="l00133"></a> 133 bool resolveLocation(const std::vector&lt;std::string&gt;&amp; locationNames,

<a id="l00134" name="l00134"></a> 134 PartId partId,

<a id="l00135" name="l00135"></a> 135 MeshId meshId,

<a id="l00136" name="l00136"></a> 136 [ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)&amp; cellZones,

<a id="l00137" name="l00137"></a> 137 ZoneSideIds&amp; faceZoneSides) const;

<a id="l00138" name="l00138"></a> 138 

<a id="l00139" name="l00139"></a> 139 bool resolveLocation(const std::string&amp; locationString,

<a id="l00140" name="l00140"></a> 140 PartId partId,

<a id="l00141" name="l00141"></a> 141 MeshId meshId,

<a id="l00142" name="l00142"></a> 142 [ZoneIds](group__typedefs.xhtml#ga93b257990d79f628e301fb5e39125cfa)&amp; cellZones,

<a id="l00143" name="l00143"></a> 143 ZoneSideIds&amp; faceZoneSides) const;

<a id="l00144" name="l00144"></a> 144 

<a id="l00145" name="l00145"></a> 145 std::string state() const;

<a id="l00146" name="l00146"></a> 146 void reset(const std::string&amp; state);

<a id="l00147" name="l00147"></a> 147 

<a id="l00148" name="l00148"></a> 148 private:

<a id="l00149" name="l00149"></a> 149 

<a id="l00150" name="l00150"></a> 150 std::unique_ptr&lt;LocationModelData&gt; _model;

<a id="l00151" name="l00151"></a> 151 };

<a id="l00152" name="l00152"></a> 152 

<a id="l00153" name="l00153"></a> 153} // namespace ansys

<a id="l00154" name="l00154"></a> 154 

<a id="l00155" name="l00155"></a> 155\#if defined(\_WIN32)

<a id="l00156" name="l00156"></a> 156\#pragma warning(pop)

<a id="l00157" name="l00157"></a> 157\#endif

<a id="l00158" name="l00158"></a> 158 

<a id="l00159" name="l00159"></a> 159\#endif // CFFSDK\_CFFINTERFACE\_LOCATIONMODEL\_HPP\_

[ansys::CffLocationModel](classansys_1_1_cff_location_model.xhtml)

A Topology model providing user visible topological names.

**Definition:** CffLocationModel.hpp:64



[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



[CffMeshIdType](group__typedefs.xhtml#ga9be1a8a186916d6989ca9cb5478f7e0a)

int CffMeshIdType

Type of a variable used to represent the identifier of a mesh.

**Definition:** CffTypes.h:663



[ansys](namespaceansys.xhtml)

**Definition:** API.dox:1