Appearance
adam_nasto_gmp_object
ADAM, Navier-Stokes equations system class definition, GPU (GMP) backend.
Source: src/app/nasto/gmp/adam_nasto_gmp_object.F90
Dependencies
Contents
- nasto_gmp_object
- allocate_gpu
- copy_cpu_gpu
- copy_gpu_cpu
- initialize
- amr_update
- compute_phi
- mark_by_geo
- mark_by_grad_var
- move_phi
- refine_uniform
- integrate_eikonal
- load_restart_files
- save_hdf5
- save_residuals
- save_restart_files
- save_simulation_data
- set_boundary_conditions
- set_initial_conditions
- update_ghost
- compute_dt
- compute_q_auxiliary
- compute_residuals
- integrate
- simulate
Derived Types
nasto_gmp_object
Navier-Stokes equations system class definition, GPU (GMP) backend.
Inheritance
Extends: nasto_common_object
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
mpih | type(mpih_object) | MPI handler. | |
adam | type(adam_object) | ADAM. | |
field | type(field_object) | pointer | The field. |
grid | type(grid_object) | pointer | The grid. |
amr | type(amr_object) | AMR marker handler. | |
ib | type(ib_object) | Immersed Boundary (IB) handler. | |
slices | type(slices_object) | Slices handler. | |
rk | type(rk_object) | RK integrator. | |
weno | type(weno_object) | WENO reconstructor. | |
io | type(nasto_io_object) | IO handler. | |
physics | type(nasto_physics_object) | Fluids physiscs handler. | |
ic | type(nasto_ic_object) | Initial Conditions (IC) handler. | |
bc | type(nasto_bc_object) | Boundary Conditions (BC) handler. | |
time | type(nasto_time_object) | Time handler. | |
ngc | integer(kind=I4P) | pointer | Number of ghost cells. |
ni | integer(kind=I4P) | pointer | Number of cells in i direction. |
nj | integer(kind=I4P) | pointer | Number of cells in j direction. |
nk | integer(kind=I4P) | pointer | Number of cells in k direction. |
nb | integer(kind=I4P) | pointer | Total blocks number for MPI. |
blocks_number | integer(kind=I4P) | pointer | Actual blocks number. |
ns | integer(kind=I4P) | pointer | Number of fluids specie. |
nv | integer(kind=I4P) | pointer | Number of conservative variables. |
nv_aux | integer(kind=I4P) | pointer | Number of auxiliary variables. |
q | real(kind=R8P) | allocatable | Cell centered variables. |
q_aux | real(kind=R8P) | allocatable | Auxiliary cell centered variables. |
mpih_gpu | type(mpih_gmp_object) | MPI handler, GMP backend. | |
field_gpu | type(field_gmp_object) | The field, GMP backend. | |
ib_gpu | type(ib_gmp_object) | IB handler, GMP backend. | |
rk_gpu | type(rk_gmp_object) | RK integrator, GMP backend. | |
weno_gpu | type(weno_gmp_object) | WENO reconstructor, GMP backend. | |
q_gpu | real(kind=R8P) | pointer | Field cell centered variables. |
q_aux_gpu | real(kind=R8P) | pointer | Auxiliary cell centered variables. |
dq_gpu | real(kind=R8P) | pointer | Eikonal right hand side. |
flx_gpu | real(kind=R8P) | pointer | Fluxes along x. |
fly_gpu | real(kind=R8P) | pointer | Fluxes along y. |
flz_gpu | real(kind=R8P) | pointer | Fluxes along z. |
q_bc_vars_gpu | real(kind=R8P) | pointer | Variables array for boundary conditions on GPU. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
allocate_common | pass(self) | Allocate common data. |
initialize_common | pass(self) | Initialize the equation common data. |
allocate_gpu | pass(self) | Allocate GPU data. |
copy_cpu_gpu | pass(self) | Copy data from CPU to GPU. |
copy_gpu_cpu | pass(self) | Copy data from GPU to CPU. |
initialize | pass(self) | Initialize the equation. |
amr_update | pass(self) | Do AMR update. |
compute_phi | pass(self) | Compute phi, distance from IB solid. |
mark_by_geo | pass(self) | Mark blocks to be refined/derefined by a geometric constrain. |
mark_by_grad_var | pass(self) | Mark blocks to be refined/derefined by a grad(var) value. |
move_phi | pass(self) | Move phi. |
refine_uniform | pass(self) | Refine all blocks uniformly. |
integrate_eikonal | pass(self) | Integrate eikonal equation. |
load_restart_files | pass(self) | Load restart files. |
save_hdf5 | pass(self) | Save simulation data in HDF5 format. |
save_residuals | pass(self) | Save residuals history. |
save_restart_files | pass(self) | Save restart files. |
save_simulation_data | pass(self) | Save all simulation data. |
set_boundary_conditions | pass(self) | Set boundary conditions of equation. |
set_initial_conditions | pass(self) | Set initial conditions of equation. |
update_ghost | pass(self) | Update ghost cells and set boundary conditions. |
compute_dt | pass(self) | Compute time step. |
compute_q_auxiliary | pass(self) | Compute auxiliary variables. |
compute_residuals | pass(self) | Compute residuals. |
integrate | pass(self) | Perform one step integration. |
simulate | pass(self) | Perform the simulation. |
Subroutines
allocate_gpu
Allocate GPU data.
fortran
subroutine allocate_gpu(self, q_gpu)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The equation. | |
q_gpu | real(kind=R8P) | inout | target | Conservative variables. |
Call graph
copy_cpu_gpu
Copy data from CPU to GPU.
fortran
subroutine copy_cpu_gpu(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The equation. | |
compute_copy_q_aux | logical | in | optional | Flag to compute auxiliary variables. |
copy_phi | logical | in | optional | Copy also phi. |
Call graph
initialize
Initialize the equation.
fortran
subroutine initialize(self, filename)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The equation. | |
filename | character(len=*) | in | Input file name. |
Call graph
amr_update
Do AMR update.
fortran
subroutine amr_update(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The equation. |
Call graph
compute_phi
Compute phi, distance from IB solid.
fortran
subroutine compute_phi(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The equation. | |
delta_fine | real(kind=R8P) | in | Maximum cell delta in fine grids. | |
delta_coarse | real(kind=R8P) | in | Minimum cell delta in coarse grids. | |
threshold | real(kind=R8P) | in | optional | Threshold for sphere proximity. |
do_init | logical | in | optional |
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_fine, delta_coarse, ivar, threshold, do_init)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The equation. | |
grad_tol | real(kind=R8P) | in | Gradiend tolerance value. | |
delta_fine | real(kind=R8P) | in | Maximum cell delta in fine grids. | |
delta_coarse | real(kind=R8P) | in | Minimum cell delta in coarse grids. | |
ivar | integer(kind=I4P) | in | optional | Variable for marking. |
threshold | real(kind=R8P) | in | optional | Threshold for sphere proximity. |
do_init | logical | in | optional | Re-initialize refinements queries. |
Call graph
move_phi
Move phi.
fortran
subroutine move_phi(self, velocity)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The equation. | |
velocity | real(kind=R8P) | in | Velocity of the movement. |
Call graph
refine_uniform
Refine all blocks uniformly.
fortran
subroutine refine_uniform(self, refinement_levels)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The equation. | |
refinement_levels | integer(kind=I4P) | in | Number of refinement to be performed. |
Call graph
integrate_eikonal
Integrate eikonal equation.
fortran
subroutine integrate_eikonal(self, q_gpu)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The equation. | |
q_gpu | real(kind=R8P) | inout | Conservative variables. |
Call graph
load_restart_files
Save restart files.
fortran
subroutine load_restart_files(self, t, time)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The equation. | |
t | integer(kind=I4P) | out | Time iteration. | |
time | real(kind=R8P) | out | Time. |
Call graph
save_hdf5
Save simulation data in HDF5 format.
fortran
subroutine save_hdf5(self, output_basename)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The equation. | |
output_basename | character(len=*) | in | optional | Output basename. |
Call graph
save_residuals
Save residuals history.
fortran
subroutine save_residuals(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The equation. |
Call graph
save_restart_files
Save restart files.
fortran
subroutine save_restart_files(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The equation. |
Call graph
save_simulation_data
Save all simulation data.
fortran
subroutine save_simulation_data(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The equation. |
Call graph
set_boundary_conditions
Set boundary conditions of equation.
fortran
subroutine set_boundary_conditions(self, q_gpu)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | in | The equation. | |
q_gpu | real(kind=R8P) | inout | Conservative variables. |
Call graph
set_initial_conditions
Set initial conditions of field.
fortran
subroutine set_initial_conditions(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The equation. | |
q_gpu | real(kind=R8P) | inout | Conservative variables. | |
step | integer(kind=I4P) | in | optional | Step 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
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The equation. |
Call graph
compute_q_auxiliary
Compute auxiliary variables.
fortran
subroutine compute_q_auxiliary(self, q_gpu, q_aux_gpu)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | in | The equation. | |
q_gpu | real(kind=R8P) | in | Conservative variables. | |
q_aux_gpu | real(kind=R8P) | out | Auxiliary variables. |
Call graph
compute_residuals
Compute residuals of equation.
fortran
subroutine compute_residuals(self, q_gpu, dq_gpu)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The equation. | |
q_gpu | real(kind=R8P) | inout | Conservative variables. | |
dq_gpu | real(kind=R8P) | inout | Residuals. |
Call graph
integrate
Perform one step integration.
fortran
subroutine integrate(self, do_ghost_syncro)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The equation. | |
do_ghost_syncro | logical | in | optional | Flag to do syncrous ghost update. |
Call graph
simulate
Perform the simulation.
fortran
subroutine simulate(self, filename)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(nasto_gmp_object) | inout | The equation. | |
filename | character(len=*) | in | Input file name. |
Call graph