> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ansys::Project::SimBase Class Reference

Base class for [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_run.md) and [Simulation](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_simulation.md) - shared functions.

`#include "SimBase.hpp"`

Inheritance diagram for ansys::Project::SimBase:

![](https://mintcdn.com/synopsys-00a47cbc/Srh1_f--TdKCLyqD/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_sim_base.png?fit=max\&auto=format\&n=Srh1_f--TdKCLyqD\&q=85\&s=1601ecf19624ee733f2b0bd36df1105f)

## Public Member Functions

| Type | Name |
| - | - |
| bool | [ok](#a006186f7ee51c0d5548bd6cad367b032) () const |
| virtual [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_error.md) | [isValid](#a3c713318a297544df6164b21df42454d) () const =0 |
| std::string | [getName](#a8aef8314dfc33a8d25e3963fa3fd07ba) () const Returns the object name in the project. |
| virtual [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_iterator.md) | [getCase](#a1fb985412b84a850718aa3aae6e03147) () const Returns the case file associated with this folder. |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_iterator.md) | [setCase](#a2312d3c69d5f32a7c76bc567c942e945) ([Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_iterator.md) pCaseFile) Set the case file associated with this item. |
| void | [setMainDataType](#ac44fe199d4f2c2c7aa8be5d22353740a) (const std::string \&pDataType) Set the result type expected as default output for runs. |
| std::string | [getMainDataType](#a743bc36e30200c87603dedaafe1d969d) () const Returns the result type expected as default output for runs (see: [setMainDataType()](#ac44fe199d4f2c2c7aa8be5d22353740a) ) |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_iterator.md) | [copyInput](#aeb5ffe7267a10b465dc8c2c825195074) ([Path](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_path.md) pPath, bool pInInputFolder=false) Copy the specified project file into the current folder. |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_iterator.md) | [setInput](#a0b6fee750eeb02e8068640758c6d8b0d) ([Path](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_path.md) pPath) Register a files as Input/ to this folder. |
| std::vector\< [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_iterator.md) > | [getInputs](#a2d532a01d1f99cb76ec85e8f4908d932) ([Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_error.md) \*pErrorPtr=0) const Return the list of registered inputs for this simulation. |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_iterator.md) | [getInputByType](#a7eb8d0c48e61b171014c593fb63e85c6) (const std::string \&pType, std::string pSubtype="") const Search for a -single- input of the specified type (and optionally, subtype) |
| std::vector\< [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_iterator.md) > | [getInputsByType](#abc3d5315d8f3a3cff217c2112b4581a1) (const std::string \&pType, std::string pSubtype="", [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_error.md) \*pErrorPtr=0) const Search for one or multiple input of the specified type (and optionally, subtype) |
| [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_metadata.md) & | [getMeta](#a067d578e43cf6085623921adb816d5f4) () Access the [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_iterator.md) [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_metadata.md), equivalent to [getIterator()](#a16f3c24244ab0ec6587d945785c7718d).[getMeta()](#a067d578e43cf6085623921adb816d5f4) |
| const [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_metadata.md) & | [getMeta](#af6e6bd9bee7a4fe152ff2ac2f51ad8c9) () const Access the [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_iterator.md) [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_metadata.md), equivalent to [getIterator()](#a16f3c24244ab0ec6587d945785c7718d).[getMeta()](#a067d578e43cf6085623921adb816d5f4) |
| virtual [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_iterator.md) | [getIterator](#a16f3c24244ab0ec6587d945785c7718d) () const Access the [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_iterator.md) for this item. |
| | [operator Iterator](#a0625d859da2633b26505821aaf569602) () const |

## Protected Member Functions

| Type | Name |
| - | - |
| | [SimBase](#a818fb26085d036e187d4363696c37804) ([Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_iterator.md) pIter) |
| virtual | [\~SimBase](#a5f50eff2ae40bad165b140399d9143e1) () |
| [Error](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_error.md) | [copyDatafileMeta](#a511aa7d1e5b9a422a7bec1812b1b2851) (const [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_iterator.md) \&pInput, [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_iterator.md) \&pOutput) |

## Protected Attributes

| Type | Name |
| - | - |
| [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_iterator.md) | [aIter](#ae97b15e35c30f6eda557fc6dfaec2b5f) |

## Detailed Description

Base class for [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_run.md) and [Simulation](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_simulation.md) - shared functions.

Not to be used directly, use [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_run.md) and [Simulation](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_simulation.md).

## Constructor & Destructor Documentation

### SimBase()

```cpp theme={null}
ansys::Project::SimBase::SimBase(Iterator pIter)
```

`protected`

### \~SimBase()

```cpp theme={null}
virtual ansys::Project::SimBase::~SimBase()
```

`inline` `protected` `virtual`

## Member Function Documentation

### copyDatafileMeta()

```cpp theme={null}
Error ansys::Project::SimBase::copyDatafileMeta(
    const Iterator & pInput,
    Iterator & pOutput
)
```

`protected`

### copyInput()

```cpp theme={null}
Iterator ansys::Project::SimBase::copyInput(
    Path pPath,
    bool pInInputFolder = false
)
```

Copy the specified project file into the current folder.

**Parameters**

| Name | Description |
| - | - |
| pPath | The project path (global or relative) to the target |
| pInInputFolder | The file will be copied to the Input/ subfolder |

### getCase()

```cpp theme={null}
Iterator ansys::Project::SimBase::getCase() const
```

`virtual`

Returns the case file associated with this folder.

Reimplemented in [ansys::Project::Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_run.md#afe453b6378308de553307d3f8ee7c097).

### getInputByType()

```cpp theme={null}
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()

```cpp theme={null}
std::vector< Iterator > ansys::Project::SimBase::getInputs(Error * 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

### getInputsByType()

```cpp theme={null}
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

### getIterator()

```cpp theme={null}
Iterator ansys::Project::SimBase::getIterator() const
```

`virtual`

Access the [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_iterator.md) for this item.

Reimplemented in [ansys::Project::Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_run.md#a6b797638d34347e6801b88c0e69e05ce), and [ansys::Project::RunGroup](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_run_group.md#a6b797638d34347e6801b88c0e69e05ce).

### getMainDataType()

```cpp theme={null}
std::string ansys::Project::SimBase::getMainDataType() const
```

Returns the result type expected as default output for runs (see: [setMainDataType()](#ac44fe199d4f2c2c7aa8be5d22353740a) )

### getMeta() \[1/2]

```cpp theme={null}
Metadata & ansys::Project::SimBase::getMeta()
```

Access the [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_iterator.md) [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_metadata.md), equivalent to [getIterator()](#a16f3c24244ab0ec6587d945785c7718d).[getMeta()](#a067d578e43cf6085623921adb816d5f4)

### getMeta() \[2/2]

```cpp theme={null}
const Metadata & ansys::Project::SimBase::getMeta() const
```

Access the [Iterator](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_iterator.md) [Metadata](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_metadata.md), equivalent to [getIterator()](#a16f3c24244ab0ec6587d945785c7718d).[getMeta()](#a067d578e43cf6085623921adb816d5f4)

### getName()

```cpp theme={null}
std::string ansys::Project::SimBase::getName() const
```

Returns the object name in the project.

### isValid()

```cpp theme={null}
virtual Error ansys::Project::SimBase::isValid() const
```

`pure virtual`

Implemented in [ansys::Project::Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_run.md#a50461d0ef3487601fd73f740cee85348), [ansys::Project::RunGroup](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_run_group.md#a3e9c11403f6ecd0abfeee7e05706631c), and [ansys::Project::Simulation](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_simulation.md#ab8c7167e09e88042db12724531150af7).

### ok()

```cpp theme={null}
bool ansys::Project::SimBase::ok() const
```

### operator Iterator()

```cpp theme={null}
ansys::Project::SimBase::operator Iterator() const
```

`inline`

### setCase()

```cpp theme={null}
Iterator ansys::Project::SimBase::setCase(Iterator 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()](#a0b6fee750eeb02e8068640758c6d8b0d)

### setInput()

```cpp theme={null}
Iterator ansys::Project::SimBase::setInput(Path pPath)
```

Register a files as Input/ to this folder.

The inputs are links stored in the hidden subfolder Input/ For example, in a [Simulation](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_simulation.md) the "current" case file can be stored as input, then once a [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_run.md) is created, the case file is registered in the [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_run.md) itself. If the current case file is changed, each previous [Run](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_run.md) still has a link to the specific case file which was used for them.

**Parameters**

| Name | Description |
| - | - |
| pPath | The project path (global or relative) to the target |

### setMainDataType()

```cpp theme={null}
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()](https://developer.synopsys.com/docs/cff/common-fluids-format-sdk-guide/classansys_1_1_project_1_1_output.md#afec1dc4d84b3faaba2a23724a632e1f8)

## Member Data Documentation

### aIter

```cpp theme={null}
Iterator ansys::Project::SimBase::aIter
```

`protected`
