Appearance
adam_prism_external_fields_object
ADAM, PRISM external fields definition, CPU backend.
Source: src/app/prism/common/adam_prism_external_fields_object.F90
Dependencies
Contents
- prism_external_fields_object
- add_external_fields_interface
- sub_external_fields_interface
- initialize
- load_from_file
- add_external_fields_rmf
- add_external_fields_uniform
- sub_external_fields_rmf
- sub_external_fields_uniform
- physical_pec_faces
- reflect_pec_ghost
- description
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
INI_SECTION_NAME | character(len=15) | parameter | INI (config) file section name. |
EF_TYPE_MAGNETIC_NOZZLE | character(len=15) | parameter | Magnetic Nozzle. |
EF_TYPE_NONE | character(len=4) | parameter | Disable external field. |
EF_TYPE_RMF | character(len=3) | parameter | Rotating Magnetic Field. |
EF_TYPE_UNIFORM_FIELD | character(len=13) | parameter | Uniform D and B field. |
EF_TYPE_RMF_AND_MAGNETIC_NOZZLE | character(len=23) | parameter | Rotating Magnetic Field/Magnetic Nozzle. |
Derived Types
prism_external_fields_object
PRISM external fields object.
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
ef_type | character(len=99) | Field type. | |
RMF_frequency | real(kind=R8P) | Rotating magnetic field frequency. | |
RMF_B_amplitude | real(kind=R8P) | Rotating magnetic field amplitude. | |
RMF_rotation_axis | character(len=99) | Rotating magnetic field rotation axis (X, Y, Z). | |
Uniform_D_amplitude | real(kind=R8P) | Uniform electric displacement field amplitude. | |
Uniform_B_amplitude | real(kind=R8P) | Uniform magnetic field amplitude. | |
displacement_from_rmf | real(kind=R8P) | D scale for the RMF. | |
Uniform_direction | character(len=99) | Uniform field direction (X, Y, Z). | |
alpha | integer(kind=I4P) | RMF rotation axis coordinate 1 | |
beta | integer(kind=I4P) | RMF rotation axis coordinate 2 | |
gamm | integer(kind=I4P) | RMF rotation axis coordinate 3 | |
uniform_axis | integer(kind=I4P) | Uniform field direction index. | |
pec_faces | integer(kind=I4P) | allocatable | Physical PEC faces by local block, for FNL kernels. |
add_external_fields | procedure(add_external_fields_interface) | pass(self), pointer | Add external fields. |
sub_external_fields | procedure(sub_external_fields_interface) | pass(self), pointer | Subtract external fields. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
description | pass(self) | Return pretty-printed object description. |
initialize | pass(self) | Initialize IC. |
load_from_file | pass(self) | Load config from file. |
add_external_fields_rmf | pass(self) | Add rotating magnetic field to the field. |
add_external_fields_uniform | pass(self) | Add uniform external field to the field. |
sub_external_fields_rmf | pass(self) | Add rotating magnetic field to the field. |
sub_external_fields_uniform | pass(self) | Subtract uniform external field from the field. |
Interfaces
add_external_fields_interface
sub_external_fields_interface
Subroutines
initialize
Initialize external fields.
fortran
subroutine initialize(self, file_parameters, field, grid, physics)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_external_fields_object) | inout | External fields. | |
file_parameters | type(file_ini) | in | Simulation parameters ini file handler. | |
field | type(field_object) | in | ||
grid | type(grid_object) | in | ||
physics | type(prism_physics_object) | in |
Call graph
load_from_file
Load config from file.
fortran
subroutine load_from_file(self, file_parameters, go_on_fail)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_external_fields_object) | inout | External fields. | |
file_parameters | type(file_ini) | in | Simulation parameters ini file handler. | |
go_on_fail | logical | in | optional | Go on if load fails. |
Call graph
add_external_fields_rmf
Add rotating magnetic field to the field.
fortran
subroutine add_external_fields_rmf(self, field, grid, time, dt, gamm, q)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_external_fields_object) | inout | External fields. | |
field | type(field_object) | inout | The field. | |
grid | type(grid_object) | in | Grid (sibling realm component, threaded | |
time | real(kind=R8P) | in | Current simulation time. | |
dt | real(kind=R8P) | in | optional | Time step. |
gamm | real(kind=R8P) | in | optional | Gamma values of RK SSP |
q | real(kind=R8P) | inout | Primitive variables. |
Call graph
add_external_fields_uniform
Add uniform external electric displacement and magnetic field to the field.
fortran
subroutine add_external_fields_uniform(self, field, grid, time, dt, gamm, q)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_external_fields_object) | inout | External fields. | |
field | type(field_object) | inout | The field. | |
grid | type(grid_object) | in | Grid. | |
time | real(kind=R8P) | in | Current simulation time. | |
dt | real(kind=R8P) | in | optional | Time step. |
gamm | real(kind=R8P) | in | optional | Gamma values of RK SSP. |
q | real(kind=R8P) | inout | Primitive variables. |
Call graph
sub_external_fields_rmf
Add rotating magnetic field to the field.
fortran
subroutine sub_external_fields_rmf(self, field, grid, time, dt, gamm, q)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_external_fields_object) | inout | External fields. | |
field | type(field_object) | inout | The field. | |
grid | type(grid_object) | in | Grid (sibling realm component, threaded | |
time | real(kind=R8P) | in | Current simulation time. | |
dt | real(kind=R8P) | in | optional | Time step. |
gamm | real(kind=R8P) | in | optional | Gamma values of RK SSP |
q | real(kind=R8P) | inout | Primitive variables. |
Call graph
sub_external_fields_uniform
Subtract uniform external electric displacement and magnetic field from the field.
fortran
subroutine sub_external_fields_uniform(self, field, grid, time, dt, gamm, q)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_external_fields_object) | inout | External fields. | |
field | type(field_object) | inout | The field. | |
grid | type(grid_object) | in | Grid. | |
time | real(kind=R8P) | in | Current simulation time. | |
dt | real(kind=R8P) | in | optional | Time step. |
gamm | real(kind=R8P) | in | optional | Gamma values of RK SSP. |
q | real(kind=R8P) | inout | Primitive variables. |
Call graph
physical_pec_faces
Identify physical PEC faces of one block; internal block ghosts keep the unreflected field.
Attributes: pure
fortran
subroutine physical_pec_faces(field, grid, b, pec_faces)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
field | type(field_object) | in | ||
grid | type(grid_object) | in | ||
b | integer(kind=I4P) | in | ||
pec_faces | logical | out |
Call graph
reflect_pec_ghost
Apply the same PEC parity as prism_cpu_object%set_boundary_conditions to an external field.
Attributes: pure
fortran
subroutine reflect_pec_ghost(i, j, k, ni, nj, nk, pec_faces, i_sample, j_sample, k_sample, sign_D, sign_B)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
i | integer(kind=I4P) | in | ||
j | integer(kind=I4P) | in | ||
k | integer(kind=I4P) | in | ||
ni | integer(kind=I4P) | in | ||
nj | integer(kind=I4P) | in | ||
nk | integer(kind=I4P) | in | ||
pec_faces | logical | in | ||
i_sample | integer(kind=I4P) | out | ||
j_sample | integer(kind=I4P) | out | ||
k_sample | integer(kind=I4P) | out | ||
sign_D | real(kind=R8P) | out | ||
sign_B | real(kind=R8P) | out |
Call graph
Functions
description
Return a pretty-formatted object description.
Attributes: pure
Returns: character(len=:)
fortran
function description(self) result(desc)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_external_fields_object) | in | External fields. |
Call graph