Appearance
adam_field_nvf_object
ADAM, field class definition, NVF backend.
Source: src/lib/nvf/adam_field_nvf_object.F90
Dependencies
Contents
- field_nvf_object
- compute_q_gradient
- copy_cpu_gpu
- copy_transpose_cpu_gpu
- copy_transpose_gpu_cpu
- initialize
- update_ghost_local_gpu
- update_ghost_mpi_gpu
Derived Types
field_nvf_object
Field class, NVF backend.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
mpih | type(mpih_nvf_object) | MPI handler. | |
maps | type(maps_nvf_object) | Maps handler. | |
field | type(field_object) | pointer | The field. |
q_t | real(kind=R8P) | allocatable | Transposed cell centered variables on CPU. |
q_gpu | real(kind=R8P) | allocatable, device | Field cell centered variables. |
q_t_gpu | real(kind=R8P) | allocatable, device | Transposed cell centered variables on GPU. |
fec_1_6_array_gpu | integer(kind=I4P) | allocatable, device | Mapping fec1-26 to fec1-6 for boundaries (GPU). |
x_cell_gpu | real(kind=R8P) | allocatable, device | Cells x coordinates on GPU. |
y_cell_gpu | real(kind=R8P) | allocatable, device | Cells y coordinates on GPU. |
z_cell_gpu | real(kind=R8P) | allocatable, device | Cells z coordinates on GPU. |
dxyz_gpu | real(kind=R8P) | allocatable, device | Delta cells GPU. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
compute_q_gradient | pass(self) | Compute maximum gradient module of q element of a block. |
copy_cpu_gpu | pass(self) | Copy data from (field_object) CPU to (field_nvf_object) GPU. |
copy_transpose_cpu_gpu | pass(self) | Transpose data from GPU to CPU. |
copy_transpose_gpu_cpu | pass(self) | Transpose data from GPU to CPU. |
initialize | pass(self) | Initialize field. |
update_ghost_local_gpu | pass(self) | Update ghosts locally. |
update_ghost_mpi_gpu | pass(self) | Update ghosts MPI. |
Subroutines
compute_q_gradient
Compute gradient (module) over q elements.
fortran
subroutine compute_q_gradient(self, b, ivar, q_gpu, gradient)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(field_nvf_object) | in | The field. | |
b | integer(kind=I4P) | in | Block index. | |
ivar | integer(kind=I4P) | in | Index of q variable. | |
q_gpu | real(kind=R8P) | in | device | Field component to which apply gradient. |
gradient | real(kind=R8P) | out | Maximum gradient of q(ivar). |
Call graph
copy_cpu_gpu
Copy data from (field_object) CPU to (field_nvf_object) GPU.
fortran
subroutine copy_cpu_gpu(self, verbose)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(field_nvf_object) | inout | The field. | |
verbose | logical | in | optional | Flag to activate verbose mode. |
Call graph
copy_transpose_cpu_gpu
Copy transposed data from CPU to GPU. This routine is called by equation typically passing either q_gpu or q_aux_gpu.
fortran
subroutine copy_transpose_cpu_gpu(self, nv, q_cpu, q_gpu)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(field_nvf_object) | inout | The equation. | |
nv | integer(kind=I4P) | in | Number of varibales. | |
q_cpu | real(kind=R8P) | in | Conservative variables on CPU. | |
q_gpu | real(kind=R8P) | out | device | Conservative variables on GPU. |
Call graph
copy_transpose_gpu_cpu
Copy transposed data from GPU to CPU. This routine is called by equation typically passing either q_gpu or q_aux_gpu.
fortran
subroutine copy_transpose_gpu_cpu(self, nv, q_gpu, q_cpu)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(field_nvf_object) | inout | The equation. | |
nv | integer(kind=I4P) | in | Number of varibales. | |
q_gpu | real(kind=R8P) | in | device | Conservative variables on GPU. |
q_cpu | real(kind=R8P) | inout | Conservative variables on CPU. |
Call graph
initialize
Initialize field.
fortran
subroutine initialize(self, field, nv_aux, verbose)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(field_nvf_object) | inout | The field. | |
field | type(field_object) | in | target | Field variable array. |
nv_aux | integer(kind=I4P) | in | optional | Number of auxiliary variables. |
verbose | logical | in | optional | Flag to activate verbose mode. |
Call graph
update_ghost_local_gpu
Update (local) ghost cells.
fortran
subroutine update_ghost_local_gpu(self, q_gpu)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(field_nvf_object) | in | The field. | |
q_gpu | real(kind=R8P) | inout | device | Field component to be updated. |
Call graph
update_ghost_mpi_gpu
Update ghost cells within other processes.
fortran
subroutine update_ghost_mpi_gpu(self, q_gpu, step)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(field_nvf_object) | inout | The field. | |
q_gpu | real(kind=R8P) | inout | device | Field component to be updated. |
step | integer(kind=I4P) | in | optional | Step to be perfordmed in asyncronous comp. |
Call graph