Skip to main content

DPF C++ client library 2023 R2

ansys::dpf::ResultInfo Class Reference

Last update: 10.07.2023

#include <dpf_api.h>

Inheritance diagram for ansys::dpf::ResultInfo:
ansys::dpf::DpfTypes

Public Types

enum  analysis_type {
  eStatic = 0 , eBukling = 1 , eModal = 2 , eHarmonic = 3 ,
  eCMS = 4 , eTransient = 5 , eMSUP = 6 , eSubStruct = 7 ,
  eSpectrum = 8 , eUnknownAnalysis = 9
}
 
enum  physics_type {
  eMecanic = 0 , eThermal = 1 , eMagnetic = 2 , eElectric = 3 ,
  eFluid = 5 , eUnknownPhysics = 4
}
 

Public Member Functions

 ResultInfo (analysis_type const &analysis_type=analysis_type::eUnknownAnalysis, physics_type const &physics_type=physics_type::eUnknownPhysics)
 
 ResultInfo (ResultInfo const &)
 
 ResultInfo (ResultInfo &&)
 
ResultInfooperator= (ResultInfo const &)
 
ResultInfooperator= (ResultInfo &&)
 
analysis_type analysisType () const
 
physics_type physicsType () const
 
UnitSystem unitSystem () const
 
std::string analysisTypeName () const
 
std::string physicsTypeName () const
 
std::string unitSystemName () const
 
dp_int numberOfResults () const
 
std::set< std::string > availableResults () const
 
std::string resultNameByOperatorName (std::string const &op_name) const
 
std::string operatorName (std::string const &res_name) const
 
std::string scriptingName (std::string const &res_name) const
 
ansys::dpf::Unit unit (std::string const &res_name) const
 
dp_int numberOfComponents (std::string const &res_name) const
 
std::string description (std::string const &res_name) const
 
ansys::dpf::Location location (std::string const &res_name) const
 
Dimensionality::ENature nature (std::string const &res_name) const
 
LabelSpacesVector qualifiers (std::string const &res_name) const
 
dp_int numberOfSubResults (std::string const &res_name) const
 
std::set< std::string > availableSubResults (std::string const &res_name) const
 
std::string subResultOperatorName (std::string const &res_name, std::string const &subres_name) const
 
std::string subResultDescription (std::string const &res_name, std::string const &subres_name) const
 
bool operatorNameIsAvailable (std::string const &op_name) const
 
void solver_version (int &major_version, int &minor_version) const
 
void solve_date_time (int &solve_date, int &solve_time) const
 
std::string user_name () const
 
std::string job_name () const
 
std::string product_name () const
 
std::string main_title () const
 
CyclicSupport getCyclicSupport () const
 
bool hasCyclicSymmetry (std::string &cyc_symmetry_type) const
 
bool hasCyclicSymmetry () const
 
std::string getStringProperty (std::string const &property_name) const
 
int getIntProperty (std::string const &property_name) const
 
std::vector< std::string > availableQualifierLabels () const
 
ansys::dpf::Support qualifierTypeSupport (ansys::dpf::Label const &qualifier) const
 
void setUnitSystem (UnitSystem const &unit_system)
 
void addResult (std::string const &operator_name, std::string const &scripting_name, ansys::dpf::Dimensionality dimensionality, ansys::dpf::Location const &location, ansys::dpf::Homogeneity const &homogeneity, std::string const &description="")
 
void addResult (Result const &res)
 
void addProperties (std::vector< std::pair< std::string, std::string > >const &properties)
 
void addProperties (std::vector< std::pair< std::string, int > >const &properties)
 
void addAvailableQualifiersForAllResults (LabelSpacesVector const &available_qualifiers)
 
void setQualifierLabelSupport (ansys::dpf::Label const &qualifier, ansys::dpf::Support const &support)
 
- Public Member Functions inherited from ansys::dpf::DpfTypes
virtual bool empty () const
 
virtual std::string describe () const
 
so::API const * callAPI () const
 
bool isOnCommonAPI () const
 
bool getClient (Client &client) const
 
bool hasBeenMovedLocally () const
 
bool isSameObject (DpfTypes const &rhs) const
 

Static Public Member Functions

static ResultInfo emptyResultInfo ()
 

Detailed Description

Provides information on all available results

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

Member Enumeration Documentation

◆ analysis_type

Analysis Type.

Enumerator
eStatic 

Static.

eBukling 

Bukling.

eModal 

Modal.

eHarmonic 

Harmonic.

eCMS 

CMS.

eTransient 

Transient.

eMSUP 

MSUP.

eSubStruct 

SubStruct.

eSpectrum 

Spectrum.

eUnknownAnalysis 

Unknown analysis type.

◆ physics_type

Physics Type.

Enumerator
eMecanic 

Mechanical.

eThermal 

Thermal.

eMagnetic 

Magnetic.

eElectric 

Electric.

eFluid 

Fluid.

eUnknownPhysics 

Unknown physics type.

Member Function Documentation

◆ addAvailableQualifiersForAllResults()

void ansys::dpf::ResultInfo::addAvailableQualifiersForAllResults ( LabelSpacesVector const &  available_qualifiers)

Set the available sub qualifiers (or domains) available for all Results in the ResultInfo.

◆ addProperties() [1/2]

void ansys::dpf::ResultInfo::addProperties ( std::vector< std::pair< std::string, int > >const &  properties)
Parameters
[in]propertiesMost common are: 'solve_time', 'solve_date', 'solver_minor_version', 'solver_major_version'.

◆ addProperties() [2/2]

void ansys::dpf::ResultInfo::addProperties ( std::vector< std::pair< std::string, std::string > >const &  properties)
Parameters
[in]propertiesMost common are 'user_name', 'job_name', 'product_name', 'main_title', 'cyclic_symmetry_type'.

◆ addResult() [1/2]

void ansys::dpf::ResultInfo::addResult ( Result const &  res)

Add a result.

◆ addResult() [2/2]

void ansys::dpf::ResultInfo::addResult ( std::string const &  operator_name,
std::string const &  scripting_name,
ansys::dpf::Dimensionality  dimensionality,
ansys::dpf::Location const &  location,
ansys::dpf::Homogeneity const &  homogeneity,
std::string const &  description = "" 
)

Add a result.

Parameters
[in]operator_nameOperator name associated to the result.
[in]scripting_namefriendly name usable as a method: all lower case, no spaces only underscores.
[in]dimensionalityDimensionality of the result see dimensionalities.
[in]locationLocation of the result.
[in]homogeneityHomogeneity of the result.
[in]descriptionoptional small description of the result.

◆ analysisType()

analysis_type ansys::dpf::ResultInfo::analysisType ( ) const
Returns
Analysis type for all results.
Examples
ModelTest.cpp.

◆ analysisTypeName()

std::string ansys::dpf::ResultInfo::analysisTypeName ( ) const
Returns
Analysis type name for all results.
Examples
ResultTest.cpp.

◆ availableResults()

std::set< std::string > ansys::dpf::ResultInfo::availableResults ( ) const

The result name might be something like temperature.

Returns
Set of names for all results.
Examples
ModelTest.cpp, and ResultTest.cpp.

◆ availableSubResults()

std::set< std::string > ansys::dpf::ResultInfo::availableSubResults ( std::string const &  res_name) const
Returns
Set of names of subresults for given result name.
Parameters
[in]res_nameResult name.

◆ description()

std::string ansys::dpf::ResultInfo::description ( std::string const &  res_name) const
Returns
Description of given result name.
Parameters
[in]res_nameResult name.

◆ getCyclicSupport()

CyclicSupport ansys::dpf::ResultInfo::getCyclicSupport ( ) const
Returns
the cyclic support if the result file has cyclic symmetry (or multistage). The CyclicSupport contains information relevant for cyclic expansion

◆ getIntProperty()

int ansys::dpf::ResultInfo::getIntProperty ( std::string const &  property_name) const
Returns
a property value: most common are 'solve_time', 'solve_date', 'solver_minor_version', 'solver_major_version'.

◆ getStringProperty()

std::string ansys::dpf::ResultInfo::getStringProperty ( std::string const &  property_name) const
Returns
a property value: most common are 'user_name', 'job_name', 'product_name', 'main_title', 'cyclic_symmetry_type'.

◆ hasCyclicSymmetry() [1/2]

bool ansys::dpf::ResultInfo::hasCyclicSymmetry ( ) const
Returns
true if the result file has cyclic symmetry (or multistage)

◆ hasCyclicSymmetry() [2/2]

bool ansys::dpf::ResultInfo::hasCyclicSymmetry ( std::string &  cyc_symmetry_type) const
Returns
true if the result file has cyclic symmetry (or multistage)
Parameters
[out]cyc_symmetry_type"single_stage", "multi_stage" or "not_cyclic".

◆ job_name()

std::string ansys::dpf::ResultInfo::job_name ( ) const
Returns
Job name.
Examples
ModelTest.cpp.

◆ location()

ansys::dpf::Location ansys::dpf::ResultInfo::location ( std::string const &  res_name) const
Returns
Location of given result name.
Parameters
[in]res_nameResult name.

◆ main_title()

std::string ansys::dpf::ResultInfo::main_title ( ) const
Returns
Main title.
Examples
ModelTest.cpp.

◆ nature()

Dimensionality::ENature ansys::dpf::ResultInfo::nature ( std::string const &  res_name) const
Returns
Nature for given result name.
Parameters
[in]res_nameResult name.
Examples
ResultTest.cpp.

◆ numberOfComponents()

dp_int ansys::dpf::ResultInfo::numberOfComponents ( std::string const &  res_name) const
Returns
Number of components for given result name.
Parameters
[in]res_nameResult name.
Examples
CompleteRST.cpp.

◆ numberOfResults()

dp_int ansys::dpf::ResultInfo::numberOfResults ( ) const
Returns
Number of results.
Examples
CompleteRST.cpp, and ModelTest.cpp.

◆ numberOfSubResults()

dp_int ansys::dpf::ResultInfo::numberOfSubResults ( std::string const &  res_name) const
Returns
Number of subresults for given result name.
Parameters
[in]res_nameResult name.

◆ operatorName()

std::string ansys::dpf::ResultInfo::operatorName ( std::string const &  res_name) const

The operator name might be something like TEMP, where the result name is Temperature.

Returns
Operator name
Parameters
[in]res_nameResult name.

◆ operatorNameIsAvailable()

bool ansys::dpf::ResultInfo::operatorNameIsAvailable ( std::string const &  op_name) const
Returns
Indication that operator is available within results and subresults.
Parameters
[in]op_nameOperator name.
Examples
CompleteRST.cpp.

◆ physicsType()

physics_type ansys::dpf::ResultInfo::physicsType ( ) const
Returns
Phyiscs type for all results.
Examples
ModelTest.cpp.

◆ physicsTypeName()

std::string ansys::dpf::ResultInfo::physicsTypeName ( ) const
Returns
Phyiscs type name for all results.
Examples
ResultTest.cpp.

◆ product_name()

std::string ansys::dpf::ResultInfo::product_name ( ) const
Returns
Product name.
Examples
ModelTest.cpp.

◆ qualifiers()

LabelSpacesVector ansys::dpf::ResultInfo::qualifiers ( std::string const &  res_name) const
Parameters
[in]res_nameResult name.

◆ qualifierTypeSupport()

ansys::dpf::Support ansys::dpf::ResultInfo::qualifierTypeSupport ( ansys::dpf::Label const &  qualifier) const
Returns
Support describing the Domain definition of the qualifier type.
Parameters
[in]qualifierLabel describing the location of the qualifier: ex phase, species...

◆ resultNameByOperatorName()

std::string ansys::dpf::ResultInfo::resultNameByOperatorName ( std::string const &  op_name) const

For a result name like Temperature, the operator name might be something like TEMP.

Returns
Name of result
Parameters
[in]op_nameOperator name.
Examples
CompleteRST.cpp.

◆ scriptingName()

std::string ansys::dpf::ResultInfo::scriptingName ( std::string const &  res_name) const

The operator scripting name is used to instantiate the operator in scripting, ex: displacement, elastic_strain...

Returns
Operator scripting name
Parameters
[in]res_nameResult name.

◆ setQualifierLabelSupport()

void ansys::dpf::ResultInfo::setQualifierLabelSupport ( ansys::dpf::Label const &  qualifier,
ansys::dpf::Support const &  support 
)

Describe the Domain definition for a given qualifier.

Parameters
[in]qualifierLabel describing the location of the qualifier: ex phase, species...
[in]supportDomain definition of the qualifier.

◆ setUnitSystem()

void ansys::dpf::ResultInfo::setUnitSystem ( UnitSystem const &  unit_system)

Set the unit system.

◆ solve_date_time()

void ansys::dpf::ResultInfo::solve_date_time ( int &  solve_date,
int &  solve_time 
) const

Gets solver date and time.

Parameters
[out]solve_dateDate.
[out]solve_timeTime.
Examples
ModelTest.cpp.

◆ solver_version()

void ansys::dpf::ResultInfo::solver_version ( int &  major_version,
int &  minor_version 
) const

Gets solver version.

Parameters
[out]major_versionMajor version.
[out]minor_versionMinor version.
Examples
ModelTest.cpp.

◆ subResultDescription()

std::string ansys::dpf::ResultInfo::subResultDescription ( std::string const &  res_name,
std::string const &  subres_name 
) const
Returns
Description for given subresult name of given result name.
Parameters
[in]res_nameResult name.
[in]subres_nameSubresult name.

◆ subResultOperatorName()

std::string ansys::dpf::ResultInfo::subResultOperatorName ( std::string const &  res_name,
std::string const &  subres_name 
) const
Returns
Operator name for given subresult name of given result name
Parameters
[in]res_nameResult name.
[in]subres_nameSubresult name.

◆ unit()

ansys::dpf::Unit ansys::dpf::ResultInfo::unit ( std::string const &  res_name) const
Returns
Unit for given result name.
Parameters
[in]res_nameResult name.

◆ unitSystem()

UnitSystem ansys::dpf::ResultInfo::unitSystem ( ) const
Returns
Unit system for all results.
Examples
ModelTest.cpp.

◆ unitSystemName()

std::string ansys::dpf::ResultInfo::unitSystemName ( ) const
Returns
Unit system name for all results.
Examples
ResultTest.cpp.

◆ user_name()

std::string ansys::dpf::ResultInfo::user_name ( ) const
Returns
User name.
Examples
ModelTest.cpp.