|
|
Tabular data is handled by GetDP as simple lists, which can be defined either directly in the `.pro` files, or in separate ASCII text files.
|
|
|
|
|
|
The following example shows how to use tables and how to interpolate the data depending on one or two variables:
|
|
|
The following example shows how to use tables and how to interpolate the data depending on one or two variables using `InterpolationLinear`, `InterpolationAkima`, `InterpolationBilinear` and related built-in functions:
|
|
|
* Geometry: [Table.geo](Table.geo)
|
|
|
* Problem definition: [Table.pro](Table.pro)
|
|
|
* 1D and 2D datasets: [Table_1D.dat](Table_1D.dat) and [Table_2D.dat](Table_2D.dat)
|
|
|
|
|
|
3D datasets can be handled in a similar way, using `InterpolationTrilinear`.
|
|
|
|
|
|
Here is an excerpt from `Table.pro` highlighting the important parts:
|
|
|
|
|
|
```cpp
|
... | ... | @@ -81,7 +83,7 @@ Function { |
|
|
|
|
|
There is no special format for tabular data imported from separate files:
|
|
|
numbers should simply be separacted by white space (spaces, newlines, tabs are
|
|
|
all accepted). For example `Table_1D.txt` contains:
|
|
|
all accepted). For example `Table_1D.dat` contains:
|
|
|
|
|
|
```
|
|
|
0 0
|
... | ... | @@ -97,7 +99,7 @@ all accepted). For example `Table_1D.txt` contains: |
|
|
1 100
|
|
|
```
|
|
|
|
|
|
and `Table_2D.txt` contains:
|
|
|
and `Table_2D.dat` contains:
|
|
|
|
|
|
```
|
|
|
6 11
|
... | ... | @@ -118,4 +120,3 @@ and `Table_2D.txt` contains: |
|
|
|
|
|
----
|
|
|
*Initially written by @AsamMich.* |
|
|
|