Skip to content

adam_prism_plasma_frequencies_object ​

Source: src/app/prism/common/adam_prism_plasma_frequencies_object.F90

Dependencies

Contents ​

Variables ​

NameTypeAttributesDescription
DT_SOURCE_CFLcharacter(len=3)parameterdt set by the fields (CFL, GLM, PML).
DT_SOURCE_PLASMAcharacter(len=18)parameterdt set by the plasma frequencies.

Derived Types ​

prism_plasma_frequencies_object ​

Components

NameTypeAttributesDescription
activelogicalPIC model: frequencies evaluated and the limit applied.
omega_dt_maxreal(kind=R8P)Accuracy threshold on omega_max dt.
beta_ireal(kind=R8P)Imaginary-axis stability bound of the RK scheme (0: none).
single_steplogicalField and PIC time schemes are single-step RK (dt may vary).
inv_epsreal(kind=R8P)1/eps0 (1 for the non-dimensional models).
wpereal(kind=R8P)Max electron plasma frequency [rad/s].
wpireal(kind=R8P)Max ion plasma frequency [rad/s].
wcereal(kind=R8P)Max electron cyclotron frequency [rad/s].
wcireal(kind=R8P)Max ion cyclotron frequency [rad/s].
wuhreal(kind=R8P)Upper hybrid frequency [rad/s].
wlhreal(kind=R8P)Lower hybrid frequency [rad/s].
wrreal(kind=R8P)R cutoff [rad/s].
wlreal(kind=R8P)L cutoff [rad/s].
woreal(kind=R8P)O cutoff (= omega_pe) [rad/s].
wmaxreal(kind=R8P)Highest characteristic frequency (omega_R) [rad/s].
transitreal(kind=R8P)Max over the particles of max_d |v_d|/dx_d [1/s].
wp2real(kind=R8P)allocatableCPU work: omega_p^2 per interior cell [2,ni,nj,nk,nb].

Type-Bound Procedures

NameAttributesDescription
initializepass(self)Activate for the PIC models, read the threshold from pic, take beta_I of the RK scheme (SELAH's, #134 D5).
descriptionpass(self)Frequencies, omega dt and the transit, for the log.
compute_cpupass(self)Local maxima on the CPU, then the global ones (collective). particles (Omega_c, transit) and cells (omega_p) select the terms, both by default (issue #129, R7): the particle terms need q_pic, pic_fields and the particle-cell map aligned, i.e. before the end-of-step wrap and migration; the cell term needs the map of the final positions.
set_maximapass(self)Reduce the local maxima over the ranks (collective) and derive the composite frequencies (section 3).
set_particle_maximapass(self)Reduce the local maxima of the particle terms over the ranks (collective) and keep them (issue #129, R7): the composite frequencies are derived by set_cell_maxima, which follows.
set_cell_maximapass(self)Reduce the local maxima of the cell term over the ranks (collective) and derive the composite frequencies with the particle maxima kept by set_particle_maxima (section 3).
dt_limitpass(self)The step: dt_CFL while omega_max dt_CFL < omega_dt_max, otherwise the accuracy limit (and the RK stability bound).
dt_sourcepass(self)'plasma_frequencies' when the global step is the plasma limit, 'CFL' otherwise.
check_steppass(self)Stop when the particles cross more than one cell per step, or when the plasma limit acts on a constant-dt scheme.

Subroutines ​

initialize ​

Activate for the PIC models, read the threshold from pic, take beta_I of the RK scheme (SELAH's, #134 D5).

fortran
subroutine initialize(self, pic, physics, numerics, beta_i)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_plasma_frequencies_object)inoutPlasma frequencies.
pictype(prism_pic_object)inPIC (omega_dt_max, time scheme).
physicstype(prism_physics_object)inPhysics.
numericstype(prism_numerics_object)inNumerics (field time scheme).
beta_ireal(kind=R8P)inImaginary-axis bound of the RK scheme.

Call graph

compute_cpu ​

Local maxima on the CPU, then the global ones (collective). particles (Omega_c, transit) and cells (omega_p) select the terms, both by default (issue #129, R7): the particle terms need q_pic, pic_fields and the particle-cell map aligned, i.e. before the end-of-step wrap and migration; the cell term needs the map of the final positions.

fortran
subroutine compute_cpu(self, pic, field, q_pic, pic_fields, blocks_number, ni, nj, nk, particles, cells)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_plasma_frequencies_object)inoutPlasma frequencies.
pictype(prism_pic_object)inPIC (particles, neighbour list).
fieldtype(field_object)inField (cell sizes).
q_picreal(kind=R8P)inParticles [8,np].
pic_fieldsreal(kind=R8P)inFields at the particles [6,np].
blocks_numberinteger(kind=I4P)inBlocks of this rank.
niinteger(kind=I4P)inBlock cells.
njinteger(kind=I4P)inBlock cells.
nkinteger(kind=I4P)inBlock cells.
particleslogicalinoptionalParticle terms (default true).
cellslogicalinoptionalCell term (default true).

Call graph

set_maxima ​

Reduce the local maxima over the ranks (collective) and derive the composite frequencies (section 3).

fortran
subroutine set_maxima(self, wpe2, wpi2, wce, wci, transit)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_plasma_frequencies_object)inoutPlasma frequencies.
wpe2real(kind=R8P)inLocal max omega_pe^2.
wpi2real(kind=R8P)inLocal max omega_pi^2.
wcereal(kind=R8P)inLocal max Omega_ce.
wcireal(kind=R8P)inLocal max Omega_ci.
transitreal(kind=R8P)inLocal max |v|/dx.

Call graph

set_particle_maxima ​

Reduce the local maxima of the particle terms over the ranks (collective) and keep them (issue #129, R7): the composite frequencies are derived by set_cell_maxima, which follows.

fortran
subroutine set_particle_maxima(self, wce, wci, transit)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_plasma_frequencies_object)inoutPlasma frequencies.
wcereal(kind=R8P)inLocal max Omega_ce.
wcireal(kind=R8P)inLocal max Omega_ci.
transitreal(kind=R8P)inLocal max |v|/dx.

Call graph

set_cell_maxima ​

Reduce the local maxima of the cell term over the ranks (collective) and derive the composite frequencies with the particle maxima kept by set_particle_maxima (section 3).

fortran
subroutine set_cell_maxima(self, wpe2, wpi2)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_plasma_frequencies_object)inoutPlasma frequencies.
wpe2real(kind=R8P)inLocal max omega_pe^2.
wpi2real(kind=R8P)inLocal max omega_pi^2.

Call graph

check_step ​

Stop when the particles cross more than one cell per step, or when the plasma limit acts on a constant-dt scheme.

fortran
subroutine check_step(self, dt)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_plasma_frequencies_object)inPlasma frequencies.
dtreal(kind=R8P)inGlobal step.

Call graph

Functions ​

description ​

Frequencies, omega dt and the transit, for the log.

Returns: character(len=:)

fortran
function description(self) result(desc)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_plasma_frequencies_object)inPlasma frequencies.

Call graph

dt_limit ​

The step: dt_CFL while omega_max dt_CFL < omega_dt_max, otherwise the accuracy limit (and the RK stability bound).

Attributes: pure

Returns: real(kind=R8P)

fortran
function dt_limit(self, dt_cfl) result(dt)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_plasma_frequencies_object)inPlasma frequencies.
dt_cflreal(kind=R8P)inStep limited by the fields.

Call graph

dt_source ​

'plasma_frequencies' when the global step is the plasma limit, 'CFL' otherwise.

Attributes: pure

Returns: character(len=:)

fortran
function dt_source(self, dt) result(source)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_plasma_frequencies_object)inPlasma frequencies.
dtreal(kind=R8P)inGlobal step (forest reduction).

Call graph