Appearance
adam_prism_common_object
Source: src/app/prism/common/adam_prism_common_object.F90
Dependencies
Contents
- prism_common_object
- allocate_common
- compute_auxiliary_fields
- initialize
- load_restart_files
- save_divergence_history
- save_energy_error
- save_energy_history
- save_restart_files
- save_xh5f
- initialize_coils
- set_rectangular_coil_x
- set_rectangular_coil_y
- set_rectangular_coil_z
- set_circular_coil_x
- set_circular_coil_y
- set_circular_coil_z
- set_solenoid_x
- set_solenoid_y
- set_solenoid_z
- erf_function
- tangential_window
- erf_primitive_function
Derived Types
prism_common_object
Maxwell equations system class definition, common data to all backends.
Inheritance
Extends: equation_object
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
io | type(io_object) | IO handler. | |
adam | type(adam_object) | ADAM. | |
amr | type(amr_object) | AMR marker handler. | |
slices | type(slices_object) | Slices handler. | |
blanesmoan | type(blanesmoan_object) | Blanes-Moan integrator. | |
cfm | type(cfm_object) | Commutator-Free Magnus integrator. | |
leapfrog | type(leapfrog_object) | Leapfrog integrator. | |
flail | type(flail_object) | Linear algebra methods handler. | |
fdv_scheme | character(len=:) | allocatable | FDV scheme, fd/fv. |
fdv_order | integer(kind=I4P) | Order of finite difference/volume schemes, general order. | |
fdv_half_stencil | integer(kind=I4P) | Half stencil length of finite difference/volume schemes. | |
fdv_half_stencils | integer(kind=I4P) | Half stencil length of fdv schemes for each derivative up to 6. | |
ngc | integer(kind=I4P) | pointer | Number of ghost cells. |
ni | integer(kind=I4P) | pointer | Number of cells in i direction. |
nj | integer(kind=I4P) | pointer | Number of cells in j direction. |
nk | integer(kind=I4P) | pointer | Number of cells in k direction. |
nb | integer(kind=I4P) | pointer | Total blocks number for MPI. |
blocks_number | integer(kind=I4P) | pointer | Actual blocks number. |
nv | integer(kind=I4P) | pointer | Number of variables in q vector. |
compute_block_total_variation | procedure(compute_block_total_variation_interface) | pass(self), pointer | Compute TV. |
compute_curl | procedure(compute_curl_interface) | pass(self), pointer | Compute curl. |
compute_derivative1 | procedure(compute_derivative1_interface) | pass(self), pointer | Compute deriv1. |
compute_derivative2 | procedure(compute_derivative2_interface) | pass(self), pointer | Compute deriv2. |
compute_derivative4 | procedure(compute_derivative4_interface) | pass(self), pointer | Compute deriv4. |
compute_divergence | procedure(compute_divergence_interface) | pass(self), pointer | Compute dive. |
compute_gradient | procedure(compute_gradient_interface) | pass(self), pointer | Compute grad. |
compute_laplacian | procedure(compute_laplacian_interface) | pass(self), pointer | Compute laplac. |
nv_c | integer(kind=I4P) | pointer | Number of conservative variables in q vector. |
nv_s | integer(kind=I4P) | pointer | Number of source variables in q vector. |
nv_cl | integer(kind=I4P) | pointer | Number of divergence cleaning variables in q vector. |
q | real(kind=R8P) | allocatable | Conservative cell centered variables. |
dq | real(kind=R8P) | allocatable | Residuals right hand side. |
q_pic | real(kind=R8P) | allocatable | PIC variables. |
pic_fields | real(kind=R8P) | allocatable | Fields value at particle locations. |
curl | real(kind=R8P) | allocatable | Curl fields. |
divergence | real(kind=R8P) | allocatable | Divergence fields. |
q_name | type(string) | allocatable | Fields names [1:nv]. |
dq_name | type(string) | allocatable | Residuals names [1:nv]. |
q_pic_name | type(string) | allocatable | PIC Fields names. |
curl_name | type(string) | allocatable | Curl fields names. |
div_name | type(string) | allocatable | Divergence fields names. |
energy_D | real(kind=R8P) | allocatable | Energy of field D, time history. |
energy_B | real(kind=R8P) | allocatable | Energy of field B, time history. |
coil_power | real(kind=R8P) | allocatable | Power of coils, time history. |
Poynting_flux | real(kind=R8P) | allocatable | Total Poynting flux from boundary, time history. |
rms_energy_error_D | real(kind=R8P) | RMS energy error of D field. | |
rms_energy_error_B | real(kind=R8P) | RMS energy error of B field. | |
max_divergence_D | real(kind=R8P) | Maximum of divergence of D field. | |
max_divergence_B | real(kind=R8P) | Maximum of divergence of B field. | |
max_divergence_J | real(kind=R8P) | Maximum of divergence of J field. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
load_fdv_from_file | pass(self) | Load FDV config from file. |
close_block_xh5f | nopass | Close XH5F file block. |
close_file_xh5f | nopass | Close XH5F file. |
open_block_xh5f | pass(self) | Open block file XH5F. |
open_file_xh5f | pass(self) | Open file XH5F. |
save_q_xh5f | pass(self) | Save in XH5F (XDMF/HDF5) format. |
allocate_common | pass(self) | Allocate common data. |
compute_auxiliary_fields | pass(self) | Compute auxiliary fields. |
initialize | pass(self) | Initialize the equation common data. |
load_restart_files | pass(self) | Load restart files. |
save_energy_error | pass(self) | Save energy error history. |
save_energy_history | pass(self) | Save energy history. |
save_divergence_history | pass(self) | Save divergence history. |
save_restart_files | pass(self) | Save restart files. |
save_xh5f | pass(self) | Save simulation data in XH5F format. |
initialize_coils | pass(self) | Initialize coils. |
set_rectangular_coil_x | pass(self) | Subroutine to set a rectangular coil source with +-x normal |
set_rectangular_coil_y | pass(self) | Subroutine to set a rectangular coil source with +-y normal |
set_rectangular_coil_z | pass(self) | Subroutine to set a rectangular coil source with +-z normal |
set_circular_coil_x | pass(self) | Subroutine to set a circular coil source with +-x normal |
set_circular_coil_y | pass(self) | Subroutine to set a circular coil source with +-y normal |
set_circular_coil_z | pass(self) | Subroutine to set a circular coil source with +-z normal |
set_solenoid_x | pass(self) | Subroutine to set a solenoid source with +-x normal |
set_solenoid_y | pass(self) | Subroutine to set a solenoid source with +-y normal |
set_solenoid_z | pass(self) | Subroutine to set a solenoid source with +-z normal |
Subroutines
allocate_common
Allocate common data.
fortran
subroutine allocate_common(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | inout | The equation. |
Call graph
compute_auxiliary_fields
Compute auxiliary fields.
fortran
subroutine compute_auxiliary_fields(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | inout | The equation. |
Call graph
initialize
Initialize the equation common data.
fortran
subroutine initialize(self, filename, memory_avail, nv, verbose)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | inout | target | The equation. |
filename | character(len=*) | in | Input file name. | |
memory_avail | real(kind=R8P) | in | value | Memory available for single MPI process. |
nv | integer(kind=I4P) | in | optional | Number of field variables. |
verbose | logical | in | optional | Trigger verbose output. |
Call graph
load_restart_files
Save restart files.
fortran
subroutine load_restart_files(self, t, time)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | inout | The equation. | |
t | integer(kind=I4P) | out | Time iteration. | |
time | real(kind=R8P) | out | Time. |
Call graph
save_divergence_history
Save divergence history.
fortran
subroutine save_divergence_history(self, is_to_open, is_to_close)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | inout | The equation. | |
is_to_open | logical | in | optional | Flag to open file before first saving. |
is_to_close | logical | in | optional | Flag to close file after last saving. |
Call graph
save_energy_error
Save energy error history.
fortran
subroutine save_energy_error(self, is_to_open, is_to_close)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | inout | The equation. | |
is_to_open | logical | in | optional | Flag to open file before first saving. |
is_to_close | logical | in | optional | Flag to close file after last saving. |
Call graph
save_energy_history
Save energy history.
fortran
subroutine save_energy_history(self, is_to_open, is_to_close)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | inout | The equation. | |
is_to_open | logical | in | optional | Flag to open file before first saving. |
is_to_close | logical | in | optional | Flag to close file after last saving. |
Call graph
save_restart_files
Save restart files.
fortran
subroutine save_restart_files(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | inout | The equation. |
Call graph
save_xh5f
Save simulation data in HDF5 format.
fortran
subroutine save_xh5f(self, output_basename, with_ghost)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | inout | The equation. | |
output_basename | character(len=*) | in | optional | Output basename. |
with_ghost | logical | in | optional | Flag to save ghost cells. |
Call graph
initialize_coils
Initialize coils.
fortran
subroutine initialize_coils(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | inout | The equation. |
Call graph
set_rectangular_coil_x
Set rectangular coil with normal direction parallel to x.
fortran
subroutine set_rectangular_coil_x(self, n, verse)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | inout | Cpu object. | |
n | integer(kind=I4P) | in | Coil number. | |
verse | real(kind=R8P) | in | Coil normal direction, +1=+x, -1=-x. |
Call graph
set_rectangular_coil_y
Set rectangular coil with normal direction parallel to y.
fortran
subroutine set_rectangular_coil_y(self, n, verse)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | inout | Cpu object. | |
n | integer(kind=I4P) | in | Coil number. | |
verse | real(kind=R8P) | in | Coil normal direction, +1=+y, -1=-y. |
Call graph
set_rectangular_coil_z
Set rectangular coil with normal direction parallel to z.
fortran
subroutine set_rectangular_coil_z(self, n, verse)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | inout | Cpu object. | |
n | integer(kind=I4P) | in | Coil number. | |
verse | real(kind=R8P) | in | Coil normal direction, +1=+z, -1=-z. |
Call graph
set_circular_coil_x
Set circular coil with normal direction parallel to x.
fortran
subroutine set_circular_coil_x(self, n, verse)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | inout | Cpu object. | |
n | integer(kind=I4P) | in | Coil number. | |
verse | real(kind=R8P) | in | Coil normal direction, +1=+x, -1=-x. |
Call graph
set_circular_coil_y
Set circular coil with normal direction parallel to y.
fortran
subroutine set_circular_coil_y(self, n, verse)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | inout | Cpu object. | |
n | integer(kind=I4P) | in | Coil number. | |
verse | real(kind=R8P) | in | Coil normal direction, +1=+y, -1=-y. |
Call graph
set_circular_coil_z
Set circular coil with normal direction parallel to z.
fortran
subroutine set_circular_coil_z(self, n, verse)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | inout | Cpu object. | |
n | integer(kind=I4P) | in | Coil number. | |
verse | real(kind=R8P) | in | Coil normal direction, +1=+z, -1=-z. |
Call graph
set_solenoid_x
Set solenoid with axis direction parallel to x.
fortran
subroutine set_solenoid_x(self, n, verse)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | inout | Cpu object. | |
n | integer(kind=I4P) | in | Coil number. | |
verse | real(kind=R8P) | in | Solenoid axis direction, +1=+x, -1=-x. |
Call graph
set_solenoid_y
Set solenoid with axis direction parallel to y.
fortran
subroutine set_solenoid_y(self, n, verse)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | inout | Cpu object. | |
n | integer(kind=I4P) | in | Coil number. | |
verse | real(kind=R8P) | in | Solenoid axis direction, +1=+y, -1=-y. |
Call graph
set_solenoid_z
Set solenoid with axis direction parallel to z.
fortran
subroutine set_solenoid_z(self, n, verse)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | inout | Cpu object. | |
n | integer(kind=I4P) | in | Coil number. | |
verse | real(kind=R8P) | in | Solenoid axis direction, +1=+z, -1=-z. |
Call graph
Functions
erf_function
Returns: real(kind=R8P)
fortran
function erf_function(s, mu, sigma) result(res)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
s | real(kind=R8P) | in | ||
mu | real(kind=R8P) | in | ||
sigma | real(kind=R8P) | in |
Call graph
tangential_window
Returns: real(kind=R8P)
fortran
function tangential_window(s, smin, smax, sigma) result(res)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
s | real(kind=R8P) | in | ||
smin | real(kind=R8P) | in | ||
smax | real(kind=R8P) | in | ||
sigma | real(kind=R8P) | in |
Call graph
erf_primitive_function
Primitive of erf((s-mu)/(sqrt(2)*sigma)).
Returns: real(kind=R8P)
fortran
function erf_primitive_function(s, mu, sigma) result(res)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
s | real(kind=R8P) | in | ||
mu | real(kind=R8P) | in | ||
sigma | real(kind=R8P) | in |
Call graph