    

 ## On this page

  

 

 # Data

 Last update: 16.07.2025 

Provides functions and classes to control the central data structure. [More...](#details)

## <a name="nested-classes"></a>Classes

class [DataObjectContainer](class_data_object_container.xhtml) A general container for vector data. [More...](class_data_object_container.xhtml#details)  
 class [DataObjectIdentMap](class_data_object_ident_map.xhtml) A map of data objects of same type being associated with single string idents. [More...](class_data_object_ident_map.xhtml#details)  
 class [DataObjectKey](class_data_object_key.xhtml) the key (ident) of a data object in generic containers. [More...](class_data_object_key.xhtml#details)  
 class [DataObjectPtr](class_data_object_ptr.xhtml) A shared pointer wrapper for data objects. [More...](class_data_object_ptr.xhtml#details)  
 class [DataObjectVector](class_data_object_vector.xhtml) A vector of [DataObjectPtr](class_data_object_ptr.xhtml "A shared pointer wrapper for data objects. "). [More...](class_data_object_vector.xhtml#details)  
 class [Element](class_element.xhtml) Repesents the geometry of a finite element within a mesh. [More...](class_element.xhtml#details)  
 struct [ElementTemporalEditInfo](struct_element_temporal_edit_info.xhtml) collects information to be used for faster FEM mesh creation. [More...](struct_element_temporal_edit_info.xhtml#details)  
 class [IndexMapper](class_index_mapper.xhtml) Accessor for indices in global vectors and matrices. [More...](class_index_mapper.xhtml#details)  
 class [MeshAssembly](class_mesh_assembly.xhtml) describes a finite element mesh [More...](class_mesh_assembly.xhtml#details)  
 class [MetaStructure](class_meta_structure.xhtml) Defines a meta structure which contains all data that is used to create a finite element mesh. [More...](class_meta_structure.xhtml#details)  
 class [MOPContainer](class_m_o_p_container.xhtml) a container storing all Field data models [More...](class_m_o_p_container.xhtml#details)  
 class [MultivariateDistributionTypes](class_multivariate_distribution_types.xhtml) encalsulates ENUM constants defining supported distribution types [More...](class_multivariate_distribution_types.xhtml#details)  
 class [RandomFieldContainer](class_random_field_container.xhtml) a container storing all random field decompositions [More...](class_random_field_container.xhtml#details)  
 class [RandomFieldData](class_random_field_data.xhtml) contains random field data for analysis and simulation for a single random field. [More...](class_random_field_data.xhtml#details)  
 class [RandomFieldGroup](class_random_field_group.xhtml) A group of random fields belonging together (either a single random field, or multiple cross-correlated fields) [More...](class_random_field_group.xhtml#details)  
 class [ValueType](class_value_type.xhtml) Represents a type of value and a set of properties. [ValueType](class_value_type.xhtml "Represents a type of value and a set of properties. ValueType is intended to be associated with a set...") is intended to be associated with a set of floating point data values. It stores information (the value type and named value attributes) about data values. It provides conversion routines between its associated floating point data values and value type. [More...](class_value_type.xhtml#details)  
 class [ValueTypeBool](class_value_type_bool.xhtml) Identifies a set of values as boolean and an associated set of optional attributes. It provides conversion routines between floating point and string representation. [More...](class_value_type_bool.xhtml#details)  
 class [ValueTypeDouble](class_value_type_double.xhtml) Identifies a set of values as number precision floating points values and an associated set of optional attributes (for instance minimum and maximum value). It provides conversion routines between floating point and string representation. [More...](class_value_type_double.xhtml#details)  
 class [ValueTypeEnum](class_value_type_enum.xhtml) Identifies a set of values as an enumration of strings type and an associated set of optional attributes (for instance minimum and maximum value). It provides conversion routines between floating point and string representation. [More...](class_value_type_enum.xhtml#details)  
 class [ValueTypeInt](class_value_type_int.xhtml) Identifies a set of values as integer values and an associated set of optional attributes (for instance minimum and maximum value). It provides conversion routines between floating point and string representation. [More...](class_value_type_int.xhtml#details)  
 class [ValueTypeManager](class_value_type_manager.xhtml) Keeps track of all unique ValueTypes. Required to create new [ValueType](class_value_type.xhtml "Represents a type of value and a set of properties. ValueType is intended to be associated with a set...") shared resource instances. Script example: # Get the [ValueTypeManager](class_value_type_manager.xhtml "Keeps track of all unique ValueTypes. Required to create new ValueType shared resource instances...") associated with a database's [DataObjectContainer](class_data_object_container.xhtml "A general container for vector data. ").

value\_type\_manager = sos.database().data().valueTypeManager() # Create a floating point [ValueType](class_value_type.xhtml "Represents a type of value and a set of properties. ValueType is intended to be associated with a set..."), without any attributes

value\_type = sos.ValueTypeDouble.create(value\_type\_manager, "my\_unique\_value\_type")   
 print("Created ValueType:") print(value\_type) # Set attribute

value\_type.setAttribute("max", 10) # Get Attribute

max = value\_type.attribute("max") print("Number of ValueTypes stored at ValueTypeManager:") print(value\_type\_manager.size()) #1 value\_type = None #Clear unreferenced ValueTypes value\_type\_manager.clearUnused() print("Number of ValueTypes stored at ValueTypeManager:") print(value\_type\_manager.size()) #0. [More...](class_value_type_manager.xhtml#details)  
 ## <a name="typedef-members"></a>Typedefs

<a id="gae27ee575b860e91b6e43a5c597dbeb11"></a>typedef std::pair&lt; string, [dataobject\_types](group__data.xhtml#ga1bebf1e22deb3cd41d7d99ddcdb15379) &gt; [TQuantityIdent](group__data.xhtml#gae27ee575b860e91b6e43a5c597dbeb11) a type specifying a unique quantity, i.e. a string ident for the quantity name and the data type   
 <a id="ga2a154410171578b305471e89715c7d93"></a>typedef std::vector&lt; number &gt; [TUIntVector](group__data.xhtml#ga2a154410171578b305471e89715c7d93) a vector of numbers   
 ## <a name="enum-members"></a>Enumerations

enum [dataobject\_types](group__data.xhtml#ga1bebf1e22deb3cd41d7d99ddcdb15379) { [NODE\_DATA](group__data.xhtml#gga1bebf1e22deb3cd41d7d99ddcdb15379a2bccb499db6de63e558b75b39da3d482) = 0, [ELEMENT\_DATA](group__data.xhtml#gga1bebf1e22deb3cd41d7d99ddcdb15379ae9445a58a2c3cd515f2058cbd3117174), [INTPT\_DATA](group__data.xhtml#gga1bebf1e22deb3cd41d7d99ddcdb15379a37e1d7b53cc878816e95037e5762871a), [SCALAR\_DATA](group__data.xhtml#gga1bebf1e22deb3cd41d7d99ddcdb15379a916fc40dfca5ba301488a121abe77495) } defines an enum for different types of vector data. [More...](group__data.xhtml#ga1bebf1e22deb3cd41d7d99ddcdb15379)  
 ## <a name="func-members"></a>Functions

[Matrix](class_matrix.xhtml) [computeElementCoordinates](group__data.xhtml#gaa66eb2b80072d0daaca0984d0c2cbc0d) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b)) [Matrix](class_matrix.xhtml) [computeNodeCoordinates](group__data.xhtml#ga1cd13e1e99d329c39e31b1ec57d0a5e7) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b)) ::[DataObjectPtr](class_data_object_ptr.xhtml) [createElementDataObject](group__data.xhtml#ga561f7f66d043dca0fbee1711d2621487) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b), [Matrix](class_matrix.xhtml) data, bool as\_sample=true) creates a data object of type ELEMENT based on an external vector data object [More...](#ga561f7f66d043dca0fbee1711d2621487)  
 ::[DataObjectPtr](class_data_object_ptr.xhtml) [createElementDataObject](group__data.xhtml#ga4b7fbb33e01d7353e9fdc4e64049af20) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b), [Matrix](class_matrix.xhtml) data, [Matrix](class_matrix.xhtml) missing\_data, bool as\_sample=true) Creates a data object of type ELEMENT based on an external vector data object including its missing data information. [More...](#ga4b7fbb33e01d7353e9fdc4e64049af20)  
 ::[DataObjectPtr](class_data_object_ptr.xhtml) [createNodeDataObject](group__data.xhtml#ga5f706da00ca8b65acf4a4f8730608b30) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b), [Matrix](class_matrix.xhtml) data, bool as\_sample=true) Creates a data object of type NODE based on an external vector data object including its missing data information. [More...](#ga5f706da00ca8b65acf4a4f8730608b30)  
 ::[DataObjectPtr](class_data_object_ptr.xhtml) [createNodeDataObject](group__data.xhtml#gaa7e429472f0a49942b7978ad936b754b) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b), [Matrix](class_matrix.xhtml) data, [Matrix](class_matrix.xhtml) missing\_data, bool as\_sample=true) Creates a data object of type NODE based on an external vector data object including its missing data information. [More...](#gaa7e429472f0a49942b7978ad936b754b)  
 ::[DataObjectPtr](class_data_object_ptr.xhtml) [createScalarDataObject](group__data.xhtml#ga9fb8c3787a7c7345b6ac97ca38fbb5ec) (number data, bool as\_sample=true) creates a data object of type SCALAR based on an external vector data object [More...](#ga9fb8c3787a7c7345b6ac97ca38fbb5ec)  
 [Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b) () Gives access to the global database. [More...](#gaebcac3a2836ec9fdf2e47bd812994b6b)  
 int [globalIndexFromElement](group__data.xhtml#ga4b59c22870814a7fe33a1b332db498bf) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b), int part\_index, int element\_index) int [globalIndexFromGrid](group__data.xhtml#ga8a832513ab98f31d38f2479c9336fad9) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b), int i, int j=0, int k=0) int [globalIndexFromNode](group__data.xhtml#ga1d1d4b90423b1c6aebd88ea0b0db07c4) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b), int part\_index, int node\_index) int [gridDimension](group__data.xhtml#ga4d6e618220a953afacda9ffd0b14d7ab) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b), unsigned char axis) int [numElements](group__data.xhtml#gadb123a56d9e42dac204e789e94911b38) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b)) int [numNodes](group__data.xhtml#ga8bed76ade4f03b01ae5b4944a3a77568) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b)) bool [operator==](group__data.xhtml#ga995109cbde74fdc91eeeb5431162ea03) ([DataObjectPtr::ObserverPtr](class_data_object_ptr.xhtml#afa0bd4d832168701ce39642b559bf810) [a](group__tmath.xhtml#ga7e205066f67b9e3fd4c8cbd5859e8da3), DataObject \*b) equal operator [More...](#ga995109cbde74fdc91eeeb5431162ea03)  
  [printMeshInfo](group__data.xhtml#gadf4920745450634090634d586c22ea97) ([Structure](class_structure.xhtml) [database](group__data.xhtml#gaebcac3a2836ec9fdf2e47bd812994b6b)) prints information on the finite element mesh [More...](#gadf4920745450634090634d586c22ea97)  
 <a id="details" name="details"></a>## Detailed Description

Provides functions and classes to control the central data structure.

## Enumeration Type Documentation

<a id="ga1bebf1e22deb3cd41d7d99ddcdb15379"></a>## [◆ ](#ga1bebf1e22deb3cd41d7d99ddcdb15379)dataobject\_types

 enum [dataobject\_types](group__data.xhtml#ga1bebf1e22deb3cd41d7d99ddcdb15379)

defines an enum for different types of vector data.

Enumerator<a id="gga1bebf1e22deb3cd41d7d99ddcdb15379a2bccb499db6de63e558b75b39da3d482"></a>NODE\_DATA node data (one scalar per node)

<a id="gga1bebf1e22deb3cd41d7d99ddcdb15379ae9445a58a2c3cd515f2058cbd3117174"></a>ELEMENT\_DATA element data (one scalar per element)

<a id="gga1bebf1e22deb3cd41d7d99ddcdb15379a37e1d7b53cc878816e95037e5762871a"></a>INTPT\_DATA integration point data

<a id="gga1bebf1e22deb3cd41d7d99ddcdb15379a916fc40dfca5ba301488a121abe77495"></a>SCALAR\_DATA scalar data (vector of size 1)





## Function Documentation

<a id="gaa66eb2b80072d0daaca0984d0c2cbc0d"></a>## [◆ ](#gaa66eb2b80072d0daaca0984d0c2cbc0d)computeElementCoordinates()

 [Matrix](class_matrix.xhtml) computeElementCoordinates  ( [Structure](class_structure.xhtml)  *database*) 

Returnsthe matrix of x,y,z coordinates with respect to the centers of the elements of the reference element set (dimension 3\*n; each column is one coordinate) Parameters databasethe database containing the reference mesh 



<a id="ga1cd13e1e99d329c39e31b1ec57d0a5e7"></a>## [◆ ](#ga1cd13e1e99d329c39e31b1ec57d0a5e7)computeNodeCoordinates()

 [Matrix](class_matrix.xhtml) computeNodeCoordinates  ( [Structure](class_structure.xhtml)  *database*) 

Returnsthe matrix of x,y,z coordinates with respect to the nodes of the reference node set (dimension 3\*n; each column is one coordinate) Parameters databasethe database containing the reference mesh 



<a id="ga561f7f66d043dca0fbee1711d2621487"></a>## [◆ ](#ga561f7f66d043dca0fbee1711d2621487)createElementDataObject() \[1/2\]

 ::[DataObjectPtr](class_data_object_ptr.xhtml) createElementDataObject  ( [Structure](class_structure.xhtml)  *database*,    [Matrix](class_matrix.xhtml)  *data*,    bool  *as\_sample* = `true`   ) 

creates a data object of type ELEMENT based on an external vector data object

Parameters databasethe database this object refers to. It is mainly used to test dimension etc. datathe actual data. It must be a column vector. The ordering is with respect to the database. (indexMapper) as\_sampleif true, then the returned data object may be used as an input sample in algorithms. Else it is assumed to be a result. Returnsa new data object containing the appropriate data. The data object will be active and will not have any missing data items. 



<a id="ga4b7fbb33e01d7353e9fdc4e64049af20"></a>## [◆ ](#ga4b7fbb33e01d7353e9fdc4e64049af20)createElementDataObject() \[2/2\]

 ::[DataObjectPtr](class_data_object_ptr.xhtml) createElementDataObject  ( [Structure](class_structure.xhtml)  *database*,    [Matrix](class_matrix.xhtml)  *data*,    [Matrix](class_matrix.xhtml)  *missing\_data*,    bool  *as\_sample* = `true`   ) 

Creates a data object of type ELEMENT based on an external vector data object including its missing data information.

Parameters databaseThe database this object refers to. It is mainly used to test dimension etc. dataThe actual data. It must be a column vector. The ordering is with respect to the indexMapper of the database. missing\_dataThe missing data information. As the data vector it must be a column vector with the same ordering. Furthermore it shall contain only values different from 0 at indices where data values are actually missing. as\_sampleIf true, then the returned data object may be used as an input sample in algorithms. Else it is assumed to be a result. ReturnsA new data object containing the appropriate data. The data object will be active and will not have any missing data items. 



<a id="ga5f706da00ca8b65acf4a4f8730608b30"></a>## [◆ ](#ga5f706da00ca8b65acf4a4f8730608b30)createNodeDataObject() \[1/2\]

 ::[DataObjectPtr](class_data_object_ptr.xhtml) createNodeDataObject  ( [Structure](class_structure.xhtml)  *database*,    [Matrix](class_matrix.xhtml)  *data*,    bool  *as\_sample* = `true`   ) 

Creates a data object of type NODE based on an external vector data object including its missing data information.

Parameters databaseThe database this object refers to. It is mainly used to test dimension etc. dataThe actual data. It must be a column vector. The ordering is with respect to the indexMapper of the database. as\_sampleIf true, then the returned data object may be used as an input sample in algorithms. Else it is assumed to be a result. ReturnsA new data object containing the appropriate data. The data object will be active and will not have any missing data items. 



<a id="gaa7e429472f0a49942b7978ad936b754b"></a>## [◆ ](#gaa7e429472f0a49942b7978ad936b754b)createNodeDataObject() \[2/2\]

 ::[DataObjectPtr](class_data_object_ptr.xhtml) createNodeDataObject  ( [Structure](class_structure.xhtml)  *database*,    [Matrix](class_matrix.xhtml)  *data*,    [Matrix](class_matrix.xhtml)  *missing\_data*,    bool  *as\_sample* = `true`   ) 

Creates a data object of type NODE based on an external vector data object including its missing data information.

Parameters databaseThe database this object refers to. It is mainly used to test dimension etc. dataThe actual data. It must be a column vector. The ordering is with respect to the indexMapper of the database. missing\_dataThe missing data information. As the data vector it must be a column vector with the same ordering. Furthermore it shall contain only values different from 0 at indices where data values are actually missing. as\_sampleIf true, then the returned data object may be used as an input sample in algorithms. Else it is assumed to be a result. ReturnsA new data object containing the appropriate data. The data object will be active and will not have any missing data items. 



<a id="ga9fb8c3787a7c7345b6ac97ca38fbb5ec"></a>## [◆ ](#ga9fb8c3787a7c7345b6ac97ca38fbb5ec)createScalarDataObject()

 ::[DataObjectPtr](class_data_object_ptr.xhtml) createScalarDataObject  ( number  *data*,    bool  *as\_sample* = `true`   ) 

creates a data object of type SCALAR based on an external vector data object

Parameters datathe actual data. It must be a column vector. The ordering is with respect to the database. (indexMapper) as\_sampleif true, then the returned data object may be used as an input sample in algorithms. Else it is assumed to be a result. Returnsa new data object containing the appropriate data. The data object will be active and will not have any missing data items. 



<a id="gaebcac3a2836ec9fdf2e47bd812994b6b"></a>## [◆ ](#gaebcac3a2836ec9fdf2e47bd812994b6b)database()

 [Structure](class_structure.xhtml) database  ( ) 

Gives access to the global database.

ReturnsA reference to the object database\_ptr (the object must be valid!), stored in See alsoapplication\_data 



<a id="ga4b59c22870814a7fe33a1b332db498bf"></a>## [◆ ](#ga4b59c22870814a7fe33a1b332db498bf)globalIndexFromElement()

 int globalIndexFromElement  ( [Structure](class_structure.xhtml)  *database*,    int  *part\_index*,    int  *element\_index*   ) 

Returnsthe global index in a data object from element index Parameters databasethe database part\_indexthe index of the part the element belongs to element\_indexthe index of the element within the part 



<a id="ga8a832513ab98f31d38f2479c9336fad9"></a>## [◆ ](#ga8a832513ab98f31d38f2479c9336fad9)globalIndexFromGrid()

 int globalIndexFromGrid  ( [Structure](class_structure.xhtml)  *database*,    int  *i*,    int  *j* = `0`,    int  *k* = `0`   ) 

Parameters databasethe database iindex i jindex j kindex k Returnsthe corresponding data index of the given grid coordinate 



<a id="ga1d1d4b90423b1c6aebd88ea0b0db07c4"></a>## [◆ ](#ga1d1d4b90423b1c6aebd88ea0b0db07c4)globalIndexFromNode()

 int globalIndexFromNode  ( [Structure](class_structure.xhtml)  *database*,    int  *part\_index*,    int  *node\_index*   ) 

Returnsthe global index in a data object from node index Parameters databasethe database part\_indexthe index of the part the node belongs to node\_indexthe index of the node within the part 



<a id="ga4d6e618220a953afacda9ffd0b14d7ab"></a>## [◆ ](#ga4d6e618220a953afacda9ffd0b14d7ab)gridDimension()

 int gridDimension  ( [Structure](class_structure.xhtml)  *database*,    unsigned char  *axis*   ) 

Parameters databasethe database axisthe axis id (0: i, 1: j, 2: k) Returnsthe number of nodes along given axis of grid 



<a id="gadb123a56d9e42dac204e789e94911b38"></a>## [◆ ](#gadb123a56d9e42dac204e789e94911b38)numElements()

 int numElements  ( [Structure](class_structure.xhtml)  *database*) 

Parameters databasethe database Returnsthe number of active elements 



<a id="ga8bed76ade4f03b01ae5b4944a3a77568"></a>## [◆ ](#ga8bed76ade4f03b01ae5b4944a3a77568)numNodes()

 int numNodes  ( [Structure](class_structure.xhtml)  *database*) 

Parameters databasethe database Returnsthe number of active nodes 



<a id="ga995109cbde74fdc91eeeb5431162ea03"></a>## [◆ ](#ga995109cbde74fdc91eeeb5431162ea03)operator==()

 bool operator==  ( [DataObjectPtr::ObserverPtr](class_data_object_ptr.xhtml#afa0bd4d832168701ce39642b559bf810)  *a*,    DataObject \*  *b*   ) 

equal operator

Parameters aa shared observer pointer to a data object ba simple pointer to a data object to be compared Returnstrue if the memory addresses are equal 



<a id="gadf4920745450634090634d586c22ea97"></a>## [◆ ](#gadf4920745450634090634d586c22ea97)printMeshInfo()

 printMeshInfo  ( [Structure](class_structure.xhtml)  *database*) 

prints information on the finite element mesh

Parameters databasedatabase containing the mesh