Skip to content

adam_patch_cpu_object

ADAM, PATCH Poisson solver with Adpative mesh Refinement for HPC computing class definition, CPU backend.

Source: src/app/patch/cpu/adam_patch_cpu_object.F90

Dependencies

Contents

Derived Types

patch_cpu_object

Maxwell equations system class definition, CPU backend.

Inheritance

Extends: patch_common_object

Components

NameTypeAttributesDescription
mpihtype(mpih_object)MPI handler.
adamtype(adam_object)ADAM.
fieldtype(field_object)pointerThe field.
gridtype(grid_object)pointerThe grid.
amrtype(amr_object)AMR marker handler.
ibtype(ib_object)Immersed Boundary (IB) handler.
flailtype(flail_object)Linear algebra methods handler.
iotype(patch_io_object)IO handler.
ictype(patch_ic_object)Initial Conditions (IC) handler.
bctype(patch_bc_object)Boundary Conditions (BC) handler.
timetype(patch_time_object)Time handler.
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 conservative/primitive variables.
qreal(kind=R8P)allocatablePotential field cell centered variable.
rreal(kind=R8P)allocatableRho function.
q_namecharacter(len=3)Potential field name.
dqreal(kind=R8P)allocatableResiduals right hand side.

Type-Bound Procedures

NameAttributesDescription
allocate_commonpass(self)Allocate common data.
initialize_commonpass(self)Initialize the equation common data.
allocate_cpupass(self)Allocate CPU data.
finalizepass(self)Finalize simulation.
initializepass(self)Initialize the equation.
amr_updatepass(self)Do AMR update.
compute_phipass(self)Compute phi, distance from IB solid.
mark_by_geopass(self)Mark blocks to be refined/derefined by a geometric constrain.
mark_by_grad_varpass(self)Mark blocks to be refined/derefined by a grad(var) value.
move_phipass(self)Move phi.
refine_uniformpass(self)Refine all blocks uniformly.
integrate_eikonalpass(self)Integrate eikonal equation.
load_restart_filespass(self)Load restart files.
save_xh5fpass(self)Save simulation data in XH5F format.
save_residualspass(self)Save residuals history.
save_restart_filespass(self)Save restart files.
save_simulation_datapass(self)Save all simulation data.
set_boundary_conditionspass(self)Set boundary conditions of equation.
set_initial_conditionspass(self)Set initial conditions (and coils) of equation.
update_ghostpass(self)Update ghost cells and set boundary conditions.
integratepass(self)Integrate the equation.
simulatepass(self)Perform the simulation.

Subroutines

allocate_cpu

Allocate CPU data.

fortran
subroutine allocate_cpu(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(patch_cpu_object)inoutThe equation.

Call graph

finalize

Finalize simulation.

fortran
subroutine finalize(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(patch_cpu_object)inoutThe equation.

Call graph

initialize

Initialize the equation.

fortran
subroutine initialize(self, filename)

Arguments

NameTypeIntentAttributesDescription
selfclass(patch_cpu_object)inoutThe equation.
filenamecharacter(len=*)inInput file name.

Call graph

amr_update

Do AMR update.

fortran
subroutine amr_update(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(patch_cpu_object)inoutThe equation.

Call graph

compute_phi

Compute phi, distance from IB solid.

fortran
subroutine compute_phi(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(patch_cpu_object)inoutThe equation.

Call graph

mark_by_geo

Mark blocks to be refined/derefined by a geometric constrain.

fortran
subroutine mark_by_geo(self, delta_fine, delta_coarse, threshold, do_init)

Arguments

NameTypeIntentAttributesDescription
selfclass(patch_cpu_object)inoutThe equation.
delta_finereal(kind=R8P)inMaximum cell delta in fine grids.
delta_coarsereal(kind=R8P)inMinimum cell delta in coarse grids.
thresholdreal(kind=R8P)inoptionalThreshold for sphere proximity.
do_initlogicalinoptional

Call graph

mark_by_grad_var

Mark blocks to be refined/derefined by a grad(var) value.

fortran
subroutine mark_by_grad_var(self, grad_tol, delta_type, delta_fine, delta_coarse, ivar, threshold, do_init)

Arguments

NameTypeIntentAttributesDescription
selfclass(patch_cpu_object)inoutThe equation.
grad_tolreal(kind=R8P)inGradiend tolerance value.
delta_typecharacter(len=*)inDelta criterion type.
delta_finereal(kind=R8P)inMaximum cell delta in fine grids.
delta_coarsereal(kind=R8P)inMinimum cell delta in coarse grids.
ivarinteger(kind=I4P)inoptionalVariable for marking.
thresholdreal(kind=R8P)inoptionalThreshold for sphere proximity.
do_initlogicalinoptionalRe-initialize refinements queries.

Call graph

move_phi

Move phi and the actual tree representation.

fortran
subroutine move_phi(self, velocity, s)

Arguments

NameTypeIntentAttributesDescription
selfclass(patch_cpu_object)inoutThe equation.
velocityreal(kind=R8P)inVelocity of the movement.
sinteger(kind=I4P)inSolid index.

Call graph

refine_uniform

Refine all blocks uniformly.

fortran
subroutine refine_uniform(self, refinement_levels)

Arguments

NameTypeIntentAttributesDescription
selfclass(patch_cpu_object)inoutThe equation.
refinement_levelsinteger(kind=I4P)inNumber of refinement to be performed.

Call graph

integrate_eikonal

Integrate eikonal equation.

fortran
subroutine integrate_eikonal(self, q)

Arguments

NameTypeIntentAttributesDescription
selfclass(patch_cpu_object)inoutThe equation.
qreal(kind=R8P)inoutConservative variables.

Call graph

load_restart_files

Save restart files.

fortran
subroutine load_restart_files(self, t, time)

Arguments

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

Call graph

save_xh5f

Save simulation data in HDF5 format.

fortran
subroutine save_xh5f(self, output_basename, with_ghost)

Arguments

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

Call graph

save_residuals

Save residuals history.

fortran
subroutine save_residuals(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(patch_cpu_object)inoutThe equation.

Call graph

save_restart_files

Save restart files.

fortran
subroutine save_restart_files(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(patch_cpu_object)inoutThe equation.

Call graph

save_simulation_data

Save all simulation data.

fortran
subroutine save_simulation_data(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(patch_cpu_object)inoutThe equation.

Call graph

set_boundary_conditions

Set boundary conditions of equation.

fortran
subroutine set_boundary_conditions(self, q)

Arguments

NameTypeIntentAttributesDescription
selfclass(patch_cpu_object)inThe equation.
qreal(kind=R8P)inoutConservative variables.

Call graph

set_initial_conditions

Set initial conditions and coils on field.

fortran
subroutine set_initial_conditions(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(patch_cpu_object)inoutThe equation.

Call graph

update_ghost

Update ghost cells. If not specified all steps are perfermod, syncronous computation

fortran
subroutine update_ghost(self, q, step)

Arguments

NameTypeIntentAttributesDescription
selfclass(patch_cpu_object)inoutThe equation.
qreal(kind=R8P)inoutConservative variables.
stepinteger(kind=I4P)inoptionalStep to be perfordmed in asyncronous comp.

Call graph

integrate

Integrate the equation.

fortran
subroutine integrate(self, compute_smoothing)

Arguments

NameTypeIntentAttributesDescription
selfclass(patch_cpu_object)inoutThe equation.
compute_smoothingprocedure(compute_smoothing_interface)Smoothing procedure.

Call graph

simulate

Perform the simulation.

fortran
subroutine simulate(self, filename)

Arguments

NameTypeIntentAttributesDescription
selfclass(patch_cpu_object)inoutThe equation.
filenamecharacter(len=*)inInput file name.

Call graph