Skip to content

adam_nasto_nvf_object

ADAM, Navier-Stokes equations system class definition, GPU (NVF) backend.

Source: src/app/nasto/nvf/adam_nasto_nvf_object.F90

Dependencies

Contents

Derived Types

nasto_nvf_object

Navier-Stokes equations system class definition, GPU (NVF) backend.

Inheritance

Extends: nasto_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(nasto_io_object)IO handler.
physicstype(nasto_physics_object)Fluids physiscs handler.
ictype(nasto_ic_object)Initial Conditions (IC) handler.
bctype(nasto_bc_object)Boundary Conditions (BC) handler.
timetype(nasto_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.
nsinteger(kind=I4P)pointerNumber of fluids specie.
nvinteger(kind=I4P)pointerNumber of conservative variables.
nv_auxinteger(kind=I4P)pointerNumber of auxiliary variables.
qreal(kind=R8P)allocatableCell centered variables.
q_auxreal(kind=R8P)allocatableAuxiliary cell centered variables.
mpih_gputype(mpih_nvf_object)MPI handler, NVF backend.
field_gputype(field_nvf_object)The field, NVF backend.
ib_gputype(ib_nvf_object)IB handler, NVF backend.
rk_gputype(rk_nvf_object)RK integrator, NVF backend.
weno_gputype(weno_nvf_object)WENO reconstructor, NVF backend.
q_gpureal(kind=R8P)pointer, deviceField cell centered variables.
q_aux_gpureal(kind=R8P)allocatable, deviceAuxiliary cell centered variables.
dq_gpureal(kind=R8P)allocatable, deviceEikonal right hand side.
flx_gpureal(kind=R8P)allocatable, deviceFluxes along x.
fly_gpureal(kind=R8P)allocatable, deviceFluxes along y.
flz_gpureal(kind=R8P)allocatable, deviceFluxes along z.
q_bc_vars_gpureal(kind=R8P)allocatable, deviceVariables array for boundary conditions on GPU.

Type-Bound Procedures

NameAttributesDescription
allocate_commonpass(self)Allocate common data.
initialize_commonpass(self)Initialize the equation common data.
allocate_gpupass(self)Allocate GPU data.
copy_cpu_gpupass(self)Copy data from CPU to GPU.
copy_gpu_cpupass(self)Copy data from GPU to CPU.
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_hdf5pass(self)Save simulation data in HDF5 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 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.

Subroutines

allocate_gpu

Allocate GPU data.

fortran
subroutine allocate_gpu(self, q_gpu)

Arguments

NameTypeIntentAttributesDescription
selfclass(nasto_nvf_object)inoutThe equation.
q_gpureal(kind=R8P)inoutdevice, targetConservative variables.

Call graph

copy_cpu_gpu

Copy data from CPU to GPU.

fortran
subroutine copy_cpu_gpu(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(nasto_nvf_object)inoutThe equation.

Call graph

copy_gpu_cpu

Copy data from GPU to CPU.

fortran
subroutine copy_gpu_cpu(self, compute_copy_q_aux, copy_phi)

Arguments

NameTypeIntentAttributesDescription
selfclass(nasto_nvf_object)inoutThe equation.
compute_copy_q_auxlogicalinoptionalFlag to compute auxiliary variables.
copy_philogicalinoptionalCopy also phi.

Call graph

initialize

Initialize the equation.

fortran
subroutine initialize(self, filename)

Arguments

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

Call graph

amr_update

Do AMR update.

fortran
subroutine amr_update(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(nasto_nvf_object)inoutThe equation.

Call graph

compute_phi

Compute phi, distance from IB solid.

fortran
subroutine compute_phi(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(nasto_nvf_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(nasto_nvf_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(nasto_nvf_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.

fortran
subroutine move_phi(self, velocity)

Arguments

NameTypeIntentAttributesDescription
selfclass(nasto_nvf_object)inoutThe equation.
velocityreal(kind=R8P)inVelocity of the movement.

Call graph

refine_uniform

Refine all blocks uniformly.

fortran
subroutine refine_uniform(self, refinement_levels)

Arguments

NameTypeIntentAttributesDescription
selfclass(nasto_nvf_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_gpu)

Arguments

NameTypeIntentAttributesDescription
selfclass(nasto_nvf_object)inoutThe equation.
q_gpureal(kind=R8P)inoutdeviceConservative variables.

Call graph

load_restart_files

Save restart files.

fortran
subroutine load_restart_files(self, t, time)

Arguments

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

Call graph

save_hdf5

Save simulation data in HDF5 format.

fortran
subroutine save_hdf5(self, output_basename)

Arguments

NameTypeIntentAttributesDescription
selfclass(nasto_nvf_object)inoutThe equation.
output_basenamecharacter(len=*)inoptionalOutput basename.

Call graph

save_residuals

Save residuals history.

fortran
subroutine save_residuals(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(nasto_nvf_object)inoutThe equation.

Call graph

save_restart_files

Save restart files.

fortran
subroutine save_restart_files(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(nasto_nvf_object)inoutThe equation.

Call graph

save_simulation_data

Save all simulation data.

fortran
subroutine save_simulation_data(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(nasto_nvf_object)inoutThe equation.

Call graph

set_boundary_conditions

Set boundary conditions of equation.

fortran
subroutine set_boundary_conditions(self, q_gpu)

Arguments

NameTypeIntentAttributesDescription
selfclass(nasto_nvf_object)inThe equation.
q_gpureal(kind=R8P)inoutdeviceConservative variables.

Call graph

set_initial_conditions

Set initial conditions of field.

fortran
subroutine set_initial_conditions(self)

Arguments

NameTypeIntentAttributesDescription
selfclass(nasto_nvf_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_gpu, step)

Arguments

NameTypeIntentAttributesDescription
selfclass(nasto_nvf_object)inoutThe equation.
q_gpureal(kind=R8P)inoutdeviceConservative 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(nasto_nvf_object)inoutThe equation.

Call graph

compute_q_auxiliary

Compute auxiliary variables.

fortran
subroutine compute_q_auxiliary(self, q_gpu, q_aux_gpu)

Arguments

NameTypeIntentAttributesDescription
selfclass(nasto_nvf_object)inThe equation.
q_gpureal(kind=R8P)indeviceConservative variables.
q_aux_gpureal(kind=R8P)outdeviceAuxiliary variables.

Call graph

compute_residuals

Compute residuals of equation.

fortran
subroutine compute_residuals(self, q_gpu, dq_gpu)

Arguments

NameTypeIntentAttributesDescription
selfclass(nasto_nvf_object)inoutThe equation.
q_gpureal(kind=R8P)inoutdeviceConservative variables.
dq_gpureal(kind=R8P)inoutdeviceResiduals.

Call graph

integrate

Perform one step integration.

fortran
subroutine integrate(self, do_ghost_syncro)

Arguments

NameTypeIntentAttributesDescription
selfclass(nasto_nvf_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(nasto_nvf_object)inoutThe equation.
filenamecharacter(len=*)inInput file name.

Call graph