Skip to content

adam_chase_cpu_object

ADAM, CHASE (CFD-HPC enabled-Adaptive mesh-Simulation code for-Euler equations) class definition, CPU backend.

Source: src/app/chase/cpu/adam_chase_cpu_object.F90

Dependencies

Contents

Derived Types

chase_cpu_object

Maxwell equations system class definition, CPU backend.

Inheritance

Extends: chase_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.
slicestype(slices_object)Slices handler.
rktype(rk_object)RK integrator.
wenotype(weno_object)WENO reconstructor.
iotype(chase_io_object)IO handler.
physicstype(chase_physics_object)Fluids physiscs handler.
ictype(chase_ic_object)Initial Conditions (IC) handler.
bctype(chase_bc_object)Boundary Conditions (BC) handler.
timetype(chase_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.
nv_auxinteger(kind=I4P)pointerNumber of auxiliary variables.
qreal(kind=R8P)allocatableCell centered variables.
q_auxreal(kind=R8P)allocatableAuxiliary cell centered variables.
q_namecharacter(len=2)allocatableConservative fields names (r,ru,rv,rw,rE).
dqreal(kind=R8P)allocatableResiduals right hand side.
flxreal(kind=R8P)allocatableFluxes along x.
flyreal(kind=R8P)allocatableFluxes along y.
flzreal(kind=R8P)allocatableFluxes along z.

Type-Bound Procedures

NameAttributesDescription
allocate_commonpass(self)Allocate common data.
initialize_commonpass(self)Initialize the equation common data.
allocate_cpupass(self)Allocate CPU data.
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.
compute_dtpass(self)Compute time step.
compute_q_auxiliarypass(self)Compute auxiliary variables.
compute_residualspass(self)Compute residuals.
integratepass(self)Perform one step integration.
simulatepass(self)Perform the simulation.

Interfaces

assign_omp

Assign array to scalar value with OpenMP threads.

Module procedures: assign_omp_R8P_5D

Subroutines

allocate_cpu

Allocate CPU data.

fortran
subroutine allocate_cpu(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(chase_cpu_object)inoutThe equation.

Call graph

initialize

Initialize the equation.

fortran
subroutine initialize(self, filename)

Arguments

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

Call graph

amr_update

Do AMR update.

fortran
subroutine amr_update(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(chase_cpu_object)inoutThe equation.

Call graph

compute_phi

Compute phi, distance from IB solid.

fortran
subroutine compute_phi(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(chase_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(chase_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(chase_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(chase_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(chase_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(chase_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(chase_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(chase_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(chase_cpu_object)inoutThe equation.

Call graph

save_restart_files

Save restart files.

fortran
subroutine save_restart_files(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(chase_cpu_object)inoutThe equation.

Call graph

save_simulation_data

Save all simulation data.

fortran
subroutine save_simulation_data(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(chase_cpu_object)inoutThe equation.

Call graph

set_boundary_conditions

Set boundary conditions of equation.

fortran
subroutine set_boundary_conditions(self, q)

Arguments

NameTypeIntentAttributesDescription
selfclass(chase_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(chase_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(chase_cpu_object)inoutThe equation.
qreal(kind=R8P)inoutConservative variables.
stepinteger(kind=I4P)inoptionalStep to be perfordmed in asyncronous comp.

Call graph

compute_dt

Compute maximum time step accordingly to CFL stabilty criterion.

fortran
subroutine compute_dt(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(chase_cpu_object)inoutThe equation.

Call graph

compute_q_auxiliary

Compute auxiliary variables.

fortran
subroutine compute_q_auxiliary(self, q, q_aux)

Arguments

NameTypeIntentAttributesDescription
selfclass(chase_cpu_object)inThe equation.
qreal(kind=R8P)inConservative variables.
q_auxreal(kind=R8P)outAuxiliary variables.

Call graph

compute_residuals

Compute residuals of equation.

fortran
subroutine compute_residuals(self, q, q_aux, dq)

Arguments

NameTypeIntentAttributesDescription
selfclass(chase_cpu_object)inoutThe equation.
qreal(kind=R8P)inoutConservative variables.
q_auxreal(kind=R8P)inoutAuxiliary variables.
dqreal(kind=R8P)inoutResiduals.

Call graph

integrate

Perform one step integration.

fortran
subroutine integrate(self, do_ghost_syncro)

Arguments

NameTypeIntentAttributesDescription
selfclass(chase_cpu_object)inoutThe equation.
do_ghost_syncrologicalinoptionalFlag to do syncrous ghost update.

Call graph

simulate

Perform the simulation.

fortran
subroutine simulate(self, filename)

Arguments

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

Call graph

assign_omp_R8P_5D

Assign array to scalar value with OpenMP threads (kind R8P, rank 5)

fortran
subroutine assign_omp_R8P_5D(blocks_number, ngc, lhs, rhs)

Arguments

NameTypeIntentAttributesDescription
blocks_numberinteger(kind=I4P)inNumber of blocks.
ngcinteger(kind=I4P)inGhost cells number.
lhsreal(kind=R8P)inoutLest hand side.
rhsreal(kind=R8P)inRight hand side.

compute_fluxes_convective

Compute convective fluxes along direction dir.

fortran
subroutine compute_fluxes_convective(dir, blocks_number, ni, nj, nk, ngc, nv, g, weno_s, weno_zeps, weno_a, weno_p, weno_d, q_aux, fluxes)

Arguments

NameTypeIntentAttributesDescription
dirinteger(kind=I4P)inDirection, 1=X, 2=Y, 3=Z.
blocks_numberinteger(kind=I4P)inNumber of blocks.
niinteger(kind=I4P)inGrid cells number in I direction.
njinteger(kind=I4P)inGrid cells number in J direction.
nkinteger(kind=I4P)inGrid cells number in K direction.
ngcinteger(kind=I4P)inGhost cells number.
nvinteger(kind=I4P)inNumber of conservative varibales.
greal(kind=R8P)inSpecific heats ratio.
weno_sinteger(kind=I4P)inWeno stencils number/dimension.
weno_zepsreal(kind=R8P)inParameter for avoiding division by zero in computing IS.
weno_areal(kind=R8P)inOptimal weights.
weno_preal(kind=R8P)inPolinomials coefficients.
weno_dreal(kind=R8P)inSmoothness indicators coefficients.
q_auxreal(kind=R8P)inAuxiliary variables.
fluxesreal(kind=R8P)inoutFluxes.

Call graph

compute_fluxes_convective_ri

Compute convective fluxes at right interface of b,i,j,k.

fortran
subroutine compute_fluxes_convective_ri(dir, b, i, j, k, ngc, nv, weno_s, weno_zeps, weno_a, weno_p, weno_d, si, sir, g, q_aux, fluxes)

Arguments

NameTypeIntentAttributesDescription
dirinteger(kind=I4P)inDirection, 1=X, 2=Y, 3=Z.
binteger(kind=I4P)inCounter.
iinteger(kind=I4P)inCounter.
jinteger(kind=I4P)inCounter.
kinteger(kind=I4P)inCounter.
ngcinteger(kind=I4P)inGhost cells number.
nvinteger(kind=I4P)inNumber of conservative varibales.
weno_sinteger(kind=I4P)inWeno stencils number/dimension.
weno_zepsreal(kind=R8P)inParameter to avoid division by zero.
weno_areal(kind=R8P)inOptimal weights.
weno_preal(kind=R8P)inPolinomials coefficients.
weno_dreal(kind=R8P)inSmoothness indicators coefficients.
siinteger(kind=I4P)inStencil increment.
sirreal(kind=R8P)inStencil increment, real cast.
greal(kind=R8P)inSpecific heats ratio.
q_auxreal(kind=R8P)inAuxiliary variables.
fluxesreal(kind=R8P)inoutFluxes.

Call graph

compute_fluxes_difference

Compute fluxes difference.

fortran
subroutine compute_fluxes_difference(null_xyz, blocks_number, ni, nj, nk, ngc, nv, ib_eps, dx, dy, dz, flx, fly, flz, phi, dq)

Arguments

NameTypeIntentAttributesDescription
null_xyzlogicalinNullified directions tags.
blocks_numberinteger(kind=I4P)inNumber of blocks.
niinteger(kind=I4P)inGrid cells number in I direction.
njinteger(kind=I4P)inGrid cells number in J direction.
nkinteger(kind=I4P)inGrid cells number in K direction.
ngcinteger(kind=I4P)inGhost cells number.
nvinteger(kind=I4P)inNumber of conservative varibales.
ib_epsreal(kind=R8P)inTolerance IB delta ratio.
dxreal(kind=R8P)inSpace steps.
dyreal(kind=R8P)inSpace steps.
dzreal(kind=R8P)inSpace steps.
flxreal(kind=R8P)inX direction fluxes.
flyreal(kind=R8P)inY direction fluxes.
flzreal(kind=R8P)inZ direction fluxes.
phireal(kind=R8P)inoptionalIB distance function.
dqreal(kind=R8P)inoutFluxes differences.

Call graph

compute_eigenvectors

Attributes: pure

fortran
subroutine compute_eigenvectors(si, sir, b, i, j, k, ngc, nv, g, q_aux, el, er)

Arguments

NameTypeIntentAttributesDescription
siinteger(kind=I4P)inDirectional (1=x,2=y,3=z) increment.
sirreal(kind=R8P)inDirectional (1=x,2=y,3=z) increment.
binteger(kind=I4P)inCell indexes.
iinteger(kind=I4P)inCell indexes.
jinteger(kind=I4P)inCell indexes.
kinteger(kind=I4P)inCell indexes.
ngcinteger(kind=I4P)inGhost cells number.
nvinteger(kind=I4P)inNumber of conservative varibales.
greal(kind=R8P)inSpecific heats ratio.
q_auxreal(kind=R8P)inAuxiliary variables.
elreal(kind=R8P)inoutLeft and right eigenvectors.
erreal(kind=R8P)inoutLeft and right eigenvectors.

Call graph

compute_max_eigenvalues

Attributes: pure

fortran
subroutine compute_max_eigenvalues(si, weno_s, b, i, j, k, ngc, nv, q_aux, evmax)

Arguments

NameTypeIntentAttributesDescription
siinteger(kind=I4P)inDirectional (1=x,2=y,3=z) increment.
weno_sinteger(kind=I4P)inWeno stencils number/dimension.
binteger(kind=I4P)inCell indexes.
iinteger(kind=I4P)inCell indexes.
jinteger(kind=I4P)inCell indexes.
kinteger(kind=I4P)inCell indexes.
ngcinteger(kind=I4P)inGhost cells number.
nvinteger(kind=I4P)inNumber of conservative varibales.
q_auxreal(kind=R8P)inAuxiliary variables.
evmaxreal(kind=R8P)outMaximum eigenvalue in the big stencil.

Call graph

compute_q_gradient

Compute gradient of q(ivar).

fortran
subroutine compute_q_gradient(b, ni, nj, nk, ngc, dx, dy, dz, q, ivar, gradient)

Arguments

NameTypeIntentAttributesDescription
binteger(kind=I4P)inBlock index.
niinteger(kind=I4P)inGrid cells number in I direction.
njinteger(kind=I4P)inGrid cells number in J direction.
nkinteger(kind=I4P)inGrid cells number in K direction.
ngcinteger(kind=I4P)inGhost cells number.
dxreal(kind=R8P)inX space step.
dyreal(kind=R8P)inY space step.
dzreal(kind=R8P)inZ space step.
qreal(kind=R8P)inField component to which apply gradient.
ivarinteger(kind=I4P)inIndex of variable for computing the gradient.
gradientreal(kind=R8P)outMaximum gradient of q.

Call graph

compute_roe_average

Compute Roe averaged quantities.

Attributes: pure

fortran
subroutine compute_roe_average(ngc, b, i, j, k, ip, jp, kp, g, q_aux, uu, vv, ww, h, qq, c, ci, b1, b2)

Arguments

NameTypeIntentAttributesDescription
ngcinteger(kind=I4P)inNumber of ghost cells.
binteger(kind=I4P)inLeft/right cells indexes.
iinteger(kind=I4P)inLeft/right cells indexes.
jinteger(kind=I4P)inLeft/right cells indexes.
kinteger(kind=I4P)inLeft/right cells indexes.
ipinteger(kind=I4P)inLeft/right cells indexes.
jpinteger(kind=I4P)inLeft/right cells indexes.
kpinteger(kind=I4P)inLeft/right cells indexes.
greal(kind=R8P)inSpecific heats ratio.
q_auxreal(kind=R8P)inAuxiliary variables.
uureal(kind=R8P)outRoe state average variables.
vvreal(kind=R8P)outRoe state average variables.
wwreal(kind=R8P)outRoe state average variables.
hreal(kind=R8P)outRoe state average variables.
qqreal(kind=R8P)outRoe state average variables.
creal(kind=R8P)outRoe state average variables.
cireal(kind=R8P)outRoe state average variables.
b1real(kind=R8P)outRoe state average variables.
b2real(kind=R8P)outRoe state average variables.

Call graph

decompose_fluxes_convective

Decompose convective fluxes. Flux vector splitting by local-Lax-Friedrics (Rusanov) with projection in pseudo-characteristics space.

Attributes: pure

fortran
subroutine decompose_fluxes_convective(weno_s, b, i, j, k, ngc, nv, si, sir, el, q_aux, fmpc)

Arguments

NameTypeIntentAttributesDescription
weno_sinteger(kind=I4P)inWeno stencils number/dimension.
binteger(kind=I4P)inCounter.
iinteger(kind=I4P)inCounter.
jinteger(kind=I4P)inCounter.
kinteger(kind=I4P)inCounter.
ngcinteger(kind=I4P)inGhost cells number.
nvinteger(kind=I4P)inNumber of conservative varibales.
siinteger(kind=I4P)inStencil increment.
sirreal(kind=R8P)inStencil increment, real cast.
elreal(kind=R8P)inLeft eigeinvectors.
q_auxreal(kind=R8P)inAuxiliary variables.
fmpcreal(kind=R8P)inoutFluxes -+ decomposition in characteristics space.

Call graph