Skip to main content

optiSLang 3D Postprocessing Script API 2025 R1

RandomFieldGroup Class Reference

Last update: 16.07.2025

A group of random fields belonging together (either a single random field, or multiple cross-correlated fields) More...

Public Types

typedef std::list< RandomFieldDataTElementRandomFieldDataContainer
 a container of random field data
 
typedef std::list< RandomFieldDataTIntptRandomFieldDataContainer
 a container of random field data
 
typedef std::list< RandomFieldDataTNodeRandomFieldDataContainer
 a container of random field data
 
typedef std::list< RandomFieldDataTScalarRandomFieldDataContainer
 a container of random field data
 

Public Member Functions

template<dataobject_types TYPE>
 add (RandomFieldData field, Structure *database)
 adds the given random field data to this group More...
 
string amplitudeIdent (number i_shape)
 computes the amplitude ident of this group for a given shape number More...
 
 computeCumulativeVariations (Structure *database)
 computes cumulative local variations and stores them in m_variations_cumulative More...
 
 computeIndividualVariations (Structure *database)
 computes individual local variations and stores them in m_variations_individual More...
 
 copyToDatabase (Structure database, bool overwrite_existing)
 copies contained data to the database (being visible in data object table) More...
 
 eraseDatabaseCopies (Structure database)
 deletes all data objects contained in this data structure from the respective database. More...
 
template<dataobject_types TYPE>
bool exists (string quantity)
 
template<dataobject_types TYPE>
std::list< RandomFieldDatafields ()
 
template<dataobject_types TYPE>
RandomFieldData findData (string quantity)
 
template<dataobject_types TYPE>
RandomFieldData findDataRef (string quantity)
 
Eigen::VectorXd getVariationOfShapes ()
 
number getVariationTotal ()
 
string ident ()
 
bool isGroup ()
 
bool isSingle ()
 
bool isValid ()
 
int numShapes ()
 
bool overlaps (RandomFieldGroup field)
 
 RandomFieldGroup ()
 default constructor
 
 RandomFieldGroup (RandomFieldGroup other)
 copy constructor More...
 
string readableIdent ()
 
 setIdent (string ident, Structure *database)
 sets m_ident More...
 
 template (findNodeData) findData< NODE_DATA >
 
 template (findElementData) findData< ELEMENT_DATA >
 
 template (findScalarData) findData< SCALAR_DATA >
 
 template (findNodeDataRef) findDataRef< NODE_DATA >
 
 template (findElementDataRef) findDataRef< ELEMENT_DATA >
 
 template (findScalarDataRef) findDataRef< SCALAR_DATA >
 

Detailed Description

A group of random fields belonging together (either a single random field, or multiple cross-correlated fields)

Constructor & Destructor Documentation

◆ RandomFieldGroup()

copy constructor

Parameters
otherthe object to be copied

Member Function Documentation

◆ add()

add ( RandomFieldData  field,
Structure database 
)

adds the given random field data to this group

Parameters
fieldthe field data to be added to this group
databaseif not zero, then the connected listeners will be notified on changing the random field models

◆ amplitudeIdent()

string amplitudeIdent ( number  i_shape)

computes the amplitude ident of this group for a given shape number

Parameters
i_shapeshape number (0..n-1)
Returns
the quantity ident of the respective amplitude

◆ computeCumulativeVariations()

computeCumulativeVariations ( Structure database)

computes cumulative local variations and stores them in m_variations_cumulative

Parameters
databaseif not zero, then the connected listeners will be notified on changing the random field models

◆ computeIndividualVariations()

computeIndividualVariations ( Structure database)

computes individual local variations and stores them in m_variations_individual

Parameters
databaseif not zero, then the connected listeners will be notified on changing the random field models

◆ copyToDatabase()

copyToDatabase ( Structure  database,
bool  overwrite_existing 
)

copies contained data to the database (being visible in data object table)

Parameters
databasethe target database
overwrite_existingif true, then data objects with identical ident will be replaced, else an exception is thrown.

◆ eraseDatabaseCopies()

eraseDatabaseCopies ( Structure  database)

deletes all data objects contained in this data structure from the respective database.

Parameters
databasethe database to be deleted

◆ exists()

bool exists ( string  quantity)
Returns
true if the fiven quantity ident is already contained
Parameters
quantitythe quantity ident

◆ fields()

std::list<RandomFieldData> fields ( )
Returns
a const-reference to the respective field container

◆ findData()

RandomFieldData findData ( string  quantity)
Returns
a reference to the data of the given quantity, regardless of being part of a group or a single field
Parameters
quantitythe quantity ident

◆ findDataRef()

RandomFieldData findDataRef ( string  quantity)
Returns
a non- reference to the data of the given quantity, regardless of being part of a group or a single field
Parameters
quantitythe quantity ident

◆ getVariationOfShapes()

Eigen::VectorXd getVariationOfShapes ( )
Returns
the explainable variation of each scatter shape

◆ getVariationTotal()

number getVariationTotal ( )
Returns
the total explainable variation

◆ ident()

string ident ( )
Returns
m_ident

◆ isGroup()

bool isGroup ( )
Returns
true if this group represents multiple cross-correlated fields

◆ isSingle()

bool isSingle ( )
Returns
true if this group represents a single random field, else there are multiple cross-correlated fields

◆ isValid()

bool isValid ( )
Returns
true if there are any fields assigned

◆ numShapes()

int numShapes ( )
Returns
the number of shapes used by this group.

◆ overlaps()

bool overlaps ( RandomFieldGroup  field)
Returns
true if any quantity of the other field has the same ident as a quantity in this object
Parameters
fieldthe other field to be tested

◆ readableIdent()

string readableIdent ( )
Returns
computes a human reable ident for LOG-output purposes of this RFGroup

◆ setIdent()

setIdent ( string  ident,
Structure database 
)

sets m_ident

Parameters
identthe new ident
databaseif not zero, then the connected listeners will be notified on changing the random field models

Connect with Ansys