Appearance
adam_prism_fnl_coil_object
ADAM, PRISM coil source definition, FNL backend.
Source: src/app/prism/fnl/adam_prism_fnl_coil_object.F90
Dependencies
Contents
Derived Types
prism_fnl_coil_object
ADAM, PRISM coil source definition, FNL (GPU) backend.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
mpih | type(mpih_object) | MPI handler. | |
coil | type(prism_coil_object) | pointer | Coil common handler. |
A_gpu | real(kind=R8P) | pointer | Current amplitude (A) |
f_gpu | real(kind=R8P) | pointer | Current frequency, if AC (Hz) |
phase_gpu | real(kind=R8P) | pointer | Current initial phase, if AC |
J_vec_gpu | real(kind=R8P) | pointer | Matrice contenente versori corrente spire (se assente = 0) |
coil_flag_gpu | integer(kind=I4P) | pointer | Matrice contenente informazioni su quale spira pass. |
blocks_number | integer(kind=I4P) | pointer | Actual blocks number. |
nb | integer(kind=I4P) | pointer | Total blocks number for MPI. |
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. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
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 class. |
Subroutines
copy_cpu_gpu
Copy data from CPU to GPU.
fortran
subroutine copy_cpu_gpu(self, verbose)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_fnl_coil_object) | inout | The field. | |
verbose | logical | in | optional | Flag to activate verbose mode. |
Call graph
copy_gpu_cpu
Copy data from GPU to CPU.
fortran
subroutine copy_gpu_cpu(self, verbose)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_fnl_coil_object) | inout | The field. | |
verbose | logical | in | optional | Flag to activate verbose mode. |
Call graph
initialize
Initialize class.
fortran
subroutine initialize(self, field, coil)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_fnl_coil_object) | inout | Coils. | |
field | type(field_object) | in | target | Field. |
coil | class(prism_coil_object) | in | target | Coils on host. |
Call graph
compute_coils_current_dev
Compute current coils sources, device kernel.
fortran
subroutine compute_coils_current_dev(ni, nj, nk, ngc, blocks_number, time_s, td, A_gpu, f_gpu, phase_gpu, coil_flag_gpu, J_vec_gpu, var_Jx, var_Jy, var_Jz, q_gpu)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
ni | integer(kind=I4P) | in | Grid cells number in I direction. | |
nj | integer(kind=I4P) | in | Grid cells number in J direction. | |
nk | integer(kind=I4P) | in | Grid cells number in K direction. | |
ngc | integer(kind=I4P) | in | Ghost grid number. | |
blocks_number | integer(kind=I4P) | in | Number of blocks. | |
time_s | real(kind=R8P) | in | Local time. | |
td | real(kind=R8P) | in | Delay coil start. | |
A_gpu | real(kind=R8P) | in | Current amplitude (A) | |
f_gpu | real(kind=R8P) | in | Current frequency, if AC (Hz) | |
phase_gpu | real(kind=R8P) | in | Current initial phase, if AC | |
coil_flag_gpu | integer(kind=I4P) | in | Matrice contenente informazioni su quale spira pass. | |
J_vec_gpu | real(kind=R8P) | in | Matrice contenente versori corrente spire. | |
var_Jx | integer(kind=I4P) | in | Indices of current density components in q vector. | |
var_Jy | integer(kind=I4P) | in | Indices of current density components in q vector. | |
var_Jz | integer(kind=I4P) | in | Indices of current density components in q vector. | |
q_gpu | real(kind=R8P) | inout | Conservative variables on GPU. |
Call graph