Skip to main content

DPF C++ client library 2023 R2

ansys::dpf::TimeFreqSupport Class Reference

Last update: 10.07.2023

Define a time/frequency set. More...

#include <dpf_api.h>

Inheritance diagram for ansys::dpf::TimeFreqSupport:
ansys::dpf::DpfTypes

Public Member Functions

 TimeFreqSupport (Client const *const client)
 
 TimeFreqSupport (int id, Client const *const client)
 
 TimeFreqSupport (TimeFreqSupport const &)
 
 TimeFreqSupport (TimeFreqSupport &&)
 
TimeFreqSupportoperator= (TimeFreqSupport const &)
 
TimeFreqSupportoperator= (TimeFreqSupport &&)
 
dp_int numberOfSets () const
 
dp_int numberOfSteps () const
 
dp_int numberOfSubStepsByStepIndex (dp_int stepIndex) const
 
dp_int numberOfSubStepsByStepId (dp_int stepId) const
 
dp_int getSetIndexByStepIndexAndSubStep (dp_int step, dp_int sub_step) const
 
dp_double getImaginaryFreqByStep (dp_index step, dp_index sub_step) const
 
dp_double getTimeFreqByStep (dp_index step, dp_index sub_step) const
 
dp_int getImaginaryFreqSetIndexByValue (dp_double frequency) const
 
dp_int getSetIndexByTimeFreq (dp_double frequency) const
 
std::pair< dp_id, dp_indexgetStepAndSubStep (int cumulative_index) const
 
Field frequencies () const
 
Field imaginaryFrequencies () const
 
Field rpms () const
 
Field harmonicIndeces (dp_int stage=0) const
 
PropertyField timeFrequenciesSubstepIds () const
 
Scoping harmonicIndicesScoping () const
 
dp_int numberOfSingularSets () const
 
void setTimeFrequencies (Field field)
 
void setImaginaryFrequencies (Field field)
 
void setRpms (Field field)
 
void setHarmonicIndices (Field field, dp_int stage=0)
 
std::pair< dp_int, dp_intboundingCumulativeIndecesOfTimeFreq (double time_freq, int loadstep=0) const
 
dp_double timeFreq (dp_int cumul_index, dp_int complex_id=0) const
 
TimeFreqSupport deep_copy (ansys::dpf::Client const *const client=nullptr) const
 
- 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 TimeFreqSupport emptyTimeFreqSupport ()
 

Detailed Description

Define a time/frequency set.

The time freq support describes an analysis' temporal or frequential space. For a transient analysis all the time sets cumulatives indices with their times are described. For a harmonic analysis, the real and imaginary frequencies, the RPMs, the load steps are described.

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

Constructor & Destructor Documentation

◆ TimeFreqSupport() [1/2]

ansys::dpf::TimeFreqSupport::TimeFreqSupport ( Client const *const  client)

Create a new TimeFreqSupport on a server.

Parameters
[in]clientClient instance designating the IP, port and protocol to use.

◆ TimeFreqSupport() [2/2]

ansys::dpf::TimeFreqSupport::TimeFreqSupport ( int  id,
Client const *const  client 
)

Retrieve an existing instance of TimeFreqSupport on a server.

Parameters
[in]idId of the TimeFreqSupport object on the server's database.
[in]clientClient instance designating the IP, port and protocol to use.

Member Function Documentation

◆ boundingCumulativeIndecesOfTimeFreq()

std::pair< dp_int, dp_int > ansys::dpf::TimeFreqSupport::boundingCumulativeIndecesOfTimeFreq ( double  time_freq,
int  loadstep = 0 
) const
Returns
Bounding indices for given time time frequency and load step.
Parameters
[in]time_freqTime frequency for which to find bounding indices.
[in]loadstepOptional load step.

◆ deep_copy()

TimeFreqSupport ansys::dpf::TimeFreqSupport::deep_copy ( ansys::dpf::Client const *const  client = nullptr) const

Create a new TimeFreqSupport on a server by copying all the data of this TimeFreqSupport.

Parameters
[in]clientClient instance designating the IP, port and protocol to use.

◆ frequencies()

Field ansys::dpf::TimeFreqSupport::frequencies ( ) const
Returns
Field associated with time frequency.
Examples
DataApis.cpp, ModelTest.cpp, and WorkflowExamples.cpp.

◆ getImaginaryFreqByStep()

dp_double ansys::dpf::TimeFreqSupport::getImaginaryFreqByStep ( dp_index  step,
dp_index  sub_step 
) const
Returns
imaginary frequency at a given step index and substep indices.
Parameters
[in]stepstep index (0 based).
[in]sub_stepsub_step index (0 based).

◆ getImaginaryFreqSetIndexByValue()

dp_int ansys::dpf::TimeFreqSupport::getImaginaryFreqSetIndexByValue ( dp_double  frequency) const
Returns
set index (0 based) for given imaginary frequency.

◆ getSetIndexByStepIndexAndSubStep()

dp_int ansys::dpf::TimeFreqSupport::getSetIndexByStepIndexAndSubStep ( dp_int  step,
dp_int  sub_step 
) const
Returns
set index (0 based) at a given step index and substep index.
Examples
ModelTest.cpp.

◆ getSetIndexByTimeFreq()

dp_int ansys::dpf::TimeFreqSupport::getSetIndexByTimeFreq ( dp_double  frequency) const
Returns
set index (0 based) for given time frequency.

◆ getStepAndSubStep()

std::pair< dp_id, dp_index > ansys::dpf::TimeFreqSupport::getStepAndSubStep ( int  cumulative_index) const
Returns
step index and substep at a given set index (0 based).

◆ getTimeFreqByStep()

dp_double ansys::dpf::TimeFreqSupport::getTimeFreqByStep ( dp_index  step,
dp_index  sub_step 
) const
Returns
time frequency at a given step index and substep indices.
Parameters
[in]stepstep index (0 based).
[in]sub_stepsub_step index (0 based).

◆ harmonicIndeces()

Field ansys::dpf::TimeFreqSupport::harmonicIndeces ( dp_int  stage = 0) const
Returns
Harmonic indices associated with time frequency.
Examples
ModelTest.cpp.

◆ harmonicIndicesScoping()

Scoping ansys::dpf::TimeFreqSupport::harmonicIndicesScoping ( ) const
Returns
Scoping containing all the stage numbers of the TimeFreqSupport.

◆ imaginaryFrequencies()

Field ansys::dpf::TimeFreqSupport::imaginaryFrequencies ( ) const
Returns
Field associated with imaginary part of time frequency.

◆ numberOfSets()

dp_int ansys::dpf::TimeFreqSupport::numberOfSets ( ) const
Returns
Number of time frequency sets.
Examples
CompleteRST.cpp, DataApis.cpp, and ModelTest.cpp.

◆ numberOfSingularSets()

dp_int ansys::dpf::TimeFreqSupport::numberOfSingularSets ( ) const
Returns
Number of unique time frequency entries.

◆ numberOfSteps()

dp_int ansys::dpf::TimeFreqSupport::numberOfSteps ( ) const
Returns
Number of steps.
Examples
ModelTest.cpp.

◆ numberOfSubStepsByStepId()

dp_int ansys::dpf::TimeFreqSupport::numberOfSubStepsByStepId ( dp_int  stepId) const
Returns
Number of sub steps for a given step id.

◆ numberOfSubStepsByStepIndex()

dp_int ansys::dpf::TimeFreqSupport::numberOfSubStepsByStepIndex ( dp_int  stepIndex) const
Returns
Number of sub steps for a given step index (0 based).
Examples
ModelTest.cpp.

◆ rpms()

Field ansys::dpf::TimeFreqSupport::rpms ( ) const
Returns
RPMS associated with time frequency.

◆ setHarmonicIndices()

void ansys::dpf::TimeFreqSupport::setHarmonicIndices ( Field  field,
dp_int  stage = 0 
)

Set harmonic indices of time frequency support from given field for a specified stage.

Parameters
[in]fieldField from which to set imaginary part of time frequency.
[in]stageOptional stage number (default is 0).
Examples
DataApis.cpp.

◆ setImaginaryFrequencies()

void ansys::dpf::TimeFreqSupport::setImaginaryFrequencies ( Field  field)

Set imaginary part of time frequency from given field.

Parameters
[in]fieldField from which to set imaginary part of time frequency.

◆ setRpms()

void ansys::dpf::TimeFreqSupport::setRpms ( Field  field)

Set rpms of time frequency support from given field.

Parameters
[in]fieldField from which to set imaginary part of time frequency.
Examples
DataApis.cpp.

◆ setTimeFrequencies()

void ansys::dpf::TimeFreqSupport::setTimeFrequencies ( Field  field)

Set time frequency from given field.

Parameters
[in]fieldField from which to set time frequency.
Examples
DataApis.cpp.

◆ timeFreq()

dp_double ansys::dpf::TimeFreqSupport::timeFreq ( dp_int  cumul_index,
dp_int  complex_id = 0 
) const
Returns
Time/Frequency for given index.
Parameters
[in]cumul_indexIndex for which to get time frequency.
[in]complex_idOptional non-zero indicates to get imaginary part of time frequency.
Examples
ModelTest.cpp.

◆ timeFrequenciesSubstepIds()

PropertyField ansys::dpf::TimeFreqSupport::timeFrequenciesSubstepIds ( ) const
Returns
substep id associated with time frequency.