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_helicon_coil
- compute_Helicon_coil_amplitude
- cartesian_to_cylindrical
- cylindrical_to_cartesian
- cylindrical_vector_to_cartesian
- 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
- coupling_descriptor_forest
- helicon_coil_A_at_point
- wrap_to_pi
- compute_signed_area
- compute_windings_number
- rectangular_coil_A_at_point
- erf_function
- tangential_window
- erf_primitive_function
- build_A_ghost_stencil
- crossproduct
Derived Types
prism_common_object
Maxwell equations system class definition, common data to all backends.
Inheritance
Extends: realm_object
Components
| Name | Type | Attributes | Description |
|---|---|---|---|
io | type(io_object) | IO handler. | |
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. | |
weno | type(weno_object) | WENO reconstructor. | |
ib | type(ib_object) | Immersed boundary. | |
rk | type(rk_object) | Runge-Kutta integrator. | |
adam | type(adam_object) | ADAM, grid + tree + field + maps orchestrator. | |
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. |
realm_index | integer(kind=I4P) | Inter-realm seam coupling — currently-published stage buffer key. | |
stage_active | integer(kind=I4P) | Procedure pointer TBPs for FDV operators (set at initialization by backend). | |
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. | |
bc | type(prism_bc_object) | Boundary conditions. | |
coil | type(prism_coil_object) | Coil source term. | |
external_fields | type(prism_external_fields_object) | External fields. | |
fWLayer | type(prism_fWLayer_object) | Far-field weighted layer. | |
ic | type(prism_ic_object) | Initial conditions. | |
leapfrog_pic | type(prism_leapfrog_pic_object) | Leapfrog PIC integrator. | |
numerics | type(prism_numerics_object) | Numerics configuration. | |
particle_injection | type(prism_particle_injection_object) | Particle injection. | |
physics | type(prism_physics_object) | Physics configuration. | |
pic | type(prism_pic_object) | PIC state. | |
rk_bc | type(prism_rk_bc_object) | Runge-Kutta BC handler. | |
rk_pic | type(prism_rk_pic_object) | Runge-Kutta PIC handler. | |
time | type(prism_time_object) | Time integration state. |
Type-Bound Procedures
| Name | Attributes | Description |
|---|---|---|
load_fdv_from_file | pass(self) | Load FDV config from file. |
initialize_forest | pass(self) | Invoked by forest%initialize per realm at startup. |
compute_local_dt_forest | pass(self) | Invoked by forest%compute_global_dt during the min reduction. |
advance_one_step_forest | pass(self) | Invoked by forest%evolve_one_step per realm per timestep. |
stages_per_step_forest | pass(self) | Number of integrator stages this realm exposes per step. |
open_step_forest | pass(self) | Per-step prologue (multi-realm path). |
begin_stage_forest | pass(self) | Begin one integrator stage on this realm (multi-realm path). |
end_stage_forest | pass(self) | End the stage: residuals + assignment (multi-realm path). |
close_step_forest | pass(self) | Per-step epilogue (multi-realm path). |
post_step_forest | pass(self) | Invoked by forest%post_step per realm per timestep. |
is_done_forest | pass(self) | Invoked by forest%is_done during the termination reduction. |
finalize_forest | pass(self) | Invoked by forest%finalize per realm at shutdown. |
finalize_mpi_forest | pass(self) | Process-global MPI finalize; forest calls it ONCE after all. |
fill_seam_from_peer_forest | pass(self) | Receive-side roundtrip: copy peer's interior into self's ghosts. |
after_topology_build_forest | pass(self) | Backend hook invoked once after the forest builds the seam maps. |
apply_reflux_to_stage_forest | pass(self) | Apply Berger-Colella reflux to self's stage buffer. |
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 |
set_helicon_coil | pass(self) | Subroutine to set a helicon coil source. |
coupling_descriptor_forest | pass(self) | Report (scheme_time, rk_scheme, nv) for β admissibility. |
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, L0)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. |
L0 | real(kind=R8P) | in | optional | Adimensionalization parameter. |
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_helicon_coil
Set helicon coil.
fortran
subroutine set_helicon_coil(self, n)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | inout | Cpu object. | |
n | integer(kind=I4P) | in | Coil number. |
Call graph
compute_Helicon_coil_amplitude
Compute amplitude correction for helicon coil
fortran
subroutine compute_Helicon_coil_amplitude(I_target, rb, ra, r1, r2, sigma, n, amplitude)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
I_target | real(kind=R8P) | in | ||
rb | real(kind=R8P) | in | ||
ra | real(kind=R8P) | in | ||
r1 | real(kind=R8P) | in | ||
r2 | real(kind=R8P) | in | ||
sigma | real(kind=R8P) | in | ||
n | integer(kind=I4P) | in | ||
amplitude | real(kind=R8P) | out |
Call graph
cartesian_to_cylindrical
Convert cartesian coordinates to cylindrical coordinates with respect to the coil center and normal direction.
Attributes: pure
fortran
subroutine cartesian_to_cylindrical(x, y, z, x_c, y_c, z_c, normal, r, theta, axial)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
x | real(kind=R8P) | in | Cartesian coordinates. | |
y | real(kind=R8P) | in | Cartesian coordinates. | |
z | real(kind=R8P) | in | Cartesian coordinates. | |
x_c | real(kind=R8P) | in | Coil center coordinates. | |
y_c | real(kind=R8P) | in | Coil center coordinates. | |
z_c | real(kind=R8P) | in | Coil center coordinates. | |
normal | character(len=2) | in | Normal direction. | |
r | real(kind=R8P) | out | Cylindrical coordinates. | |
theta | real(kind=R8P) | out | Cylindrical coordinates. | |
axial | real(kind=R8P) | out | Cylindrical coordinates. |
Call graph
cylindrical_to_cartesian
Convert cylindrical coordinates to cartesian coordinates with respect to the coil center and normal direction.
Attributes: pure
fortran
subroutine cylindrical_to_cartesian(r, theta, axial, x_c, y_c, z_c, normal, x, y, z)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
r | real(kind=R8P) | in | ||
theta | real(kind=R8P) | in | ||
axial | real(kind=R8P) | in | ||
x_c | real(kind=R8P) | in | ||
y_c | real(kind=R8P) | in | ||
z_c | real(kind=R8P) | in | ||
normal | character(len=2) | in | ||
x | real(kind=R8P) | out | ||
y | real(kind=R8P) | out | ||
z | real(kind=R8P) | out |
cylindrical_vector_to_cartesian
Convert cylindrical vector A components to cartesian vector components.
Attributes: pure
fortran
subroutine cylindrical_vector_to_cartesian(A_r, A_theta, A_axial, theta, normal, A_x, A_y, A_z)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
A_r | real(kind=R8P) | in | ||
A_theta | real(kind=R8P) | in | ||
A_axial | real(kind=R8P) | in | ||
theta | real(kind=R8P) | in | ||
normal | character(len=2) | in | ||
A_x | real(kind=R8P) | out | ||
A_y | real(kind=R8P) | out | ||
A_z | real(kind=R8P) | out |
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
coupling_descriptor_forest
Report this realm's coupling descriptor for β admissibility.
Returns (numerics%scheme_time, rk%scheme, physics%nv). β admits a seam between two realms iff all three values agree. Spatial operator (numerics%scheme_space) is intentionally NOT in the descriptor — β exists precisely to support different spatial operators per realm.
Provided on prism_common_object so both prism_cpu_object and prism_fnl_object inherit a single implementation.
fortran
subroutine coupling_descriptor_forest(self, scheme_time, rk_scheme, nv)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(prism_common_object) | in | The realm. | |
scheme_time | character(len=:) | out | allocatable | Time-integration family tag ("runge_kutta", "leapfrog", ...). |
rk_scheme | character(len=:) | out | allocatable | Within-family scheme tag ("runge-kutta-ssp-54", ...). |
nv | integer(kind=I4P) | out | Number of conserved variables on this realm. |
Call graph
Functions
helicon_coil_A_at_point
Compute helicon/saddle coil auxiliary vector potential A at one point.
Returns: real(kind=R8P)
fortran
function helicon_coil_A_at_point(cell_coord, x_c, y_c, z_c, normal, Radius, N_points, s_map, csi_map, area_signed, eta, theta_c, sigma) result(Ap)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
cell_coord | real(kind=R8P) | in | Coordinate cartesiane del punto di valutazione. | |
x_c | real(kind=R8P) | in | Coordinata x centro cilindro. | |
y_c | real(kind=R8P) | in | Coordinata x centro cilindro. | |
z_c | real(kind=R8P) | in | Coordinata z centro cilindro. | |
normal | character(len=2) | in | Asse cilindro. | |
Radius | real(kind=R8P) | in | Raggio cilindro. | |
N_points | integer(kind=I4P) | in | Numero di punti della spline. | |
s_map | real(kind=R8P) | in | s coordinates of the spline points for the helicon coil case. | |
csi_map | real(kind=R8P) | in | csi coordinates of the spline points for the helicon coil case. | |
area_signed | real(kind=R8P) | in | ||
eta | real(kind=R8P) | in | ||
theta_c | real(kind=R8P) | in | ||
sigma | real(kind=R8P) | in | Smearing. |
Call graph
wrap_to_pi
Wrap angle to [-pi, pi).
Attributes: pure, elemental
Returns: real(kind=R8P)
fortran
function wrap_to_pi(alpha) result(alpha_w)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
alpha | real(kind=R8P) | in |
Call graph
compute_signed_area
Compute signed area of a a 2D polygon
Returns: real(kind=R8P)
fortran
function compute_signed_area(N_points, x_points, y_points) result(signed_area)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
N_points | integer(kind=I4P) | in | ||
x_points | real(kind=R8P) | in | ||
y_points | real(kind=R8P) | in |
Call graph
compute_windings_number
Returns: real(kind=R8P)
fortran
function compute_windings_number(N_points, x_points, y_points, coord) result(w_n)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
N_points | integer(kind=I4P) | in | ||
x_points | real(kind=R8P) | in | ||
y_points | real(kind=R8P) | in | ||
coord | real(kind=R8P) | in |
Call graph
rectangular_coil_A_at_point
Returns: real(kind=R8P)
fortran
function rectangular_coil_A_at_point(xp, xc, idir_n, idir_a, idir_b, a1, a2, b1, b2, sigma) result(Ap)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
xp | real(kind=R8P) | in | Punto di valutazione. | |
xc | real(kind=R8P) | in | Centro spira. | |
idir_n | integer(kind=I4P) | in | Componente normale: 1=x, 2=y, 3=z. | |
idir_a | integer(kind=I4P) | in | Prima coordinata locale nel piano spira. | |
idir_b | integer(kind=I4P) | in | Seconda coordinata locale nel piano spira. | |
a1 | real(kind=R8P) | in | Estremi lato locale a. | |
a2 | real(kind=R8P) | in | Estremi lato locale a. | |
b1 | real(kind=R8P) | in | Estremi lato locale b. | |
b2 | real(kind=R8P) | in | Estremi lato locale b. | |
sigma | real(kind=R8P) | in | Smearing unico della spira. |
Call graph
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
build_A_ghost_stencil
Build ghost cell A array to compute J_vec value through the curl, useful in multiblock application
Returns: real(kind=R8P)
fortran
function build_A_ghost_stencil(hs, dxyz, gc_coord, x_c, y_c, z_c, sigma, i_dir_n, i_dir_a, i_dir_b, a1, a2, b1, b2, N_Points, s_map, csi_map, area_signed, eta, theta_c, r_coil, normal, coil_type) result(A_gc)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
hs | integer(kind=I4P) | in | Half-stencil size for the curl computation. | |
dxyz | real(kind=R8P) | in | Space steps. | |
gc_coord | real(kind=R8P) | in | Ghost cell coordinates. | |
x_c | real(kind=R8P) | in | Center coordinates. | |
y_c | real(kind=R8P) | in | Center coordinates. | |
z_c | real(kind=R8P) | in | Center coordinates. | |
sigma | real(kind=R8P) | in | Width of the Gaussian profile. | |
i_dir_n | integer(kind=I4P) | in | Direction indices for the normal and tangential directions. | |
i_dir_a | integer(kind=I4P) | in | Direction indices for the normal and tangential directions. | |
i_dir_b | integer(kind=I4P) | in | Direction indices for the normal and tangential directions. | |
a1 | real(kind=R8P) | in | optional | Local coordinates of the rectangular coil along the first |
a2 | real(kind=R8P) | in | optional | Local coordinates of the rectangular coil along the first |
b1 | real(kind=R8P) | in | optional | Local coordinates of the rectangular coil along the second |
b2 | real(kind=R8P) | in | optional | Local coordinates of the rectangular coil along the second |
N_Points | integer(kind=I4P) | in | ||
s_map | real(kind=R8P) | in | optional | s coordinates of the spline points for the helicon coil case. |
csi_map | real(kind=R8P) | in | optional | csi coordinates of the spline points for the helicon coil case. |
area_signed | real(kind=R8P) | in | optional | |
eta | real(kind=R8P) | in | optional | |
theta_c | real(kind=R8P) | in | optional | |
r_coil | real(kind=R8P) | in | optional | Radius of the helicon coil. |
normal | character(len=2) | in | optional | Normal vector for the helicon coil case. |
coil_type | real(kind=R8P) | in | Coil type. |
Call graph
crossproduct
Returns: real(kind=R8P)
fortran
function crossproduct(a, b) result(cross)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
a | real(kind=R8P) | in | Left hand side. | |
b | real(kind=R8P) | in | Left hand side. |
Call graph