|
|
ONELAB parameters can be created, accessed and modified in various ways in Gmsh (`.geo`) and GetDP (`.pro`) input files:
|
|
|
|
|
|
1. `n = DefineNumber[ 3.14, Name "a number", <attributes...>];`
|
|
|
* `n = DefineNumber[ 3.14, Name "a number", <attributes...>];`
|
|
|
|
|
|
2. `s = DefineString["hello", Name "a string", <attributes...>];`
|
|
|
* `s = DefineString["hello", Name "a string", <attributes...>];`
|
|
|
|
|
|
3. `DefineConstant [ n = {3.14, Name "a number", <attributes...>} , s = {"hello", Name "a string", <attributes>} , ...] ;`
|
|
|
* `DefineConstant [ n = {3.14, Name "a number", <attributes...>} , s = {"hello", Name "a string", <attributes>} , ...] ;`
|
|
|
|
|
|
4. `SetNumber[ "a number", 3.14 ]; n = GetNumber["a number"];`
|
|
|
* `SetNumber[ "a number", 3.14 ]; n = GetNumber["a number"];`
|
|
|
|
|
|
5. `SetString[ "a string", "hello" ]; s = GetString["a string"];`
|
|
|
* `SetString[ "a string", "hello" ]; s = GetString["a string"];`
|
|
|
|
|
|
In addition, GetDP defines two functions to access ONELAB parameters at run-time, i.e. during pre-processing, processing or post-processing operations (in contrast to the other methods listed above, which are executed when the `.pro` files are parsed):
|
|
|
|
|
|
1. `SetNumberRunTime[ 3.14 ]{"a number"}`
|
|
|
* `SetNumberRunTime[ 3.14 ]{"a number"}`
|
|
|
|
|
|
2. `n = GetNumberRunTime[]{"a number"}`
|
|
|
* `n = GetNumberRunTime[]{"a number"}`
|
|
|
|
|
|
Finally, GetDP also defines a `SendToServer` option in its `PostOperation` object, to send post-processing results directly to the ONELAB database. See the GetDP [documentation](http://getdp.info/doc/texinfo/getdp.html#Types-for-PostOperation) for more information.
|
|
|
|
... | ... | |