Skip to content

adam_prism_common_object

Source: src/app/prism/common/adam_prism_common_object.F90

Dependencies

Contents

Derived Types

prism_common_object

Maxwell equations system class definition, common data to all backends.

Inheritance

Extends: equation_object

Components

NameTypeAttributesDescription
iotype(io_object)IO handler.
adamtype(adam_object)ADAM.
amrtype(amr_object)AMR marker handler.
slicestype(slices_object)Slices handler.
blanesmoantype(blanesmoan_object)Blanes-Moan integrator.
cfmtype(cfm_object)Commutator-Free Magnus integrator.
leapfrogtype(leapfrog_object)Leapfrog integrator.
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_block_total_variationprocedure(compute_block_total_variation_interface)pass(self), pointerCompute TV.
compute_curlprocedure(compute_curl_interface)pass(self), pointerCompute curl.
compute_derivative1procedure(compute_derivative1_interface)pass(self), pointerCompute deriv1.
compute_derivative2procedure(compute_derivative2_interface)pass(self), pointerCompute deriv2.
compute_derivative4procedure(compute_derivative4_interface)pass(self), pointerCompute deriv4.
compute_divergenceprocedure(compute_divergence_interface)pass(self), pointerCompute dive.
compute_gradientprocedure(compute_gradient_interface)pass(self), pointerCompute grad.
compute_laplacianprocedure(compute_laplacian_interface)pass(self), pointerCompute laplac.
nv_cinteger(kind=I4P)pointerNumber of conservative variables in q vector.
nv_sinteger(kind=I4P)pointerNumber of source variables in q vector.
nv_clinteger(kind=I4P)pointerNumber of divergence cleaning variables in q vector.
qreal(kind=R8P)allocatableConservative cell centered variables.
dqreal(kind=R8P)allocatableResiduals right hand side.
q_picreal(kind=R8P)allocatablePIC variables.
pic_fieldsreal(kind=R8P)allocatableFields value at particle locations.
curlreal(kind=R8P)allocatableCurl fields.
divergencereal(kind=R8P)allocatableDivergence fields.
q_nametype(string)allocatableFields names [1:nv].
dq_nametype(string)allocatableResiduals names [1:nv].
q_pic_nametype(string)allocatablePIC Fields names.
curl_nametype(string)allocatableCurl fields names.
div_nametype(string)allocatableDivergence fields names.
energy_Dreal(kind=R8P)allocatableEnergy of field D, time history.
energy_Breal(kind=R8P)allocatableEnergy of field B, time history.
coil_powerreal(kind=R8P)allocatablePower of coils, time history.
Poynting_fluxreal(kind=R8P)allocatableTotal Poynting flux from boundary, time history.
rms_energy_error_Dreal(kind=R8P)RMS energy error of D field.
rms_energy_error_Breal(kind=R8P)RMS energy error of B field.
max_divergence_Dreal(kind=R8P)Maximum of divergence of D field.
max_divergence_Breal(kind=R8P)Maximum of divergence of B field.
max_divergence_Jreal(kind=R8P)Maximum of divergence of J field.

Type-Bound Procedures

NameAttributesDescription
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.
allocate_commonpass(self)Allocate common data.
compute_auxiliary_fieldspass(self)Compute auxiliary fields.
initializepass(self)Initialize the equation common data.
load_restart_filespass(self)Load restart files.
save_energy_errorpass(self)Save energy error history.
save_energy_historypass(self)Save energy history.
save_divergence_historypass(self)Save divergence history.
save_restart_filespass(self)Save restart files.
save_xh5fpass(self)Save simulation data in XH5F format.
initialize_coilspass(self)Initialize coils.
set_rectangular_coil_xpass(self)Subroutine to set a rectangular coil source with +-x normal
set_rectangular_coil_ypass(self)Subroutine to set a rectangular coil source with +-y normal
set_rectangular_coil_zpass(self)Subroutine to set a rectangular coil source with +-z normal
set_circular_coil_xpass(self)Subroutine to set a circular coil source with +-x normal
set_circular_coil_ypass(self)Subroutine to set a circular coil source with +-y normal
set_circular_coil_zpass(self)Subroutine to set a circular coil source with +-z normal
set_solenoid_xpass(self)Subroutine to set a solenoid source with +-x normal
set_solenoid_ypass(self)Subroutine to set a solenoid source with +-y normal
set_solenoid_zpass(self)Subroutine to set a solenoid source with +-z normal

Subroutines

allocate_common

Allocate common data.

fortran
subroutine allocate_common(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_common_object)inoutThe equation.

Call graph

compute_auxiliary_fields

Compute auxiliary fields.

fortran
subroutine compute_auxiliary_fields(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_common_object)inoutThe equation.

Call graph

initialize

Initialize the equation common data.

fortran
subroutine initialize(self, filename, memory_avail, nv, verbose)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_common_object)inouttargetThe equation.
filenamecharacter(len=*)inInput 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_restart_files

Save restart files.

fortran
subroutine load_restart_files(self, t, time)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_common_object)inoutThe equation.
tinteger(kind=I4P)outTime iteration.
timereal(kind=R8P)outTime.

Call graph

save_divergence_history

Save divergence history.

fortran
subroutine save_divergence_history(self, is_to_open, is_to_close)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_common_object)inoutThe equation.
is_to_openlogicalinoptionalFlag to open file before first saving.
is_to_closelogicalinoptionalFlag to close file after last saving.

Call graph

save_energy_error

Save energy error history.

fortran
subroutine save_energy_error(self, is_to_open, is_to_close)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_common_object)inoutThe equation.
is_to_openlogicalinoptionalFlag to open file before first saving.
is_to_closelogicalinoptionalFlag to close file after last saving.

Call graph

save_energy_history

Save energy history.

fortran
subroutine save_energy_history(self, is_to_open, is_to_close)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_common_object)inoutThe equation.
is_to_openlogicalinoptionalFlag to open file before first saving.
is_to_closelogicalinoptionalFlag to close file after last saving.

Call graph

save_restart_files

Save restart files.

fortran
subroutine save_restart_files(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_common_object)inoutThe equation.

Call graph

save_xh5f

Save simulation data in HDF5 format.

fortran
subroutine save_xh5f(self, output_basename, with_ghost)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_common_object)inoutThe equation.
output_basenamecharacter(len=*)inoptionalOutput basename.
with_ghostlogicalinoptionalFlag to save ghost cells.

Call graph

initialize_coils

Initialize coils.

fortran
subroutine initialize_coils(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_common_object)inoutThe equation.

Call graph

set_rectangular_coil_x

Set rectangular coil with normal direction parallel to x.

fortran
subroutine set_rectangular_coil_x(self, n, verse)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_common_object)inoutCpu object.
ninteger(kind=I4P)inCoil number.
versereal(kind=R8P)inCoil normal direction, +1=+x, -1=-x.

Call graph

set_rectangular_coil_y

Set rectangular coil with normal direction parallel to y.

fortran
subroutine set_rectangular_coil_y(self, n, verse)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_common_object)inoutCpu object.
ninteger(kind=I4P)inCoil number.
versereal(kind=R8P)inCoil normal direction, +1=+y, -1=-y.

Call graph

set_rectangular_coil_z

Set rectangular coil with normal direction parallel to z.

fortran
subroutine set_rectangular_coil_z(self, n, verse)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_common_object)inoutCpu object.
ninteger(kind=I4P)inCoil number.
versereal(kind=R8P)inCoil normal direction, +1=+z, -1=-z.

Call graph

set_circular_coil_x

Set circular coil with normal direction parallel to x.

fortran
subroutine set_circular_coil_x(self, n, verse)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_common_object)inoutCpu object.
ninteger(kind=I4P)inCoil number.
versereal(kind=R8P)inCoil normal direction, +1=+x, -1=-x.

Call graph

set_circular_coil_y

Set circular coil with normal direction parallel to y.

fortran
subroutine set_circular_coil_y(self, n, verse)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_common_object)inoutCpu object.
ninteger(kind=I4P)inCoil number.
versereal(kind=R8P)inCoil normal direction, +1=+y, -1=-y.

Call graph

set_circular_coil_z

Set circular coil with normal direction parallel to z.

fortran
subroutine set_circular_coil_z(self, n, verse)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_common_object)inoutCpu object.
ninteger(kind=I4P)inCoil number.
versereal(kind=R8P)inCoil normal direction, +1=+z, -1=-z.

Call graph

set_solenoid_x

Set solenoid with axis direction parallel to x.

fortran
subroutine set_solenoid_x(self, n, verse)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_common_object)inoutCpu object.
ninteger(kind=I4P)inCoil number.
versereal(kind=R8P)inSolenoid axis direction, +1=+x, -1=-x.

Call graph

set_solenoid_y

Set solenoid with axis direction parallel to y.

fortran
subroutine set_solenoid_y(self, n, verse)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_common_object)inoutCpu object.
ninteger(kind=I4P)inCoil number.
versereal(kind=R8P)inSolenoid axis direction, +1=+y, -1=-y.

Call graph

set_solenoid_z

Set solenoid with axis direction parallel to z.

fortran
subroutine set_solenoid_z(self, n, verse)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_common_object)inoutCpu object.
ninteger(kind=I4P)inCoil number.
versereal(kind=R8P)inSolenoid axis direction, +1=+z, -1=-z.

Call graph

Functions

erf_function

Returns: real(kind=R8P)

fortran
function erf_function(s, mu, sigma) result(res)

Arguments

NameTypeIntentAttributesDescription
sreal(kind=R8P)in
mureal(kind=R8P)in
sigmareal(kind=R8P)in

Call graph

tangential_window

Returns: real(kind=R8P)

fortran
function tangential_window(s, smin, smax, sigma) result(res)

Arguments

NameTypeIntentAttributesDescription
sreal(kind=R8P)in
sminreal(kind=R8P)in
smaxreal(kind=R8P)in
sigmareal(kind=R8P)in

Call graph

erf_primitive_function

Primitive of erf((s-mu)/(sqrt(2)*sigma)).

Returns: real(kind=R8P)

fortran
function erf_primitive_function(s, mu, sigma) result(res)

Arguments

NameTypeIntentAttributesDescription
sreal(kind=R8P)in
mureal(kind=R8P)in
sigmareal(kind=R8P)in

Call graph