    

 ## On this page

  

 

 # Simulation

 Last update: 16.07.2025 

<a id="l00001" name="l00001"></a> 1\#ifndef CFFSDK\_PROJECT\_SIMULATION\_H

<a id="l00002" name="l00002"></a> 2\#define CFFSDK\_PROJECT\_SIMULATION\_H

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

<a id="l00004" name="l00004"></a> 4\#include "Project/LibraryType.hpp"

<a id="l00005" name="l00005"></a> 5\#include "Project/Iterator.hpp"

<a id="l00006" name="l00006"></a> 6\#include "Project/Run.hpp"

<a id="l00007" name="l00007"></a> 7\#include "Project/RunGroup.hpp"

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

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

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

<a id="l00011" name="l00011"></a> 11namespace Project {

<a id="l00012" name="l00012"></a> 12 

<a id="l00013" name="l00013"></a> 13class Metadata;

<a id="l00014" name="l00014"></a> 14 

<a id="l00015" name="l00015"></a>[ 15](classansys_1_1_project_1_1_simulation.xhtml)class ANSYS_PROJECT_DLL [Simulation](classansys_1_1_project_1_1_simulation.xhtml) : public [SimBase](classansys_1_1_project_1_1_sim_base.xhtml)

<a id="l00016" name="l00016"></a> 16{

<a id="l00017" name="l00017"></a> 17public:

<a id="l00018" name="l00018"></a> 18 [Simulation](classansys_1_1_project_1_1_simulation.xhtml)([Iterator](classansys_1_1_project_1_1_iterator.xhtml) pIter);

<a id="l00019" name="l00019"></a> 19 virtual [~Simulation](classansys_1_1_project_1_1_simulation.xhtml)() {};

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

<a id="l00021" name="l00021"></a> 21 virtual [Error](classansys_1_1_project_1_1_error.xhtml) isValid() const;

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

<a id="l00023" name="l00023"></a> 23 // SimBase implements: ok, getName, Meta, Input functions

<a id="l00024" name="l00024"></a> 24 // getCase, setMainDataType

<a id="l00025" name="l00025"></a> 25 

<a id="l00026" name="l00026"></a> 26 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) getData();

<a id="l00027" name="l00027"></a> 27 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) getResult(const std::string&amp; pDataType);

<a id="l00028" name="l00028"></a> 28 

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

<a id="l00030" name="l00030"></a> 30 [Run](classansys_1_1_project_1_1_run.xhtml) newRun(std::string pName,Run::RunOutputType pType);

<a id="l00031" name="l00031"></a> 31 [Run](classansys_1_1_project_1_1_run.xhtml) newRunInFolder(std::string pName,Run::RunOutputType pType,[Iterator](classansys_1_1_project_1_1_iterator.xhtml) pFolder);

<a id="l00032" name="l00032"></a> 32 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) getRun(const std::string&amp; pName) const;

<a id="l00033" name="l00033"></a> 33 std::vector&lt;std::string&gt; getRuns() const;

<a id="l00034" name="l00034"></a> 34 [Error](classansys_1_1_project_1_1_error.xhtml) removeRun(const std::string&amp; pName,bool pFlagErase);

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

<a id="l00036" name="l00036"></a> 36 // Run Group

<a id="l00037" name="l00037"></a> 37 [RunGroup](classansys_1_1_project_1_1_run_group.xhtml) newRunGroup(std::string pName,Run::RunOutputType pType);

<a id="l00038" name="l00038"></a> 38 [RunGroup](classansys_1_1_project_1_1_run_group.xhtml) getRunGroup(const std::string&amp; pName) const;

<a id="l00039" name="l00039"></a> 39 std::vector&lt;std::string&gt; getRunGroups() const;

<a id="l00040" name="l00040"></a> 40 [Error](classansys_1_1_project_1_1_error.xhtml) removeRunGroup(const std::string&amp; pName,bool pFlagEraseRuns);

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

<a id="l00042" name="l00042"></a> 42 void newLink(const std::string pKey,

<a id="l00043" name="l00043"></a> 43 const [Iterator](classansys_1_1_project_1_1_iterator.xhtml)&amp; pIter);

<a id="l00044" name="l00044"></a> 44 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) getLink(const std::string pKey);

<a id="l00045" name="l00045"></a> 45 bool hasLink(const std::string pKey);

<a id="l00046" name="l00046"></a> 46 

<a id="l00047" name="l00047"></a> 47 static bool isSimulation(const [Iterator](classansys_1_1_project_1_1_iterator.xhtml)&amp; pIter);

<a id="l00048" name="l00048"></a> 48 

<a id="l00049" name="l00049"></a> 49 void setCurrentRun([Iterator](classansys_1_1_project_1_1_iterator.xhtml) pRun);

<a id="l00050" name="l00050"></a> 50 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) getCurrentRun() const;

<a id="l00051" name="l00051"></a> 51protected:

<a id="l00052" name="l00052"></a> 52 std::vector&lt;std::string&gt; getListOfSubclass(const std::string&amp; pSubclass) const;

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

<a id="l00054" name="l00054"></a> 54 

<a id="l00055" name="l00055"></a> 55}

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

<a id="l00057" name="l00057"></a> 57 

<a id="l00058" name="l00058"></a> 58\#endif // CFFSDK\_PROJECT\_SIMULATION\_H

[ansys::Project::Error](classansys_1_1_project_1_1_error.xhtml)

The return state / error value of a Project function call.

**Definition:** Error.hpp:11



[ansys::Project::Iterator](classansys_1_1_project_1_1_iterator.xhtml)

Pointer to a project location.

**Definition:** Iterator.hpp:20



[ansys::Project::RunGroup](classansys_1_1_project_1_1_run_group.xhtml)

Optional concept - Virtual folder with a list of Run.

**Definition:** RunGroup.hpp:17



[ansys::Project::Run](classansys_1_1_project_1_1_run.xhtml)

Subfolder of a Simulation, regrouping Output/Result for a step.

**Definition:** Run.hpp:18



[ansys::Project::SimBase](classansys_1_1_project_1_1_sim_base.xhtml)

Base class for Run and Simulation - shared functions.

**Definition:** SimBase.hpp:13



[ansys::Project::Simulation](classansys_1_1_project_1_1_simulation.xhtml)

Subfolder of a Project, regrouping input files and Run subfolders.

**Definition:** Simulation.hpp:16



[ansys](namespaceansys.xhtml)

**Definition:** API.dox:1