Appearance
adam_prism_fnl_leapfrog_pic_object
ADAM, PRISM PIC leapfrog integrator, FNL backend.
Source: src/app/prism/fnl/adam_prism_fnl_leapfrog_pic_object.F90
Dependencies
Contents
- prism_fnl_leapfrog_pic_object
- destroy
- initialize
- copy_cpu_gpu
- copy_gpu_cpu
- assign_step
- prime_step
- integrate
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
PIC_VARIABLES_NUMBER | integer(kind=I4P) | parameter |
Derived Types
prism_fnl_leapfrog_pic_object
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
q_pic_old_gpu | real(kind=R8P) | pointer | Leapfrog history [particle, variable, step]. |
buf_q_pic_old_R8P | real(kind=R8P) | allocatable | Host buffer with device layout for q_pic_old copies. |
nu | real(kind=R8P) | RAW filter coefficient. | |
alpha | real(kind=R8P) | RAW-Williams coefficient. | |
is_filtered | logical | Enable RAW filter. | |
particle_number | integer(kind=I4P) | Total number of particles. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
copy_cpu_gpu | pass(self) | |
copy_gpu_cpu | pass(self) | |
destroy | pass(self) | |
initialize | pass(self) | |
assign_step | pass(self) | |
prime_step | pass(self) | |
integrate | pass(self) |
Subroutines
destroy
Free device and host staging data owned by this object.
fortran
subroutine destroy(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_fnl_leapfrog_pic_object) | inout | FNL PIC leapfrog object. |
Call graph
initialize
Initialize device-side PIC leapfrog state.
fortran
subroutine initialize(self, pic, leapfrog_pic)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_fnl_leapfrog_pic_object) | inout | FNL PIC leapfrog object. | |
pic | type(prism_pic_object) | in | Host PIC object. | |
leapfrog_pic | type(prism_leapfrog_pic_object) | in | Host PIC leapfrog object. |
Call graph
copy_cpu_gpu
Copy host leapfrog PIC history to the device mirror.
fortran
subroutine copy_cpu_gpu(self, q_pic_old, verbose)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_fnl_leapfrog_pic_object) | inout | FNL PIC leapfrog object. | |
q_pic_old | real(kind=R8P) | in | target | Host leapfrog history. |
verbose | logical | in | optional | Trigger verbose output. |
Call graph
copy_gpu_cpu
Copy device leapfrog PIC history back to the host mirror.
fortran
subroutine copy_gpu_cpu(self, q_pic_old, verbose)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_fnl_leapfrog_pic_object) | inout | FNL PIC leapfrog object. | |
q_pic_old | real(kind=R8P) | inout | target | Host leapfrog history. |
verbose | logical | in | optional | Trigger verbose output. |
Call graph
assign_step
Store one PIC state in the device leapfrog history buffer.
fortran
subroutine assign_step(self, s, q_pic_gpu)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_fnl_leapfrog_pic_object) | inout | FNL PIC leapfrog object. | |
s | integer(kind=I4P) | in | Leapfrog history slot. | |
q_pic_gpu | real(kind=R8P) | in | PIC variables on device. |
Call graph
prime_step
Perform the explicit Euler priming step for PIC leapfrog on device.
fortran
subroutine prime_step(self, dt, q_pic_gpu, pic_fields_gpu)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_fnl_leapfrog_pic_object) | inout | FNL PIC leapfrog object. | |
dt | real(kind=R8P) | in | Time step. | |
q_pic_gpu | real(kind=R8P) | inout | PIC variables on device. | |
pic_fields_gpu | real(kind=R8P) | in | Fields at particle locations on device. |
integrate
Integrate PIC particles with leapfrog on device.
fortran
subroutine integrate(self, dt, q_pic_gpu, pic_fields_gpu)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_fnl_leapfrog_pic_object) | inout | FNL PIC leapfrog object. | |
dt | real(kind=R8P) | in | Time step. | |
q_pic_gpu | real(kind=R8P) | inout | PIC variables on device. | |
pic_fields_gpu | real(kind=R8P) | in | Fields at particle locations on device. |
Call graph