    

 ## On this page

  

 

 # ansys::Project::RunGroup Class Reference

 Last update: 16.07.2025 

Optional concept - Virtual folder with a list of [Run](classansys_1_1_project_1_1_run.xhtml "Subfolder of a Simulation, regrouping Output/Result for a step."). [More...](classansys_1_1_project_1_1_run_group.xhtml#details)

`#include "RunGroup.hpp"`

Inheritance diagram for ansys::Project::RunGroup:

 ![](/sites/default/files/migrate-content/common_fluids_format_2024_r2/classansys_1_1_project_1_1_run_group.png)



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

<a id="a3e9c11403f6ecd0abfeee7e05706631c" name="a3e9c11403f6ecd0abfeee7e05706631c"></a>virtual [Error](classansys_1_1_project_1_1_error.xhtml) **isValid** () const Returns error with message if invalid.   
 virtual bool [setRunOutputType](classansys_1_1_project_1_1_run_group.xhtml#aff79c14360fd61663d209ea8bd6f0e05) (Run::RunOutputType pType) Set the run output type, will add automatically the mandatory variables (if any) [More...](classansys_1_1_project_1_1_run_group.xhtml#aff79c14360fd61663d209ea8bd6f0e05)  
 [Error](classansys_1_1_project_1_1_error.xhtml) [addRun](classansys_1_1_project_1_1_run_group.xhtml#a2f0eda313925457b7e3362530169e5ac) ([Iterator](classansys_1_1_project_1_1_iterator.xhtml) pRun) Register a [Run](classansys_1_1_project_1_1_run.xhtml "Subfolder of a Simulation, regrouping Output/Result for a step.") in the [RunGroup](classansys_1_1_project_1_1_run_group.xhtml "Optional concept - Virtual folder with a list of Run."). [More...](classansys_1_1_project_1_1_run_group.xhtml#a2f0eda313925457b7e3362530169e5ac)  
 <a id="a622a0d105333fa6403d6713b559e927d" name="a622a0d105333fa6403d6713b559e927d"></a>std::vector&lt; [Iterator](classansys_1_1_project_1_1_iterator.xhtml) &gt; **getRuns** () const Returns the list of runs for this [RunGroup](classansys_1_1_project_1_1_run_group.xhtml "Optional concept - Virtual folder with a list of Run.").   
 bool [addVariable](classansys_1_1_project_1_1_run_group.xhtml#ab4e9f4d0c7f6e9747451330dc698c5bc) (const std::string &amp;pVar) Register an input variable for this run. [More...](classansys_1_1_project_1_1_run_group.xhtml#ab4e9f4d0c7f6e9747451330dc698c5bc)  
 bool [setVariables](classansys_1_1_project_1_1_run_group.xhtml#a2e8493f21a92ce378d4bce82d0cb7b3f) (const std::vector&lt; std::string &gt; &amp;pVars) Set/replace the list of variables for this run. [More...](classansys_1_1_project_1_1_run_group.xhtml#a2e8493f21a92ce378d4bce82d0cb7b3f)  
 bool [removeVariable](classansys_1_1_project_1_1_run_group.xhtml#a54114201475287073e786d77e3718383) (const std::string &amp;pVar) Remove a variable from the list of inputs. [More...](classansys_1_1_project_1_1_run_group.xhtml#a54114201475287073e786d77e3718383)  
 <a id="aebee6c00a322bbcccc5659453699d929" name="aebee6c00a322bbcccc5659453699d929"></a>std::vector&lt; std::string &gt; **getVariables** () const Return the list of input variables for this [Run](classansys_1_1_project_1_1_run.xhtml "Subfolder of a Simulation, regrouping Output/Result for a step.").   
 bool [addOutputVariable](classansys_1_1_project_1_1_run_group.xhtml#aa84a2103fc117a256bab7cce5fef9780) (const std::string &amp;pVar) Register an output variable for this run. [More...](classansys_1_1_project_1_1_run_group.xhtml#aa84a2103fc117a256bab7cce5fef9780)  
 <a id="a1593a20a772c53baf1af273ab63f0a53" name="a1593a20a772c53baf1af273ab63f0a53"></a>bool **setOutputVariables** (const std::vector&lt; std::string &gt; &amp;pVars) Set/replace the list of output variables.   
 <a id="ae3d5f185d577c43e2ed2721f18212c35" name="ae3d5f185d577c43e2ed2721f18212c35"></a>bool **removeOutputVariable** (const std::string &amp;pVar) Remove an output variable.   
 <a id="aa85ce4557dbb6edd648e2e4d68c60ab6" name="aa85ce4557dbb6edd648e2e4d68c60ab6"></a>std::vector&lt; std::string &gt; **getOutputVariables** () const Returns the list of output variables.   
 <a id="ae5c21c8fb9320c241809e969717c4360" name="ae5c21c8fb9320c241809e969717c4360"></a>std::vector&lt; std::string &gt; **getAllVariables** () const Returns the list of all variables ( input and output )   
 <a id="a8ba482e260f6846c1a59cd8848341601" name="a8ba482e260f6846c1a59cd8848341601"></a>void **addVarIndex** () Add the Index variable (not required if mandatory for the run type)   
 <a id="a03c7998829a5b7f7fe8be10be1474e7c" name="a03c7998829a5b7f7fe8be10be1474e7c"></a>void **addVarTime** () Add the Time variable (not required if mandatory for the run type)   
 <a id="a322c24066e5f30512865a58bd7b01c43" name="a322c24066e5f30512865a58bd7b01c43"></a>void **addVarSolverIteration** () Add the SolverIteration variable (not required if mandatory for the run type)   
 <a id="a518fcda2b9be5b8c2278981784e0f574" name="a518fcda2b9be5b8c2278981784e0f574"></a>void **addVarCrankAngle** () Add the built-in variable.   
 <a id="ac89b098f5fe66841a9b538617e7b3f87" name="ac89b098f5fe66841a9b538617e7b3f87"></a>void **addVarMeshId** () Add the MeshId variable - Id should be incremented when the mesh has changed.   
 <a id="af1b52a763e5fc10f7ad5f350767ae945" name="af1b52a763e5fc10f7ad5f350767ae945"></a>void **addVarDomainTransformationId** () Add the DomainTransformationId variable - Id should be incremented when the mesh transformation metadata has changed.   
 <a id="ab2c162b2db99da7a0ae0a33f34fc4ad9" name="ab2c162b2db99da7a0ae0a33f34fc4ad9"></a>void **addVarPhysicsId** () Add the PhysicsId variable - Id should be incremented when the physics settings have changed.   
 <a id="a5bf38019a16ca06c2fc3500e5c9fe0a5" name="a5bf38019a16ca06c2fc3500e5c9fe0a5"></a>void **addVarTopologyId** () Add the TopologyId variable - Id should be incremented when the topology (list of boundaries, domains) has changed.   
 <a id="a32464d38b59f71688e99b311de6ce564" name="a32464d38b59f71688e99b311de6ce564"></a>void **addVarCoordinatesId** () Add the CoordinatesId variable - Id should be incremented when the node locations of a mesh have changed.   
 <a id="a376c18baaecfbce85fa4e637e71c0e5b" name="a376c18baaecfbce85fa4e637e71c0e5b"></a>void **addVarConnectivityId** () Add the ConnectivityId variable - Id should be incremented when the cells of a mesh are changed (number changed, connectivity changed, ...)   
 <a id="a1a825e5d408a51ac0ad6ee804e2e411e" name="a1a825e5d408a51ac0ad6ee804e2e411e"></a>void **addVarCaseId** () Add the CaseId variable - Id is incremented when the case settings are changed.   
 void [addVarInputSettingsId](classansys_1_1_project_1_1_run_group.xhtml#ad1cb2f559eef2c4960300dc23eb06d14) () Add the InputSettings variable - Id is incremented when the input case settings are changed. [More...](classansys_1_1_project_1_1_run_group.xhtml#ad1cb2f559eef2c4960300dc23eb06d14)  
 <a id="aebad5a9f951bc07891bef662aed6ada1" name="aebad5a9f951bc07891bef662aed6ada1"></a>void **addVarOutputSettingsId** () Add the OutputSettings variable - Id is incremented when the case output settings are changed.   
 void [setRunStatus](classansys_1_1_project_1_1_run_group.xhtml#ae14a2fd242ce9515baba2542a12fe493) (RunStatus pStatus) Set the RunStatus state for this [Run](classansys_1_1_project_1_1_run.xhtml "Subfolder of a Simulation, regrouping Output/Result for a step."). [More...](classansys_1_1_project_1_1_run_group.xhtml#ae14a2fd242ce9515baba2542a12fe493)  
 <a id="a7482f6212a0f951dcb367a98803b33e3" name="a7482f6212a0f951dcb367a98803b33e3"></a>RunStatus **getRunStatus** () const Returns the RunStatus state for this [Output](classansys_1_1_project_1_1_output.xhtml "Subfolder of a Run, regrouping Results for a step."). See [setRunStatus()](classansys_1_1_project_1_1_run_group.xhtml#ae14a2fd242ce9515baba2542a12fe493 "Set the RunStatus state for this Run.")   
 <a id="aee0d6fd3d0249f5536d45886bc9ad403" name="aee0d6fd3d0249f5536d45886bc9ad403"></a>RunOutputType **getRunOutputType** () const Return the RunOutputType as the enum.   
 <a id="a77a5212218cb0dde90bccf6597c0d8d4" name="a77a5212218cb0dde90bccf6597c0d8d4"></a>std::string **getRunOutputTypeAsString** () const Return the RunOutputType as a string.   
 <a id="details" name="details"></a>## Detailed Description

Optional concept - Virtual folder with a list of [Run](classansys_1_1_project_1_1_run.xhtml "Subfolder of a Simulation, regrouping Output/Result for a step.").

Can be used to regroup multiple runs part of a larger parametric analysis. The [RunGroup](classansys_1_1_project_1_1_run_group.xhtml "Optional concept - Virtual folder with a list of Run.") is a subclass of [Run](classansys_1_1_project_1_1_run.xhtml "Subfolder of a Simulation, regrouping Output/Result for a step.") and provides the same services ( RunOutputType, input/output variables, etc. )



## Member Function Documentation

<a id="aa84a2103fc117a256bab7cce5fef9780" name="aa84a2103fc117a256bab7cce5fef9780"></a>## [◆ ](#aa84a2103fc117a256bab7cce5fef9780)addOutputVariable()

 bool ansys::Project::Run::addOutputVariable  ( const std::string &amp;  *pVar*) 

Register an output variable for this run.

All [Output](classansys_1_1_project_1_1_output.xhtml "Subfolder of a Run, regrouping Results for a step.") subfolders should define a specific value for this variable.





<a id="a2f0eda313925457b7e3362530169e5ac" name="a2f0eda313925457b7e3362530169e5ac"></a>## [◆ ](#a2f0eda313925457b7e3362530169e5ac)addRun()

 [Error](classansys_1_1_project_1_1_error.xhtml) ansys::Project::RunGroup::addRun  ( [Iterator](classansys_1_1_project_1_1_iterator.xhtml)  *pRun*) 

Register a [Run](classansys_1_1_project_1_1_run.xhtml "Subfolder of a Simulation, regrouping Output/Result for a step.") in the [RunGroup](classansys_1_1_project_1_1_run_group.xhtml "Optional concept - Virtual folder with a list of Run.").

The [Run](classansys_1_1_project_1_1_run.xhtml "Subfolder of a Simulation, regrouping Output/Result for a step.") is referenced as a project Link in the virtual subfolder





<a id="ab4e9f4d0c7f6e9747451330dc698c5bc" name="ab4e9f4d0c7f6e9747451330dc698c5bc"></a>## [◆ ](#ab4e9f4d0c7f6e9747451330dc698c5bc)addVariable()

 bool ansys::Project::Run::addVariable  ( const std::string &amp;  *pVar*) 

Register an input variable for this run.

This registration is not required for automatic variables (Transient=Time, etc.)

All [Output](classansys_1_1_project_1_1_output.xhtml "Subfolder of a Run, regrouping Results for a step.") subfolders should define a specific value for this variable.





<a id="ad1cb2f559eef2c4960300dc23eb06d14" name="ad1cb2f559eef2c4960300dc23eb06d14"></a>## [◆ ](#ad1cb2f559eef2c4960300dc23eb06d14)addVarInputSettingsId()

 void ansys::Project::Run::addVarInputSettingsId  ( ) 

Add the InputSettings variable - Id is incremented when the input case settings are changed.

If provided, this should be incremented when any of the dependent input settings are changed, such as PhysicsId or DomainTransformationId





<a id="a54114201475287073e786d77e3718383" name="a54114201475287073e786d77e3718383"></a>## [◆ ](#a54114201475287073e786d77e3718383)removeVariable()

 bool ansys::Project::Run::removeVariable  ( const std::string &amp;  *pVar*) 

Remove a variable from the list of inputs.

Mandatory variables cannot be removed





<a id="aff79c14360fd61663d209ea8bd6f0e05" name="aff79c14360fd61663d209ea8bd6f0e05"></a>## [◆ ](#aff79c14360fd61663d209ea8bd6f0e05)setRunOutputType()

 bool ansys::Project::RunGroup::setRunOutputType  ( Run::RunOutputType  *pType*)   virtual 

Set the run output type, will add automatically the mandatory variables (if any)

The RunOutputType::Simple cannot be used for a [RunGroup](classansys_1_1_project_1_1_run_group.xhtml "Optional concept - Virtual folder with a list of Run.")





<a id="ae14a2fd242ce9515baba2542a12fe493" name="ae14a2fd242ce9515baba2542a12fe493"></a>## [◆ ](#ae14a2fd242ce9515baba2542a12fe493)setRunStatus()

 void ansys::Project::Run::setRunStatus  ( RunStatus  *pStatus*) 

Set the RunStatus state for this [Run](classansys_1_1_project_1_1_run.xhtml "Subfolder of a Simulation, regrouping Output/Result for a step.").

(Optional API) The run status permits to indicate if a [Run](classansys_1_1_project_1_1_run.xhtml "Subfolder of a Simulation, regrouping Output/Result for a step.") is running, completed, waiting for execution, etc. This status can also be defined at the [Output](classansys_1_1_project_1_1_output.xhtml "Subfolder of a Run, regrouping Results for a step.") level





<a id="a2e8493f21a92ce378d4bce82d0cb7b3f" name="a2e8493f21a92ce378d4bce82d0cb7b3f"></a>## [◆ ](#a2e8493f21a92ce378d4bce82d0cb7b3f)setVariables()

 bool ansys::Project::Run::setVariables  ( const std::vector&lt; std::string &gt; &amp;  *pVars*) 

Set/replace the list of variables for this run.

The operation will fail if the list of variables does not contain the mandatory variable for the RunOutputType

All [Output](classansys_1_1_project_1_1_output.xhtml "Subfolder of a Run, regrouping Results for a step.") subfolders should define a specific value for each variable.