> ## Documentation Index
> Fetch the complete documentation index at: https://developer.synopsys.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Data

Provides functions and classes to control the central data structure.

## Classes

| Type | Name |
| - | - |
| class | [DataObjectContainer](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_container.md) A general container for vector data. |
| class | [DataObjectIdentMap](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_ident_map.md) A map of data objects of same type being associated with single string idents. |
| class | [DataObjectKey](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_key.md) the key (ident) of a data object in generic containers. |
| class | [DataObjectPtr](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_ptr.md) A shared pointer wrapper for data objects. |
| class | [DataObjectVector](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_vector.md) A vector of [DataObjectPtr](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_ptr.md). |
| class | [Element](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_element.md) Repesents the geometry of a finite element within a mesh. |
| struct | [ElementTemporalEditInfo](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_element_temporal_edit_info.md) collects information to be used for faster FEM mesh creation. |
| class | [IndexMapper](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_index_mapper.md) Accessor for indices in global vectors and matrices. |
| class | [MeshAssembly](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_mesh_assembly.md) describes a finite element mesh |
| class | [MetaStructure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_meta_structure.md) Defines a meta structure which contains all data that is used to create a finite element mesh. |
| class | [MOPContainer](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p_container.md) a container storing all Field data models |
| class | [MultivariateDistributionTypes](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_multivariate_distribution_types.md) encalsulates ENUM constants defining supported distribution types |
| class | [RandomFieldContainer](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_random_field_container.md) a container storing all random field decompositions |
| class | [RandomFieldData](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_random_field_data.md) contains random field data for analysis and simulation for a single random field. |
| class | [RandomFieldGroup](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_random_field_group.md) A group of random fields belonging together (either a single random field, or multiple cross-correlated fields) |
| class | [ValueType](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_value_type.md) Represents a type of value and a set of properties. [ValueType](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_value_type.md) 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. |
| class | [ValueTypeBool](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_value_type_bool.md) Identifies a set of values as boolean and an associated set of optional attributes. It provides conversion routines between floating point and string representation. |
| class | [ValueTypeDouble](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_value_type_double.md) 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. |
| class | [ValueTypeEnum](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_value_type_enum.md) 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. |
| class | [ValueTypeInt](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_value_type_int.md) 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. |
| class | [ValueTypeManager](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_value_type_manager.md) Keeps track of all unique ValueTypes. Required to create new [ValueType](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_value_type.md) shared resource instances. Script example: ## Get the [ValueTypeManager](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_value_type_manager.md) associated with a database's [DataObjectContainer](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_container.md). value\_type\_manager = sos.database().data().valueTypeManager() ## Create a floating point [ValueType](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_value_type.md), 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. |

## Typedefs

| Type | Name |
| - | - |
|  typedef std::pair\< string, [dataobject\_types](#ga1bebf1e22deb3cd41d7d99ddcdb15379) > | [TQuantityIdent](#gae27ee575b860e91b6e43a5c597dbeb11) a type specifying a unique quantity, i.e. a string ident for the quantity name and the data type |
|  typedef std::vector\< number > | [TUIntVector](#ga2a154410171578b305471e89715c7d93) a vector of numbers |

## Enumerations

| Type | Name |
| - | - |
| enum | [dataobject\_types](#ga1bebf1e22deb3cd41d7d99ddcdb15379) \{ [NODE\_DATA](#gga1bebf1e22deb3cd41d7d99ddcdb15379a2bccb499db6de63e558b75b39da3d482) = 0, [ELEMENT\_DATA](#gga1bebf1e22deb3cd41d7d99ddcdb15379ae9445a58a2c3cd515f2058cbd3117174), [INTPT\_DATA](#gga1bebf1e22deb3cd41d7d99ddcdb15379a37e1d7b53cc878816e95037e5762871a), [SCALAR\_DATA](#gga1bebf1e22deb3cd41d7d99ddcdb15379a916fc40dfca5ba301488a121abe77495) } defines an enum for different types of vector data. |

## Functions

| Type | Name |
| - | - |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [computeElementCoordinates](#gaa66eb2b80072d0daaca0984d0c2cbc0d) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](#gaebcac3a2836ec9fdf2e47bd812994b6b)) |
| [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) | [computeNodeCoordinates](#ga1cd13e1e99d329c39e31b1ec57d0a5e7) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](#gaebcac3a2836ec9fdf2e47bd812994b6b)) |
| ::[DataObjectPtr](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_ptr.md) | [createElementDataObject](#ga561f7f66d043dca0fbee1711d2621487) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](#gaebcac3a2836ec9fdf2e47bd812994b6b), [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) data, bool as\_sample=true) creates a data object of type ELEMENT based on an external vector data object |
| ::[DataObjectPtr](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_ptr.md) | [createElementDataObject](#ga4b7fbb33e01d7353e9fdc4e64049af20) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](#gaebcac3a2836ec9fdf2e47bd812994b6b), [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) data, [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) 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. |
| ::[DataObjectPtr](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_ptr.md) | [createNodeDataObject](#ga5f706da00ca8b65acf4a4f8730608b30) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](#gaebcac3a2836ec9fdf2e47bd812994b6b), [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) data, bool as\_sample=true) Creates a data object of type NODE based on an external vector data object including its missing data information. |
| ::[DataObjectPtr](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_ptr.md) | [createNodeDataObject](#gaa7e429472f0a49942b7978ad936b754b) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](#gaebcac3a2836ec9fdf2e47bd812994b6b), [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) data, [Matrix](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_matrix.md) 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. |
| ::[DataObjectPtr](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_ptr.md) | [createScalarDataObject](#ga9fb8c3787a7c7345b6ac97ca38fbb5ec) (number data, bool as\_sample=true) creates a data object of type SCALAR based on an external vector data object |
| [Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) | [database](#gaebcac3a2836ec9fdf2e47bd812994b6b) () Gives access to the global database. |
| int | [globalIndexFromElement](#ga4b59c22870814a7fe33a1b332db498bf) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](#gaebcac3a2836ec9fdf2e47bd812994b6b), int part\_index, int element\_index) |
| int | [globalIndexFromGrid](#ga8a832513ab98f31d38f2479c9336fad9) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](#gaebcac3a2836ec9fdf2e47bd812994b6b), int i, int j=0, int k=0) |
| int | [globalIndexFromNode](#ga1d1d4b90423b1c6aebd88ea0b0db07c4) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](#gaebcac3a2836ec9fdf2e47bd812994b6b), int part\_index, int node\_index) |
| int | [gridDimension](#ga4d6e618220a953afacda9ffd0b14d7ab) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](#gaebcac3a2836ec9fdf2e47bd812994b6b), unsigned char axis) |
| int | [numElements](#gadb123a56d9e42dac204e789e94911b38) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](#gaebcac3a2836ec9fdf2e47bd812994b6b)) |
| int | [numNodes](#ga8bed76ade4f03b01ae5b4944a3a77568) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](#gaebcac3a2836ec9fdf2e47bd812994b6b)) |
| bool | [operator==](#ga995109cbde74fdc91eeeb5431162ea03) ([DataObjectPtr::ObserverPtr](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_ptr.md#afa0bd4d832168701ce39642b559bf810) [a](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__tmath#ga7e205066f67b9e3fd4c8cbd5859e8da3), DataObject \*b) equal operator |
| | [printMeshInfo](#gadf4920745450634090634d586c22ea97) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](#gaebcac3a2836ec9fdf2e47bd812994b6b)) prints information on the finite element mesh |

## Detailed Description

Provides functions and classes to control the central data structure.

## Enumeration Type Documentation

### dataobject\_types

```cpp theme={null}
enum dataobject_types
```

defines an enum for different types of vector data.

| Enumerator | |
| - | - |
| NODE\_DATA | node data (one scalar per node) |
| ELEMENT\_DATA | element data (one scalar per element) |
| INTPT\_DATA | integration point data |
| SCALAR\_DATA | scalar data (vector of size 1) |

## Function Documentation

### computeElementCoordinates()

```cpp theme={null}
Matrix computeElementCoordinates(Structure database)
```

**Returns**

the 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**

| Name | Description |
| - | - |
| database | the database containing the reference mesh |

### computeNodeCoordinates()

```cpp theme={null}
Matrix computeNodeCoordinates(Structure database)
```

**Returns**

the 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**

| Name | Description |
| - | - |
| database | the database containing the reference mesh |

### createElementDataObject() \[1/2]

```cpp theme={null}
:: DataObjectPtr createElementDataObject(
    Structure database,
    Matrix data,
    bool as_sample = true
)
```

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

**Parameters**

| Name | Description |
| - | - |
| database | the database this object refers to. It is mainly used to test dimension etc. |
| data | the actual data. It must be a column vector. The ordering is with respect to the database. (indexMapper) |
| as\_sample | if true, then the returned data object may be used as an input sample in algorithms. Else it is assumed to be a result. |

**Returns**

a new data object containing the appropriate data. The data object will be active and will not have any missing data items.

### createElementDataObject() \[2/2]

```cpp theme={null}
:: DataObjectPtr createElementDataObject(
    Structure database,
    Matrix data,
    Matrix 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**

| Name | Description |
| - | - |
| database | The database this object refers to. It is mainly used to test dimension etc. |
| data | The actual data. It must be a column vector. The ordering is with respect to the indexMapper of the database. |
| missing\_data | The 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\_sample | If true, then the returned data object may be used as an input sample in algorithms. Else it is assumed to be a result. |

**Returns**

A new data object containing the appropriate data. The data object will be active and will not have any missing data items.

### createNodeDataObject() \[1/2]

```cpp theme={null}
:: DataObjectPtr createNodeDataObject(
    Structure database,
    Matrix 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**

| Name | Description |
| - | - |
| database | The database this object refers to. It is mainly used to test dimension etc. |
| data | The actual data. It must be a column vector. The ordering is with respect to the indexMapper of the database. |
| as\_sample | If true, then the returned data object may be used as an input sample in algorithms. Else it is assumed to be a result. |

**Returns**

A new data object containing the appropriate data. The data object will be active and will not have any missing data items.

### createNodeDataObject() \[2/2]

```cpp theme={null}
:: DataObjectPtr createNodeDataObject(
    Structure database,
    Matrix data,
    Matrix 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**

| Name | Description |
| - | - |
| database | The database this object refers to. It is mainly used to test dimension etc. |
| data | The actual data. It must be a column vector. The ordering is with respect to the indexMapper of the database. |
| missing\_data | The 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\_sample | If true, then the returned data object may be used as an input sample in algorithms. Else it is assumed to be a result. |

**Returns**

A new data object containing the appropriate data. The data object will be active and will not have any missing data items.

### createScalarDataObject()

```cpp theme={null}
:: DataObjectPtr createScalarDataObject(
    number data,
    bool as_sample = true
)
```

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

**Parameters**

| Name | Description |
| - | - |
| data | the actual data. It must be a column vector. The ordering is with respect to the database. (indexMapper) |
| as\_sample | if true, then the returned data object may be used as an input sample in algorithms. Else it is assumed to be a result. |

**Returns**

a new data object containing the appropriate data. The data object will be active and will not have any missing data items.

### database()

```cpp theme={null}
Structure database()
```

Gives access to the global database.

**Returns**

A reference to the object database\_ptr (the object must be valid!), stored in

**See also**

application\_data

### globalIndexFromElement()

```cpp theme={null}
int globalIndexFromElement(
    Structure database,
    int part_index,
    int element_index
)
```

**Returns**

the global index in a data object from element index

**Parameters**

| Name | Description |
| - | - |
| database | the database |
| part\_index | the index of the part the element belongs to |
| element\_index | the index of the element within the part |

### globalIndexFromGrid()

```cpp theme={null}
int globalIndexFromGrid(
    Structure database,
    int i,
    int j = 0,
    int k = 0
)
```

**Parameters**

| Name | Description |
| - | - |
| database | the database |
| i | index i |
| j | index j |
| k | index k |

**Returns**

the corresponding data index of the given grid coordinate

### globalIndexFromNode()

```cpp theme={null}
int globalIndexFromNode(
    Structure database,
    int part_index,
    int node_index
)
```

**Returns**

the global index in a data object from node index

**Parameters**

| Name | Description |
| - | - |
| database | the database |
| part\_index | the index of the part the node belongs to |
| node\_index | the index of the node within the part |

### gridDimension()

```cpp theme={null}
int gridDimension(
    Structure database,
    unsigned char axis
)
```

**Parameters**

| Name | Description |
| - | - |
| database | the database |
| axis | the axis id (0: i, 1: j, 2: k) |

**Returns**

the number of nodes along given axis of grid

### numElements()

```cpp theme={null}
int numElements(Structure database)
```

**Parameters**

| Name | Description |
| - | - |
| database | the database |

**Returns**

the number of active elements

### numNodes()

```cpp theme={null}
int numNodes(Structure database)
```

**Parameters**

| Name | Description |
| - | - |
| database | the database |

**Returns**

the number of active nodes

### operator==()

```cpp theme={null}
bool operator==(
    DataObjectPtr::ObserverPtr a,
    DataObject * b
)
```

equal operator

**Parameters**

| Name | Description |
| - | - |
| a | a shared observer pointer to a data object |
| b | a simple pointer to a data object to be compared |

**Returns**

true if the memory addresses are equal

### printMeshInfo()

```cpp theme={null}
printMeshInfo(Structure database)
```

prints information on the finite element mesh

**Parameters**

| Name | Description |
| - | - |
| database | database containing the mesh |
