Public Member Functions | List of all members
CalculationDefinition Class Reference

CalculationDefinition class is used for the calculation processing of results (Parts, faces, and edges).
The class can be obtained from Study class.
. More...

Public Member Functions

void AddGroup (MeshGroup *set, int group=0)
 Adds MeshGroup object to the calculation. More...
 
void AddSelected (Selection *selection)
 Adds the parts, faces, or edges that is selected using the Selection object to a calculation. More...
 
void AddSet (Set *set, int group=0)
 Adds a set object to a calculation. More...
 
void AddSetFromModel (Variant &val, int group=0)
 Adds a set with a specified name or index to a calculation. More...
 
void AddTarget (String &name)
 Adds an arbitrary section / arbitrary edge to the calculation target. More...
 
void ClearParts ()
 Removes all parts, faces, or edges from calculation.
 
void ClearTargets ()
 Deletes all arbitrary sections and arbitrary edges from the calculation target.
 
String GetCalculationType ()
 Returns the calculation type. More...
 
StringList GetCalculationTypeNames ()
 Returns a list of calculation types. More...
 
DataSetGetCaseDataSet (int caseno)
 Returns DataSet for a specified case. More...
 
String GetComponent ()
 Returns CalculationDefinition object for a specified name or index. This function is used to operate the properties of a calculation. More...
 
Variant GetComponentNames ()
 Returns a list of components. More...
 
DataSetGetDataSet ()
 Returns a DataSet object. More...
 
PointGetDirectionAxis ()
 Returns the direction axis coordinates.
 
bool GetDirectionReverse ()
 Returns whether to reverse the edge or surface direction in the case of a line integral or surface integral.
 
bool GetFullModelExpansion ()
 Whether to use full model expansion.
 
String GetName ()
 Returns a title. More...
 
int GetNumCopies ()
 Returns the number of copies.
 
double GetOffsetAngle ()
 Returns the angle offset.
 
double GetOffsetTranslation ()
 Returns the translation offset.
 
PointGetOrigin ()
 Returns the origin coordinates.
 
Variant GetParts ()
 Returns an ID list of parts, faces, or edges as a point sequence. More...
 
double GetPhase ()
 Returns a phase. More...
 
String GetPhaseType ()
 Returns the phase type. More...
 
int GetReferenceStep ()
 Returns reference step. More...
 
String GetResultCoordinateName ()
 Returns the name of the coordinate system being used. More...
 
String GetResultCoordinateNameList ()
 Returns a list of coordinate systems that can be used. More...
 
String GetResultType ()
 Returns name of a result type as a string. More...
 
Variant GetResultTypeNames ()
 Returns a list of result type names. More...
 
double GetScaleFactor ()
 Returns the scale factor. More...
 
SelectionGetSelection ()
 Returns the parts, faces, or edges included in a calculation as Selection object. More...
 
SetGetSet (int index, int group=0)
 Returns sets included in a calculation with a specified name or index. More...
 
double GetTemperature ()
 Returns temperature. More...
 
double GetThreshold ()
 Returns a boundary value. More...
 
String GetUserComponentType ()
 Returns the user component selected in the result type. More...
 
bool IsOneResultPerSet ()
 Whether to split one result per set.
 
bool IsValid ()
 Returns True if an object is valid. More...
 
int NumSets (int group=0)
 Returns the number of sets included in a calculation with a specified name or index. More...
 
void RemoveAllSets (int group=0)
 Removes all sets from a calculation. More...
 
void RemoveSet (Variant &val, int group=0)
 Removes a set with a specified name or index from a calculation. More...
 
void SetCalculationType (String &name)
 Specifies the calculation method. More...
 
void SetComponent (String &name)
 Specifies a component name. More...
 
void SetDirectionAxis (double x, double y, double z)
 Specifies the direction for pattern copy. More...
 
void SetDirectionReverse (bool reverse)
 Specifies whether to reverse the edge or surface direction in the case of line integral or surface integral. More...
 
void SetFullModelExpansion (bool useFullModelExpansion)
 Specifies whether to use full model expansion. More...
 
void SetHistoryAllSteps ()
 Specifies all steps to be referenced by the history function.
 
void SetHistorySteps (String array &steps)
 Specifies the range of steps to be referenced by the history function. More...
 
void SetHistoryStepsByString (String &str)
 Specifies multiple steps to be referenced by the history function using a string. More...
 
void SetName (String &name)
 Specifies a title. More...
 
void SetNumCopies (Variant &numCopies)
 Specifies the number of pattern copies. More...
 
void SetOffsetAngle (Variant &offsetAngle)
 Specifies the offset angle. More...
 
void SetOffsetTranslation (Variant &offsetTranslation)
 Returns the offset translation. More...
 
void SetOneResultPerSet (bool oneResultPerSet)
 Splits into one result per set. More...
 
void SetOrigin (double x, double y, double z)
 Specifies the origin for pattern copy. More...
 
void SetPhase (double value)
 Specifies a phase. More...
 
void SetPhaseType (Variant &value)
 Specifies the phase type. More...
 
void SetReferenceStep (Variant &step)
 Specifies reference step. More...
 
void SetResultCoordinate (Variant &name)
 Specifies coordinate system to be used by specifying its name or index. More...
 
void SetResultType (String &typeName, String &sourceTitle=String())
 Specifies the result type. More...
 
void SetScaleFactor (Variant &scaleFactor)
 Specifies the scale factor. More...
 
void SetTemperature (Variant &value)
 Specifies temperature. More...
 
void SetThreshold (Variant &value)
 Specifies the boundary value. More...
 
void SetUseFullModelConversion (bool use)
 Specifies whether to use the full model conversion or not. More...
 
void SetUsePatternCopy (bool usePatternCopy)
 Uses automatic pattern copy. More...
 
void SetUserComponentType (String &name)
 Specifies user component. More...
 
void SetUseRotationCopy (bool useRotationCopy)
 Specifies whether to use rotation or translation pattern copy. More...
 
bool UseFullModelConversion ()
 Returns whether to use the full model conversion or not.
 
bool UsePatternCopy ()
 Whether to use automatic pattern copy.
 
bool UseRotationCopy ()
 Uses rotation pattern copy or translation copy.
 

Detailed Description

CalculationDefinition class is used for the calculation processing of results (Parts, faces, and edges).
The class can be obtained from Study class.
.

Example of calling the class object:

app.GetModel(0).GetStudy(0).GetCalculationDefinition(0)

Member Function Documentation

void CalculationDefinition::AddGroup ( MeshGroup set,
int  group = 0 
)

Adds MeshGroup object to the calculation.

Parameters
setMeshGroup object
groupGroup

For more information about MeshGroup, see MeshGroup .

void CalculationDefinition::AddSelected ( Selection selection)

Adds the parts, faces, or edges that is selected using the Selection object to a calculation.

Parameters
selectionSelection object (selected parts, faces, or edges)
void CalculationDefinition::AddSet ( Set set,
int  group = 0 
)

Adds a set object to a calculation.

Parameters
setSet object
groupGroup

For more information about Sets, see Set and SetList .

void CalculationDefinition::AddSetFromModel ( Variant &  val,
int  group = 0 
)

Adds a set with a specified name or index to a calculation.

Parameters
valName or index of the set
groupGroup
void CalculationDefinition::AddTarget ( String &  name)

Adds an arbitrary section / arbitrary edge to the calculation target.

Parameters
nameName to be calculate target
String CalculationDefinition::GetCalculationType ( )

Returns the calculation type.

Returns
String
Calculation method
max : Maximum value
min : Minimum value
range : Range (maximum value - minimum value)
sum : Total sum
average : Simple average
integral_average : Integral average
integral : Integral (part)
surface_integral : Surface integral
line_integral : Line integral
below_threshold : Region below threshold
above_threshold : Region above threshold
StringList CalculationDefinition::GetCalculationTypeNames ( )

Returns a list of calculation types.

Returns
String array
DataSet * CalculationDefinition::GetCaseDataSet ( int  caseno)

Returns DataSet for a specified case.

Parameters
casenoCase number
Returns
DataSet object

caseno is the one-based number.

String CalculationDefinition::GetComponent ( )

Returns CalculationDefinition object for a specified name or index. This function is used to operate the properties of a calculation.

Parameters
valName or index
Returns
CalculationDefinition object
Variant CalculationDefinition::GetComponentNames ( )

Returns a list of components.

Returns
String array
DataSet * CalculationDefinition::GetDataSet ( )

Returns a DataSet object.

Returns
DataSet object

For more information about DataSet, see DataSet .

String CalculationDefinition::GetName ( )

Returns a title.

Returns
Title (string)
Variant CalculationDefinition::GetParts ( )

Returns an ID list of parts, faces, or edges as a point sequence.

Returns
ID list for parts, faces, and edges
double CalculationDefinition::GetPhase ( )

Returns a phase.

Returns
Phase
String CalculationDefinition::GetPhaseType ( )

Returns the phase type.

Returns
Phase type
"RealImag" = Displays real part and imaginary part
"AmplitudePhase" = Displays amplitude and phase
"FixedPhase" = Specified phase
int CalculationDefinition::GetReferenceStep ( )

Returns reference step.

Returns
Reference step ID

This command is used when the demagnetization ratio (Compared to reference step) is selected as the result type.

String CalculationDefinition::GetResultCoordinateName ( )

Returns the name of the coordinate system being used.

Returns
Name of the coordinate system
String CalculationDefinition::GetResultCoordinateNameList ( )

Returns a list of coordinate systems that can be used.

Returns
List of names for coordinate systems
String CalculationDefinition::GetResultType ( )

Returns name of a result type as a string.

Returns
Name of the result type
Variant CalculationDefinition::GetResultTypeNames ( )

Returns a list of result type names.

Returns
List of result type names
double CalculationDefinition::GetScaleFactor ( )

Returns the scale factor.

Returns
Scale factor
Selection * CalculationDefinition::GetSelection ( )

Returns the parts, faces, or edges included in a calculation as Selection object.

Returns
Selection object
Set * CalculationDefinition::GetSet ( int  index,
int  group = 0 
)

Returns sets included in a calculation with a specified name or index.

Parameters
indexIndex of the set
groupGroup ID for calculation

For more information about Sets, see Set and SetList .

double CalculationDefinition::GetTemperature ( )

Returns temperature.

Returns
Temperature

This command is used when the demagnetization ratio (Compared to undemagnetized state, temperature dependent) is selected as the result type.

double CalculationDefinition::GetThreshold ( )

Returns a boundary value.

Returns
Boundary value
String CalculationDefinition::GetUserComponentType ( )

Returns the user component selected in the result type.

Returns
name User component name
bool CalculationDefinition::IsValid ( )

Returns True if an object is valid.

Returns
Whether or not the CalculationDefinition objects in the list are valid
int CalculationDefinition::NumSets ( int  group = 0)

Returns the number of sets included in a calculation with a specified name or index.

Parameters
groupGroup ID for calculation
Returns
Number of sets
void CalculationDefinition::RemoveAllSets ( int  group = 0)

Removes all sets from a calculation.

Parameters
groupGroup ID for calculation
void CalculationDefinition::RemoveSet ( Variant &  val,
int  group = 0 
)

Removes a set with a specified name or index from a calculation.

Parameters
valName or index of the set
groupGroup ID for calculation
void CalculationDefinition::SetCalculationType ( String &  name)

Specifies the calculation method.

Parameters
name
Calculation method
max : Maximum value
min : Minimum value
range : Range (maximum value - minimum value)
sum : Total sum
average : Simple average
integral_average : Integral average
integral : Integral (part)
surface_integral : Surface integral
line_integral : Line integral
below_threshold : Region below threshold
above_threshold : Region above threshold
void CalculationDefinition::SetComponent ( String &  name)

Specifies a component name.

Parameters
nameComponent name
void CalculationDefinition::SetDirectionAxis ( double  x,
double  y,
double  z 
)

Specifies the direction for pattern copy.

Parameters
xx-axis
yy-axis
zz-axis
void CalculationDefinition::SetDirectionReverse ( bool  reverse)

Specifies whether to reverse the edge or surface direction in the case of line integral or surface integral.

Parameters
reverseReverse the edge or surface direction
void CalculationDefinition::SetFullModelExpansion ( bool  useFullModelExpansion)

Specifies whether to use full model expansion.

Parameters
useFullModelExpansionwhether to use full model expansion
void CalculationDefinition::SetHistorySteps ( String array &  historySteps)

Specifies the range of steps to be referenced by the history function.

Parameters
historyStepsStep
void CalculationDefinition::SetHistoryStepsByString ( String &  str)

Specifies multiple steps to be referenced by the history function using a string.

The steps can be specified either with a comma (e.g. 1,2,3) or by the range (e.g. 4-8).

Parameters
strStep
void CalculationDefinition::SetName ( String &  name)

Specifies a title.

Parameters
nameName
void CalculationDefinition::SetNumCopies ( Variant &  numCopies)

Specifies the number of pattern copies.

Parameters
numCopiesNumber of copies to be made
void CalculationDefinition::SetOffsetAngle ( Variant &  offsetAngle)

Specifies the offset angle.

Parameters
offsetAngleOffset angle
void CalculationDefinition::SetOffsetTranslation ( Variant &  offsetTranslation)

Returns the offset translation.

Parameters
offsetTranslationOffset translation
void CalculationDefinition::SetOneResultPerSet ( bool  oneResultPerSet)

Splits into one result per set.

Parameters
oneResultPerSetWhether to split into one result per set.
void CalculationDefinition::SetOrigin ( double  x,
double  y,
double  z 
)

Specifies the origin for pattern copy.

Parameters
xx-axis
yy-axis
zz-axis
void CalculationDefinition::SetPhase ( double  value)

Specifies a phase.

Parameters
valuePhase
void CalculationDefinition::SetPhaseType ( Variant &  value)

Specifies the phase type.

Parameters
value
Phase type
"RealImag" or "0" = Displays real part and imaginary part
"AmplitudePhase" or "1" = Displays amplitude and phase
"FixedPhase" or "2" = Specified phase
void CalculationDefinition::SetReferenceStep ( Variant &  step)

Specifies reference step.

Parameters
stepReference step ID

This command is used to display the demagnetization ratio (Compared to reference step) for a magnetic field analysis.

void CalculationDefinition::SetResultCoordinate ( Variant &  name)

Specifies coordinate system to be used by specifying its name or index.

Parameters
nameName or index of the coordinate system
void CalculationDefinition::SetResultType ( String &  typeName,
String &  sourceTitle = String() 
)

Specifies the result type.

Parameters
typeNameResult type name
sourceTitleTitle of the result calculation, such as FFT, when referencing the calculation tool.

sourceTitle can be omitted.
For information about the condition type name that can be specified as typeName , see Properties and Flags for Calculating Results .

void CalculationDefinition::SetScaleFactor ( Variant &  scaleFactor)

Specifies the scale factor.

Parameters
scaleFactorScale factor
void CalculationDefinition::SetTemperature ( Variant &  value)

Specifies temperature.

Parameters
valueTemperature

This command is used to display the demagnetization ratio (Compared to undemagnetized state, temperature dependent) for a magnetic field analysis.

void CalculationDefinition::SetThreshold ( Variant &  value)

Specifies the boundary value.

Parameters
valueBoundary value
void CalculationDefinition::SetUseFullModelConversion ( bool  use)

Specifies whether to use the full model conversion or not.

Parameters
useUse the full model conversion
void CalculationDefinition::SetUsePatternCopy ( bool  usePatternCopy)

Uses automatic pattern copy.

Parameters
usePatternCopyWhether to use automatic pattern copy.
void CalculationDefinition::SetUserComponentType ( String &  name)

Specifies user component.

Parameters
nameUser component name
void CalculationDefinition::SetUseRotationCopy ( bool  useRotationCopy)

Specifies whether to use rotation or translation pattern copy.

Parameters
useRotationCopyWhether to use rotation or translation pattern copy