Appearance
Input reference
A PRISM run reads one INI file: mpirun -np N exe/adam_prism_cpu input.ini (or adam_prism_fnl). This page lists every section and key PRISM reads, with its type, whether it is required, its default, the accepted values and what happens on an invalid one. The sections the library reads for every application ([IO], [grid], [amr], [amr_marker_N], [runge_kutta], [weno], [fdv], [solids], [slices], the forest manifest) are in the library input reference, with PRISM's use of each; PRISM's additional rules for them are below. The library page also gives the parsing rules and the legend of the Req. column.
Read the hazards first: they collect the combinations PRISM refuses, and the ones it accepts but handles differently than the key names suggest.
Program entry and read order
adam_prism_cpu [file] / adam_prism_fnl [file] (default input.ini). A file with a [forest] section and realms_number >= 1 is a forest manifest; otherwise it is itself a single-realm input.
A realm input is read in this order: [IO] → [numerics] → [physics] → [runge_kutta] scheme and the coil counts (the memory budget) → the library sections ([grid], [amr], markers, [weno], [runge_kutta], [fdv], [solids], [slices]) → [bc_*] → [PIC] and [particle_injection] (PIC models) → [time] → [initial_conditions] → [coils_input] → [grms] → [magnetic_field_at_center_domain] → [probes] → [external_fields] → [fWLayer] → [PML]. The backend then checks the combinations (time and space schemes, PML, PIC current) and stops on the ones it does not implement.
CRLF. A Windows (CRLF) input reads as an LF one on both backends (see the library parsing rules).
Units. SI, except under the non-dimensional models (AdimEM, AdimPIC), where lengths are divided by L0, fields by B0 and D0 = B0 c0 ε0, times by T0 = L0/c0; the input stays in SI and PRISM converts it.
[IO]
The library keys are in the library reference. PRISM reads these keys itself (prism_io_object, #80 P5).
| Key | Type | Req. | Default | Accepted / invalid | Meaning |
|---|---|---|---|---|---|
save_memory_status | logical | no | .false. | logical | Print the memory status at the diagnostic steps. |
save_curl_fields | logical | no | .false. | logical | Also write the curl fields. |
save_divergence_fields | logical | no | .false. | logical | Also write the divergence fields. |
seam_divB_tol | real | no | -1 (off) | real | 2:1 seam div(B) monitor: warn (or stop, below) when the seam max|div B| exceeds it on an AMR run (#29). |
seam_divB_error | logical | no | .false. | logical | .true.: the seam monitor stops the run instead of warning. |
save_fields | string | no | all | all, em; other values are fatal | all: every field in the field files. em: D and B only (production runs); the save_residual/curl/divergence_fields flags still add their arrays. |
A cadence <= 0 disables that output, end of run included (#97).
[numerics]
Every key is required; an unknown value is fatal.
| Key | Accepted values | Meaning |
|---|---|---|
scheme_time | runge_kutta, leapfrog, blanes_moan, commutator_free_magnus (also UPPER and Capitalised) | Time integration. Only runge_kutta runs: the other three are refused at initialization on both backends (#55). |
scheme_space | fd_centered, fv_centered, weno (also UPPER and Capitalised) | Spatial scheme. weno runs on the CPU backend only (the FNL backend refuses it). |
reconstruction_variables | conservative, characteristics | Variables the WENO path reconstructs. |
constrained_transport | no, D, B, DB (case variants accepted) | Which GLM scalars to carry: φ for D, ψ for B. See the divergence-correction matrix. |
divergence_correction | no, hyperbolic, poisson | hyperbolic: the GLM cleaning of the scalars selected by constrained_transport (required: D, B or DB). poisson: refused at load. no: no correction; a constrained_transport other than no is then ignored with a warning. |
[physics]
| Key | Type | Req. | Default | Accepted / invalid | Meaning |
|---|---|---|---|---|---|
physical_model | string | yes | — | EM (em, Electromagnetic, electromagnetic, Maxwell, maxwell), PIC (pic, ParticleInCell, particleincell), AdimEM (adimem, AdimensionalizedElectromagnetic, adimensionalelectromagnetic), AdimPIC (adimpic, adim_PIC, adim_pic); other values are fatal | Maxwell's equations, with particles (PIC), in SI or non-dimensional form. A PIC model adds the charge density rho to the state. |
L0 | real | cond. (AdimEM, AdimPIC) | — | > 0, otherwise fatal | Reference length (m). |
B0 | real | cond. (AdimEM, AdimPIC) | — | > 0, otherwise fatal | Reference magnetic field (T). |
chi | real | cond. (divergence_correction = hyperbolic) | — | > 0, otherwise fatal | GLM propagation speed, in units of c: the fastest wave is max(1, chi) c0. |
alpha | real | no | 0 | >= 0, otherwise fatal | GLM damping rate (1/s, or 1/T0 non-dimensional); > 0 also caps the time step at 1/alpha. Read only with hyperbolic. |
Library sections in PRISM
| Section | PRISM rule |
|---|---|
[grid] | ngc >= fdv_order/2 (fatal); with scheme_space = weno also ngc >= [weno] S (fatal). Extents are divided by L0 in a non-dimensional model. |
[amr] | Refinement at initialization only, during the [initial_conditions] amr_iterations passes; frequency is read and unused, regrid_prolongation is unused. memory_fraction (default 0.85, in (0, 1]) is the share of the memory budget given to the blocks (backends). After the initial AMR the grid is balanced by block count, balance_static (default .true., #123, library input). |
[amr_marker_N] | Mode 1 primitive-box refines; mode 3 (AMR_TV) refines on the total variation of the coils' current density (tol, delta_type, delta_fine, delta_coarse). stl is fatal. Mode 1 solid, mode 2, mode 4 and mode 5 do nothing, silently. |
[runge_kutta] | EM on CPU: every scheme, Yoshida included. EM on FNL: Yoshida is refused. PIC: a runge-kutta-ssp-* scheme (the particles are a SELAH companion of the field stepper). The PML, the charge-conserving PIC current and the staged path (2:1 faces, forests) need an SSP scheme. |
[weno] | Read only with scheme_space = weno (CPU); with another scheme its keys are unread. scheme accepts weno-u-1/3/5/7/9; the centred weno-c-* stop at initialization (#139, they ran the upwind kernel under a centred name). weights (js, si) is used; the ROR keys are no longer read. |
[fdv] | fdv_scheme (FD, FV) selects PRISM's operators and the coil stamping; fdv_order the order of the centred operators, which the t0 elliptic solves also use (they accept 2, 4, 6, 8). |
[solids] | Loaded and passed to the Runge-Kutta stages; no committed PRISM input uses solids. |
[bc_x_min], [bc_x_max], [bc_y_min], [bc_y_max], [bc_z_min], [bc_z_max]
One key per section, required.
| Key | Accepted values | Meaning |
|---|---|---|
type | extrapolation, Neumann, Dirichlet, Silver_Muller, periodic, PEC (or pec); case-sensitive, other values are fatal. radiative is refused (#57). | Face boundary condition. |
periodicis the library's periodicity (BC_PERIODIC = -1): the tree builds periodic neighbours and the ghost exchange fills the periodic ghosts, across blocks and ranks. The two faces of an axis must be both periodic or neither (fatal).Dirichletwrites zero into the ghosts; there is no key for a prescribed value.- Edge and corner ghost rows receive no boundary condition.
Silver_Mulleris spelled with an underscore.- The elliptic map gives the boundary the t0 solves see.
[time]
Every key is required.
| Key | Type | Meaning |
|---|---|---|
it_max | int | > 0: stop after it_max steps. <= 0: run to time_max. |
time_max | real | End time (s; divided by T0 in a non-dimensional model). |
CFL | real | CFL number on the fastest wave, max(1, chi) c0, and half the smallest cell: dt = CFL (dx_min/2) / (max(1, chi) c0) (upper-case key). The PML (C_gamma), the GLM damping (alpha) and, under PIC, [PIC] omega_dt_max may cap the step further. |
[initial_conditions]
| Key | Type | Req. | Accepted / invalid | Meaning |
|---|---|---|---|---|
amr_iterations | int | yes | negative values are clamped to 0 | Initial-condition + AMR passes: each sets the initial condition and runs the markers. |
type | string | yes | see below; other values are fatal | Initial field. |
type | Extra keys (all required, real unless stated) | Field |
|---|---|---|
vacuum | — | Every variable zero. |
plane_wave | kx, ky, kz (direction components), lambda (wavelength), B0 (amplitude, T) | A plane wave of wavelength lambda along (kx, ky, kz), D = B0 c0 ε0. |
gaussian_pulse | B0, k0 (carrier wavenumber), r0 (centre along the direction), sigma (> 0, width), pulse_direction (string) | A Gaussian-enveloped wave packet. |
gaussian_derivative_pulse | B0, r0, sigma (> 0), pulse_direction (string); optional k0 (carrier wavenumber, default 0) | A pulse with no zero-frequency content: single-cycle with k0 = 0, a packet around k0 otherwise. |
rmf_field | [external_fields] RMF_frequency, RMF_B_amplitude, RMF_rotation_axis (X, Y, Z, either case; other values are fatal) | A rotating magnetic field. |
uniform_field | B_x, B_y, B_z | A uniform magnetic field. |
riemann-problem | — | Refused: its regions were read but never applied (#56). |
magnetic_nozzle, rmf_magnetic_nozzle | — | Refused: use [external_fields] external_fields_applied for a nozzle field (also refused, see there). |
pulse_direction accepts +x, -x, +y, -y, +z, -z; another value is fatal when the initial condition is set. Under the non-dimensional models the pulse lengths are given in SI and converted.
[coils_input] and [coils_input_coil_N]
Coil current sources, stamped into the current density J as a Gaussian distribution around the coil path.
[coils_input]
| Key | Type | Req. | Meaning |
|---|---|---|---|
rectangular_coils_number | int | no | Rectangular loops. |
circular_coils_number | int | no | Circular loops. |
solenoid_coils_number | int | no | Solenoids. |
helicon_coils_number | int | no | Helicon antennas (polylines). |
time_delay | real | cond. (any coil) | Ramp-up time: the current is multiplied by g(s) = 10s³ − 15s⁴ + 6s⁵, s = t/time_delay clamped to [0, 1], so it grows smoothly from zero at t0 to full at time_delay. With time_delay <= 0 the coils carry full current at t0, and the t0 magnetic field is solved for (see [PIC] magnetic_field_elliptic_initialization). |
Each count defaults to the number of [coils_input_coil_N] sections whose coil_type is that kind (#80 F5), so an input lists its coils and need not count them; the coil sections are numbered 1..N without gaps. No coil section and no count: no coils.
[coils_input_coil_N] (N = 1..total coils)
| Key | Type | Req. | Accepted / invalid | Meaning |
|---|---|---|---|---|
coil_type | string | yes | rectangular, circular, solenoid, helicon; another value is accepted silently and stamps no coil | Geometry. |
current_type | string | yes | DC_current, AC_current; another value is accepted silently and reads no amplitude | Waveform. |
sigma | real | yes | — | Width of the Gaussian current distribution. |
x_center, y_center, z_center | real | yes (every kind) | — | Coil centre. |
normal | string | yes (every kind) | +x, -x, +y, -y, +z, -z; another value stamps no coil, silently | Coil plane normal (the axis of a solenoid). |
lx, ly | real | rectangular | — | Loop sides. |
r_coil | real | circular, solenoid, helicon | — | Radius. |
l_solenoid | real | solenoid | — | Length. |
windings | int | solenoid | — | Turns. |
N_points | int | helicon | <= 50, otherwise fatal | Points of the antenna path. |
x_point_K, y_point_K, z_point_K | real | helicon, K = 1..N_points | — | Antenna path points. |
Amplitude | real | yes (DC_current, AC_current) | — | Current amplitude (A). |
Frequency, Phase | real | AC_current | — | Frequency (Hz) and initial phase (degrees). |
[external_fields]
| Key | Type | Req. | Accepted / invalid | Meaning |
|---|---|---|---|---|
external_fields_applied | string | yes | none (no), RMF, uniform_field (UniformField), and the case variants; magnetic_nozzle and rmf_and_magnetic_nozzle are parsed and refused at initialization (no backend implements them); other values are fatal | External field added to the evolved one. |
RMF_frequency, RMF_B_amplitude | real | RMF | — | Rotating field frequency (Hz) and amplitude (T). |
RMF_rotation_axis | string | RMF | X, Y, Z (either case); another value leaves the rotation indices undefined, silently | Rotation axis. |
Uniform_field_D_amplitude (or Uniform_D_amplitude) | real | uniform_field | — | Uniform D amplitude. |
Uniform_field_B_amplitude (or Uniform_B_amplitude) | real | uniform_field | — | Uniform B amplitude. |
Uniform_field_direction (or Uniform_direction) | string | uniform_field | x, y, z (either case); other values are fatal | Direction of the uniform field. |
For each pair, the first name is read first and the second is the fallback.
[fWLayer]
A far-wave damping layer along chosen domain faces.
| Key | Type | Req. | Accepted / invalid | Meaning |
|---|---|---|---|---|
width | real | yes (even when no layer is used) | >= 0, otherwise fatal | Physical layer width; the cells per face are min(ni, ceiling(width/ds)). 0 disables the layer. |
x_minus_layer, x_plus_layer, y_minus_layer, y_plus_layer, z_minus_layer, z_plus_layer | string | yes | yes, no (case variants); other values are fatal | Faces carrying the layer. |
The removed key C (cells per face) is rejected by the removed-keys lint.
[PML]
A perfectly matched layer, stored on the boundary blocks only. The section is optional: without PML_type the PML is off.
| Key | Type | Req. | Default | Accepted / invalid | Meaning |
|---|---|---|---|---|---|
PML_type | string | no | none | no/none, CLASSIC (PML, STANDARD), CLASSIC_DIRECT (DIRECT, CLASSIC-DIRECT), CFS (CPML, CFS_PML), BERMUDEZ, with case variants; other values are fatal | PML formulation. |
width | real | yes (PML on) | 0 | > 0, otherwise fatal | Physical layer width. |
C_gamma (or c_gamma) | real | no | 0.1 | > 0, otherwise fatal | Time-step cap dt <= C_gamma / gamma_max. |
exact_decay | logical | no | .false. | The decay of the auxiliary variables integrated exactly by SELAH (the residual is the source alone; absorbing layers); default: the explicit Runge–Kutta step of the whole right-hand side. | |
x_minus_layer … z_plus_layer | logical | yes (PML on) | — | at least one .true., otherwise fatal | Faces carrying the PML. |
gamma_max | real | CLASSIC, CLASSIC_DIRECT, CFS | — | >= 0, otherwise fatal | Maximum damping. |
gamma_exponent | real | CLASSIC, CLASSIC_DIRECT, BERMUDEZ | — | > 0, otherwise fatal | Exponent of the damping profile. |
alfa_max | real | CFS | — | >= 0, otherwise fatal | CFS frequency shift (spelled alfa). |
k_max | real | CFS | — | > 0, otherwise fatal | CFS stretching. |
beta | real | BERMUDEZ | — | >= 0, otherwise fatal | Bermúdez profile coefficient. |
The backend constraints are in the PML hazards.
[PIC] (PIC models only)
| Key | Type | Req. | Default | Accepted / invalid | Meaning |
|---|---|---|---|---|---|
problem_type | string | yes | — | plasma, single_particle; another value is accepted silently and injects no particle | Problem kind. |
plasma_domain | string | plasma | — | uniform (all, full, uniform_domain), cilinder (uniform_cilinder), slab (uniform_slab), box (uniform_box), with case variants; other values are fatal | Region the plasma fills. Note the spelling cilinder. |
cilinder_radius, cilinder_length, cilinder_x_center, cilinder_y_center, cilinder_z_center | real | cilinder | — | — | Cylinder. |
cilinder_axis | char | cilinder | — | x, y, z; another value leaves the particle positions undefined, silently | Cylinder axis. |
slab_normal | string | slab | — | x, y, z (either case); other values are fatal | Slab normal. |
slab_thickness, slab_center | real | slab | — | thickness > 0, otherwise fatal | Slab along its normal. |
box_length_x, box_length_y, box_length_z, box_x_center, box_y_center, box_z_center | real | box | — | — | Box. |
plasma_density | real | plasma | — | — | Total density (ions + electrons + neutrals) per unit volume: the particle count is nint(plasma_density × volume / particle_weight) of the plasma region. |
particle_weight | real | no | 1 | > 0, otherwise fatal | Real particles per macroparticle: each particle carries particle_weight times the charge and the mass of its species (q/m unchanged). |
neutral_fraction | real | plasma | — | — | Fraction of neutrals; the rest is split evenly into ions and electrons. |
initialization | string | no | coherent | coherent only; other values are fatal | Field initialization. |
electric_field_elliptic_initialization | logical | no | .true. | logical | Solve D(G) φ = −ρ/ε at t0 and correct D, so div D = ρ to round-off. |
magnetic_field_elliptic_initialization | logical | no | .true. | logical | Solve D(G) A = −μ J at t0 and add curl A to B, when J ≠ 0 at t0. |
elliptic_initialization_closure | string | no | grounded | grounded, isolated; other values are fatal. isolated is fatal unless both t0 solves are on, and at t0 unless exactly one axis is non-periodic with PEC faces (the others periodic or null) | Mean fields of the t0 solves: grounded zero (the PEC walls at one potential, no trapped flux), isolated those of the same sources in open space along the non-periodic axis (numerics). |
elliptic_correction | logical | — | — | .true. is fatal (#84 E3d); the lint rejects the key | Removed. |
particle_weighting_model | string | yes | — | NGP, CIC, TSC, cubic (3rd), quartic (4th), quintic (5th), sextic (6th), gaussian, with case variants; other values are fatal | Charge deposition. |
current_weighting_model | string | yes | — | the same list, plus conserving (charge_conserving); other values are fatal | Current deposition. conserving needs fd_centered, runge_kutta and SSP-22/33/54 (fatal otherwise). |
field_weighting_model | string | yes | — | 0D … 6D, gaussian, londrillo, totorica (esirkepov_Q2), esirkepov_Q5, esirkepov_Q6, esirkepov_Q8, esirkepov_Q10, with case variants; other values are fatal | Field gather to the particles. |
current_conserving_solver | string | no | londrillo | londrillo, totorica (esirkepov_Q2), esirkepov_Q5/Q6/Q8/Q10; the old names esirkepov, direct/line, esirkepov-modified stop with the new name; other values are fatal. Ignored unless current_weighting_model = conserving. | Matched current of the conserving deposit. With periodic faces londrillo stops at initialization, both backends. |
esirkepov_tail_cleanup | logical | no | .false. | logical | Tail cleanup of the Esirkepov current; stops at initialization with periodic faces, both backends. |
filter_deposition | logical | no | .false. | logical | Filter the deposited source. |
sigma, cutoff_sigma | real | cond. (any Gaussian model) | — | > 0, otherwise fatal | Gaussian width and cut-off (in widths). |
gaussian_support_cells | int | no | automatic | — | Gaussian support in cells; automatic from the final cell size when absent. |
scheme_time | string | yes | — | runge_kutta, leapfrog (case variants); another value warns and falls back to runge_kutta | Particle push. leapfrog is refused at initialization. |
omega_dt_max | real | no | 0.05 | > 0, otherwise fatal | Accuracy threshold on ω_max Δt: when the field step gives ω_max Δt ≥ omega_dt_max (ω_max the R cutoff of the plasma frequencies), Δt = omega_dt_max/ω_max or less (numerics). |
particle_capacity_factor | real | no | 0 (global capacity) | >= 1 when given, otherwise fatal | Particle-array capacity of every rank, in units of global particles / ranks, fixed at initialization; a rank that has to hold more stops the run (#112). |
charge_conservation_save | int | no | 0 (no history) | >= 0, otherwise fatal | Write <basename>-charge_conservation_history.dat every N steps; 0 skips the diagnostic and its ghost exchange per stage (#111). |
The particle closure at the domain faces is not an input key: it follows the field [bc_*] type (periodic faces wrap the particles, every other kind keeps the legacy closure, where a particle leaving the domain stops the run).
[particle_injection] (PIC models only)
For problem_type = plasma:
| Key | Type | Req. | Default | Accepted / invalid | Meaning |
|---|---|---|---|---|---|
random_seed | int | no | processor-dependent | any | Fixed seed, for a reproducible plasma. |
space_random_number_generator | string | yes | — | random, layered (case variants); other values are fatal | Position sampling. |
space_pairing | string | yes | — | yes, no; other values are fatal | Electrons placed on the ions' positions. |
ions_velocity_distribution, electrons_velocity_distribution, neutrals_velocity_distribution | string | yes | — | uniform_maxwellian (maxwellian, uniform), non_uniform_maxwellian, drift (pure_drift), with case variants; other values are fatal | Velocity distribution per species. |
ionic_temperature, electronic_temperature, neutrals_temperature | real | cond. (that species uniform_maxwellian) | — | — | Temperature (K). |
ionic_temperature_x/_y/_z, electronic_temperature_x/_y/_z, neutrals_temperature_x/_y/_z | real | cond. (that species non_uniform_maxwellian) | — | — | Temperature per axis (K). |
velocity_random_number_generator | string | cond. (any Maxwellian species) | — | random, layered; other values are fatal | Velocity sampling. |
velocity_pairing | string | cond. (any Maxwellian species) | — | yes, no; other values are fatal. yes needs the same distribution, temperatures and drifts for ions and electrons (fatal otherwise). | Electrons take the ions' velocities. |
ions_drift_x/_y/_z, electrons_drift_x/_y/_z, neutrals_drift_x/_y/_z | real | yes | — | — | Drift velocity per species (m/s). |
v_av_correction | string | yes | — | yes, no; other values are fatal | Remove the sampled mean velocity. |
For problem_type = single_particle: x_position, y_position, z_position, charge, mass, v_drift_x, v_drift_y, v_drift_z, all real and required.
[leapfrog] (removed)
No parser reads it: its keys (is_filtered, nu, alpha) set the Robert–Asselin filter of ADAM's PIC leapfrog, deleted when the particle push moved to SELAH (SELAH#4). An input that keeps the section stops at initialization on its unread keys ([IO] unused_keys = error, the default); delete it.
Diagnostics
[grms]
| Key | Type | Req. | Default | Accepted / invalid | Meaning |
|---|---|---|---|---|---|
save_history | logical | no | .false. | logical | Write the RMS-field history. |
history_save | int | no | 10 | — | Its cadence in steps. |
region_type | string | no | all | all, cylinder; other values are fatal | Region of the RMS. |
center_x, center_y, center_z, axis_x, axis_y, axis_z, radius, length | real | cylinder | — | axis non-zero, radius and length > 0, otherwise fatal | Cylinder (the axis is normalised). |
[magnetic_field_at_center_domain]
| Key | Type | Req. | Default | Meaning |
|---|---|---|---|---|
save_history | logical | no | .false. | Write the history of B at the domain centre. |
history_save | int | no | 10 | Its cadence in steps. |
[probes]
Optional: without a [probes] section, or with neither point_N nor plane_N keys, there are no probes. Each probe samples the whole state at a point by trilinear interpolation.
ini
[probes]
save_every = 4
point_1 = -0.04 0.0 0.0 ; one probe at x y z
plane_1 = x 0.4364 48 48 ; a plane of probes normal to x at x = 0.4364: 48 x 48 points over y and z| Key | Type | Req. | Accepted / invalid | Meaning |
|---|---|---|---|---|
save_every | int | yes (probes on) | > 0, otherwise fatal | Cadence in steps; the last step is always saved. |
point_N | 3 reals | no | inside the domain, otherwise fatal | A probe at x y z. |
plane_N | axis, real, 2 ints | no | axis x/y/z, abscissa inside the domain, n1 n2 >= 1, otherwise fatal | A plane of n1 x n2 probes normal to the axis at the abscissa, on the cell centres of a uniform lattice spanning the domain along the other two axes (normal x: y then z; y: x then z; z: x then y). With n equal to the cells of the grid along an axis the probes sit on the cell centres. |
Coordinates are in the grid's units (divided by L0 non-dimensional). point_N and plane_N are numbered from 1 without gaps: the first missing number ends the list. The former input, probes_number and one [probe_N] section (x, y, z) per probe, is refused at initialization: write each former probe as a point_N, or a full lattice of them as one plane_N.
Output (rank 0): <output_basename>-probe_NN.dat per point (one row per save: it time and the variables) and <output_basename>-plane_NN.dat per plane (per save, n1 x n2 rows it time i j and the variables, i fastest). The rows are not flushed at every save (a flush per file is a file-system round trip; on a shared file system it stalled every rank for seconds): they reach the files when the runtime buffers fill and at the end of the run, so after a crash the last rows may be missing.