> ## 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.

# ApproximateRandomField Class Reference

Part of [Field models](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__fieldmodels)

an algorithm that computes new field samples from amplitudes and random field model

## Public Types

| Type | Name |
| - | - |
|  typedef std::vector\< string > | [StringVector](#a999a7ace250aceefc403bb62cd8c3bcc) typedef for vector of string |

## Public Member Functions

| Type | Name |
| - | - |
| | [ApproximateRandomField](#abed8428b8373181f0763cb47a6e8b28f) (bool enforce\_equal\_idents=false) constructor |
| | [check](#a47c34ec1e578c2ce27cf1c5fcd0d1704) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__data#gaebcac3a2836ec9fdf2e47bd812994b6b)) checks the settings |
| | [compute](#ab08e112d95fe611e7eb25491c354d115) ([Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) [database](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/group__data#gaebcac3a2836ec9fdf2e47bd812994b6b)) computes the new objects |

## Public Attributes

| Type | Name |
| - | - |
|  bool | [accept\_partial\_subspace](#a591952882aeaa67ab84a56aa4d053268) if true, then one accepts that the set of input parameters is incomplete. E.g. if a required input parameter is not selected, then one simly assumes the "center" value for it. |
| [StringVector](#a999a7ace250aceefc403bb62cd8c3bcc) | [element\_rf\_idents](#ad32f73f98b09adf3f85472a8821a2b8c) the idents of selected ELEMENT\_DATA Field data models |
| [StringVector](#a999a7ace250aceefc403bb62cd8c3bcc) | [intpt\_rf\_idents](#a4c9b45bd9f054423f76aa4caadae9268) the idents of selected INTPT\_DATA Field data models |
| [StringVector](#a999a7ace250aceefc403bb62cd8c3bcc) | [node\_rf\_idents](#a36214b9d8cdcdaf27d0362f8d82f6291) the idents of selected NODE\_DATA Field data models |
|  bool | [overwrite\_existing](#ade25e60bd85c8b4abd4f5b416cae0eb9) if true, existing outut objects will be replaced, otherwise: error if it already exists |
| [StringVector](#a999a7ace250aceefc403bb62cd8c3bcc) | [scalar\_rf\_idents](#a92968627a0b6d1a65f4a0647b6f3f165) the idents of selected SCALAR\_DATA Field data models |
| [DataObjectContainer](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_container.md) | [selected\_inputs](#afac43f97194e263427759f8414a2d703) contains the selected scalar input samples |

## Detailed Description

an algorithm that computes new field samples from amplitudes and random field model

## Constructor & Destructor Documentation

### ApproximateRandomField()

```cpp theme={null}
ApproximateRandomField(bool enforce_equal_idents = false)
```

constructor

**Parameters**

| Name | Description |
| - | - |
| enforce\_equal\_idents | if true, then the same quantity idents are used as the input idents (is only used in optiSLang's simulation flow. Usually objects with that quantity ident already exist!) |

## Member Function Documentation

### check()

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

checks the settings

**Parameters**

| Name | Description |
| - | - |
| database | the database we refer to |

**Exceptions**

| Name | Description |
| - | - |
| an | exception in case of an error |

### compute()

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

computes the new objects

**Parameters**

| Name | Description |
| - | - |
| database | the database we refer to |
