Appearance
adam_fnl_field_object
ADAM, field class definition, FNL backend.
Source: src/lib/fnl/adam_fnl_field_object.F90
Dependencies
Contents
- field_fnl_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_fnl_object
Field class, FNL backend.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
mpih | type(mpih_object) | MPI handler. | |
maps | type(maps_fnl_object) | Maps handler. | |
field | type(field_object) | pointer | The field. |
fec_1_6_array_gpu | integer(kind=I4P) | pointer | Mapping fec1-26 to fec1-6 for boundaries (GPU). |
x_cell_gpu | real(kind=R8P) | pointer | Cells x coordinates on GPU [nb,1-ngc:ni+ngc]. |
y_cell_gpu | real(kind=R8P) | pointer | Cells y coordinates on GPU [nb,1-ngc:nj+ngc]. |
z_cell_gpu | real(kind=R8P) | pointer | Cells z coordinates on GPU [nb,1-ngc:nk+ngc]. |
dxyz_gpu | real(kind=R8P) | pointer | Delta cells GPU [nb,3]. |
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. |
nv | integer(kind=I4P) | pointer | Number of variables in q vector. |
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_fnl_object) GPU. |
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_fnl_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 | 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_fnl_object) GPU.
fortran
subroutine copy_cpu_gpu(self, verbose)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(field_fnl_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_t, q_gpu)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(field_fnl_object) | inout | The field. | |
nv | integer(kind=I4P) | in | Number of varibales. | |
q_cpu | real(kind=R8P) | in | Conservative variables on CPU. | |
q_t | real(kind=R8P) | inout | Transposed conservative variables on CPU. | |
q_gpu | real(kind=R8P) | inout | 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_t_gpu, q_cpu)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(field_fnl_object) | inout | The field. | |
nv | integer(kind=I4P) | in | Number of varibales. | |
q_gpu | real(kind=R8P) | in | Conservative variables on GPU. | |
q_t_gpu | real(kind=R8P) | inout | Transposed 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, q_gpu, verbose)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(field_fnl_object) | inout | The field. | |
field | type(field_object) | in | target | Field variable array. |
nv_aux | integer(kind=I4P) | in | optional | Number of auxiliary variables. |
q_gpu | real(kind=R8P) | inout | pointer, optional | Field cell centered 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_fnl_object) | in | The field. | |
q_gpu | real(kind=R8P) | inout | 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_fnl_object) | inout | The field. | |
q_gpu | real(kind=R8P) | inout | Field component to be updated. | |
step | integer(kind=I4P) | in | optional | Step to be perfordmed in asyncronous comp. |
Call graph