ansys::Project::SimBase Class Reference
Last update: 16.07.2025Base class for Run and Simulation - shared functions. More...
#include "SimBase.hpp"

Public Member Functions | |
| std::string | getName () const |
| Returns the object name in the project. | |
| virtual Iterator | getCase () const |
| Returns the case file associated with this folder. | |
| Iterator | setCase (Iterator pCaseFile) |
| Set the case file associated with this item. More... | |
| void | setMainDataType (const std::string &pDataType) |
| Set the result type expected as default output for runs. More... | |
| std::string | getMainDataType () const |
| Returns the result type expected as default output for runs (see: setMainDataType() ) | |
| Iterator | copyInput (Path pPath, bool pInInputFolder=false) |
| Copy the specified project file into the current folder. More... | |
| Iterator | setInput (Path pPath) |
| Register a files as Input/ to this folder. More... | |
| std::vector< Iterator > | getInputs (Error *pErrorPtr=0) const |
| Return the list of registered inputs for this simulation. More... | |
| Iterator | getInputByType (const std::string &pType, std::string pSubtype="") const |
| Search for a -single- input of the specified type (and optionally, subtype) More... | |
| std::vector< Iterator > | getInputsByType (const std::string &pType, std::string pSubtype="", Error *pErrorPtr=0) const |
| Search for one or multiple input of the specified type (and optionally, subtype) More... | |
| Metadata & | getMeta () |
| Access the Iterator Metadata, equivalent to getIterator().getMeta() | |
| const Metadata & | getMeta () const |
| Access the Iterator Metadata, equivalent to getIterator().getMeta() | |
| virtual Iterator | getIterator () const |
| Access the Iterator for this item. | |
Detailed Description
Base class for Run and Simulation - shared functions.
Not to be used directly, use Run and Simulation.
Member Function Documentation
◆ copyInput()
Copy the specified project file into the current folder.
- Parameters
-
pPath The project path (global or relative) to the target pInInputFolder The file will be copied to the Input/ subfolder
◆ getInputByType()
| Iterator ansys::Project::SimBase::getInputByType | ( | const std::string & | 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
◆ getInputs()
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
◆ getInputsByType()
| std::vector< Iterator > ansys::Project::SimBase::getInputsByType | ( | const std::string & | pType, |
| std::string | pSubtype = "", |
||
| Error * | 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
◆ setCase()
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()
◆ setInput()
Register a files as Input/ to this folder.
The inputs are links stored in the hidden subfolder Input/ For example, in a Simulation the "current" case file can be stored as input, then once a Run is created, the case file is registered in the Run itself. If the current case file is changed, each previous Run still has a link to the specific case file which was used for them.
- Parameters
-
pPath The project path (global or relative) to the target
◆ setMainDataType()
| void ansys::Project::SimBase::setMainDataType | ( | const std::string & | 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()