transeq equation obtains the derivatives direction by direction, and the exact algorithm used to obtain these derivatives are decided at runtime. Backend implementations are responsible from directing calls to transeq_ders into the correct algorithm.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t) | :: | self | ||||
| class(field_t), | intent(inout) | :: | du | |||
| class(field_t), | intent(inout) | :: | dv | |||
| class(field_t), | intent(inout) | :: | dw | |||
| class(field_t), | intent(in) | :: | u | |||
| class(field_t), | intent(in) | :: | v | |||
| class(field_t), | intent(in) | :: | w | |||
| real(kind=dp), | intent(in) | :: | nu | |||
| type(dirps_t), | intent(in) | :: | dirps |
transeq equation obtains the derivatives direction by direction, and the exact algorithm used to obtain these derivatives are decided at runtime. Backend implementations are responsible from directing calls to transeq_ders into the correct algorithm.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t) | :: | self | ||||
| class(field_t), | intent(inout) | :: | dspec | |||
| class(field_t), | intent(in) | :: | uvw | |||
| class(field_t), | intent(in) | :: | spec | |||
| real(kind=dp), | intent(in) | :: | nu | |||
| type(dirps_t), | intent(in) | :: | dirps | |||
| logical, | intent(in) | :: | sync |
transeq equation obtains the derivatives direction by direction, and the exact algorithm used to obtain these derivatives are decided at runtime. Backend implementations are responsible from directing calls to tds_solve to the correct algorithm.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t) | :: | self | ||||
| class(field_t), | intent(inout) | :: | du | |||
| class(field_t), | intent(in) | :: | u | |||
| class(tdsops_t), | intent(in) | :: | tdsops |
reorder subroutines are straightforward, they rearrange data into our specialist data structure so that regardless of the direction tridiagonal systems are solved efficiently and fast.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t) | :: | self | ||||
| class(field_t), | intent(inout) | :: | u_ | |||
| class(field_t), | intent(in) | :: | u | |||
| integer, | intent(in) | :: | direction |
sum9into3 subroutine combines all the directional velocity derivatives into the corresponding x directional fields.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t) | :: | self | ||||
| class(field_t), | intent(inout) | :: | u | |||
| class(field_t), | intent(in) | :: | u_ |
copy vectors: y = x
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t) | :: | self | ||||
| class(field_t), | intent(inout) | :: | dst | |||
| class(field_t), | intent(in) | :: | src |
adds two vectors together: y = ax + by
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t) | :: | self | ||||
| real(kind=dp), | intent(in) | :: | a | |||
| class(field_t), | intent(in) | :: | x | |||
| real(kind=dp), | intent(in) | :: | b | |||
| class(field_t), | intent(inout) | :: | y |
pointwise multiplication between two vectors: y(:) = y(:) * x(:)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t) | :: | self | ||||
| class(field_t), | intent(inout) | :: | y | |||
| class(field_t), | intent(in) | :: | x |
Calculates the scalar product of two input fields
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t) | :: | self | ||||
| class(field_t), | intent(in) | :: | x | |||
| class(field_t), | intent(in) | :: | y |
Scales or shifts a field by a
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t) | :: | self | ||||
| class(field_t), | intent(in) | :: | f | |||
| real(kind=dp), | intent(in) | :: | a |
Reduces field to a scalar, example: volume integral
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t) | :: | self | ||||
| class(field_t), | intent(in) | :: | f |
Obtains maximum and mean values in a field
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t) | :: | self | ||||
| real(kind=dp), | intent(out) | :: | max_val | |||
| real(kind=dp), | intent(out) | :: | mean_val | |||
| class(field_t), | intent(in) | :: | f | |||
| integer, | intent(in), | optional | :: | enforced_data_loc |
A field is a subdomain with a rectangular cuboid shape. It has 6 faces, and these faces are either a subdomain boundary or a global domain boundary based on the location of the subdomain. This subroutine allows us to set any of these faces to a value, 'c_start' and 'c_end' for faces at opposite sides. 'face' is one of X_FACE, Y_FACE, Z_FACE from common.f90
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t) | :: | self | ||||
| class(field_t), | intent(inout) | :: | f | |||
| real(kind=dp), | intent(in) | :: | c_start | |||
| real(kind=dp), | intent(in) | :: | c_end | |||
| integer, | intent(in) | :: | face |
Copy the specialist data structure from device or host back to a regular 3D data array in host memory.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t), | intent(inout) | :: | self | |||
| class(field_t), | intent(inout) | :: | f | |||
| real(kind=dp), | intent(in), | dimension(:, :, :) | :: | data |
Copy a regular 3D array in host memory into the specialist data structure field that lives on device or host
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t), | intent(inout) | :: | self | |||
| real(kind=dp), | intent(out), | dimension(:, :, :) | :: | data | ||
| class(field_t), | intent(in) | :: | f |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t) | :: | self | ||||
| class(tdsops_t), | intent(inout), | allocatable | :: | tdsops | ||
| integer, | intent(in) | :: | n_tds | |||
| real(kind=dp), | intent(in) | :: | delta | |||
| character(len=*), | intent(in) | :: | operation | |||
| character(len=*), | intent(in) | :: | scheme | |||
| integer, | intent(in) | :: | bc_start | |||
| integer, | intent(in) | :: | bc_end | |||
| real(kind=dp), | intent(in), | optional | :: | stretch(:) | ||
| real(kind=dp), | intent(in), | optional | :: | stretch_correct(:) | ||
| integer, | intent(in), | optional | :: | n_halo | ||
| character(len=*), | intent(in), | optional | :: | from_to | ||
| logical, | intent(in), | optional | :: | sym | ||
| real(kind=dp), | intent(in), | optional | :: | c_nu | ||
| real(kind=dp), | intent(in), | optional | :: | nu0_nu |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t) | :: | self | ||||
| type(mesh_t), | intent(in) | :: | mesh | |||
| type(dirps_t), | intent(in) | :: | xdirps | |||
| type(dirps_t), | intent(in) | :: | ydirps | |||
| type(dirps_t), | intent(in) | :: | zdirps | |||
| logical, | intent(in), | optional | :: | lowmem |
base_backend class defines all the abstract operations that the solver class requires.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public | :: | n_halo | = | 4 |
DistD2 implementation is hardcoded for 4 halo layers for all backends |
|
| type(mesh_t), | public, | pointer | :: | mesh | |||
| class(allocator_t), | public, | pointer | :: | allocator | |||
| class(poisson_fft_t), | public, | pointer | :: | poisson_fft |
| procedure(transeq_ders), public, deferred :: transeq_x | |
| procedure(transeq_ders), public, deferred :: transeq_y | |
| procedure(transeq_ders), public, deferred :: transeq_z | |
| procedure(transeq_ders_spec), public, deferred :: transeq_species | |
| procedure(tds_solve), public, deferred :: tds_solve | |
| procedure(reorder), public, deferred :: reorder | |
| procedure(sum_intox), public, deferred :: sum_yintox | |
| procedure(sum_intox), public, deferred :: sum_zintox | |
| procedure(veccopy), public, deferred :: veccopy | |
| procedure(vecadd), public, deferred :: vecadd | |
| procedure(vecmult), public, deferred :: vecmult | |
| procedure(scalar_product), public, deferred :: scalar_product | |
| procedure(field_max_mean), public, deferred :: field_max_mean | |
| procedure(field_ops), public, deferred :: field_scale | |
| procedure(field_ops), public, deferred :: field_shift | |
| procedure(field_reduce), public, deferred :: field_volume_integral | |
| procedure(field_set_face), public, deferred :: field_set_face | |
| procedure(copy_data_to_f), public, deferred :: copy_data_to_f | |
| procedure(copy_f_to_data), public, deferred :: copy_f_to_data | |
| procedure(alloc_tdsops), public, deferred :: alloc_tdsops | |
| procedure(init_poisson_fft), public, deferred :: init_poisson_fft | |
| procedure, public :: base_init | |
| procedure, public :: get_field_data | |
| procedure, public :: set_field_data |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t) | :: | self |
Extract data from field f optionally reordering into dir orientation.
To output in same orientation as f, use call ...%get_field_data(data, f, f%dir)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t) | :: | self | ||||
| real(kind=dp), | intent(out), | dimension(:, :, :) | :: | data |
Output array |
|
| class(field_t), | intent(in) | :: | f |
Field |
||
| integer, | intent(in), | optional | :: | dir |
Desired orientation of output array (defaults to Cartesian) |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(base_backend_t) | :: | self | ||||
| class(field_t), | intent(inout) | :: | f |
Field |
||
| real(kind=dp), | intent(in), | dimension(:, :, :) | :: | data |
Input array |
|
| integer, | intent(in), | optional | :: | dir |
Orientation of input array (defaults to Cartesian) |