Module of objets to work with Eulerian data in LEAP.
Eulerian objects (eulerian_obj_r, eulerian_obj_i): - represent a field quantity (e.g., pressure field). - can be of type real (at working precision) or integer. - can be cell centered (staggering = 0), or face centered (staggering = 1,2,3). - have methods to manage ghost cells. - have some overloaded operations (addition, subtraction, multiplication). Note that multiplication by a scalar can only be done on the right side.
Eulerian Sets (eulerian_set): - represent a data set, i.e., a collection of Eulerian objects. - offer additional methods to manage Eulerian objects (such as adding an object to the set). - there is no restriction on the number of objects that can be added to a set. - offer methods for IO of one or all objects in the set.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | private, | parameter | :: | EULERIAN_SET_HTBL_SIZE | = | 20 |
Eulerian data of type integer
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(block_obj), | public, | pointer | :: | block | => | null() |
Associated block structure |
| integer, | public, | allocatable | :: | cell(:,:,:) |
Cell data |
||
| character(len=:), | public, | allocatable | :: | name |
Variable name |
||
| type(parallel_obj), | public, | pointer | :: | parallel | => | null() |
Associated parallel structure |
| integer, | public | :: | staggering | = | 0 |
0 = cell centered; 1 = X1-face centered 2 = X2-face centered; 3 = X3-face centered |
Eulerian data of type real
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(block_obj), | public, | pointer | :: | block | => | null() |
Associated block structure |
| real(kind=wp), | public, | allocatable | :: | cell(:,:,:) |
Cell data |
||
| character(len=:), | public, | allocatable | :: | name |
Variable name |
||
| type(parallel_obj), | public, | pointer | :: | parallel | => | null() |
Associated parallel structure |
| integer, | public | :: | staggering | = | 0 |
0 = cell centered; 1 = X1-face centered 2 = X2-face centered; 3 = X3-face centered |
A utility to manage Eulerian objects.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(block_obj), | public, | pointer | :: | block | => | null() |
Associated block structure |
| type(eulerian_ptr), | public, | allocatable | :: | field(:) |
Array of Eulerian objects |
||
| type(parallel_obj), | public, | pointer | :: | parallel | => | null() |
Associated parallel structure |
| logical, | private | :: | overwrite | = | .true. |
Switch to overwrite IO files |
|
| character(len=str64), | private | :: | read_file |
File to read |
|||
| type(hashtbl_obj), | private | :: | tbl |
Hash table |
|||
| character(len=str64), | private | :: | write_file |
File to write |
Base structure for Rulerian data. This typically represents a field quantity.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| type(block_obj), | public, | pointer | :: | block | => | null() |
Associated block structure |
| character(len=:), | public, | allocatable | :: | name |
Variable name |
||
| type(parallel_obj), | public, | pointer | :: | parallel | => | null() |
Associated parallel structure |
| integer, | public | :: | staggering | = | 0 |
0 = cell centered; 1 = X1-face centered 2 = X2-face centered; 3 = X3-face centered |
Polymorphic pointer to either real or complex Eulerian data
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | public, | pointer | :: | p | => | null() |
Performs addition of integer Eulerian objects.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(in) | :: | this |
An Eulerian object |
||
| type(eulerian_obj_i), | intent(in) | :: | in |
An Eulerian object |
Result
Performs addition of real Eulerian objects.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(in) | :: | this |
An Eulerian object |
||
| type(eulerian_obj_r), | intent(in) | :: | in |
An Eulerian object |
Result
Computes the mean of an Eulerian_obj.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(in) | :: | this |
An Eulerian object |
Performs multiplication of integer Eulerian objects by integer scalar.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(in) | :: | this |
An Eulerian object |
||
| integer, | intent(in) | :: | in |
An Eulerian object |
Result
Performs multiplication of real Eulerian objects by real scalar.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(in) | :: | this |
An Eulerian object |
||
| real(kind=wp), | intent(in) | :: | in |
An Eulerian object |
Result
Computes norm2 of an Eulerian_obj.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(in) | :: | this |
An Eulerian object |
Performs subtraction of integer Eulerian objects.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(in) | :: | this |
An Eulerian object |
||
| type(eulerian_obj_i), | intent(in) | :: | in |
An Eulerian object |
Result
Performs subtraction of real Eulerian objects.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(in) | :: | this |
An Eulerian object |
||
| type(eulerian_obj_r), | intent(in) | :: | in |
An Eulerian object |
Result
Returns the index of an Eulerian_obj contained in this%fields given its name.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(in) | :: | this |
An Eulerian Set |
||
| character(len=*), | intent(in) | :: | name |
Name of the field |
Result
Returns whether overwriting is true or false
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(in) | :: | this |
An Eulerian Set |
Overwrite value
Returns the base name of file to write
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(in) | :: | this |
An Eulerian Set |
Name of file
Returns the base name of file to write.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(in) | :: | this |
An Eulerian Set |
Name of file
Updates and add-up the ghostcells.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(inout) | :: | this |
An Eulerian object |
Adds up ghostcells in the x direction with non-blocking mpi directives.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(inout) | :: | this |
An Eulerian object |
Adds up ghostcells in the y direction with non-blocking mpi directives.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(inout) | :: | this |
An Eulerian object |
Adds up ghostcells in the z direction with non-blocking mpi directives.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(inout) | :: | this |
An Eulerian object |
Allocates Cell array in Eulerian object.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(inout) | :: | this |
An Eulerian object |
Performs assignment for Eulerian_obj.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(inout) | :: | this |
An Eulerian object |
||
| class(eulerian_obj_base), | intent(in) | :: | in |
Object to assign |
Performs assignment for Eulerian_obj.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(inout) | :: | this |
An Eulerian object |
||
| integer, | intent(in) | :: | in |
Object to assign |
Performs assignment for Eulerian_obj.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(inout) | :: | this |
An Eulerian object |
||
| real(kind=wp), | intent(in) | :: | in |
Object to assign |
Deallocate Cell array in Eulerian object.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(inout) | :: | this |
An Eulerian object |
Finalizes the Eulerian object and free memory.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(inout) | :: | this |
An Eulerian object |
Prints info about this structure.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(inout) | :: | this |
An Eulerian object |
Initializes an Eulerian field.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(inout) | :: | this |
An Eulerian object |
||
| character(len=*), | intent(in) | :: | name |
Name of variable |
||
| type(block_obj), | intent(in), | target | :: | block |
A block object |
|
| type(parallel_obj), | intent(in), | target | :: | parallel |
Parallel structure to link with |
|
| integer, | intent(in) | :: | stag |
Staggering |
Updates the ghostcells.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(inout) | :: | this |
An Eulerian object |
Updates the ghostcells in the x direction with non-blocking mpi directives.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(inout) | :: | this |
An Eulerian object |
Updates the ghostcells in the y direction with non-blocking mpi directives.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(inout) | :: | this |
An Eulerian object |
Updates the ghostcells in the z direction with non-blocking mpi directives.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_obj_base), | intent(inout) | :: | this |
An Eulerian object |
Adds a eulerian object to the eulerian set.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
An Eulerian Set |
||
| character(len=*), | intent(in) | :: | name |
Name of variable |
||
| integer, | intent(in) | :: | stag |
Staggering |
||
| class(eulerian_obj_base), | intent(inout), | target | :: | obj |
Eulerian obj to link and Initialize |
Finalizes object and frees up memory.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
An Eulerian Set |
Prints info about this collection of eulerian objects
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
An Eulerian Set |
Initializes an Eulerian Set.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
An Eulerian Set |
||
| type(block_obj), | intent(in), | target | :: | block |
A block object |
|
| type(parallel_obj), | intent(in), | target | :: | parallel |
Parallel structure to link with |
Reads Eulerian data using H5HUT.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
An Eulerian Set |
||
| integer, | intent(out) | :: | iter |
Iteration at write |
||
| real(kind=wp), | intent(out) | :: | time |
Time at write |
||
| character(len=str8), | intent(in), | optional | :: | list(:) |
Names of fields to write |
|
| integer, | intent(in), | optional | :: | step |
User supplied step to open |
Reads Eulerian data with LEAP's HDF5.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
an eulerian set |
||
| integer, | intent(out) | :: | iter |
iteration in file |
||
| real(kind=wp), | intent(out) | :: | time |
time in file |
||
| character(len=str8), | intent(in), | optional | :: | list(:) |
names of fields to read |
Reads one Eulerian object based on name with H5HUT.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
An Eulerian Set |
||
| type(h5hut_obj), | intent(inout) | :: | h5 |
H5hut structure |
||
| integer, | intent(in) | :: | ind |
Index of Eulerian object |
Reads one Eulerian object based on name using LEAP's HDF5.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
An Eulerian Set |
||
| type(hdf5_obj), | intent(inout) | :: | hdf5 | |||
| integer, | intent(in) | :: | ind |
Index of Eulerian object |
Sets file overwritting
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
An Eulerian Set |
||
| logical, | intent(in) | :: | overwrite |
Name of file |
Set the base name of file to read
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
An Eulerian Set |
||
| character(len=*), | intent(in) | :: | name |
Name of file |
Sets the base name of file to write.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
An Eulerian Set |
||
| character(len=*), | intent(in) | :: | name |
Name of file |
Writes Eulerian data using H5HUT.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
An Eulerian Set |
||
| integer, | intent(in) | :: | iter |
Iteration at write |
||
| real(kind=wp), | intent(in) | :: | time |
Time at write |
||
| character(len=str8), | intent(in), | optional | :: | list(:) |
Names of fields to write |
Write Eulerian data using LEAP's HDF5.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
An Eulerian Set |
||
| integer, | intent(in) | :: | iter |
Iteration at write |
||
| real(kind=wp), | intent(in) | :: | time |
Time at write |
||
| character(len=str8), | intent(in), | optional | :: | list(:) |
Names of fields to write |
Write Eulerian data using SILO.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
An Eulerian Set |
||
| integer, | intent(in) | :: | iter |
Iteration at write |
||
| real(kind=wp), | intent(in) | :: | time |
Time at write |
||
| character(len=str8), | intent(in), | optional | :: | list(:) |
Names of fields to write |
Write a single Eulerian object to file using H5HUT.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
An Eulerian Set |
||
| type(h5hut_obj), | intent(inout) | :: | h5 |
H5hut structure |
||
| integer, | intent(in) | :: | ind |
Index of Eulerian object |
Write a single Eulerian object to file using LEAP's HDF5.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
An Eulerian Set |
||
| type(hdf5_obj), | intent(inout) | :: | hdf5 | |||
| integer, | intent(in) | :: | ind |
Index of Eulerian object |
Write a single Eulerian objects to file using SILO.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(eulerian_set), | intent(inout) | :: | this |
An Eulerian Set |
||
| type(silo_obj), | intent(inout) | :: | silo |
Silo structure |
||
| integer, | intent(in) | :: | ind |
Index of Eulerian object |