-
Notifications
You must be signed in to change notification settings - Fork 53
Dig deeper
In the following some more details on Lib_VTK_IO usage are provided. For a complete documentation see the API documenting pages.
All the library functions are integer(I4P) functions: the returned integer output is 0 if the function calling has been completed right while it is >0 if some errors occur (the error handling is only at its embryonic phase). Therefore the functions calling must be done as follows:
...
integer(I4P):: E_IO
...
E_IO = VTK_INI(....
...
The programming style is based on two main principles:
- portable kind-precision of reals and integers variables;
- dynamic dispatching.
Using dynamic dispatching the library has a simple API. The user calls a generic procedure (VTK_INI, VTK_GEO,...) and the library, depending on the type and number of the inputs passed, calls the correct internal function (i.e. VTK_GEO for R8P real type if the input passed is R8P real type). By this interface only few functions are used without the necessity of calling a different function for each different input type.
Dynamic dispatching is based on the internal kind-precision/rank selecting convention: Fortran 90/95 standard has introduced some useful functions to achieve the portability of reals and integers precision and Lib_VTK_IO uses these functions to define portable kind-precision; to this aim Lib_VTK_IO uses IR_Precision module.
In the following the usage of main functions is analyze deeper.
- functions for VTK-XML-files;
- functions for VTM-XML-files;
- functions for PVTK-XML-files;
- functions for VTK-legacy-files.