> ## 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::dpf::Model Class Reference

`#include <dpf_model.h>`

## Public Member Functions

| Type | Name |
| - | - |
| | [Model](#a76d48e79b13741b01c3e0bb37ea56cc1) (const std::string \&filePath) |
| | [Model](#aa7d8460544b5133e3d144a72f4f8d78b) (const [DataSources](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1DataSources.md) \&data\_sources) |
| [MeshedRegion](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshedRegion.md) | [getMesh](#a48c91a341bc268e48fe4efd1e8c8cb0f) (int timestep=0) |
| [MeshesContainer](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshesContainer.md) | [getMeshesContainer](#abadaeac1d698448632bc92df349f0ed9) () |
| [TimeFreqSupport](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1TimeFreqSupport.md) | [getTimeFreqSupport](#a431d3eb5237f3b5f9f99631c259c53d2) () |
| [ResultInfo](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1ResultInfo.md) | [getResultInfo](#a4c81175ac5b1652728ceb587b414857e) () |
| [Result](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1Result.md) | [CreateResultEvaluationWorkflow](#a34060c2b318e850b8b468b9e4371e651) (const char \*res\_name, [Scoping](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1Scoping.md) meshScoping=[Scoping](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1Scoping.md)(), [Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/structansys_1_1dpf_1_1Location.md) requested\_location=[Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/structansys_1_1dpf_1_1Location.md)(), int cs\_id=0) |
| [Result](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1Result.md) | [CreateResultEvaluationWorkflow](#a346a4ed1937d88f3b094041d51b68b13) (const char \*res\_name, const char \*named\_selection, [Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/structansys_1_1dpf_1_1Location.md) requested\_location=[Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/structansys_1_1dpf_1_1Location.md)(), bool bInclusive=true, int cs\_id=0) |
| [MeshQuery](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshQuery.md) | [CreateMeshQuery](#aa7b9083700bfa4fe6fae6b08c878eebc) () |
|  void | **ReleaseHandles** () Closes the files that were kept open to retrieve data. |

## Detailed Description

Encapsulation of mesh and results.

**Examples**

[DataApis.cpp](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/DataApis_8cpp-example.md), [MeshQueryTest.cpp](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/MeshQueryTest_8cpp-example.md), [ModelTest.cpp](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/ModelTest_8cpp-example.md), and [ResultTest.cpp](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/ResultTest_8cpp-example.md).

## Constructor & Destructor Documentation

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

```cpp theme={null}
ansys::dpf::Model::Model(const std::string & filePath)
```

`inline`

Create model from given file.

**Parameters**

| Name | Description |
| - | - |
| filePath | @ \[in] File from which to create model. |

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

```cpp theme={null}
ansys::dpf::Model::Model(const DataSources & data_sources)
```

`inline`

Create model from given data sources.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | data\_sources | Data sources from which to create model. |

## Member Function Documentation

### CreateMeshQuery()

```cpp theme={null}
MeshQuery ansys::dpf::Model::CreateMeshQuery()
```

`inline`

**Returns**

[MeshQuery](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1MeshQuery.md).

**Examples**

[MeshQueryTest.cpp](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/MeshQueryTest_8cpp-example.md).

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

```cpp theme={null}
Result ansys::dpf::Model::CreateResultEvaluationWorkflow(
    const char * res_name,
    const char * named_selection,
    Location requested_location = Location (),
    bool bInclusive = true,
    int cs_id = 0
)
```

`inline`

**Returns**

[Result](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1Result.md) for given result name and named\_selection of mesh.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | res\_name | Result name for which to get Result. |
| \[in] | named\_selection | Name of selected region in mesh. For MAPDL, names are capitalized. |
| \[in] | requested\_location | Location of evaluated result (nodal, elemental, or elemental\_nodal). |
| \[in] | bInclusive | When named\_selection is a nodal region and requested\_location is elemental, true indicates take elements with all nodes in region. |
| | cs\_id | If false, take elements with at least 1 node in region. \[in] Not used. |

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

```cpp theme={null}
Result ansys::dpf::Model::CreateResultEvaluationWorkflow(
    const char * res_name,
    Scoping meshScoping = Scoping (),
    Location requested_location = Location (),
    int cs_id = 0
)
```

`inline`

**Returns**

[Result](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1Result.md) for given result name.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | res\_name | Result name for which to get Result. |
| \[in] | meshScoping | Scoping of mesh elements or nodes. |
| \[in] | requested\_location | Location of evaluated result (nodal, elemental, or elemental\_nodal). |
| \[in] | cs\_id | Not used. |

### getMesh()

```cpp theme={null}
MeshedRegion ansys::dpf::Model::getMesh(int timestep = 0)
```

`inline`

**Returns**

Meshed region for given timestep.

**Parameters**

| Direction | Name | Description |
| - | - | - |
| \[in] | timestep | Optional timestep for which to get meshed region. |

**Examples**

[ModelTest.cpp](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/ModelTest_8cpp-example.md).

### getMeshesContainer()

```cpp theme={null}
MeshesContainer ansys::dpf::Model::getMeshesContainer()
```

`inline`

**Returns**

Meshes container for model.

### getResultInfo()

```cpp theme={null}
ResultInfo ansys::dpf::Model::getResultInfo()
```

`inline`

[Result](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1Result.md) Info allows to access to:

* available results
* unit
* analysis type
* physics type

**Returns**

[Result](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/classansys_1_1dpf_1_1Result.md) info for model.

### getTimeFreqSupport()

```cpp theme={null}
TimeFreqSupport ansys::dpf::Model::getTimeFreqSupport()
```

`inline`

Retrieves the time/freq support to have access to the analysis domain (number times steps/frequences, correspending times/frequences/ harmonic indices, rpms)

**Returns**

Time frequency support for model.

**Examples**

[ModelTest.cpp](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/2025-r2/ModelTest_8cpp-example.md).
