> ## 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.

# Class ansys::dpf::Model

![][C++]
![][public]

Encapsulation of mesh and results.

## Members

* [CreateMeshQuery](#classansys-dpf-model-1aa7b9083700bfa4fe6fae6b08c878eebc)
* [CreateResultEvaluationWorkflow](#classansys-dpf-model-1a34060c2b318e850b8b468b9e4371e651)
* [CreateResultEvaluationWorkflow](#classansys-dpf-model-1a346a4ed1937d88f3b094041d51b68b13)
* [getMesh](#classansys-dpf-model-1a48c91a341bc268e48fe4efd1e8c8cb0f)
* [getMeshesContainer](#classansys-dpf-model-1abadaeac1d698448632bc92df349f0ed9)
* [getResultInfo](#classansys-dpf-model-1a4c81175ac5b1652728ceb587b414857e)
* [getTimeFreqSupport](#classansys-dpf-model-1a431d3eb5237f3b5f9f99631c259c53d2)
* [Model](#classansys-dpf-model-1a76d48e79b13741b01c3e0bb37ea56cc1)
* [Model](#classansys-dpf-model-1aa7d8460544b5133e3d144a72f4f8d78b)
* [ReleaseHandles](#classansys-dpf-model-1ac6d249ff396b756eb860b1ea46dc2fa1)
* [\~Model](#classansys-dpf-model-1a6d0f6e29b54a53f4e9c856da139fae8d)

## Public functions

### Function \~Model

![][public]

```cpp theme={null}
virtual ansys::dpf::Model::~Model()
```

**Return type**:

### Function Model

![][public]

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

Create model from given file.

**Parameters**:

* const std::string & **filePath**: @ \[in] File from which to create model.

**Return type**:

### Function Model

![][public]

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

Create model from given data sources.

**Parameters**:

* const [DataSources](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-datasources.md) & **data\_sources**: \[in] Data sources from which to create model.

**Return type**:

### Function getMesh

![][public]

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

**Returns**:

Meshed region for given timestep.

**Parameters**:

* int **timestep** = 0 : \[in] Optional timestep for which to get meshed region.

**Return type**: [MeshedRegion](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-meshedregion.md)

### Function getMeshesContainer

![][public]

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

**Returns**:

Meshes container for model.

**Return type**: [MeshesContainer](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-meshescontainer.md)

### Function getTimeFreqSupport

![][public]

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

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.

**Return type**: [TimeFreqSupport](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-timefreqsupport.md)

### Function getResultInfo

![][public]

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

[Result](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-result.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/api-reference/classansys-dpf-result.md) info for model.

**Return type**: [ResultInfo](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-resultinfo.md)

### Function CreateResultEvaluationWorkflow

![][public]

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

**Returns**:

[Result](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-result.md) for given result name.

**Parameters**:

* const char \* **res\_name**: \[in] Result name for which to get Result.
* [Scoping](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-scoping.md) **meshScoping** = [Scoping](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-scoping.md)() : \[in] Scoping of mesh elements or nodes.
* [Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/structansys-dpf-location.md) **requested\_location** = [Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/structansys-dpf-location.md)() : \[in] Location of evaluated result (nodal, elemental, or elemental\_nodal).
* int **cs\_id** = 0 : \[in] Not used.

**Return type**: [Result](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-result.md)

### Function CreateResultEvaluationWorkflow

![][public]

```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)
```

**Returns**:

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

**Parameters**:

* const char \* **res\_name**: \[in] Result name for which to get Result.
* const char \* **named\_selection**: \[in] Name of selected region in mesh. For MAPDL, names are capitalized.
* [Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/structansys-dpf-location.md) **requested\_location** = [Location](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/structansys-dpf-location.md)() : \[in] Location of evaluated result (nodal, elemental, or elemental\_nodal).
* bool **bInclusive** = true : \[in] When named\_selection is a nodal region and requested\_location is elemental, true indicates take elements with all nodes in region.
* int **cs\_id** = 0 : If false, take elements with at least 1 node in region. \[in] Not used.

**Return type**: [Result](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-result.md)

### Function CreateMeshQuery

![][public]

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

**Returns**:

[MeshQuery](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-meshquery.md).

**Return type**: [MeshQuery](https://developer.synopsys.com/docs/dpf/dpf-cpp-client-library/api-reference/classansys-dpf-meshquery.md)

### Function ReleaseHandles

![][public]

```cpp theme={null}
void ansys::dpf::Model::ReleaseHandles()
```

Closes the files that were kept open to retrieve data.

**Return type**: void

[C++]: https://img.shields.io/badge/language-C%2B%2B-blue "C++"

[const]: https://img.shields.io/badge/-const-lightblue "const"

[public]: https://img.shields.io/badge/-public-brightgreen "public"

[static]: https://img.shields.io/badge/-static-lightgrey "static"
