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

# DistanceField Class Reference

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

represents a distance field for an unstructured grid

## Public Member Functions

| Type | Name |
| - | - |
| | [DistanceField](#a15cc0535dbc0e77586c9e6be7ad52a9f) () default constructor used for serialization |
| | [DistanceField](#a139bb19a278626c059c5116b0d4e7cff) (::[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), number additional\_space, number \_grid\_distance, size\_t max\_approx\_grid\_size, bool use\_all\_boundary\_faces=true, bool do\_not\_warn=false) |
| ::[Structure](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_structure) | [exportData](#aaccae3ac8105a1859991f30d5360b302) () destructor |
| bool | [hasData](#a314b19ebe3b2ce78e9df49fee95c21dd) () const |

## Static Public Member Functions

| Type | Name |
| - | - |
|  static number | **getElementSizeFromQuantile** ([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), number quantile\_value) |

## Detailed Description

represents a distance field for an unstructured grid

## Constructor & Destructor Documentation

### DistanceField()

```cpp theme={null}
DistanceField(
    :: Structure database,
    number additional_space,
    number _grid_distance,
    size_t max_approx_grid_size,
    bool use_all_boundary_faces = true,
    bool do_not_warn = false
)
```

**Parameters**

| Name | Description |
| - | - |
| additional\_space | defines how much space must be added along each direction of the structure |
| \_grid\_distance | defines the grid point distance |
| max\_approx\_grid\_size | this is an approximate upper bound to the number of grid points, given that the grid point distance computed from the quantile value exceeds all bounds |
| use\_all\_boundary\_faces | if true, then the complete boundary is used. If false, then the boundary is determined by the reference node set |
| do\_not\_warn | if true no warning will be created (quiet mode) |

## Member Function Documentation

### exportData()

```cpp theme={null}
:: Structure exportData()
```

destructor

returns a copy of the internal distance field as a database

### hasData()

```cpp theme={null}
bool hasData() const
```

**Returns**

true if the distance field contains data
