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

# ExportToMOP Class Reference

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

A struct collecting export information for FMOP/F-CoP in optiSLang.

## Public Member Functions

| Type | Name |
| - | - |
| | [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 validity of these data. |
| | [ExportToMOP](#a8c9ce3a6bacc3ac24e01814cb01e1fa2) (string optislang\_input, string the\_path) Initialized the object with default values. |
| bool | [outputFilesExisting](#af8ef70826654ecf2af46c75fb83f925a) () |
| | [save](#a6a338dc4344270fcbccadf5667ef12f9) ([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)) Exports all the data and scripts communicate [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) definitions between SoS and optiSLAng. |

## Static Public Member Functions

| Type | Name |
| - | - |
| static | [checkSelectedAmplitudes](#ac1d7acce9d248bcaff1bca550f42aa44) ([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), [DataObjectContainer](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_data_object_container.md) selected\_scalars) checks if the selected scalar data contain valid amplitudes only |

## Public Attributes

| Type | Name |
| - | - |
|  bool | [copy\_results](#aa2d28e7e85f125f59d27e4fbedbb600b) If true, then the result database will also contain all result objects which were computed so far. Default: false. |
|  string | [database\_file](#a90c11fb8a955197d99f5dfc621bd2856) The file name of the database that stores the simulation data (relative to path) |
|  std::vector\< string > | [element\_quantities](#a970a74a4c019ff340a64d03415d87e5e) The element data quantity idents to be exported (all quantities must be associated with random fields for which amplitude samples were generated) |
|  string | [import\_script\_file](#a4d44f4c862c4630598b8007eaef0b411) The file name of the script to be executed to assemble the F-CoP from amplitude [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) (relative to path) |
| number | [min\_cop](#a9c4157039d23c5bdda684578b63c50e5) Defines the minimum [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) being required for an input to be announced in the data table. If the total F-CoP is lower than this limit, it will not be created. |
|  std::vector\< string > | [node\_quantities](#a2ecca64c04b8d43f838b3aa19c191380) The node data quantity idents to be exported (all quantities must be associated with random fields for which amplitude samples were generated) |
|  string | [optislang\_input\_file](#aac275a93401ccbf6426cb70296422fe8) The name of the optiSLang binary file that is parsed and will serve as a template for the output optiSLang bin file (absolute path) |
|  string | [optislang\_output\_file](#a09209613b366e22bbeff2c7455c55a40) The name of the optiSLang binary file that will contain the amplitudes (as responses) (relative to path) |
|  string | [path](#a46c20eb2a26abeb1e934cd66e1dd6484) The output path. Must be given as an absolute path. |
|  bool | [replace\_files](#a2f8b3cba47ad64fb6bda4b6428a032d3) If true, already existing files are to be replaced. |
|  std::vector\< string > | [scalar\_quantities](#a289361395c457f67d04eaa1f1e498628) The scalar data quantity idents to be exported (all quantities must be associated with random fields for which amplitude samples were generated) |

## Detailed Description

A struct collecting export information for FMOP/F-CoP in optiSLang.

## Constructor & Destructor Documentation

### ExportToMOP()

```cpp theme={null}
ExportToMOP(
    string optislang_input,
    string the_path
)
```

Initialized the object with default values.

**Parameters**

| Name | Description |
| - | - |
| optislang\_input | The name of the optiSLang binary template file (to be used as a template for the output file) |
| the\_path | Defines the output path |

## Member Function Documentation

### check()

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

Checks validity of these data.

If any of the specified directories or files does not exist, an exception is thrown It further checks if any of the objects to be exported does not exist.

**Parameters**

| Name | Description |
| - | - |
| database | the data base where the data is stored |

### checkSelectedAmplitudes()

```cpp theme={null}
static checkSelectedAmplitudes(
    Structure database,
    DataObjectContainer selected_scalars
)
```

`static`

checks if the selected scalar data contain valid amplitudes only

**Parameters**

| Name | Description |
| - | - |
| database | the data base where the data is stored |
| selected\_scalars | the selected scalar quantities that are ALL amplitudes to be used/exported. |

**Exceptions**

| Name | Description |
| - | - |
| exception | on error. |

### outputFilesExisting()

```cpp theme={null}
bool outputFilesExisting()
```

**Returns**

true if at least one of the output files are existing.

### save()

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

Exports all the data and scripts communicate [MOP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_m_o_p.md) definitions between SoS and optiSLAng.

**Parameters**

| Name | Description |
| - | - |
| database | the data base where all data is contained. |

## Member Data Documentation

### min\_cop

```cpp theme={null}
number min_cop
```

Defines the minimum [CoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/struct_co_p.md) being required for an input to be announced in the data table. If the total F-CoP is lower than this limit, it will not be created.

This value will be exported to the script file that calls [ImportCoP](https://developer.synopsys.com/docs/optislang/optislang-3d-postprocessing-script-api/class_import_co_p.md). Default: 0.0
