Skip to content

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

Derived Types

equation_object

Equation system class definition, common data to all backends and applications.

Components

NameTypeAttributesDescription
iotype(io_object)IO handler.
adamtype(adam_object)ADAM.
fieldtype(field_object)pointerThe field.
amrtype(amr_object)AMR marker handler.
ibtype(ib_object)Immersed Boundary (IB) handler.
slicestype(slices_object)Slices handler.
blanesmoantype(blanesmoan_object)Blanes-Moan integrator.
cfmtype(cfm_object)Commutator-Free Magnus integrator.
leapfrogtype(leapfrog_object)Leapfrog integrator.
rktype(rk_object)RK integrator.
wenotype(weno_object)WENO reconstructor.
flailtype(flail_object)Linear algebra methods handler.
fdv_schemecharacter(len=:)allocatableFDV scheme, fd/fv.
fdv_orderinteger(kind=I4P)Order of finite difference/volume schemes, general order.
fdv_half_stencilinteger(kind=I4P)Half stencil length of finite difference/volume schemes.
fdv_half_stencilsinteger(kind=I4P)Half stencil length of fdv schemes for each derivative up to 6.
ngcinteger(kind=I4P)pointerNumber of ghost cells.
niinteger(kind=I4P)pointerNumber of cells in i direction.
njinteger(kind=I4P)pointerNumber of cells in j direction.
nkinteger(kind=I4P)pointerNumber of cells in k direction.
nbinteger(kind=I4P)pointerTotal blocks number for MPI.
blocks_numberinteger(kind=I4P)pointerActual blocks number.
nvinteger(kind=I4P)pointerNumber of variables in q vector.
compute_curlprocedure(compute_curl_interface)pass(self), pointerCompute curl of vector field.
compute_derivative1procedure(compute_derivative1_interface)pass(self), pointerCompute derivative1 of scalar field.
compute_derivative2procedure(compute_derivative2_interface)pass(self), pointerCompute derivative2 of scalar field.
compute_derivative4procedure(compute_derivative4_interface)pass(self), pointerCompute derivative4 of scalar field.
compute_divergenceprocedure(compute_divergence_interface)pass(self), pointerCompute divergence of vector field.
compute_gradientprocedure(compute_gradient_interface)pass(self), pointerCompute gradient of scalar field.
compute_laplacianprocedure(compute_laplacian_interface)pass(self), pointerCompute laplacian of scalar field.

Type-Bound Procedures

NameAttributesDescription
initializepass(self)Initialize common data.
load_fdv_from_filepass(self)Load FDV config from file.
close_block_xh5fnopassClose XH5F file block.
close_file_xh5fnopassClose XH5F file.
open_block_xh5fpass(self)Open block file XH5F.
open_file_xh5fpass(self)Open file XH5F.
save_q_xh5fpass(self)Save in XH5F (XDMF/HDF5) format.
compute_curl_fdpass(self)Compute curl of vector field, finite difference.
compute_curl_fvpass(self)Compute curl of vector field, finite volume.
compute_derivative1_fdpass(self)Compute derivative1 of scalar field, finite difference.
compute_derivative1_fvpass(self)Compute derivative1 of scalar field, finite volume.
compute_derivative2_fdpass(self)Compute derivative2 of scalar field, finite difference.
compute_derivative2_fvpass(self)Compute derivative2 of scalar field, finite volume.
compute_derivative4_fdpass(self)Compute derivative4 of scalar field, finite difference.
compute_divergence_fdpass(self)Compute divergence of vector field, finite difference.
compute_divergence_fvpass(self)Compute divergence of vector field, finite volume.
compute_gradient_fdpass(self)Compute gradient of scalar field, finite difference.
compute_gradient_fvpass(self)Compute gradient of scalar field, finite volume.
compute_laplacian_fdpass(self)Compute laplacian of scalar field, finite difference.
compute_laplacian_fvpass(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

NameTypeIntentAttributesDescription
selfclass(equation_object)inouttargetThe equation.
filenamecharacter(len=*)inInput parameters file name.
memory_availreal(kind=R8P)invalueMemory available for single MPI process.
nvinteger(kind=I4P)inoptionalNumber of field variables.
verboselogicalinoptionalTrigger 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

NameTypeIntentAttributesDescription
selfclass(equation_object)inoutThe equation.
file_parameterstype(file_ini)inSimulation parameters ini file handler.
go_on_faillogicalinoptionalGo on if load fails.

Call graph

close_block_xh5f

Close XH5F file block.

fortran
subroutine close_block_xh5f(xh5f)

Arguments

NameTypeIntentAttributesDescription
xh5ftype(xh5f_file_object)inoutXH5F file handler.

Call graph

close_file_xh5f

Close XH5F file.

fortran
subroutine close_file_xh5f(xh5f)

Arguments

NameTypeIntentAttributesDescription
xh5ftype(xh5f_file_object)inoutXH5F file handler.

Call graph

open_block_xh5f

Open XH5F file block.

fortran
subroutine open_block_xh5f(self, xh5f, b, nijk, t, time)

Arguments

NameTypeIntentAttributesDescription
selfclass(equation_object)inoutThe equation.
xh5ftype(xh5f_file_object)inoutXH5F file handler.
binteger(kind=I4P)inBlock index.
nijkinteger(kind=I8P)inBlocks dimensions.
tinteger(kind=I4P)inoptionalTime iteration.
timereal(kind=R8P)inoptionalTime.

Call graph

open_file_xh5f

Open XH5F file.

fortran
subroutine open_file_xh5f(self, basename, xh5f, directory)

Arguments

NameTypeIntentAttributesDescription
selfclass(equation_object)inoutThe equation.
basenamecharacter(len=*)inBase name of output files.
xh5ftype(xh5f_file_object)outXH5F file handler.
directorycharacter(len=*)inoptionalDirectory 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

NameTypeIntentAttributesDescription
selfclass(equation_object)inoutThe equation.
basenamecharacter(len=*)inBase name of output files.
qreal(kind=R8P)inQ-vector variables [nv,ni,nj,nk,nb].
q_namecharacter(len=*)inoptionalQ-vector variables names [nv].
directorycharacter(len=*)inoptionalDirectory name of output files.
with_ghostlogicalinoptionalFlag to save ghost cells.
with_cell_mortonlogicalinoptionalFlag to save Morton code also in cells.
tinteger(kind=I4P)inoptionalTime iteration.
timereal(kind=R8P)inoptionalTime.

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

NameTypeIntentAttributesDescription
selfclass(equation_object)inThe equation.
hsinteger(kind=I4P)inFDV half stencil length.
ivarinteger(kind=I4P)inStart index of variable of q.
qreal(kind=R8P)inField variables.
curlreal(kind=R8P)inoutCurl.

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

NameTypeIntentAttributesDescription
selfclass(equation_object)inThe equation.
hsinteger(kind=I4P)inFDV half stencil length.
ivarinteger(kind=I4P)inStart index of variable of q.
qreal(kind=R8P)inField variables.
curlreal(kind=R8P)inoutCurl.

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

NameTypeIntentAttributesDescription
selfclass(equation_object)inThe equation.
hsinteger(kind=I4P)inFDV half stencil length.
dirinteger(kind=I4P)inDirection, 1=X, 2=Y, 3=Z.
ivarinteger(kind=I4P)inStart index of (vec.) variable of q.
qreal(kind=R8P)inField variables.
dq_dsreal(kind=R8P)inoutDerivative1, 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

NameTypeIntentAttributesDescription
selfclass(equation_object)inThe equation.
hsinteger(kind=I4P)inFDV half stencil length.
dirinteger(kind=I4P)inDirection, 1=X, 2=Y, 3=Z.
ivarinteger(kind=I4P)inStart index of (vec.) variable of q.
qreal(kind=R8P)inField variables.
dq_dsreal(kind=R8P)inoutDerivative1, 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

NameTypeIntentAttributesDescription
selfclass(equation_object)inThe equation.
hsinteger(kind=I4P)inFDV half stencil length.
dirinteger(kind=I4P)inDirection, 1=X, 2=Y, 3=Z.
ivarinteger(kind=I4P)inStart index of vec variable of q.
qreal(kind=R8P)inField variables.
d2q_ds2real(kind=R8P)inoutDerivative2, 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

NameTypeIntentAttributesDescription
selfclass(equation_object)inThe equation.
hsinteger(kind=I4P)inFDV half stencil length.
dirinteger(kind=I4P)inDirection, 1=X, 2=Y, 3=Z.
ivarinteger(kind=I4P)inStart index of variable of q.
qreal(kind=R8P)inField variables.
d2q_ds2real(kind=R8P)inoutDerivative2, 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

NameTypeIntentAttributesDescription
selfclass(equation_object)inThe equation.
hsinteger(kind=I4P)inFDV half stencil length.
dirinteger(kind=I4P)inDirection, 1=X, 2=Y, 3=Z.
ivarinteger(kind=I4P)inStart index of variable of q.
qreal(kind=R8P)inField variables.
d4q_ds4real(kind=R8P)inoutDerivative4, 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

NameTypeIntentAttributesDescription
selfclass(equation_object)inThe equation.
hsinteger(kind=I4P)inFDV half stencil length.
ivarinteger(kind=I4P)inStart index of field of q.
qreal(kind=R8P)inField variables.
divergencereal(kind=R8P)inoutDivergence.

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

NameTypeIntentAttributesDescription
selfclass(equation_object)inThe equation.
hsinteger(kind=I4P)inFDV half stencil length.
ivarinteger(kind=I4P)inStart index of field of q.
qreal(kind=R8P)inField variables.
divergencereal(kind=R8P)inoutDivergence.

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

NameTypeIntentAttributesDescription
selfclass(equation_object)inThe equation.
hsinteger(kind=I4P)inFDV half stencil length.
ivarinteger(kind=I4P)inIndex of scalar variable of q.
qreal(kind=R8P)inField variables.
gradientreal(kind=R8P)inoutGradient.

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

NameTypeIntentAttributesDescription
selfclass(equation_object)inThe equation.
hsinteger(kind=I4P)inFDV half stencil length.
ivarinteger(kind=I4P)inIndex of scalar variable of q.
qreal(kind=R8P)inField variables.
gradientreal(kind=R8P)inoutGradient.

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

NameTypeIntentAttributesDescription
selfclass(equation_object)inThe equation.
hsinteger(kind=I4P)inFDV half stencil length.
ivarinteger(kind=I4P)inIndex of scalar variable of q.
qreal(kind=R8P)inField variables.
laplacianreal(kind=R8P)inoutGradient.

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

NameTypeIntentAttributesDescription
selfclass(equation_object)inThe equation.
hsinteger(kind=I4P)inFDV half stencil length.
ivarinteger(kind=I4P)inIndex of scalar variable of q.
qreal(kind=R8P)inField variables.
laplacianreal(kind=R8P)inoutGradient.