    

 ## On this page

  

 

 # ansys::Project::SimBase Class Reference

 Last update: 24.03.2026 

Base class for [Run](classansys_1_1_project_1_1_run.xhtml "Subfolder of a Simulation, regrouping Output/Result for a step.") and [Simulation](classansys_1_1_project_1_1_simulation.xhtml "Subfolder of a Project, regrouping input files and Run subfolders.") - shared functions. [More...](classansys_1_1_project_1_1_sim_base.xhtml#details)

`#include "SimBase.hpp"`

Inheritance diagram for ansys::Project::SimBase:

 ![](/sites/default/files/migrate-content/common_fluids_format_2026_r1_1/classansys_1_1_project_1_1_sim_base.png)



## <a id="pub-methods" name="pub-methods"></a>Public Member Functions

bool [ok](classansys_1_1_project_1_1_sim_base.xhtml#a006186f7ee51c0d5548bd6cad367b032) () const virtual [Error](classansys_1_1_project_1_1_error.xhtml) [isValid](classansys_1_1_project_1_1_sim_base.xhtml#a3c713318a297544df6164b21df42454d) () const =0 std::string [getName](classansys_1_1_project_1_1_sim_base.xhtml#a8aef8314dfc33a8d25e3963fa3fd07ba) () const Returns the object name in the project. [More...](classansys_1_1_project_1_1_sim_base.xhtml#a8aef8314dfc33a8d25e3963fa3fd07ba)  
 virtual [Iterator](classansys_1_1_project_1_1_iterator.xhtml) [getCase](classansys_1_1_project_1_1_sim_base.xhtml#a1fb985412b84a850718aa3aae6e03147) () const Returns the case file associated with this folder. [More...](classansys_1_1_project_1_1_sim_base.xhtml#a1fb985412b84a850718aa3aae6e03147)  
 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) [setCase](classansys_1_1_project_1_1_sim_base.xhtml#a2312d3c69d5f32a7c76bc567c942e945) ([Iterator](classansys_1_1_project_1_1_iterator.xhtml) pCaseFile) Set the case file associated with this item. [More...](classansys_1_1_project_1_1_sim_base.xhtml#a2312d3c69d5f32a7c76bc567c942e945)  
 void [setMainDataType](classansys_1_1_project_1_1_sim_base.xhtml#ac44fe199d4f2c2c7aa8be5d22353740a) (const std::string &amp;pDataType) Set the result type expected as default output for runs. [More...](classansys_1_1_project_1_1_sim_base.xhtml#ac44fe199d4f2c2c7aa8be5d22353740a)  
 std::string [getMainDataType](classansys_1_1_project_1_1_sim_base.xhtml#a743bc36e30200c87603dedaafe1d969d) () const Returns the result type expected as default output for runs (see: [setMainDataType()](classansys_1_1_project_1_1_sim_base.xhtml#ac44fe199d4f2c2c7aa8be5d22353740a "Set the result type expected as default output for runs.") ) [More...](classansys_1_1_project_1_1_sim_base.xhtml#a743bc36e30200c87603dedaafe1d969d)  
 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) [copyInput](classansys_1_1_project_1_1_sim_base.xhtml#aeb5ffe7267a10b465dc8c2c825195074) ([Path](classansys_1_1_project_1_1_path.xhtml) pPath, bool pInInputFolder=false) Copy the specified project file into the current folder. [More...](classansys_1_1_project_1_1_sim_base.xhtml#aeb5ffe7267a10b465dc8c2c825195074)  
 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) [setInput](classansys_1_1_project_1_1_sim_base.xhtml#a0b6fee750eeb02e8068640758c6d8b0d) ([Path](classansys_1_1_project_1_1_path.xhtml) pPath) Register a files as Input/ to this folder. [More...](classansys_1_1_project_1_1_sim_base.xhtml#a0b6fee750eeb02e8068640758c6d8b0d)  
 std::vector&lt; [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &gt; [getInputs](classansys_1_1_project_1_1_sim_base.xhtml#a2d532a01d1f99cb76ec85e8f4908d932) ([Error](classansys_1_1_project_1_1_error.xhtml) \*pErrorPtr=0) const Return the list of registered inputs for this simulation. [More...](classansys_1_1_project_1_1_sim_base.xhtml#a2d532a01d1f99cb76ec85e8f4908d932)  
 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) [getInputByType](classansys_1_1_project_1_1_sim_base.xhtml#a7eb8d0c48e61b171014c593fb63e85c6) (const std::string &amp;pType, std::string pSubtype="") const Search for a -single- input of the specified type (and optionally, subtype) [More...](classansys_1_1_project_1_1_sim_base.xhtml#a7eb8d0c48e61b171014c593fb63e85c6)  
 std::vector&lt; [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &gt; [getInputsByType](classansys_1_1_project_1_1_sim_base.xhtml#abc3d5315d8f3a3cff217c2112b4581a1) (const std::string &amp;pType, std::string pSubtype="", [Error](classansys_1_1_project_1_1_error.xhtml) \*pErrorPtr=0) const Search for one or multiple input of the specified type (and optionally, subtype) [More...](classansys_1_1_project_1_1_sim_base.xhtml#abc3d5315d8f3a3cff217c2112b4581a1)  
 [Metadata](classansys_1_1_project_1_1_metadata.xhtml) &amp; [getMeta](classansys_1_1_project_1_1_sim_base.xhtml#a067d578e43cf6085623921adb816d5f4) () Access the [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.") [Metadata](classansys_1_1_project_1_1_metadata.xhtml "Dictionary of values associated with an Iterator."), equivalent to [getIterator()](classansys_1_1_project_1_1_sim_base.xhtml#a16f3c24244ab0ec6587d945785c7718d "Access the Iterator for this item.").[getMeta()](classansys_1_1_project_1_1_sim_base.xhtml#a067d578e43cf6085623921adb816d5f4 "Access the Iterator Metadata, equivalent to getIterator().getMeta()") [More...](classansys_1_1_project_1_1_sim_base.xhtml#a067d578e43cf6085623921adb816d5f4)  
 const [Metadata](classansys_1_1_project_1_1_metadata.xhtml) &amp; [getMeta](classansys_1_1_project_1_1_sim_base.xhtml#af6e6bd9bee7a4fe152ff2ac2f51ad8c9) () const Access the [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.") [Metadata](classansys_1_1_project_1_1_metadata.xhtml "Dictionary of values associated with an Iterator."), equivalent to [getIterator()](classansys_1_1_project_1_1_sim_base.xhtml#a16f3c24244ab0ec6587d945785c7718d "Access the Iterator for this item.").[getMeta()](classansys_1_1_project_1_1_sim_base.xhtml#a067d578e43cf6085623921adb816d5f4 "Access the Iterator Metadata, equivalent to getIterator().getMeta()") [More...](classansys_1_1_project_1_1_sim_base.xhtml#af6e6bd9bee7a4fe152ff2ac2f51ad8c9)  
 virtual [Iterator](classansys_1_1_project_1_1_iterator.xhtml) [getIterator](classansys_1_1_project_1_1_sim_base.xhtml#a16f3c24244ab0ec6587d945785c7718d) () const Access the [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.") for this item. [More...](classansys_1_1_project_1_1_sim_base.xhtml#a16f3c24244ab0ec6587d945785c7718d)  
  [operator Iterator](classansys_1_1_project_1_1_sim_base.xhtml#a0625d859da2633b26505821aaf569602) () const ## <a id="pro-methods" name="pro-methods"></a>Protected Member Functions

 [SimBase](classansys_1_1_project_1_1_sim_base.xhtml#a818fb26085d036e187d4363696c37804) ([Iterator](classansys_1_1_project_1_1_iterator.xhtml) pIter) virtual [~SimBase](classansys_1_1_project_1_1_sim_base.xhtml#a5f50eff2ae40bad165b140399d9143e1) () [Error](classansys_1_1_project_1_1_error.xhtml) [copyDatafileMeta](classansys_1_1_project_1_1_sim_base.xhtml#a511aa7d1e5b9a422a7bec1812b1b2851) (const [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &amp;pInput, [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &amp;pOutput) ## <a id="pro-attribs" name="pro-attribs"></a>Protected Attributes

[Iterator](classansys_1_1_project_1_1_iterator.xhtml) [aIter](classansys_1_1_project_1_1_sim_base.xhtml#ae97b15e35c30f6eda557fc6dfaec2b5f) <a id="details" name="details"></a>## Detailed Description

Base class for [Run](classansys_1_1_project_1_1_run.xhtml "Subfolder of a Simulation, regrouping Output/Result for a step.") and [Simulation](classansys_1_1_project_1_1_simulation.xhtml "Subfolder of a Project, regrouping input files and Run subfolders.") - shared functions.

Not to be used directly, use [Run](classansys_1_1_project_1_1_run.xhtml "Subfolder of a Simulation, regrouping Output/Result for a step.") and [Simulation](classansys_1_1_project_1_1_simulation.xhtml "Subfolder of a Project, regrouping input files and Run subfolders.").



## Constructor &amp; Destructor Documentation

<a id="a818fb26085d036e187d4363696c37804" name="a818fb26085d036e187d4363696c37804"></a>## [◆ ](#a818fb26085d036e187d4363696c37804)SimBase()

 ansys::Project::SimBase::SimBase  ( [Iterator](classansys_1_1_project_1_1_iterator.xhtml)  *pIter*)   protected 





<a id="a5f50eff2ae40bad165b140399d9143e1" name="a5f50eff2ae40bad165b140399d9143e1"></a>## [◆ ](#a5f50eff2ae40bad165b140399d9143e1)~SimBase()

 virtual ansys::Project::SimBase::~SimBase  ( )   inlineprotectedvirtual 





## Member Function Documentation

<a id="a511aa7d1e5b9a422a7bec1812b1b2851" name="a511aa7d1e5b9a422a7bec1812b1b2851"></a>## [◆ ](#a511aa7d1e5b9a422a7bec1812b1b2851)copyDatafileMeta()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::SimBase::copyDatafileMeta  ( const [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &amp;  *pInput*,    [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &amp;  *pOutput*   )   protected 





<a id="aeb5ffe7267a10b465dc8c2c825195074" name="aeb5ffe7267a10b465dc8c2c825195074"></a>## [◆ ](#aeb5ffe7267a10b465dc8c2c825195074)copyInput()

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::SimBase::copyInput  ( [Path](classansys_1_1_project_1_1_path.xhtml)  *pPath*,    bool  *pInInputFolder* = `false`   ) 

Copy the specified project file into the current folder.

Parameters pPathThe project path (global or relative) to the target pInInputFolderThe file will be copied to the Input/ subfolder 



<a id="a1fb985412b84a850718aa3aae6e03147" name="a1fb985412b84a850718aa3aae6e03147"></a>## [◆ ](#a1fb985412b84a850718aa3aae6e03147)getCase()

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::SimBase::getCase  ( )  const  virtual 

Returns the case file associated with this folder.

Reimplemented in [ansys::Project::Run](classansys_1_1_project_1_1_run.xhtml#afe453b6378308de553307d3f8ee7c097).





<a id="a7eb8d0c48e61b171014c593fb63e85c6" name="a7eb8d0c48e61b171014c593fb63e85c6"></a>## [◆ ](#a7eb8d0c48e61b171014c593fb63e85c6)getInputByType()

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::SimBase::getInputByType  ( const std::string &amp;  *pType*,    std::string  *pSubtype* = `""`   )  const

Search for a -single- input of the specified type (and optionally, subtype)

If no such input exist, the null iterator is returned. If there are multiple matches, or lead to a broken link, an invalid iterator (with error message) is returned. A link input is resolved to the target iterator





<a id="a2d532a01d1f99cb76ec85e8f4908d932" name="a2d532a01d1f99cb76ec85e8f4908d932"></a>## [◆ ](#a2d532a01d1f99cb76ec85e8f4908d932)getInputs()

 std::vector&lt; [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &gt; ansys::Project::SimBase::getInputs  ( [Error](classansys_1_1_project_1_1_error.xhtml) \*  *pErrorPtr* = `0`)  const

Return the list of registered inputs for this simulation.

Inputs are items in the Input/ subfolder, which are either a file with DataType property, or a link to a file in the project named with the DataType property name





<a id="abc3d5315d8f3a3cff217c2112b4581a1" name="abc3d5315d8f3a3cff217c2112b4581a1"></a>## [◆ ](#abc3d5315d8f3a3cff217c2112b4581a1)getInputsByType()

 std::vector&lt; [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &gt; ansys::Project::SimBase::getInputsByType  ( const std::string &amp;  *pType*,    std::string  *pSubtype* = `""`,    [Error](classansys_1_1_project_1_1_error.xhtml) \*  *pErrorPtr* = `0`   )  const

Search for one or multiple input of the specified type (and optionally, subtype)

If no such input exist, empty vector is returned The list of items found is returned If any match lead to a broken input link, and the error argument is provided it will be updated with the list of errors. Erroneous items are not included in the return vector. A link input is resolved to the target iterator





<a id="a16f3c24244ab0ec6587d945785c7718d" name="a16f3c24244ab0ec6587d945785c7718d"></a>## [◆ ](#a16f3c24244ab0ec6587d945785c7718d)getIterator()

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::SimBase::getIterator  ( )  const  virtual 

Access the [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.") for this item.

Reimplemented in [ansys::Project::Run](classansys_1_1_project_1_1_run.xhtml#a6b797638d34347e6801b88c0e69e05ce), and [ansys::Project::RunGroup](classansys_1_1_project_1_1_run_group.xhtml#a6b797638d34347e6801b88c0e69e05ce).





<a id="a743bc36e30200c87603dedaafe1d969d" name="a743bc36e30200c87603dedaafe1d969d"></a>## [◆ ](#a743bc36e30200c87603dedaafe1d969d)getMainDataType()

 std::string ansys::Project::SimBase::getMainDataType  ( )  const

Returns the result type expected as default output for runs (see: [setMainDataType()](classansys_1_1_project_1_1_sim_base.xhtml#ac44fe199d4f2c2c7aa8be5d22353740a "Set the result type expected as default output for runs.") )





<a id="a067d578e43cf6085623921adb816d5f4" name="a067d578e43cf6085623921adb816d5f4"></a>## [◆ ](#a067d578e43cf6085623921adb816d5f4)getMeta() \[1/2\]

 [Metadata](classansys_1_1_project_1_1_metadata.xhtml) &amp; ansys::Project::SimBase::getMeta  ( ) 

Access the [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.") [Metadata](classansys_1_1_project_1_1_metadata.xhtml "Dictionary of values associated with an Iterator."), equivalent to [getIterator()](classansys_1_1_project_1_1_sim_base.xhtml#a16f3c24244ab0ec6587d945785c7718d "Access the Iterator for this item.").[getMeta()](classansys_1_1_project_1_1_sim_base.xhtml#a067d578e43cf6085623921adb816d5f4 "Access the Iterator Metadata, equivalent to getIterator().getMeta()")





<a id="af6e6bd9bee7a4fe152ff2ac2f51ad8c9" name="af6e6bd9bee7a4fe152ff2ac2f51ad8c9"></a>## [◆ ](#af6e6bd9bee7a4fe152ff2ac2f51ad8c9)getMeta() \[2/2\]

 const [Metadata](classansys_1_1_project_1_1_metadata.xhtml) &amp; ansys::Project::SimBase::getMeta  ( )  const

Access the [Iterator](classansys_1_1_project_1_1_iterator.xhtml "Pointer to a project location.") [Metadata](classansys_1_1_project_1_1_metadata.xhtml "Dictionary of values associated with an Iterator."), equivalent to [getIterator()](classansys_1_1_project_1_1_sim_base.xhtml#a16f3c24244ab0ec6587d945785c7718d "Access the Iterator for this item.").[getMeta()](classansys_1_1_project_1_1_sim_base.xhtml#a067d578e43cf6085623921adb816d5f4 "Access the Iterator Metadata, equivalent to getIterator().getMeta()")





<a id="a8aef8314dfc33a8d25e3963fa3fd07ba" name="a8aef8314dfc33a8d25e3963fa3fd07ba"></a>## [◆ ](#a8aef8314dfc33a8d25e3963fa3fd07ba)getName()

 std::string ansys::Project::SimBase::getName  ( )  const

Returns the object name in the project.





<a id="a3c713318a297544df6164b21df42454d" name="a3c713318a297544df6164b21df42454d"></a>## [◆ ](#a3c713318a297544df6164b21df42454d)isValid()

 virtual [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::SimBase::isValid  ( )  const  pure virtual 

Implemented in [ansys::Project::Run](classansys_1_1_project_1_1_run.xhtml#a50461d0ef3487601fd73f740cee85348), [ansys::Project::RunGroup](classansys_1_1_project_1_1_run_group.xhtml#a3e9c11403f6ecd0abfeee7e05706631c), and [ansys::Project::Simulation](classansys_1_1_project_1_1_simulation.xhtml#ab8c7167e09e88042db12724531150af7).





<a id="a006186f7ee51c0d5548bd6cad367b032" name="a006186f7ee51c0d5548bd6cad367b032"></a>## [◆ ](#a006186f7ee51c0d5548bd6cad367b032)ok()

 bool ansys::Project::SimBase::ok  ( )  const





<a id="a0625d859da2633b26505821aaf569602" name="a0625d859da2633b26505821aaf569602"></a>## [◆ ](#a0625d859da2633b26505821aaf569602)operator Iterator()

 ansys::Project::SimBase::operator [Iterator](classansys_1_1_project_1_1_iterator.xhtml)  ( )  const  inline 





<a id="a2312d3c69d5f32a7c76bc567c942e945" name="a2312d3c69d5f32a7c76bc567c942e945"></a>## [◆ ](#a2312d3c69d5f32a7c76bc567c942e945)setCase()

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::SimBase::setCase  ( [Iterator](classansys_1_1_project_1_1_iterator.xhtml)  *pCaseFile*) 

Set the case file associated with this item.

The case file is registered as an Input, and stored in a Input/ subfolder (hidden, project only) see [setInput()](classansys_1_1_project_1_1_sim_base.xhtml#a0b6fee750eeb02e8068640758c6d8b0d "Register a files as Input/ to this folder.")





<a id="a0b6fee750eeb02e8068640758c6d8b0d" name="a0b6fee750eeb02e8068640758c6d8b0d"></a>## [◆ ](#a0b6fee750eeb02e8068640758c6d8b0d)setInput()

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::SimBase::setInput  ( [Path](classansys_1_1_project_1_1_path.xhtml)  *pPath*) 

Register a files as Input/ to this folder.

The inputs are links stored in the hidden subfolder Input/ For example, in a [Simulation](classansys_1_1_project_1_1_simulation.xhtml "Subfolder of a Project, regrouping input files and Run subfolders.") the "current" case file can be stored as input, then once a [Run](classansys_1_1_project_1_1_run.xhtml "Subfolder of a Simulation, regrouping Output/Result for a step.") is created, the case file is registered in the [Run](classansys_1_1_project_1_1_run.xhtml "Subfolder of a Simulation, regrouping Output/Result for a step.") itself. If the current case file is changed, each previous [Run](classansys_1_1_project_1_1_run.xhtml "Subfolder of a Simulation, regrouping Output/Result for a step.") still has a link to the specific case file which was used for them.

Parameters pPathThe project path (global or relative) to the target 



<a id="ac44fe199d4f2c2c7aa8be5d22353740a" name="ac44fe199d4f2c2c7aa8be5d22353740a"></a>## [◆ ](#ac44fe199d4f2c2c7aa8be5d22353740a)setMainDataType()

 void ansys::Project::SimBase::setMainDataType  ( const std::string &amp;  *pDataType*) 

Set the result type expected as default output for runs.

The main data type is used to get the 'default' output file from a run with multiple data types registered. If this is defined, it will dictate the automatic behavior of [Output::getData()](classansys_1_1_project_1_1_output.xhtml#afec1dc4d84b3faaba2a23724a632e1f8 "Returns the main data file for this Output.")





## Member Data Documentation

<a id="ae97b15e35c30f6eda557fc6dfaec2b5f" name="ae97b15e35c30f6eda557fc6dfaec2b5f"></a>## [◆ ](#ae97b15e35c30f6eda557fc6dfaec2b5f)aIter

 [Iterator](classansys_1_1_project_1_1_iterator.xhtml) ansys::Project::SimBase::aIter  protected