Skip to main content

DPF C++ client library 2023 R2

ansys::dpf::Model Class Reference

Last update: 10.07.2023

#include <dpf_model.h>

Public Member Functions

 Model (const std::string &filePath)
 
 Model (const DataSources &data_sources)
 
MeshedRegion getMesh (int timestep=0)
 
MeshesContainer getMeshesContainer ()
 
TimeFreqSupport getTimeFreqSupport ()
 
ResultInfo getResultInfo ()
 
Result CreateResultEvaluationWorkflow (const char *res_name, Scoping meshScoping=Scoping(), Location requested_location=Location(), int cs_id=0)
 
Result CreateResultEvaluationWorkflow (const char *res_name, const char *named_selection, Location requested_location=Location(), bool bInclusive=true, int cs_id=0)
 
MeshQuery CreateMeshQuery ()
 

Detailed Description

Encapsulation of mesh and results.

Examples
DataApis.cpp, MeshQueryTest.cpp, ModelTest.cpp, and ResultTest.cpp.

Constructor & Destructor Documentation

◆ Model() [1/2]

ansys::dpf::Model::Model ( const std::string &  filePath)
inline

Create model from given file.

Parameters
filePath@ [in] File from which to create model.

◆ Model() [2/2]

ansys::dpf::Model::Model ( const DataSources data_sources)
inline

Create model from given data sources.

Parameters
[in]data_sourcesData sources from which to create model.

Member Function Documentation

◆ CreateMeshQuery()

MeshQuery ansys::dpf::Model::CreateMeshQuery ( )
inline
Returns
MeshQuery.
Examples
MeshQueryTest.cpp.

◆ CreateResultEvaluationWorkflow() [1/2]

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 for given result name and named_selection of mesh.
Parameters
[in]res_nameResult name for which to get Result.
[in]named_selectionName of selected region in mesh. For MAPDL, names are capitalized.
[in]requested_locationLocation of evaluated result (nodal, elemental, or elemental_nodal).
[in]bInclusiveWhen named_selection is a nodal region and requested_location is elemental, true indicates take elements with all nodes in region.
cs_idIf false, take elements with at least 1 node in region. [in] Not used.

◆ CreateResultEvaluationWorkflow() [2/2]

Result ansys::dpf::Model::CreateResultEvaluationWorkflow ( const char *  res_name,
Scoping  meshScoping = Scoping(),
Location  requested_location = Location(),
int  cs_id = 0 
)
inline
Returns
Result for given result name.
Parameters
[in]res_nameResult name for which to get Result.
[in]meshScopingScoping of mesh elements or nodes.
[in]requested_locationLocation of evaluated result (nodal, elemental, or elemental_nodal).
[in]cs_idNot used.

◆ getMesh()

MeshedRegion ansys::dpf::Model::getMesh ( int  timestep = 0)
inline
Returns
Meshed region for given timestep.
Parameters
[in]timestepOptional timestep for which to get meshed region.
Examples
ModelTest.cpp.

◆ getMeshesContainer()

MeshesContainer ansys::dpf::Model::getMeshesContainer ( )
inline
Returns
Meshes container for model.

◆ getResultInfo()

ResultInfo ansys::dpf::Model::getResultInfo ( )
inline

Result Info allows to access to:

  • available results
  • unit
  • analysis type
  • physics type
Returns
Result info for model.

◆ getTimeFreqSupport()

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.