Appearance
adam_equation_object
ADAM, equation system class definition, common data to all backends and applications.
Source: src/lib/common/adam_equation_object.F90
Dependencies
Contents
- equation_object
- compute_curl_interface
- compute_derivative1_interface
- compute_derivative2_interface
- compute_derivative4_interface
- compute_divergence_interface
- compute_gradient_interface
- compute_laplacian_interface
- initialize
- load_fdv_from_file
- close_block_xh5f
- close_file_xh5f
- open_block_xh5f
- open_file_xh5f
- save_q_xh5f
- compute_curl_fd
- compute_curl_fv
- compute_derivative1_fd
- compute_derivative1_fv
- compute_derivative2_fd
- compute_derivative2_fv
- compute_derivative4_fd
- compute_divergence_fd
- compute_divergence_fv
- compute_gradient_fd
- compute_gradient_fv
- compute_laplacian_fd
- compute_laplacian_fv
Derived Types
equation_object
Equation system class definition, common data to all backends and applications.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
io | type(io_object) | IO handler. | |
adam | type(adam_object) | ADAM. | |
field | type(field_object) | pointer | The field. |
amr | type(amr_object) | AMR marker handler. | |
ib | type(ib_object) | Immersed Boundary (IB) handler. | |
slices | type(slices_object) | Slices handler. | |
blanesmoan | type(blanesmoan_object) | Blanes-Moan integrator. | |
cfm | type(cfm_object) | Commutator-Free Magnus integrator. | |
leapfrog | type(leapfrog_object) | Leapfrog integrator. | |
rk | type(rk_object) | RK integrator. | |
weno | type(weno_object) | WENO reconstructor. | |
flail | type(flail_object) | Linear algebra methods handler. | |
fdv_scheme | character(len=:) | allocatable | FDV scheme, fd/fv. |
fdv_order | integer(kind=I4P) | Order of finite difference/volume schemes, general order. | |
fdv_half_stencil | integer(kind=I4P) | Half stencil length of finite difference/volume schemes. | |
fdv_half_stencils | integer(kind=I4P) | Half stencil length of fdv schemes for each derivative up to 6. | |
ngc | integer(kind=I4P) | pointer | Number of ghost cells. |
ni | integer(kind=I4P) | pointer | Number of cells in i direction. |
nj | integer(kind=I4P) | pointer | Number of cells in j direction. |
nk | integer(kind=I4P) | pointer | Number of cells in k direction. |
nb | integer(kind=I4P) | pointer | Total blocks number for MPI. |
blocks_number | integer(kind=I4P) | pointer | Actual blocks number. |
nv | integer(kind=I4P) | pointer | Number of variables in q vector. |
compute_curl | procedure(compute_curl_interface) | pass(self), pointer | Compute curl of vector field. |
compute_derivative1 | procedure(compute_derivative1_interface) | pass(self), pointer | Compute derivative1 of scalar field. |
compute_derivative2 | procedure(compute_derivative2_interface) | pass(self), pointer | Compute derivative2 of scalar field. |
compute_derivative4 | procedure(compute_derivative4_interface) | pass(self), pointer | Compute derivative4 of scalar field. |
compute_divergence | procedure(compute_divergence_interface) | pass(self), pointer | Compute divergence of vector field. |
compute_gradient | procedure(compute_gradient_interface) | pass(self), pointer | Compute gradient of scalar field. |
compute_laplacian | procedure(compute_laplacian_interface) | pass(self), pointer | Compute laplacian of scalar field. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
initialize | pass(self) | Initialize common data. |
load_fdv_from_file | pass(self) | Load FDV config from file. |
close_block_xh5f | nopass | Close XH5F file block. |
close_file_xh5f | nopass | Close XH5F file. |
open_block_xh5f | pass(self) | Open block file XH5F. |
open_file_xh5f | pass(self) | Open file XH5F. |
save_q_xh5f | pass(self) | Save in XH5F (XDMF/HDF5) format. |
compute_curl_fd | pass(self) | Compute curl of vector field, finite difference. |
compute_curl_fv | pass(self) | Compute curl of vector field, finite volume. |
compute_derivative1_fd | pass(self) | Compute derivative1 of scalar field, finite difference. |
compute_derivative1_fv | pass(self) | Compute derivative1 of scalar field, finite volume. |
compute_derivative2_fd | pass(self) | Compute derivative2 of scalar field, finite difference. |
compute_derivative2_fv | pass(self) | Compute derivative2 of scalar field, finite volume. |
compute_derivative4_fd | pass(self) | Compute derivative4 of scalar field, finite difference. |
compute_divergence_fd | pass(self) | Compute divergence of vector field, finite difference. |
compute_divergence_fv | pass(self) | Compute divergence of vector field, finite volume. |
compute_gradient_fd | pass(self) | Compute gradient of scalar field, finite difference. |
compute_gradient_fv | pass(self) | Compute gradient of scalar field, finite volume. |
compute_laplacian_fd | pass(self) | Compute laplacian of scalar field, finite difference. |
compute_laplacian_fv | pass(self) | Compute laplacian of scalar field, finite volume. |
Interfaces
compute_curl_interface
compute_derivative1_interface
compute_derivative2_interface
compute_derivative4_interface
compute_divergence_interface
compute_gradient_interface
compute_laplacian_interface
Subroutines
initialize
Initialize common data: MPI, ADAM, grid, field and data replica pointers.
fortran
subroutine initialize(self, filename, memory_avail, nv, verbose)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(equation_object) | inout | target | The equation. |
filename | character(len=*) | in | Input parameters file name. | |
memory_avail | real(kind=R8P) | in | value | Memory available for single MPI process. |
nv | integer(kind=I4P) | in | optional | Number of field variables. |
verbose | logical | in | optional | Trigger verbose output. |
Call graph
load_fdv_from_file
Load FDV config from file.
fortran
subroutine load_fdv_from_file(self, file_parameters, go_on_fail)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(equation_object) | inout | The equation. | |
file_parameters | type(file_ini) | in | Simulation parameters ini file handler. | |
go_on_fail | logical | in | optional | Go on if load fails. |
Call graph
close_block_xh5f
Close XH5F file block.
fortran
subroutine close_block_xh5f(xh5f)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
xh5f | type(xh5f_file_object) | inout | XH5F file handler. |
Call graph
close_file_xh5f
Close XH5F file.
fortran
subroutine close_file_xh5f(xh5f)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
xh5f | type(xh5f_file_object) | inout | XH5F file handler. |
Call graph
open_block_xh5f
Open XH5F file block.
fortran
subroutine open_block_xh5f(self, xh5f, b, nijk, t, time)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(equation_object) | inout | The equation. | |
xh5f | type(xh5f_file_object) | inout | XH5F file handler. | |
b | integer(kind=I4P) | in | Block index. | |
nijk | integer(kind=I8P) | in | Blocks dimensions. | |
t | integer(kind=I4P) | in | optional | Time iteration. |
time | real(kind=R8P) | in | optional | Time. |
Call graph
open_file_xh5f
Open XH5F file.
fortran
subroutine open_file_xh5f(self, basename, xh5f, directory)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(equation_object) | inout | The equation. | |
basename | character(len=*) | in | Base name of output files. | |
xh5f | type(xh5f_file_object) | out | XH5F file handler. | |
directory | character(len=*) | in | optional | Directory name of output files. |
Call graph
save_q_xh5f
Save ADAM in XH5F format.
fortran
subroutine save_q_xh5f(self, basename, q, q_name, directory, with_ghost, with_cell_morton, t, time)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(equation_object) | inout | The equation. | |
basename | character(len=*) | in | Base name of output files. | |
q | real(kind=R8P) | in | Q-vector variables [nv,ni,nj,nk,nb]. | |
q_name | character(len=*) | in | optional | Q-vector variables names [nv]. |
directory | character(len=*) | in | optional | Directory name of output files. |
with_ghost | logical | in | optional | Flag to save ghost cells. |
with_cell_morton | logical | in | optional | Flag to save Morton code also in cells. |
t | integer(kind=I4P) | in | optional | Time iteration. |
time | real(kind=R8P) | in | optional | Time. |
Call graph
compute_curl_fd
Compute curl of vector fields, div(q(ivar:ivar+2), using finite difference schemes.
fortran
subroutine compute_curl_fd(self, hs, ivar, q, curl)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(equation_object) | in | The equation. | |
hs | integer(kind=I4P) | in | FDV half stencil length. | |
ivar | integer(kind=I4P) | in | Start index of variable of q. | |
q | real(kind=R8P) | in | Field variables. | |
curl | real(kind=R8P) | inout | Curl. |
Call graph
compute_curl_fv
Compute curl of vector fields, div(q(ivar:ivar+2), using finite volume schemes.
fortran
subroutine compute_curl_fv(self, hs, ivar, q, curl)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(equation_object) | in | The equation. | |
hs | integer(kind=I4P) | in | FDV half stencil length. | |
ivar | integer(kind=I4P) | in | Start index of variable of q. | |
q | real(kind=R8P) | in | Field variables. | |
curl | real(kind=R8P) | inout | Curl. |
Call graph
compute_derivative1_fd
Compute derivative1 of scalar fields, dq(ivar)/ds, using finite difference schemes.
fortran
subroutine compute_derivative1_fd(self, hs, dir, ivar, q, dq_ds)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(equation_object) | in | The equation. | |
hs | integer(kind=I4P) | in | FDV half stencil length. | |
dir | integer(kind=I4P) | in | Direction, 1=X, 2=Y, 3=Z. | |
ivar | integer(kind=I4P) | in | Start index of (vec.) variable of q. | |
q | real(kind=R8P) | in | Field variables. | |
dq_ds | real(kind=R8P) | inout | Derivative1, dq/ds. |
Call graph
compute_derivative1_fv
Compute derivative1 of scalar fields, dq(ivar)/ds, using finite volume schemes.
fortran
subroutine compute_derivative1_fv(self, hs, dir, ivar, q, dq_ds)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(equation_object) | in | The equation. | |
hs | integer(kind=I4P) | in | FDV half stencil length. | |
dir | integer(kind=I4P) | in | Direction, 1=X, 2=Y, 3=Z. | |
ivar | integer(kind=I4P) | in | Start index of (vec.) variable of q. | |
q | real(kind=R8P) | in | Field variables. | |
dq_ds | real(kind=R8P) | inout | Derivative1, dq/ds. |
Call graph
compute_derivative2_fd
Compute derivative2 of scalar fields, d2q(ivar)/ds2, using finite difference schemes.
fortran
subroutine compute_derivative2_fd(self, hs, dir, ivar, q, d2q_ds2)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(equation_object) | in | The equation. | |
hs | integer(kind=I4P) | in | FDV half stencil length. | |
dir | integer(kind=I4P) | in | Direction, 1=X, 2=Y, 3=Z. | |
ivar | integer(kind=I4P) | in | Start index of vec variable of q. | |
q | real(kind=R8P) | in | Field variables. | |
d2q_ds2 | real(kind=R8P) | inout | Derivative2, d2q/ds2. |
Call graph
compute_derivative2_fv
Compute derivative2 of scalar fields, d2q(ivar)/ds2, using finite volume schemes.
fortran
subroutine compute_derivative2_fv(self, hs, dir, ivar, q, d2q_ds2)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(equation_object) | in | The equation. | |
hs | integer(kind=I4P) | in | FDV half stencil length. | |
dir | integer(kind=I4P) | in | Direction, 1=X, 2=Y, 3=Z. | |
ivar | integer(kind=I4P) | in | Start index of variable of q. | |
q | real(kind=R8P) | in | Field variables. | |
d2q_ds2 | real(kind=R8P) | inout | Derivative2, d2q/ds2. |
compute_derivative4_fd
Compute derivative2 of scalar fields, d4q(ivar)/ds4, using finite difference schemes.
fortran
subroutine compute_derivative4_fd(self, hs, dir, ivar, q, d4q_ds4)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(equation_object) | in | The equation. | |
hs | integer(kind=I4P) | in | FDV half stencil length. | |
dir | integer(kind=I4P) | in | Direction, 1=X, 2=Y, 3=Z. | |
ivar | integer(kind=I4P) | in | Start index of variable of q. | |
q | real(kind=R8P) | in | Field variables. | |
d4q_ds4 | real(kind=R8P) | inout | Derivative4, d4q/ds4. |
Call graph
compute_divergence_fd
Compute divergence of vector fields, div(q(ivar:ivar+2), using finite difference schemes.
fortran
subroutine compute_divergence_fd(self, hs, ivar, q, divergence)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(equation_object) | in | The equation. | |
hs | integer(kind=I4P) | in | FDV half stencil length. | |
ivar | integer(kind=I4P) | in | Start index of field of q. | |
q | real(kind=R8P) | in | Field variables. | |
divergence | real(kind=R8P) | inout | Divergence. |
Call graph
compute_divergence_fv
Compute divergence of vector fields, div(q(ivar:ivar+2), using finite volume schemes.
fortran
subroutine compute_divergence_fv(self, hs, ivar, q, divergence)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(equation_object) | in | The equation. | |
hs | integer(kind=I4P) | in | FDV half stencil length. | |
ivar | integer(kind=I4P) | in | Start index of field of q. | |
q | real(kind=R8P) | in | Field variables. | |
divergence | real(kind=R8P) | inout | Divergence. |
Call graph
compute_gradient_fd
Compute gradient of scalar variable q(ivar), finite difference schemes.
fortran
subroutine compute_gradient_fd(self, hs, ivar, q, gradient)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(equation_object) | in | The equation. | |
hs | integer(kind=I4P) | in | FDV half stencil length. | |
ivar | integer(kind=I4P) | in | Index of scalar variable of q. | |
q | real(kind=R8P) | in | Field variables. | |
gradient | real(kind=R8P) | inout | Gradient. |
Call graph
compute_gradient_fv
Compute gradient of scalar variable q(ivar), finite volume schemes.
fortran
subroutine compute_gradient_fv(self, hs, ivar, q, gradient)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(equation_object) | in | The equation. | |
hs | integer(kind=I4P) | in | FDV half stencil length. | |
ivar | integer(kind=I4P) | in | Index of scalar variable of q. | |
q | real(kind=R8P) | in | Field variables. | |
gradient | real(kind=R8P) | inout | Gradient. |
Call graph
compute_laplacian_fd
Compute laplacian of scalar variable q(ivar), finite difference schemes.
fortran
subroutine compute_laplacian_fd(self, hs, ivar, q, laplacian)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(equation_object) | in | The equation. | |
hs | integer(kind=I4P) | in | FDV half stencil length. | |
ivar | integer(kind=I4P) | in | Index of scalar variable of q. | |
q | real(kind=R8P) | in | Field variables. | |
laplacian | real(kind=R8P) | inout | Gradient. |
Call graph
compute_laplacian_fv
Compute laplacian of scalar variable q(ivar), finite volume schemes.
fortran
subroutine compute_laplacian_fv(self, hs, ivar, q, laplacian)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(equation_object) | in | The equation. | |
hs | integer(kind=I4P) | in | FDV half stencil length. | |
ivar | integer(kind=I4P) | in | Index of scalar variable of q. | |
q | real(kind=R8P) | in | Field variables. | |
laplacian | real(kind=R8P) | inout | Gradient. |