... | ... | @@ -122,14 +122,14 @@ Currently these basic functions do not allow setting optional ONELAB attributes. |
|
|
|
|
|
All the above functions (`DefineNumber`, `DefineString`, `DefineConstant`, `SetNumber`, `SetString`, `GetNumber` and `GetString`) are executed when the input data files for GetDP and Gmsh are parsed. For GetDP, this means that the queries in the database using these functions are done once, when the `.pro` file is analyzed.
|
|
|
|
|
|
However, in some situations, one might want to exchange information with the ONELAB database while the computation is running, i.e. at ''run-time''. GetDP defines two built-in functions (at the same level as other GetDP functions like 'X[]' or 'Vector[]') that allow to exchange numbers at run-time, while evaluating any expression:
|
|
|
However, in some situations, one might want to exchange information with the ONELAB database while the computation is running, i.e. at ''run-time''. GetDP defines two built-in functions (at the same level as other GetDP functions like `X[]` or `Vector[]`) that allow to exchange numbers at run-time, while evaluating expressions:
|
|
|
|
|
|
```cpp
|
|
|
SetNumberRunTime[ 3.14 ]{"a number"}
|
|
|
GetNumberRunTime[]{"a number"}
|
|
|
```
|
|
|
|
|
|
These functions can be used in all the same places that other GetDP functions can be used, e.g. in `Function` definitions, `Formulation` terms, inside the `Evaluate` operation in a `Resolution`, etc.
|
|
|
These functions can be used in all the same places that other GetDP expressions can be used, e.g. in `Function` definitions, `Formulation` terms, inside the `Evaluate` operation in a `Resolution`, etc.
|
|
|
|
|
|
## Common parameter attributes
|
|
|
|
... | ... | |