Appearance
adam_flume_common_object
ADAM, FLUME common object: data and methods shared by all backends.
flume_common_object extends the library realm_object (which owns grid, tree, field, maps, IO, AMR, IB, RK and WENO objects) with the FLUME physics layer. The backends (flume_cpu_object, flume_fnl_object) extend it and implement the forest contract. Initialization order (issue #35, section 6.1): IO, numerics, physics (decides nv), blocks budget with the real per-block fields count, realm, BCs (before the first map build, so periodicity is seen by the tree), time, IC, diagnostics, fields allocation, uniform refinement.
Source: src/app/flume/common/adam_flume_common_object.F90
Dependencies
Contents
- flume_common_object
- amr_update
- mark_by_geometry
- mark_by_gradient
- mark_by_solid
- accumulate_seam_skin
- allocate_common
- compute_phi
- compute_fields_number
- destroy_common
- initialize
- report_divb
- report_glm_speed
- load_restart_files
- save_restart_files
- save_xh5f
- set_divb_seam
- set_glm_damping
- save_slices
- coupling_descriptor_forest
- seam_skin_cell
- check_slices
- compute_mhd_derived
- compute_q_aux_host
- check_amr_block_cells
- check_ngc_number
- io_initialize
- glm_lambda
- null_freeze
- ib_cut_spacing
- refinement_by_spacing
- block_spacing
Variables
| Name | Type | Attributes | Description |
|---|---|---|---|
SCHEME_TIME_TAG | character(len=11) | parameter | Time-integration family tag (forest admissibility). |
Derived Types
flume_common_object
FLUME common object: data and methods shared by 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_curl_extended | procedure(compute_curl_interface) | pass(self), pointer | Compute curl on extended support. |
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_gradient_extended | procedure(compute_gradient_interface) | pass(self), pointer | Compute gradient on extended support. |
compute_laplacian | procedure(compute_laplacian_interface) | pass(self), pointer | Compute laplac. |
amr_locked_ | logical | Runtime AMR locked after initialization. | |
save_auxiliary_fields | logical | Save the auxiliary variables with the fields. | |
glm_speed_reported | real(kind=R8P) | Largest wave speed above c_h reported so far. | |
divb_reported | real(kind=R8P) | Largest max|div B| above divb_tol reported so far. | |
divb_seam | integer(kind=I4P) | allocatable | Seam faces flags of the div(B) history [nb, 6]. |
q | real(kind=R8P) | allocatable | Conservative variables [nv, 1-ngc:ni+ngc, ..., nb]. |
dq | real(kind=R8P) | allocatable | Residuals [nv, 1-ngc:ni+ngc, ..., nb]. |
q_aux | real(kind=R8P) | allocatable | Auxiliary variables [nv_aux, 1-ngc:ni+ngc, ..., nb]. |
q_name | type(string) | allocatable | Conservative variables names. |
dq_name | type(string) | allocatable | Residuals names. |
q_aux_name | type(string) | allocatable | Auxiliary variables names. |
bc | type(flume_bc_object) | Boundary conditions. | |
diagnostics | type(flume_diagnostics_object) | Diagnostics. | |
ic | type(flume_ic_object) | Initial conditions. | |
numerics | type(flume_numerics_object) | Numerics. | |
physics | type(flume_physics_object) | Physics. | |
time | type(flume_time_object) | Time handler. |
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. |
compute_curl_fd_extended | pass(self) | Compute curl of vector field, finite difference, even for half gcs. |
compute_gradient_fd_extended | pass(self) | Compute gradient of scalar field, finite difference, even for half |
amr_update | pass(self) | Do AMR update (initialization-time only). |
mark_by_geometry | pass(self) | Mark blocks to be refined by a primitive geometric box. |
mark_by_gradient | pass(self) | Mark blocks by the gradient of a conservative or auxiliary variable. |
mark_by_solid | pass(self) | Mark blocks crossed by the surface of an immersed solid. |
accumulate_seam_skin | pass(self) | Route one weighted seam face skin to the forest's flux register. |
allocate_common | pass(self) | Allocate common data. |
compute_fields_number | pass(self) | Compute the block-sized fields allocated per block. |
compute_phi | pass(self) | Compute the immersed solids distance function (host). |
destroy_common | pass(self) | Free common data. |
glm_lambda | pass(self) | Return the GLM bound of the local dt, c_h max sum_d 1/dx_d. |
initialize | pass(self) | Initialize the common data. |
null_freeze | pass(self) | Return the variable each null direction freezes. |
report_divb | pass(self) | Reduce and save the div(B) norms, apply the divb_tol monitor. |
report_glm_speed | pass(self) | Check c_h against the fastest wave (warning or stop). |
load_restart_files | pass(self) | Load restart files. |
save_restart_files | pass(self) | Save restart files. |
save_slices | pass(self) | Save the slices on their cadence. |
save_xh5f | pass(self) | Save fields in XH5F format. |
set_divb_seam | pass(self) | Set the seam faces flags of the div(B) history. |
set_glm_damping | pass(self) | Set the GLM damping once the grid exists. |
coupling_descriptor_forest | pass(self) | Return the realm coupling descriptor. |
block_spacing | pass(self) | Return the spacing of a block by a delta criterion. |
check_amr_block_cells | pass(self) | Check the block cells numbers against the 2:1 refinement. |
check_ngc_number | pass(self) | Check the ghost cells number against the stencils. |
check_slices | pass(self) | Check the slices interpolation types. |
compute_mhd_derived | pass(self) | Compute the MHD derived output fields of one block. |
compute_q_aux_host | pass(self) | Compute the auxiliary variables of the host q. |
io_initialize | pass(self) | Build the variables names. |
Subroutines
amr_update
Do AMR update: amr%iters sweeps over the markers until the grid stabilizes (initialization-time only).
fortran
subroutine amr_update(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | inout | The equation. |
Call graph
mark_by_geometry
Mark blocks to be refined by a primitive axis-aligned box (deterministic, solution-independent).
A block is flagged TO_BE_REFINED iff its centroid lies inside [box_emin, box_emax] and its refinement level is below target_level; every other block is left untouched (the marker is additive).
fortran
subroutine mark_by_geometry(self, box_emin, box_emax, target_level, do_init)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | inout | The equation. | |
box_emin | real(kind=R8P) | in | Box minimum corner. | |
box_emax | real(kind=R8P) | in | Box maximum corner. | |
target_level | integer(kind=I4P) | in | Refine blocks below this level. | |
do_init | logical | in | optional | Re-initialize refinements queries. |
Call graph
mark_by_gradient
Mark blocks by the gradient magnitude of a conservative (field = 1) or auxiliary (field = 2) variable.
CHASE semantics: the admissible cell spacing of a block is delta_fine where max |grad var| > tol, else delta_coarse; a block coarser than admissible is refined, a block whose parent (spacing doubled) would still be admissible is derefined, any other block is left untouched. The spacing of a block is chosen by delta_type (x, y, z or max). The gradient uses the interior cells only (centred differences, one-sided at the block edges), so the marker does not depend on the ghost cells: it runs on the host state before any ghost exchange, for both backends (AMR is initialization-time only).
fortran
subroutine mark_by_gradient(self, field, ivar, tol, delta_type, delta_fine, delta_coarse)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | inout | The equation. | |
field | integer(kind=I4P) | in | Marker field: 1 conservative, 2 auxiliary variables. | |
ivar | integer(kind=I4P) | in | Variable index in the marker field. | |
tol | real(kind=R8P) | in | Gradient magnitude tolerance. | |
delta_type | character(len=*) | in | Block spacing criterion: x, y, z, max. | |
delta_fine | real(kind=R8P) | in | Admissible spacing where the gradient exceeds tol. | |
delta_coarse | real(kind=R8P) | in | Admissible spacing elsewhere. |
Call graph
mark_by_solid
Mark blocks by the surface of immersed solid solid: CHASE semantics, with the refine/derefine rule of the gradient marker.
A block is crossed by the surface when its distance function (interior and ghost cells) changes sign; its admissible spacing is then delta_fine, delta_coarse otherwise. The distance function must be current (the caller computes it on the present grid). A run without solids, or a solid index out of range, is fatal (CHASE read phi unallocated in that case, issue #35 C-8).
fortran
subroutine mark_by_solid(self, solid, delta_type, delta_fine, delta_coarse)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | inout | The equation. | |
solid | integer(kind=I4P) | in | Solid index. | |
delta_type | character(len=*) | in | Block spacing criterion: x, y, z, max. | |
delta_fine | real(kind=R8P) | in | Admissible spacing across the surface. | |
delta_coarse | real(kind=R8P) | in | Admissible spacing elsewhere. |
Call graph
accumulate_seam_skin
Route one seam face skin of block b, face fec, weighted by weight, to the forest's flux register.
Shared by the backends (the register is host-side): the CPU packs skin from its face fluxes, the FNL backend packs it on the device and copies it to the host. skin(v, c) is the face flux with the cell index c running over the two tangential axes, inner fastest (x faces: j, k; y faces: i, k; z faces: i, j), the register order. Coarse side (positive register index): the skin is the coarse face. Fine side (negative index): on an intra-realm AMR seam the skin is 2:1-restricted (2x2 average) into this block's quadrant of the coarse face, the quadrant offset precomputed by the forest from the Morton codes (maps%amr_seam_quadrant); on an inter-realm mirror seam (same resolution) it covers the coarse face 1:1 and is accumulated unrestricted.
FLUME weighs every stage by its SSP coefficient, weight = beta_s: the register then holds the flux of the whole step, sum_s beta_s F_s, exactly the flux the committed update q + dt sum_s beta_s dq_s used, and the end-of-step correction restores conservation to round-off (issue #35, P5; AMReX non-subcycled flux register).
fortran
subroutine accumulate_seam_skin(self, flux_register, b, fec, weight, skin)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | in | The equation. | |
flux_register | class(flux_register_object) | inout | Forest's flux register. | |
b | integer(kind=I4P) | in | Block index. | |
fec | integer(kind=I4P) | in | Face (1..6: -x, +x, -y, +y, -z, +z). | |
weight | real(kind=R8P) | in | Stage weight. | |
skin | real(kind=R8P) | in | Face skin (nv, inner_n*outer_n). |
Call graph
allocate_common
Allocate common data.
fortran
subroutine allocate_common(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | inout | The equation. |
Call graph
compute_phi
Compute the distance function of the immersed solids on the host (a no-op without solids); the solids are static, so the backends compute it once per grid (initialization, restart, initial AMR).
fortran
subroutine compute_phi(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | inout | The equation. |
Call graph
compute_fields_number
Compute the block-sized fields FLUME allocates per block, the fields_number of the blocks budget.
Both backends allocate the same nb-sized arrays, on the host (CPU) or on the device (FNL): q, dq (2 nv), q_aux (nv_aux), the three face fluxes (3 nv, counted as full block fields) and the Runge-Kutta stages (rk_stored_stages_number nv). Requires physics initialized.
fortran
subroutine compute_fields_number(self, file_parameters, fields_number)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | inout | The equation. | |
file_parameters | type(file_ini) | in | Simulation parameters ini file handler. | |
fields_number | integer(kind=I4P) | out | Block-sized fields allocated per block. |
Call graph
destroy_common
Free common data.
fortran
subroutine destroy_common(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | inout | The equation. |
Call graph
initialize
Initialize the common data (issue #35, section 6.1, step 3).
fortran
subroutine initialize(self, filename, memory_avail, nv, fields_number, verbose, L0)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_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 | Unused: nv is decided by the physics. |
fields_number | integer(kind=I4P) | in | optional | Block-sized fields per block (default: computed). |
verbose | logical | in | optional | Trigger verbose output. |
L0 | real(kind=R8P) | in | optional | Unused: FLUME is dimensional. |
Call graph
report_divb
Reduce the div(B) norms of this rank over all ranks, save the div(B) history row and apply the monitor (issue #41, D-10): max|div B| > [mhd].(divb_tol) (> 0) is fatal with divb_error, otherwise a warning logged by rank 0 each time the maximum exceeds the largest one reported so far.
fortran
subroutine report_divb(self, norms)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | inout | The equation. | |
norms | real(kind=R8P) | in | max|div B|, sum |div B| dV, seam-local max|div B| (rank). |
Call graph
report_glm_speed
Check the GLM cleaning speed against the fastest wave (issue #41, section 3.5, D-9): max(|u_d| + c_{f,d}) > c_h is fatal with [mhd].(glm_ch_check) = error, otherwise a warning logged by rank 0 each time the speed exceeds the largest one reported so far (GLM stays stable, dt includes c_h, but the cleaning is slower than the fastest wave).
fortran
subroutine report_glm_speed(self, speed_max)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | inout | The equation. | |
speed_max | real(kind=R8P) | in | Fastest wave speed of this rank. |
Call graph
load_restart_files
Load restart files.
fortran
subroutine load_restart_files(self, t, time)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | inout | The equation. | |
t | integer(kind=I4P) | out | Time iteration. | |
time | real(kind=R8P) | out | Time. |
Call graph
save_restart_files
Save restart files.
fortran
subroutine save_restart_files(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | inout | The equation. |
Call graph
save_xh5f
Save fields in XH5F format: q always, dq when [IO].(save_residual_fields), the auxiliary variables (computed from the saved q, ghost cells included) when [IO].(save_auxiliary_fields).
fortran
subroutine save_xh5f(self, output_basename, with_ghost)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_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
set_divb_seam
Set the seam faces flags of the div(B) history (issue #41, D-10): a block face is a seam face when the forest registered it in the flux register (a 2:1 AMR or inter-realm seam, inter_realm_face_register_index /= 0).
fortran
subroutine set_divb_seam(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | inout | The equation. |
Call graph
set_glm_damping
Set the GLM damping once the grid exists (issue #41, section 3.5): the minimum cell spacing of the realm over the active directions (MPI-reduced) is the min-cell damping length. A no-op without GLM.
fortran
subroutine set_glm_damping(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | inout | The equation. |
Call graph
save_slices
Save the slices (library slices_object, [slices] / [slice_N]) of the conservative variables on their cadence; the caller has refreshed the ghost cells of the host q (the interpolation stencils read them).
fortran
subroutine save_slices(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | inout | The equation. |
Call graph
coupling_descriptor_forest
Return the realm coupling descriptor checked by the forest for stage-coincident admissibility.
fortran
subroutine coupling_descriptor_forest(self, scheme_time, rk_scheme, nv)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | in | The equation. | |
scheme_time | character(len=:) | out | allocatable | Time-integration family tag. |
rk_scheme | character(len=:) | out | allocatable | Within-family scheme tag. |
nv | integer(kind=I4P) | out | Number of conserved variables on this realm. |
Call graph
seam_skin_cell
Return the interior cell (i, j, k) of skin cell c on the face of normal axis and side sgn (register order, inner tangential axis fastest). Shared by the host and device reflux applications.
Attributes: pure
fortran
subroutine seam_skin_cell(axis, sgn, ni, nj, nk, c, i, j, k)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
axis | integer(kind=I4P) | in | Face normal axis, 1..3. | |
sgn | integer(kind=I4P) | in | Face side, +1 maximum, -1 minimum. | |
ni | integer(kind=I4P) | in | Grid dimensions. | |
nj | integer(kind=I4P) | in | Grid dimensions. | |
nk | integer(kind=I4P) | in | Grid dimensions. | |
c | integer(kind=I4P) | in | Skin cell index. | |
i | integer(kind=I4P) | out | Interior cell (0 on a malformed axis). | |
j | integer(kind=I4P) | out | Interior cell (0 on a malformed axis). | |
k | integer(kind=I4P) | out | Interior cell (0 on a malformed axis). |
Call graph
check_slices
Check the interpolation type of every slice: the library interpolation leaves the value undefined for an unknown type, so an unknown one is fatal here.
fortran
subroutine check_slices(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | in | The equation. |
Call graph
compute_mhd_derived
Compute the MHD derived output fields of block b (issue #41, section 9) from the host q and q_aux: total pressure pt = p + |B|^2 / 2, plasma beta 2 p / |B|^2 (huge where B = 0), |B| (every cell), and div B (interior cells, zero on the ghost cells) by the centred finite difference of the div(B) history (the library derivative, half stencil [fdv], null directions weighted zero). The caller has refreshed the ghost cells.
fortran
subroutine compute_mhd_derived(self, b, derived)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | in | The equation. | |
b | integer(kind=I4P) | in | Block index. | |
derived | real(kind=R8P) | out | pt, beta, bmag, divb. |
Call graph
compute_q_aux_host
Compute the auxiliary variables of the host q on every cell, ghost cells included (output and AMR marking only: the backends compute their own auxiliary variables in the space operator). The model is selected outside the loops.
fortran
subroutine compute_q_aux_host(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | inout | The equation. |
Call graph
check_amr_block_cells
Check that a run with init-time refinement has an even number of block cells along every non-null axis.
A 2:1 child covers half of its parent: with an odd cell count its boundary falls in the middle of a parent cell, the coarse-fine ghost fill reads undefined values and the residual is NaN from the first stage (issue #37, measured with ni = 25). Uniform refinement (iu_ref_levels) has no coarse-fine faces and is not affected.
fortran
subroutine check_amr_block_cells(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | in | The equation. |
Call graph
check_ngc_number
Check the ghost cells number against the WENO stencil half-width.
fortran
subroutine check_ngc_number(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | in | The equation. |
Call graph
io_initialize
Build the variables names from the physical model (the same predicate that decided nv).
fortran
subroutine io_initialize(self)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | inout | The equation. |
Call graph
Functions
glm_lambda
Return the GLM bound of the local time step, c_h max_b sum_{d active} 1 / dx_d (issue #41, section 3.5): the (B_n, psi) waves travel at c_h along every active direction, the multi-dimensional form of dt <= CFL dx / c_h consistent with the fluid bound sum_d (|u_d| + c_{f,d}) / dx_d. Zero without GLM; local (the forest reduces dt).
Returns: real(kind=R8P)
fortran
function glm_lambda(self) result(lambda)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | in | The equation. |
Call graph
null_freeze
Return, per direction, the conservative variable whose residual a null direction freezes (0: none).
Euler: the momentum along the null direction (CHASE semantics, issue #35, section 3.4). MHD: none, the 1-D MHD Riemann problems evolve the transverse momentum and field through the fluxes of the active directions (issue #41, M2-P3). Host data passed to the model-independent flux difference: no model branch in the kernels.
Returns: integer(kind=I4P)
fortran
function null_freeze(self) result(freeze)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | in | The equation. |
Call graph
ib_cut_spacing
Return the spacing of a fluid cell along one direction, shortened where the solid surface crosses its stencil (CHASE semantics, issue #35 D-9).
When the fluid cell (phi_c < 0) has one neighbour inside the solid (phi_m phi_p < 0), the surface lies at the distance delta = -phi_c / (phi_s - phi_c + eps) ds from the cell centre towards the solid neighbour s, and the spacing becomes ds / 2 + delta; otherwise it is ds.
Attributes: pure
Returns: real(kind=R8P)
fortran
function ib_cut_spacing(phi_c, phi_m, phi_p, ds, eps) result(ds_cut)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
phi_c | real(kind=R8P) | in | Distance function of the cell (negative in the fluid). | |
phi_m | real(kind=R8P) | in | Distance function of the minus neighbour. | |
phi_p | real(kind=R8P) | in | Distance function of the plus neighbour. | |
ds | real(kind=R8P) | in | Spacing. | |
eps | real(kind=R8P) | in | Guard against a vanishing denominator. |
Call graph
refinement_by_spacing
Return the refinement query of a block of spacing dc against the admissible spacing delta: refine when too coarse, derefine when its parent (spacing doubled) would still be admissible, untouched otherwise.
Attributes: pure
Returns: integer(kind=I4P)
fortran
function refinement_by_spacing(dc, delta) result(refinement)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
dc | real(kind=R8P) | in | Block spacing. | |
delta | real(kind=R8P) | in | Admissible spacing. |
Call graph
block_spacing
Return the spacing of block b by the AMR delta criterion: x, y, z, or max over the active directions.
Returns: real(kind=R8P)
fortran
function block_spacing(self, b, delta_type) result(dc)Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
self | class(flume_common_object) | in | The equation. | |
b | integer(kind=I4P) | in | Block index. | |
delta_type | character(len=*) | in | Delta criterion. |
Call graph