Appearance
adam_prism_pic_bc_object
ADAM, PRISM PIC particle boundary conditions (particle closure at the domain faces).
The particle closure of a face is derived from the field BC of that face ([bc_*] type, no input key of its own), by a total map: every field BC kind maps to a particle closure, an unknown kind is fatal, so a new field BC has to state its particle closure here too.
periodic-> PIC_BC_PERIODIC: a particle leaving the domain across the face re-enters from the opposite face. The deposits and gathers of a particle near the face need no special treatment: the periodic ghosts are images of the opposite interior (library periodicity), so a particle beyond the face is located in the ghost halo of the block on that face, exactly as a particle beyond the blocks of its rank. Its position is wrapped at the end of a time step (never inside the RK stages, whose positions are combined linearly).- every other kind -> PIC_BC_LEGACY, with a warning: no particle closure, a particle must stay far from the face (a particle outside the domain stops the run, a conserving current whose support reaches the face stops the run, the standard deposit drops what spills into the boundary ghosts).
Source: src/app/prism/common/adam_prism_pic_bc_object.F90
Dependencies
Contents
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
PIC_BC_LEGACY | integer(kind=I4P) | parameter | No particle closure: particles must stay far from the face. |
PIC_BC_PERIODIC | integer(kind=I4P) | parameter | Periodic particle closure. |
FACE_NAMES | character(len=8) | parameter |
Derived Types
prism_pic_bc_object
PIC particle boundary conditions.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
pic_bc_type | integer(kind=I4P) | Particle closure of each face. | |
is_periodic | logical | Periodic particle closure along each axis. | |
domain_emin | real(kind=R8P) | Domain minimum coordinates. | |
domain_emax | real(kind=R8P) | Domain maximum coordinates. | |
domain_length | real(kind=R8P) | Domain lengths. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
description | pass(self) | Return pretty-printed object description. |
initialize | pass(self) | Initialize the particle closures from the field BCs. |
is_outside | pass(self) | True if a position is outside the domain along a non-periodic axis. |
wrap_periodic_positions | pass(self) | Bring the particles that crossed a periodic face back in the domain. |
Subroutines
initialize
Initialize the particle closures from the field BCs of the grid (grid%set_bc_type already called).
fortran
subroutine initialize(self, grid)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_pic_bc_object) | inout | PIC BC object. | |
grid | type(grid_object) | in | Grid (sibling realm component, threaded in). |
Call graph
wrap_periodic_positions
Bring the particles that crossed a periodic face back in the domain (emin, emax], by one domain length (a particle moves less than a cell in a step). Particles inside the domain are not touched (bitwise).
fortran
subroutine wrap_periodic_positions(self, q_pic, particle_number)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_pic_bc_object) | in | PIC BC object. | |
q_pic | real(kind=R8P) | inout | PIC variables [variable, particle]. | |
particle_number | integer(kind=I4P) | in | Number of particles. |
Call graph
Functions
description
Return a pretty-formatted object description.
Attributes: pure
Returns: character(len=:)
fortran
function description(self, prefix) result(desc)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_pic_bc_object) | in | PIC BC object. | |
prefix | character(len=*) | in | optional | Prefixing string. |
Call graph
is_outside
True if a position is outside the domain (emin, emax] along an axis without periodic closure.
Attributes: pure
Returns: logical
fortran
function is_outside(self, x) result(outside)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_pic_bc_object) | in | PIC BC object. | |
x | real(kind=R8P) | in | Position. |
Call graph