Skip to content

adam_prism_pic_object

ADAM, PRISM Particle-in-Cell class definition, CPU backend.

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

Dependencies

Contents

Variables

NameTypeAttributesDescription
INI_SECTION_NAMEcharacter(len=3)parameterINI file section name for PIC configuration.
PLASMA_TYPE_PROBLEMcharacter(len=6)parameterAnalyzing physical problem involving the presence of plasma
SINGLE_PARTICLE_TYPE_PROBLEMcharacter(len=15)parameterAnalyzing physical problem involving the presence of a single particle
CIC_WEIGHTING_MODELcharacter(len=3)parameterCIC weighting model.
NGP_WEIGHTING_MODELcharacter(len=3)parameterNGP weighting model.
TSC_WEIGHTING_MODELcharacter(len=3)parameterTSC weighting model.
ZEROD_FIELDS_WEIGHTING_MODELcharacter(len=2)parameter0D field weighting.
ONED_FIELDS_WEIGHTING_MODELcharacter(len=2)parameter1D field weighting.
NUM_SCHEME_TIME_PIC_LEAPFROGcharacter(len=8)parameterLeapfrog numerical scheme for time operator.
NUM_SCHEME_TIME_PIC_RUNGE_KUTTAcharacter(len=11)parameterRunge-Kutta numerical scheme for time operator.

Derived Types

prism_pic_object

Components

NameTypeAttributesDescription
mpihtype(mpih_object)MPI handler.
plasma_densityreal(kind=R8P)Plasma density
neutral_fractionreal(kind=R8P)Neutral fraction
particle_numberinteger(kind=I4P)Total number of particles.
n_ionsinteger(kind=I4P)Total ions number
n_electronsinteger(kind=I4P)Total electrons number
n_neutralsinteger(kind=I4P)Total neutrals number
neighbour_listinteger(kind=I4P)allocatableParticle grid positions array.
problem_typecharacter(len=99)Type of problem analyzed
particle_weighting_modelcharacter(len=99)Particle weighting model.
current_weighting_modelcharacter(len=99)Current weighting model.
field_weighting_modelcharacter(len=99)Field weighting model.
scheme_timecharacter(len=99)Numerical scheme for time operator [runge_kutta, leapfrog,...].
particle_weightingprocedure(particle_weighting_interface)pass(self), pointerParticle weighting.
current_weightingprocedure(current_weighting_interface)pass(self), pointerCurrent weighting.
field_weightingprocedure(field_weighting_interface)pass(self), pointerfield weighting.

Type-Bound Procedures

NameAttributesDescription
descriptionpass(self)Return pretty-printed object description.
initializepass(self)Initialize IC.
load_from_filepass(self)Load config from file.
particle_cartesian_grid_indexpass(self)Compute the grid index corresponding to a particle position.
CIC_charge_weightingpass(self)Cloud-in-Cell weighting of particle quantities to the grid.
NGP_charge_weightingpass(self)Nearest Grid Point weighting of particle quantities to the grid.
TSC_charge_weightingpass(self)Triangular Shaped Cloud weighting of particle quantities to the grid.
CIC_current_weightingpass(self)Cloud-in-Cell weighting of particle quantities to the grid.
NGP_current_weightingpass(self)Nearest Grid Point weighting of particle quantities to the grid.
TSC_current_weightingpass(self)Triangular Shaped Cloud weighting of particle quantities to the grid.
zeroD_field_weightingpass(self)
oneD_field_weightingpass(self)

Interfaces

particle_weighting_interface

current_weighting_interface

field_weighting_interface

Subroutines

initialize

Initialize PIC.

fortran
subroutine initialize(self, file_parameters, field)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_pic_object)inoutPic object.
file_parameterstype(file_ini)inSimulation parameters ini file handler.
fieldtype(field_object)inField object

Call graph

load_from_file

Load PIC configuration from file.

fortran
subroutine load_from_file(self, file_parameters, go_on_fail)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_pic_object)inoutPIC object.
file_parameterstype(file_ini)inFile handler.
go_on_faillogicalinoptionalGo on if load fails.

Call graph

particle_cartesian_grid_index

Compute the grid index corresponding to a particle position. Good for cartesian grids only.

fortran
subroutine particle_cartesian_grid_index(self, field, q_pic)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_pic_object)inoutExternal fields.
fieldtype(field_object)inThe field.
q_picreal(kind=R8P)inPIC variables.

Call graph

NGP_charge_weighting

fortran
subroutine NGP_charge_weighting(self, field, q, q_pic, nv)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_pic_object)inoutExternal fields.
fieldtype(field_object)inoutThe field.
qreal(kind=R8P)inoutField variables.
q_picreal(kind=R8P)inPIC variables.
nvinteger(kind=I4P)inNumber of variables.

CIC_charge_weighting

Cloud-in-Cell weighting of particle quantities to the grid.

fortran
subroutine CIC_charge_weighting(self, field, q, q_PIC, nv)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_pic_object)inoutExternal fields.
fieldtype(field_object)inoutThe field.
qreal(kind=R8P)inoutField variables.
q_PICreal(kind=R8P)inPIC variables.
nvinteger(kind=I4P)inNumber of variables.

TSC_charge_weighting

fortran
subroutine TSC_charge_weighting(self, field, q, q_pic, nv)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_pic_object)inoutExternal fields.
fieldtype(field_object)inoutThe field.
qreal(kind=R8P)inoutField variables.
q_picreal(kind=R8P)inPIC variables.
nvinteger(kind=I4P)inNumber of variables.

NGP_current_weighting

fortran
subroutine NGP_current_weighting(self, field, q, q_pic, nv)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_pic_object)inoutExternal fields.
fieldtype(field_object)inoutThe field.
qreal(kind=R8P)inoutField variables.
q_picreal(kind=R8P)inPIC variables.
nvinteger(kind=I4P)inNumber of variables.

CIC_current_weighting

Cloud-in-Cell weighting of particle quantities to the grid.

fortran
subroutine CIC_current_weighting(self, field, q, q_pic, nv)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_pic_object)inoutExternal fields.
fieldtype(field_object)inoutThe field.
qreal(kind=R8P)inoutField variables.
q_picreal(kind=R8P)inPIC variables.
nvinteger(kind=I4P)inNumber of variables.

TSC_current_weighting

fortran
subroutine TSC_current_weighting(self, field, q, q_pic, nv)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_pic_object)inoutExternal fields.
fieldtype(field_object)inoutThe field.
qreal(kind=R8P)inoutField variables.
q_picreal(kind=R8P)inPIC variables.
nvinteger(kind=I4P)inNumber of variables.

zeroD_field_weighting

fortran
subroutine zeroD_field_weighting(self, field, pic_fields, q, q_pic, nv)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_pic_object)inoutExternal fields.
fieldtype(field_object)inoutThe field.
pic_fieldsreal(kind=R8P)inoutFields value at particle locations
qreal(kind=R8P)inField variables.
q_picreal(kind=R8P)inPIC variables.
nvinteger(kind=I4P)inNumber of variables.

oneD_field_weighting

fortran
subroutine oneD_field_weighting(self, field, pic_fields, q, q_pic, nv)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_pic_object)inoutExternal fields.
fieldtype(field_object)inoutThe field.
pic_fieldsreal(kind=R8P)inoutFields value at particle locations
qreal(kind=R8P)inField variables.
q_picreal(kind=R8P)inPIC variables.
nvinteger(kind=I4P)inNumber of variables.

Call graph

Functions

description

Return a pretty-formatted object description.

Returns: character(len=:)

fortran
function description(self) result(desc)

Arguments

NameTypeIntentAttributesDescription
selfclass(prism_pic_object)inExternal fields.

Call graph

crossproduct

Returns: real(kind=R8P)

fortran
function crossproduct(a, b) result(cross)

Arguments

NameTypeIntentAttributesDescription
areal(kind=R8P)inLeft hand side.
breal(kind=R8P)inLeft hand side.

Call graph

lininterp

Returns: real(kind=R8P)

fortran
function lininterp(x1, y1, x2, y2, xp) result(delta)

Arguments

NameTypeIntentAttributesDescription
x1real(kind=R8P)in
y1real(kind=R8P)in
x2real(kind=R8P)in
y2real(kind=R8P)in
xpreal(kind=R8P)in

Call graph