| Procedure | Location | Procedure Type | Description |
|---|---|---|---|
| agree_outcome | checkpoint_io | Function | Collective outcome agreement (write-side): failed = any rank not ok. On failure the optional status pair gets fail_text; on SUCCESS the pair is left exactly as the caller preset it — hence intent(inout), NOT intent(out) (which would leave the caller's values undefined on the success path). COLLECTIVE — every rank must call. |
| all_finite_2d | mesh_2d | Function | True iff every element of a 2D coordinate array is finite (no NaN/Inf). |
| allocate_work_arrays | solver_state | Subroutine | Allocate all solver work arrays owned by a solver instance. |
| allocate_work_arrays_2d | solver_state_2d | Subroutine | Allocate the conserved-variable array with halo layers on both axes. |
| apply_bcs | boundary_conditions | Subroutine | Method dispatcher for boundary-condition enforcement. |
| apply_bcs_fdm | boundary_conditions | Subroutine | Update halo cells of state%ub from the current interior solution and BC types (NODAL / finite-difference path). Rank-aware: only edge ranks act. |
| apply_bcs_fdm_2d | boundary_2d | Subroutine | Fill the four halo bands for the NODAL finite-difference (FDM) path. |
| apply_bcs_fvm_1d | boundary_conditions | Subroutine | Update ghost cells of state%ub for the CELL-CENTERED finite-volume path. |
| apply_halos_2d | boundary_2d | Subroutine | Fill all four halo bands per cfg % bc_* edge type. |
| apply_initial_condition | initial_conditions | Subroutine | Fill |
| apply_initial_condition_2d | initial_conditions_2d | Subroutine | Fill state % ub over interior cells according to cfg % problem_type. |
| apply_left_bc_into_halo | boundary_conditions | Subroutine | Compute the left-boundary ghost state and broadcast it across the h
halo cells |
| apply_periodic_halos_2d | boundary_2d | Subroutine | Fill all four halo bands by periodic wrap of the opposite interior edge. |
| apply_right_bc_into_halo | boundary_conditions | Subroutine | Compute the right-boundary ghost state and broadcast it across the h
halo cells |
| apply_weno_js_generic | weno_family | Subroutine | Generic Jiang-Shu WENO reconstruction for odd-width schemes. |
| ausm_plus | euler_physics | Subroutine | AUSM+ FDS scheme (AUSM family). |
| axis_split | domain_decomposition_2d | Subroutine | Split one Cartesian axis ( |
| band_lapack_solve | time_integration | Subroutine | Banded linear solver using LAPACK dgbsv. |
| band_lu_solve | time_integration | Subroutine | Banded Gaussian elimination without pivoting. Band storage: AB(ku+1+i-j, j) = A(i,j). On exit x = A^{-1} b. The matrix ab_loc is overwritten with LU factors. |
| bcast_bytes | cortex_run_attached_mod | Subroutine | |
| bdf2_step | time_integration | Subroutine | Advance the solution by one time step using the BDF2 (Gear) scheme. |
| bdf2_step_serial_body | time_integration | Subroutine | Serial Newton + banded-solve body for BDF2 (including the backward-Euler bootstrap path). Operates entirely on state%ub / state%bdf2_ub_prev / state%resid at whatever size state%decomp%n_local says. Does NOT call compute_resid_glob — the wrapper does, from every rank, after restore_local_layout. |
| be_u32_to_i64 | cortex_link | Function | Decode a 4-byte big-endian length prefix as an UNSIGNED 32-bit value widened to int64. Each byte is masked into int64 before the shift/OR, so a wire value with the high bit set (0x80000000.. 0xFFFFFFFF) decodes as a large positive int64 — not a negative int32 (the desync bug). Range: [0, 4294967295]. |
| beuler_step | time_integration | Subroutine | Advance the solution by one time step using backward (implicit) Euler. |
| beuler_step_serial_body | time_integration | Subroutine | Serial (rank-aware-decomp-agnostic) Newton + banded-solve body for backward Euler. Operates entirely on state%ub / state%resid; the caller is responsible for sizing the state correctly. Does NOT call compute_resid_glob — the wrapper does, after restore_local_layout brings every rank back to its local view so the par_sum_real call involves all ranks. |
| build_counts_displs | implicit_gather_scatter | Subroutine | |
| build_field_table | config | Function | Bind the 62-entry field-descriptor table (ABI schema order) to |
| build_field_table_2d | config_2d | Function | Bind the 38-entry field-descriptor table (frozen |
| build_mesh_2d_fdm_curvilinear | mesh_2d | Subroutine | Build a curvilinear-FDM mesh from a single-block Plot3D grid: the Plot3D points are treated as NODES (mesh % nx = ni, mesh % ny = nj, nodes lying ON the boundaries), mesh % uniform = .false., dx/dy = 0 (unused on the curvilinear path), then compute_metrics_fdm_2d fills the nodal metrics. Distinct from build_mesh_2d_global's 'plot3d' branch, which treats the points as CELL CORNERS (nx = ni-1 cells) and builds finite-volume metrics. |
| build_mesh_2d_global | mesh_2d | Subroutine | Build the global (whole-domain) mesh from either a uniform specification or a Plot3D grid file. For 'uniform', nx/ny are read from the caller. For 'plot3d', ni/nj are read from the file and nx/ny are written back (intent(inout)) so the caller knows the derived sizes. Calls compute_metrics_2d at the end and propagates its status — a metric failure (e.g. a folded or zero-area cell) fails the build. |
| build_mesh_2d_local | mesh_2d | Subroutine | Slice the (global) metric arrays of |
| build_mesh_2d_uniform_nodal | mesh_2d | Subroutine | Build a uniform Cartesian NODAL mesh for the finite-difference (FDM) path. Unlike build_mesh_2d_global's 'uniform' branch (which stores CELL counts and derives FV metrics), this stores NODE counts directly: mesh % nx = npx, mesh % ny = npy, with grid points lying ON both boundaries. The spacing is dx = (x_right - x_left) / (npx - 1) (equal to the FV cell size for the same number of cells). The FV metric arrays (vol, s_xi, s_eta, xc, yc) are left UNALLOCATED on purpose — the uniform FDM residual divides by the scalar dx/dy, not by vol — so this builder does NOT call compute_metrics_2d. |
| build_mesh_cellcentered_1d | mesh_1d | Subroutine | Build cell-centered coordinates and widths for the FVM path. |
| build_mesh_cellcentered_global | mesh_1d | Subroutine | Build the replicated GLOBAL cell-centered mesh for a NON-UNIFORM FVM grid. |
| build_mesh_cellcentered_local | mesh_1d | Subroutine | Build this rank's local cell-centered coordinates and widths (FVM path). |
| build_mesh_global | mesh_1d | Subroutine | Build the replicated global mesh; for file grids, derive n_cell/endpoints. |
| build_mesh_local | mesh_1d | Subroutine | Slice the replicated global mesh into this rank's local node arrays. |
| bytes_to_string | protocol_codec | Subroutine | |
| c_cortex_close | cortex_link | Interface | |
| c_cortex_connect_tcp | cortex_link | Interface | |
| c_cortex_recv_all | cortex_link | Interface | |
| c_cortex_send_all | cortex_link | Interface | |
| cart_comm_2d | mpi_cart_2d | Function | Return the Cartesian communicator handle. |
| cart_is_setup | mpi_cart_2d | Function | True once cart_setup_2d / setup_decomp_2d has created the Cartesian comm. |
| cart_rank_2d | mpi_cart_2d | Function | This rank's index within the Cartesian communicator. |
| cart_setup_2d | mpi_cart_2d | Subroutine | Create the Cartesian communicator (dims auto-chosen by MPI_Dims_create) and return this rank's per-rank decomposition. |
| case_base_dir | path_util | Function | The case directory used to anchor a namelist's relative file paths: the
explicit |
| casefolds_on_set | config_schema_2d | Function | Keys whose value read_config_2d stores lowercased (selector-like fields): every kind_choice field in the table, PLUS grid_type and output_format, which are kind_string rather than kind_choice but get the same historical to_lower-on-parse treatment, so the setter must special-case them alongside the choice keys. Table-driven rather than a hand-maintained key list, but yields the identical 12 keys the old list named (10 choice-kind fields + these 2 string-kind fields). |
| central2_reconstruct | central2 | Subroutine | Second-order central reconstruction in physical space. |
| cfd_solver_call_udf | initial_conditions | Interface | |
| cfd_solver_get_pid | initial_conditions | Interface | |
| cfd_solver_host_platform | initial_conditions | Interface | |
| check_plot3d_dims | mesh_2d | Subroutine | Validate a Plot3D header: lower bound (>= 2 nodes per axis) and upper sanity caps (per-axis and total node count). Returns is_ok=.false. with a descriptive message on violation. |
| choice_violation_message | config_engine | Function | Compose the historical choice-violation text for one field. |
| ckpt_filename | checkpoint_io | Function | ' |
| classify_build | run_banner | Subroutine | Classify a compiler_options() string as debug/release/unknown and return the optimization flag actually present. Pure string scan; the last '-O' token wins (compilers honour the last -O). No MPI / no intrinsics. |
| compute_boundary_ghost | boundary_conditions | Subroutine | Compute one boundary ghost-state vector from a boundary cell. Caller decides whether to broadcast the value across all halo cells or to use the per-cell mirror pattern (signalled by @p per_cell_pattern). |
| compute_candidate_reconstructions | weno_family | Subroutine | Evaluate candidate reconstruction polynomials from tabulated coefficients. |
| compute_candidate_smoothness | weno_family | Subroutine | Evaluate candidate Jiang-Shu smoothness indicators from quadratic forms. |
| compute_dt_2d | time_integration_2d | Function | |
| compute_eigensystem | euler_physics | Subroutine | Compute the right eigenvector matrix K and its inverse K^{-1} of the Euler Jacobian at a given state. |
| compute_eigensystem_2d | euler_physics_2d | Subroutine | Right-eigenvector matrix K and its inverse for the flux Jacobian in
direction |
| compute_euler_flux | euler_physics | Subroutine | Compute the Euler flux vector F(Q) for a given conserved state. |
| compute_euler_flux_2d | euler_physics_2d | Subroutine | Compute both directional flux vectors F (x) and G (y) for state Q. |
| compute_full_stencil_smoothness | weno_family | Subroutine | Evaluate a quadratic smoothness form on the full stencil. |
| compute_max_wave_speed | euler_physics | Function | Return the global maximum wave speed max_i(|u_i| + c_i). |
| compute_max_wave_speed_2d | euler_physics_2d | Function | Global maximum signal speed max_{i,j}( max(|u|,|v|) + c ) over interior cells. |
| compute_metrics_2d | mesh_2d | Subroutine | Compute finite-volume metrics from node coordinates already in mesh%x_node / mesh%y_node. Allocates (with stat=) and fills vol(nx,ny), s_xi(2,nx+1,ny), s_eta(2,nx,ny+1), xc(nx,ny), yc(nx,ny). Returns is_ok=.false. and a diagnostic message naming the first (i,j) with non-positive cell area. |
| compute_metrics_fdm_2d | mesh_2d | Subroutine | Compute NODAL transformation metrics for curvilinear FDM from the node coordinates already in mesh%x_node / mesh%y_node (shape (nx, ny), the Plot3D points treated as nodes; unit computational spacing dxi=deta=1). |
| compute_resid | spatial_discretization | Subroutine | Compute the spatial residual R(Q), dispatching on the block's method. |
| compute_resid_2d | spatial_discretization_2d | Subroutine | |
| compute_resid_2d_curvilinear | spatial_discretization_2d | Subroutine | Curvilinear residual: R = -(1/V)[ (Fhat_{i+1}-Fhat_i) + (Ghat_{j+1}-Ghat_j) ] with contravariant face fluxes Fhat = |S_xi| * f_n(qL,qR; n_xi), Ghat = |S_eta| * f_n(qL,qR; n_eta). Reconstruction is identical to the uniform path (uniform computational stencil); geometry enters via s_xi/s_eta/vol. |
| compute_resid_fdm | spatial_discretization | Subroutine | Compute the spatial residual R(Q) = -1/dx * (F_{i+1/2} - F_{i-1/2}). |
| compute_resid_fdm_curv_2d | spatial_discretization_2d | Subroutine | Curvilinear-FDM (FDS) residual on NODAL transformation metrics: R = -(1/J)[ (Fhat_{i+1/2}-Fhat_{i-1/2}) + (Ghat_{j+1/2}-Ghat_{j-1/2}) ] with contravariant face fluxes Fhat = |S_xi| * f_n(qL,qR; n_xi), Ghat = |S_eta| * f_n(qL,qR; n_eta) and S_xi=mesh%sx_xi, S_eta=mesh%sx_eta, J=mesh%jac. Structurally identical to compute_resid_2d_curvilinear (the FVM curvilinear residual); only the metric SOURCE differs — FVM face-area vectors (s_xi/s_eta/vol) become the nodal transformation metrics here. Reconstruction and the contravariant flux machinery are reused verbatim. Freestream/GCL preservation (the Phase 1 gate) relies on the consistent metric evaluation in compute_metrics_fdm_2d: a constant flow telescopes the face fluxes to ~0. |
| compute_resid_fdm_curv_fvs_2d | spatial_discretization_2d | Subroutine | Curvilinear-FDM FLUX-VECTOR-SPLITTING residual on NODAL transformation metrics (the FVS counterpart of compute_resid_fdm_curv_2d): R = -(1/J)[ (Fhat_{i+1/2}-Fhat_{i-1/2}) + (Ghat_{j+1/2}-Ghat_{j-1/2}) ] with the contravariant split-flux reconstruction Fhat_{i+1/2} = recon_L[ Fhat^+ ] + recon_R[ Fhat^- ], mirroring the uniform FVS residual compute_resid_fdm_fvs_2d but with CONTRAVARIANT split fluxes and the 1/J divisor. |
| compute_resid_fdm_fvs_2d | spatial_discretization_2d | Subroutine | FDM + flux-vector-splitting residual (Shu-style conservative finite difference). Per direction: split the physical flux at every node (interior + halo) into F^+/F^-, reconstruct F^+ with the LEFT-biased stencil and F^- with the RIGHT-biased (mirror) stencil, sum the two reconstructions at each face, then take the conservative difference. |
| compute_resid_fvm_1d | spatial_discretization | Subroutine | Compute the cell-centered finite-volume residual R_i = -1/dx_i * (F_{i+1/2} - F_{i-1/2}) on a block of cell averages. |
| compute_resid_glob | time_integration | Subroutine | Accumulate the global L2 norm of the residual into state%resid_glob. |
| compute_resid_glob_2d | solver_runtime_2d | Subroutine | Reduce the global L2 norm of the last-substage residual into
|
| compute_roe_averages | euler_physics | Subroutine | Compute Roe-averaged velocity, enthalpy, and sound speed. |
| conclude_read | checkpoint_io | Function | Shared read epilogue: ONE collective decision point (the only par_lor of
the read path's conclusion); returns the agreed failure flag so callers
write |
| config_2d_get_integer | config_schema_2d | Subroutine | Read one integer-valued field from |
| config_2d_get_logical | config_schema_2d | Subroutine | Read one logical field from |
| config_2d_get_real | config_schema_2d | Subroutine | Read one scalar real-valued field from |
| config_2d_get_real3 | config_schema_2d | Subroutine | config_2d has no real3 parameters: always unknown-key. |
| config_2d_get_string | config_schema_2d | Subroutine | Read one string or choice-token field from |
| config_2d_set_integer | config_schema_2d | Subroutine | Write one integer-valued field in |
| config_2d_set_logical | config_schema_2d | Subroutine | Write one logical field in |
| config_2d_set_real | config_schema_2d | Subroutine | Write one scalar real-valued field in |
| config_2d_set_real3 | config_schema_2d | Subroutine | config_2d has no real3 parameters: always unknown-key. |
| config_2d_set_string | config_schema_2d | Subroutine | Write one string or choice-token field in |
| config_default_integer | config_schema | Subroutine | Read the compiled-in default integer value for a schema key. |
| config_default_logical | config_schema | Subroutine | Read the compiled-in default logical value for a schema key. |
| config_default_real | config_schema | Subroutine | Read the compiled-in default scalar real value for a schema key. |
| config_default_real3 | config_schema | Subroutine | Read the compiled-in default length-3 real vector for a schema key. |
| config_default_string | config_schema | Subroutine | Read the compiled-in default string or choice token for a schema key. |
| config_get_integer | config_schema | Subroutine | Read one integer-valued field from |
| config_get_logical | config_schema | Subroutine | Read one logical field from |
| config_get_real | config_schema | Subroutine | Read one scalar real-valued field from |
| config_get_real3 | config_schema | Subroutine | Read one fixed-length real-3 field from |
| config_get_string | config_schema | Subroutine | Read one string or choice token from |
| config_schema_choice_count | config_schema | Function | Return the number of allowed choices for a choice-valued schema entry. |
| config_schema_count | config_schema | Function | Return the number of published schema entries. |
| config_set_integer | config_schema | Subroutine | Write one integer-valued field in |
| config_set_logical | config_schema | Subroutine | Write one logical field in |
| config_set_real | config_schema | Subroutine | Write one scalar real-valued field in |
| config_set_real3 | config_schema | Subroutine | Write one fixed-length real-3 field in |
| config_set_string | config_schema | Subroutine | Write one string or choice token in |
| cons_flux_1d_unit | mesh_2d | Subroutine | High-order freestream-consistent CONSERVATIVE-FLUX face values of a unit-spacing nodal line g(1..n): hf(1..n+1), where face iface lies between node iface-1 and node iface. The construction guarantees the telescoping identity |
| cons_width | mesh_2d | Function | Stencil width for the high-order conservative-flux metric operator on n nodes: 6 (6th-order) when n>=6, 4 (4th-order) when n>=4, else 2 (the classical central scheme). Even widths keep the interior operator a symmetric central difference, whose conservative flux telescopes cleanly. |
| consume_cli_arg | solver_runtime | Subroutine | Dispatch one parsed CLI token onto the worker-CLI state. |
| copy_choice | config_schema | Subroutine | Copy one 1-based choice-list item into |
| copy_current_solution | solver_runtime | Subroutine | Copy the current solution into primitive-variable arrays. |
| cortex_close_fd | cortex_link | Subroutine | |
| cortex_open | cortex_link | Subroutine | Open a TCP loopback connection to the Cortex server. |
| cortex_recv_frame | cortex_link | Subroutine | Receive a length-prefixed frame. Both header and payload are returned as allocatable byte arrays (caller owns). |
| cortex_run_attached | cortex_run_attached_mod | Subroutine | |
| cortex_send_frame | cortex_link | Subroutine | Send a length-prefixed frame: 4-byte BE header length, header bytes, 4-byte BE payload length, payload bytes. Both length prefixes are always present (payload length is zero when payload is empty; spec §12.2). |
| ctx1d_begin_work | solver_runtime | Subroutine | 1D |
| ctx1d_checkpoint | solver_runtime | Subroutine | 1D |
| ctx1d_finish_work | solver_runtime | Subroutine | 1D |
| ctx1d_log_line | solver_runtime | Subroutine | 1D |
| ctx1d_progress_residual | solver_runtime | Function | 1D |
| ctx1d_raw_dt | solver_runtime | Function | 1D |
| ctx1d_set_dt | solver_runtime | Subroutine | 1D |
| ctx1d_snapshot | solver_runtime | Subroutine | 1D |
| ctx1d_step | solver_runtime | Subroutine | 1D |
| ctx2d_checkpoint | solver_runtime_2d | Subroutine | 2D |
| ctx2d_log_line | solver_runtime_2d | Subroutine | 2D |
| ctx2d_observe | solver_runtime_2d | Subroutine | 2D |
| ctx2d_raw_dt | solver_runtime_2d | Function | 2D |
| ctx2d_set_dt | solver_runtime_2d | Subroutine | 2D |
| ctx2d_step | solver_runtime_2d | Subroutine | 2D |
| curvilinear_sigma | time_integration_2d | Function | Per-cell contravariant spectral radius for the curvilinear CFL limit: (|u.Sxi| + c|Sxi| + |u.Seta| + c|Seta|) / V, with cell-averaged face vectors. |
| decode_advance | protocol_codec | Subroutine | |
| decode_copy_solution | protocol_codec | Subroutine | |
| decode_frame_header | protocol_codec | Subroutine | |
| decode_keyed_request | protocol_codec | Subroutine | Decode the {"args":{"key": |
| decode_load_config_inline | protocol_codec | Subroutine | Decode {"args":{"config":{key1:v1,key2:v2,...}}}. Walks every key, resolves it against =config_schema= via =schema_lookup=, and validates the corresponding value's JSON type. On the first unknown / mistyped entry returns =ok=.false.= with the offending key carried in =message=. Bounds checking is delegated to the caller (the SET dispatch path runs =solver_session_set_*= which re-validates against schema bounds); this decoder only validates type-level shape. |
| decode_load_namelist | protocol_codec | Subroutine | |
| decode_run_to_end | protocol_codec | Subroutine | |
| decode_set_value | protocol_codec | Subroutine | Decode the {"args":{"key":"...","value": |
| decode_write_checkpoint | protocol_codec | Subroutine | |
| decode_write_result | protocol_codec | Subroutine | |
| decompose | domain_decomposition | Function | Compute this rank's decomposition. Pure: no MPI calls, no global state. |
| decompose_2d | domain_decomposition_2d | Function | |
| deriv_1d_unit | mesh_2d | Subroutine | Matching high-order first derivative of a unit-spacing nodal line: the undivided difference of the conservative-flux face values (cons_flux_1d_unit), so dg(i) reproduces the high-order central derivative AND stays bit-consistent with the face metrics built from the same operator (the property that makes freestream telescope to round-off, design spec §5.3). |
| derived_filename | output_format_list | Function | Derive the output filename for |
| destroy_solver_state | solver_state | Subroutine | Nullify procedure pointer components of a solver_state_t instance. |
| directional_flux | euler_physics_2d | Subroutine | Return the directional Euler flux: fx for dir==1, gy for dir==2. |
| dispatch_opcode | cortex_run_attached_mod | Subroutine | |
| drop_slab | solution_gather_2d | Subroutine | Deallocate a frame slab buffer with the mandatory stat check. |
| emit | logger | Subroutine | |
| emit_progress_tick | cortex_run_attached_mod | Subroutine | Tick handler bound on rank 0 only. Encodes a PROGRESS_TICK and writes it to the existing attached-mode socket fd. |
| encode_advance_reply | protocol_codec | Subroutine | |
| encode_copy_solution_reply | protocol_codec | Subroutine | |
| encode_copy_solution_reply_2d | protocol_codec | Subroutine | 2D COPY_SOLUTION reply header: like the 1D encoder but with the grid
shape ( |
| encode_error_push | protocol_codec | Subroutine | Encode a server-pushed ERROR frame (spec §3.2). Rank 0 only.
Always followed by |
| encode_get_integer_reply | protocol_codec | Subroutine | |
| encode_get_logical_reply | protocol_codec | Subroutine | |
| encode_get_point_count_reply | protocol_codec | Subroutine | |
| encode_get_progress_reply | protocol_codec | Subroutine | |
| encode_get_real3_reply | protocol_codec | Subroutine | |
| encode_get_real_reply | protocol_codec | Subroutine | |
| encode_get_string_reply | protocol_codec | Subroutine | |
| encode_hello_push | protocol_codec | Subroutine | |
| encode_initialize_reply | protocol_codec | Subroutine | |
| encode_keyed_failure | cortex_run_attached_mod | Subroutine | Encode a rank-0-only ok=false reply for a config-key read/write. Centralised so the same code shape is used by every SET/GET arm. |
| encode_progress_tick | protocol_codec | Subroutine | Encode a PROGRESS_TICK push frame (spec §3.2). Rank 0 only. |
| encode_push | protocol_codec | Subroutine | |
| encode_reply_error | protocol_codec | Subroutine | |
| encode_reply_ok | protocol_codec | Subroutine | |
| encode_run_to_end_reply | protocol_codec | Subroutine | |
| encode_write_checkpoint_reply | protocol_codec | Subroutine | WRITE_CHECKPOINT reply header: |
| encode_write_result_reply | protocol_codec | Subroutine | |
| eno3_reconstruct | eno3 | Subroutine | Perform classical ENO3 reconstruction on the supplied stencil. |
| ensure_fvs_scratch_2d | spatial_discretization_2d | Subroutine | Allocate (or re-allocate on a dimension change) the FVS split-flux scratch fp_all/fm_all, halo-padded like ub (1-h:nx+h, 1-h:ny+h). Allocated lazily from compute_resid_fdm_fvs_2d so non-FVS paths never pay the memory cost. |
| ensure_resid_scratch_2d | spatial_discretization_2d | Subroutine | Allocate (or re-allocate on a dimension change) the reconstruction scratch arrays shared by the uniform and curvilinear residual paths. Consistent stat= handling: the two paths previously diverged (one omitted stat=). |
| ensure_schema | config_schema | Subroutine | Populate the saved schema table on first use, bound to a saved default
|
| ensure_schema_2d | config_schema_2d | Subroutine | Populate the saved schema table on first use, bound to a saved default
|
| euler_step | time_integration | Subroutine | Advance the solution by one time step using the explicit Euler scheme. |
| euler_step_2d | time_integration_2d | Subroutine | Explicit Euler via the shared kernel (whole-array flat update under the
halo-zero resid invariant — see rk4_step_2d notes). Retired from the
legacy interior-slice form in Q2a: |
| eval_face_sensor | spatial_discretization | Function | Evaluate the hybrid shock sensor for face iface. |
| exchange_halos | halo_exchange | Subroutine | Fill state%ub's halo cells from neighbours. |
| exchange_halos_2d | halo_exchange_2d | Subroutine | Fill state%ub halo cells from MPI neighbours in both x and y directions. |
| ext_for_format | output_format_list | Function | Canonical file extension for a format token. |
| extract_primitives | euler_physics | Subroutine | Extract primitive variables (rho, u, p) from a conserved state vector. |
| face_flux_2d | euler_riemann_2d | Subroutine | |
| face_flux_2d_normal | euler_riemann_2d | Subroutine | Face flux through an arbitrary UNIT normal nrm=(nx,ny). Rotates the conserved momentum into the face frame, reuses the axis solver (dir=1), then rotates the momentum flux back to (x,y). nrm must be a unit vector. |
| field_index | config_engine | Function | 1-based index of |
| field_meta | config_engine | Function | Metadata-only constructor. Callers associate the matching pointer component afterwards (build_field_table binds them to a target config). |
| fields_get_integer | config_engine | Function | Typed by-name read. .false. on unknown key OR kind mismatch; the caller composes its historical error text (they differ between 1D and 2D). |
| fields_get_logical | config_engine | Function | |
| fields_get_real | config_engine | Function | |
| fields_get_real3 | config_engine | Function | |
| fields_get_string | config_engine | Function | Strings and choices are both readable as strings (historical behavior). |
| fields_set_integer | config_engine | Function | |
| fields_set_logical | config_engine | Function | |
| fields_set_real | config_engine | Function | |
| fields_set_real3 | config_engine | Function | |
| fields_set_string | config_engine | Function | |
| fill_stencil | spatial_discretization | Subroutine | Fill a reconstruction stencil from a halo'd field. |
| fill_x_edge | boundary_2d | Subroutine | Fill a left (is_min=.true.) or right x-edge band over rows j=1..ny. |
| fill_x_edge_fdm | boundary_2d | Subroutine | Fill a left (is_min=.true.) or right x-edge band over rows j=1..ny, NODAL. |
| fill_y_edge | boundary_2d | Subroutine | Fill a bottom (is_min=.true.) or top y-edge band over columns i=1..nx. |
| fill_y_edge_fdm | boundary_2d | Subroutine | Fill a bottom (is_min=.true.) or top y-edge band over columns i=1..nx, NODAL. |
| finalize_runtime | solver_runtime | Subroutine | Write the final solution to the output file and print the performance table. |
| find_config_schema_entry | config_schema | Function | Find a schema entry by key and return its 1-based index. |
| find_config_schema_entry_2d | config_schema_2d | Function | Find a 2D schema entry by key; 0 when absent. |
| finish | solver_session | Subroutine | Store the last writable-operation error and mirror it to optional outputs. |
| finish_readonly | solver_session | Subroutine | Mirror readonly-operation status without mutating the session state. |
| format_run_banner | run_banner | Function | Assemble the single ASCII banner line. Pure; ASCII separators only so it
renders correctly on Windows consoles as well.
|
| frame_slab_extents | solution_gather_2d | Subroutine | Slab geometry of one rank's owned piece of the GLOBAL boundary-ghost
frame (the four width-h bands outside the global interior, corners
included). Ownership is disjoint and exhaustive: the left/right bands
cover global rows 1..ny_g only; the bottom/top bands span the FULL
padded width 1-h..nx_g+h and therefore own the four corners. A rank
owns a band segment iff its tile touches that global edge; a
bottom/top-edge rank's segment extends into the corner columns iff it
is also a left/right-edge rank ( |
| fvs_vacuum_guard_2d | spatial_discretization_2d | Subroutine | Vacuum/positivity guard for the FVS split-flux precompute. The FVS split routines evaluate sqrt(gam*p/rho); a non-positive density or pressure would produce NaN that then propagates silently through the reconstructed face fluxes and the residual. Detect it here and fail clearly instead. Mirrors the 1D FVS guard in spatial_discretization.f90 (block-guarded check + parallel_fatal). Operands are guarded with nested ifs because Fortran .and. does not short-circuit (rho is a divisor in p). |
| gather_and_write_2d | solution_gather_2d | Subroutine | Gather all per-rank tiles to rank 0 and write the global field as ASCII. |
| gather_boundary_ghosts_to_root | solution_gather_2d | Subroutine | Gather the GLOBAL boundary-ghost frame to cart rank 0: the four width-h
ghost bands outside the global interior, corners included — every ghost
cell of every rank that is NOT an interior MPI-halo cell. The 2D twin of
1D's |
| gather_edge_ghosts_to_root | solution_gather | Subroutine | Gather the boundary halo/ghost cells owned by the global left- and
right-edge ranks to rank 0: |
| gather_field_to_root | implicit_gather_scatter | Subroutine | Gather (neq, n_local) slices from every rank into (neq, n_global)
on rank 0 via MPI_Gatherv. On non-root ranks |
| gather_solution_to_root | solution_gather | Subroutine | Gather (neq, n_local) primitives from every rank into (neq, n_global) on rank 0 via MPI_Gatherv. |
| gather_solution_to_root_2d | solution_gather_2d | Subroutine | Gather all per-rank tiles to rank 0, assembling the full global solution field. |
| get_config_schema_choice | config_schema | Subroutine | Copy one allowed string token from a schema entry's choice list. |
| get_config_schema_entry | config_schema | Subroutine | Copy one schema entry by its 1-based index. |
| get_host_platform | initial_conditions | Function | Return the host platform detected by the C portability shim. |
| get_q_at_face | spatial_discretization | Function | Return Q at grid cell idx, reading directly from the halo'd state%ub. |
| get_windows_temp_dir | initial_conditions | Function | Return the preferred runtime-UDF output directory on Windows. |
| global_point_count_2d | solver_runtime_2d | Function | Whole-domain point count (FVM cells / FDM nodes), identical on all ranks. |
| grid_fingerprint | checkpoint | Function | Coordinate fingerprint of the global node grid: (sum x, sum x^2). Cheap, sensitive to the node distribution, and bit-reproducible because the grid is rebuilt deterministically from the same grid_file. |
| grid_fingerprint_2d | checkpoint_2d | Function | Rank-independent geometric fingerprint of the grid: (sum, sum-of-squares) of cell-centre coordinates. For curvilinear grids it reduces over local cells (each cell owned once); for uniform grids it is a deterministic scalar combo identical on every rank. |
| handle_copy_solution | cortex_run_attached_mod | Subroutine | Service a COPY_SOLUTION request. |
| handle_copy_solution_2d | cortex_run_attached_mod | Subroutine | 2D COPY_SOLUTION: session packs one i-fastest float64 block per requested primitive (x,y,rho,u,v,p) into a flat buffer; rank 0 transfers it to the binary payload and emits the nx/ny-bearing reply header. Collective. |
| handle_version_flag | version_info | Subroutine | Shared |
| hll_flux | euler_physics | Subroutine | HLL approximate Riemann solver. |
| hllc_flux | euler_physics | Subroutine | HLLC approximate Riemann solver with contact-wave restoration. |
| hllc_flux_2d | euler_riemann_2d | Subroutine | |
| hook_noop | run_step_engine | Subroutine | Default no-op hook body for the overridable bindings. |
| hook_zero | run_step_engine | Function | Default zero-residual hook body for |
| ic_config3 | initial_conditions_2d | Subroutine | Lax-Liu Config 3 four-quadrant Riemann problem (split at the domain centre). |
| ic_freestream | initial_conditions_2d | Subroutine | Uniform free-stream from the config reference state (rho_inf,u_inf,v_inf,p_inf). Used to initialise supersonic inflow cases (e.g. the compression ramp). |
| ic_from_file | initial_conditions | Subroutine | Load the initial condition from a data file containing columns: x rho u p. |
| ic_isentropic_vortex | initial_conditions_2d | Subroutine | Classic isentropic vortex (Shu 1998). Mean flow rho=1,p=1,u=v=1; strength beta=5; centred at the domain midpoint. Exact, smooth, periodic. |
| ic_sedov | initial_conditions_2d | Subroutine | Sedov-Taylor blast: ambient rho=1,p=1e-5; total energy E=1 deposited as high pressure in cells within r0 = 3.5*dx of the domain centre (cylindrical). |
| ic_toro_explosion | initial_conditions_2d | Subroutine | Toro 2D explosion: circle R=0.4 at the domain centre; inside rho=1,p=1; outside rho=0.125,p=0.1; u=v=0. |
| ic_udf | initial_conditions | Subroutine | Compile a user-defined Fortran source file to a shared library at runtime
and call its |
| ic_uniform | initial_conditions_2d | Subroutine | Constant state rho=1, u=0, v=0, p=1. |
| init_flux_scheme | euler_physics | Subroutine | Bind the flux dispatch pointers in @p state to the requested scheme. |
| init_from_config | solver_state | Subroutine | Populate a solver_state_t from a config_t. |
| init_from_config_2d | solver_state_2d | Subroutine | Build mesh from config and derive grid scalars. |
| init_recon_scheme | reconstruction | Subroutine | Bind the reconstruction procedure pointers and stencil metadata in @p state to the requested scheme, then resolve state%use_char_proj. |
| init_recon_scheme_2d | schemes_2d | Subroutine | Bind the reconstruction procedure pointer and stencil metadata in @p state to the requested scheme (taken from state%cfg%recon_scheme). |
| init_run_context_2d | solver_runtime_2d | Subroutine | Bring a 2D run context to ready-to-step state. |
| init_time_scheme | time_integration | Subroutine | Bind the procedure pointer @p step to the requested scheme. |
| initialize_runtime | solver_runtime | Subroutine | Populate |
| invert_4x4 | euler_physics_2d | Subroutine | Inverse of a 4x4 matrix via LAPACK LU (dgetrf) + inversion (dgetri). |
| is_absolute_path | path_util | Function | True if |
| is_decomp_2d_feasible | domain_decomposition_2d | Function | |
| is_decomp_feasible | domain_decomposition | Function | Return .true. iff this rank's n_local is large enough to accommodate the halo (and, for periodic grids, the wrap send's one-cell offset). |
| is_fds_flux_scheme | option_registry | Function | |
| is_frame_len_valid | cortex_link | Function | A decoded frame length is acceptable iff it is non-negative and within the =MAX_FRAME_BYTES= cap. (Non-negativity is structurally guaranteed by =be_u32_to_i64=, but kept explicit so the predicate is correct for any int64 caller.) |
| is_send_frame_valid | cortex_link | Function | Check that a send-side frame field (header or payload) can be represented by the u32 wire length prefix. Deliberately NOT symmetric with =is_frame_len_valid=: the 64 MiB inbound cap guards against an untrusted peer's request sizes, while outbound frames are sized by the worker itself and legitimately carry bulk COPY_SOLUTION replies far beyond 64 MiB (audit 2026-07-06 N1). |
| is_valid_boundary_condition | option_registry | Function | |
| is_valid_char_proj_mode | option_registry | Function | |
| is_valid_flux_scheme | option_registry | Function | |
| is_valid_hybrid_sensor | option_registry | Function | |
| is_valid_limiter | option_registry | Function | |
| is_valid_method | option_registry | Function | |
| is_valid_nrbc_mode | option_registry | Function | |
| is_valid_problem_type | option_registry | Function | |
| is_valid_recon_scheme | option_registry | Function | |
| is_valid_time_scheme | option_registry | Function | |
| itoa | protocol_codec | Function | |
| jac_store_col | time_integration | Subroutine | Store one Jacobian column into band storage AB(diag_row_loc+i-j, j) = J(i,j). Works for both the custom (diag_row_loc = ku+1) and LAPACK (diag_row_loc = kl+ku+1) storage layouts. |
| join_path | initial_conditions | Function | Join a directory and leaf name with a platform-appropriate separator. |
| join_token_list | option_registry | Function | |
| kernel_euler | stepper_kernels | Subroutine | Explicit Euler: Q^{n+1} = Q^n + dt R(Q^n). |
| kernel_rk4 | stepper_kernels | Subroutine | Classic RK4 (not SSP). s1 holds Q^n; s2 accumulates the weighted stages. |
| kernel_ssprk22 | stepper_kernels | Subroutine | SSPRK(2,2) (Shu & Osher 1988). 1D-verbatim stage expressions. |
| kernel_ssprk54 | stepper_kernels | Subroutine | SSPRK(5,4) — Spiteri & Ruuth (2002), SIAM J. Numer. Anal. 40(2), 469-491, Shu-Osher form. Coefficients independently cross-checked against NodePy (ketch/nodepy, runge_kutta_method.py, RK['SSP54']/'SSPRK54', fetched 2026-07-08): converting this routine's Shu-Osher coefficients to Butcher (A, b) form reproduces every one of NodePy's 30-digit A/b entries to 8-12 significant digits, consistent with NodePy's own documented note that its table is a higher-precision (30-digit) re-solve of the same Ruuth-Spiteri method whose originally published coefficients (as coded below, ~15 digits) are only accurate to about 10 digits. Five stages, order 4, SSP coefficient c ~= 1.508. Register use: s1 = u0 (stages 2-4), s2 = u2 then the final stage's partial sum, s3 = u3; the final stage's L(u3) piece is accumulated into s2 before stage 4 overwrites resid (avoids a fourth scratch array). HISTORY: before 2026-07 this routine carried an unpublished 3rd-order tableau (initial-commit transcription defect; see the 2026-07-07 retrospective). The observed-order tripwire test guards against any regression. |
| kernel_tvd_rk3 | stepper_kernels | Subroutine | TVD-RK3 (Shu & Osher 1988). 1D-verbatim stage expressions. |
| kind_label | cortex_run_attached_mod | Function | Human-readable label for a |
| lagrange_unit_weights | mesh_2d | Subroutine | Lagrange weights c(1:w) for interpolating/extrapolating a unit-spacing line sampled at local positions 0,1,...,w-1 to the (possibly out-of-range) target offset t. Used to build the ghost values that close the symmetric stencil at domain boundaries. |
| lax_friedrichs_split | euler_physics | Subroutine | Lax-Friedrichs flux splitting. |
| lax_friedrichs_split_2d | euler_physics_2d | Subroutine | Lax-Friedrichs directional splitting: F± = ½(F ± α Q), α = |vel_dir| + c. Guarantees fp + fm == F exactly (same α applied to both halves). |
| lax_friedrichs_split_both | euler_physics | Subroutine | Fused Lax-Friedrichs flux splitting: returns F^+ and F^- in one call. |
| left_right_states_from_namelist | initial_conditions | Subroutine | Convert namelist primitives (rho_left, u_left, p_left / rho_right, ...) to conserved state vectors. |
| lim_koren | muscl | Function | Koren TVD limiter. Third-order accurate for smooth data; preserves monotonicity near discontinuities. |
| lim_mc | muscl | Function | Monotonized Central (MC) TVD limiter. Good balance between dissipation and resolution; recommended for most shock-capturing applications. |
| lim_minmod | muscl | Function | Minmod TVD limiter. Most dissipative of the standard limiters; guaranteed TVD for any CFL within the stability limit. |
| lim_superbee | muscl | Function | Superbee TVD limiter. Least dissipative TVD limiter; may over-sharpen contact discontinuities on smooth problems. |
| lim_van_leer | muscl | Function | van Leer smooth TVD limiter. |
| limit_pos_2d | spatial_discretization_2d | Subroutine | Zhang-Shu positivity limiter for a 2D Euler face state (neq2d=4). Blends the reconstructed face state toward the cell average until density rho >= eps and pressure p >= eps. A no-op in smooth regions. |
| limit_positivity | positivity_limiter | Subroutine | Scale a reconstructed face state toward the cell average to ensure density ρ ≥ ε and pressure p ≥ ε (Zhang-Shu 2010). |
| linear_weno5_reconstruct | linear_weno | Subroutine | 5th-order linear WENO reconstruction on a 5-point stencil. |
| linear_weno7_reconstruct | linear_weno | Subroutine | 7th-order linear WENO reconstruction on a 7-point stencil. |
| log_debug | logger | Subroutine | Emit a DEBUG-level message. |
| log_effective_config | solver_runtime | Subroutine | Log the effective (post-promotion) configuration at startup.
Reads from the authoritative copy |
| log_error | logger | Subroutine | Emit an ERROR-level message. |
| log_finalize | logger | Subroutine | Close the log file and reset file-logging state. |
| log_info | logger | Subroutine | Emit an INFO-level message. |
| log_init | logger | Subroutine | Initialise the logger: set verbosity level and optionally open a log file. |
| log_iteration | solver_runtime | Subroutine | Log one iteration summary line (time, residual, per-iteration and elapsed wall time).
The lightweight |
| log_performance_summary | solver_runtime | Subroutine | Print the wall-clock performance table after the run completes.
Reports total time, I/O time, and the three hot-path timers
( |
| log_run_banner | run_banner | Subroutine | Emit the one-line startup banner via log_info on rank 0.
log_info's private emit already returns early on ranks > 0 (unless
LOG_ALL_RANKS), so no explicit rank guard is needed here.
Optional |
| log_warn | logger | Subroutine | Emit a WARN-level message. |
| lowercase_token | string_utils | Function | Return a left-justified, trimmed, lowercased copy of |
| minmod2 | mp5 | Function | Two-argument minmod function. Returns the value with the smaller magnitude if a and b have the same sign, else 0. |
| minmod4 | mp5 | Function | Four-argument minmod function. Returns 0 if the arguments do not all share the same sign; otherwise returns the value with the smallest magnitude. |
| mp5_reconstruct | mp5 | Subroutine | Perform MP5 reconstruction on the supplied stencil. |
| mpi_proc_null_value | mpi_runtime | Function | Expose MPI_PROC_NULL as a value so callers that don't |
| mpi_runtime_finalize | mpi_runtime | Subroutine | Finalise the MPI library. Idempotent: a second call is a no-op. |
| mpi_runtime_init | mpi_runtime | Subroutine | Initialise the MPI library and cache rank/size. |
| mpi_runtime_is_initialised | mpi_runtime | Function | True after |
| mpi_world | mpi_runtime | Function | Return the world communicator handle. Convenience accessor so call sites never reference MPI_COMM_WORLD directly. Always call this function at the point of use rather than caching the return value, so the call site stays correct once sub-communicators are introduced. |
| muscl_koren_reconstruct | muscl | Subroutine | MUSCL reconstruction with the Koren limiter. |
| muscl_mc_reconstruct | muscl | Subroutine | MUSCL reconstruction with the Monotonized Central (MC) limiter. |
| muscl_minmod_reconstruct | muscl | Subroutine | MUSCL reconstruction with the Minmod limiter. |
| muscl_reconstruct | muscl | Subroutine | Core MUSCL reconstruction kernel (component-wise, left-biased stencil). |
| muscl_superbee_reconstruct | muscl | Subroutine | MUSCL reconstruction with the Superbee limiter. |
| muscl_van_leer_reconstruct | muscl | Subroutine | MUSCL reconstruction with the van Leer smooth limiter. |
| my_rank | mpi_runtime | Function | Local rank in MPI_COMM_WORLD. Aborts if called before init. |
| n_ranks | mpi_runtime | Function | Size of MPI_COMM_WORLD. Aborts if called before init. |
| neumann_gradient_ghost | boundary_conditions | Subroutine | 'neumann_gradient' ghost: prescribed-gradient Neumann BC. |
| nonreflecting_ghost | boundary_conditions | Subroutine | 'nonreflecting' ghost: characteristic (LODI/Thompson) non-reflecting BC. |
| normal_phys_flux | euler_riemann_2d | Subroutine | |
| normalize_fields | config_engine | Subroutine | Lowercase every casefold-flagged string field in place (the table-driven replacement for the 1D normalize_config). |
| normalize_key | config_schema | Function | Normalise a user-provided parameter key to lowercase trimmed form.
Thin wrapper over |
| op_failed | cortex_run_attached_mod | Function | Turn a failed session operation into a proper reply-level error and tell the caller to stop handling the current opcode. Returns .true. on failure. |
| opcode_kind_matches | cortex_run_attached_mod | Function | True when a SET_/GET_ opcode's own wire kind is compatible with the
schema's |
| outflow_ghost | boundary_conditions | Subroutine | 'outflow' ghost: first-order linear extrapolation with a positivity guard. |
| pack_be_u32 | cortex_link | Subroutine | Pack an UNSIGNED 32-bit length prefix from an int64 value in [0, 4294967295]. Takes int64 so a length in (2^31-1, 2^32-1] — legitimate for large COPY_SOLUTION replies — never round-trips through int32 (an out-of-range conversion, processor-dependent). Inverse of =be_u32_to_i64=. |
| pack_field | time_integration | Subroutine | Flatten a (neq x n_pt) field into a length-neq*n_pt 1-D array. Ordering: (eq=1,cell=1), (eq=2,cell=1), ..., (eq=neq,cell=n_pt). |
| par_lor | parallel_reductions | Function | Return the logical OR of a scalar logical across all ranks. |
| par_max_real | parallel_reductions | Function | Return the maximum of a scalar real(wp) across all ranks. |
| par_sum_real | parallel_reductions | Function | Return the sum of a scalar real(wp) across all ranks. |
| parallel_fatal | mpi_runtime | Subroutine | Abort the entire MPI world with a diagnostic message. |
| parse_format_list | output_format_list | Subroutine | Split |
| parse_uri | cortex_link | Subroutine | Parse a "tcp://host:port" URI into host string and integer port. Errors fatally on a malformed URI — bug in the caller. |
| path_dirname | path_util | Function | Directory part of |
| prim_split | euler_riemann_2d | Subroutine | |
| primitives_2d | euler_physics_2d | Subroutine | Extract primitives (rho, u, v, p) from a 2D conserved state. |
| quote_shell_arg | initial_conditions | Function | Wrap a filesystem path for the shell used by execute_command_line. |
| rank_first_global | domain_decomposition | Function | 1-based global index of |
| rank_local_count | domain_decomposition | Function | Single source of truth for the slab/block partition: the number of global
cells owned by |
| read_checkpoint | checkpoint | Subroutine | Read a checkpoint file and restore solver state. |
| read_checkpoint_2d | checkpoint_2d | Subroutine | Read a checkpoint and restore state. Every rank reads the global file read-only, validates magic/version/dim/nx/ny/neq/grid/halo-width, then slices its interior block and its owned piece of the GLOBAL boundary-ghost frame (v6; see the write-side record-block comment). |
| read_ckpt_header | checkpoint_io | Subroutine | Read + validate the unified header against the caller's expectations.
On any failure ok=.false. and err carries ' |
| read_config | config | Subroutine | Read simulation parameters from a namelist file. |
| read_config_2d | config_2d | Subroutine | Read a namelist file into a config_2d_t and validate it. |
| read_dim | config_dim | Subroutine | Read the problem dimension from the &control group of |
| read_grid_record_and_check | checkpoint_io | Subroutine | Read the grid record and compare against the configured grid using the historical 1e-12 relative tolerance. |
| read_node_coords | mesh_1d | Subroutine | Read strictly-increasing node coordinates from a text file. One value per line; blank lines and lines beginning with '#' are ignored. |
| read_plot3d_2d | mesh_2d | Subroutine | Read a single-block 2D Plot3D grid. Header |
| recon_uses_char_proj_by_default | option_registry | Function | |
| reconstruct_with_proj | spatial_discretization | Subroutine | Reconstruct a face flux or state with optional characteristic projection. |
| recv_bytes | cortex_link | Subroutine | |
| recv_slab | solution_gather_2d | Subroutine | Allocate |
| ref_state | boundary_2d | Function | Conserved free-stream reference state from config. |
| reflect_velocity_2d | boundary_2d | Function | Reflect the velocity of a conserved state about unit normal nrm, preserving density and total energy (|v| is unchanged). Inviscid no-penetration wall. The density is floored to eps (matching limit_pos_2d): the halo fill runs BEFORE any residual-side positivity guard can fire, so a transient non-positive boundary-adjacent state (near-vacuum off a strong expansion) must not divide-by-zero / SIGFPE here (audit 2026-07-06 N2); the residual guards still abort cleanly on the interior state itself. |
| reject_kind_mismatch | cortex_run_attached_mod | Function | Rank-0-only ok=false |
| release_work_arrays | solver_state | Subroutine | Release all allocatable arrays owned by a solver instance. |
| report_performance_summary | solver_runtime | Subroutine | Print the end-of-run performance table once after a completed run. |
| required_local | domain_decomposition | Function | Minimum interior cell count this rank must hold. A non-periodic rank needs
at least |
| reset_runtime | solver_session | Subroutine | Tear down the live runtime context while keeping editable config state. |
| resolve_case_path | path_util | Function | Resolve a namelist file-valued parameter against a case directory.
Absolute or empty |
| resolve_cli | solver_runtime | Subroutine | Parse the worker's CLI: --cortex-socket=URI plus a positional namelist path. Either may be absent. or empty. |
| resolve_cli_namelist | solver_runtime | Subroutine | Read the namelist filename from the first command-line argument.
Falls back to |
| resolve_latest_pointer | checkpoint_io | Function | If fname names the pointer file, read the real path from it; otherwise return fname unchanged. Detects >512-char truncation explicitly. |
| resolve_time_scheme | time_integration | Subroutine | Resolve a scheme name to a specific stepper procedure pointer. |
| resolve_time_scheme_2d | time_integration_2d | Subroutine | |
| restore_local_layout | time_integration | Subroutine | Restore the per-rank local layout captured by save_local_layout. Releases all work arrays, swaps state%decomp back to the saved local decomp, reallocates work arrays at local size, and copies the saved ub-interior (and bdf2_ub_prev if present) back in. The bdf2_initialized flag is also restored. |
| rhs_1d | time_integration | Subroutine | stepper_kernels rhs callback: recompute the 1D residual (halo exchange + BCs + interior resid happen inside compute_resid). |
| rhs_2d | time_integration_2d | Subroutine | stepper_kernels rhs callback: recompute the 2D residual (halo exchange + BCs + interior resid happen inside compute_resid_2d). |
| rk4_step | time_integration | Subroutine | Advance the solution by one time step using the classic RK4 scheme. |
| rk4_step_2d | time_integration_2d | Subroutine | Classic RK4 via the shared kernel. Whole-array flat update (halos included) — legal under the halo-zero resid invariant; halos are refreshed inside compute_resid_2d before each use. New in R2; no bit-history to preserve. |
| roe_flux | euler_physics | Subroutine | Roe approximate Riemann solver with Harten entropy fix. |
| run_bounded_steps | run_step_engine | Subroutine | Advance ctx by at most max_steps iterations (see module header for the ordering contract). All cadence/exit arithmetic that was duplicated between the per-dim loops lives here and only here. Hooks must not mutate the cfg fields passed as cadence arguments (time_stop, max_iter, checkpoint_freq/print_freq/snapshot_freq are snapshotted at call time and alias the ctx). |
| run_euler_1d | euler_driver | Subroutine | Run a 1D Euler case from |
| run_euler_2d | euler_driver_2d | Subroutine | Run the full 2D Euler solve: read config, init, time-march, gather and write. |
| run_newton | time_integration | Subroutine | Shared Newton + banded-solve inner loop for the implicit steppers. |
| run_solver | solver_runtime | Subroutine | Execute the main time-marching loop until |
| run_solver_steps | solver_runtime | Subroutine | Advance the main time loop by at most |
| run_solver_steps_2d | solver_runtime_2d | Subroutine | Advance the 2D time loop by at most |
| rusanov_flux_2d | euler_riemann_2d | Subroutine | |
| safe_vel | precision | Function | FP-trap-safe velocity = momentum / density for output/diagnostics. |
| save_local_layout | time_integration | Subroutine | Capture the per-rank local layout of state so it can be restored after the implicit gather-solve-scatter window. Saves the decomp, the ub-interior slice, and bdf2_ub_prev if present. |
| scatter_boundary_ghosts_from_root | solution_gather_2d | Subroutine | Inverse of |
| scatter_edge_ghosts_from_root | solution_gather | Subroutine | Inverse of |
| scatter_field_from_root | implicit_gather_scatter | Subroutine | Scatter (neq, n_global) on rank 0 into per-rank (neq, n_local)
slices via MPI_Scatterv. On non-root ranks |
| schema_lookup | protocol_codec | Subroutine | Resolve a wire-protocol key against the configuration schema. |
| schema_lookup_2d | config_schema_2d | Subroutine | Resolve a wire-protocol key against the 2D schema (same shape as
|
| schema_lookup_dim | protocol_codec | Subroutine | Resolve a wire key against the schema for |
| seed_dirichlet_halos | initial_conditions | Subroutine | Fill the boundary halo cells with the prescribed Dirichlet states. |
| send_bytes | cortex_link | Subroutine | |
| send_hello | cortex_run_attached_mod | Subroutine | |
| session_schema_lookup | cortex_run_attached_mod | Subroutine | Resolve a config key against the schema matching the session's dim. dim=1 behaviour is byte-identical to the old direct schema_lookup call. |
| set_farfield_ghost | boundary_2d | Function | Characteristic (Riemann-invariant) far-field ghost state for an OUTWARD unit normal nrm. q_int is the boundary-adjacent interior conserved state, q_inf the free-stream. With interior/free-stream normal velocities Un_i, Un_inf and sound speeds c_i, c_inf: * supersonic in/out (|Un_i| >= c_i) short-circuit to pure free-stream / pure interior extrapolation; * otherwise combine the outgoing (interior) invariant R+ = Un_i + 2 c_i/(gam-1) with the incoming (free-stream) R- = Un_inf - 2 c_inf/(gam-1) to get Un_b = (R+ + R-)/2, c_b = (gam-1)/4 (R+ - R-). Entropy and tangential velocity are taken from the free-stream on inflow (Un_b <= 0) and from the interior on outflow; rho_b, p_b follow from entropy + c_b. gam is passed explicitly (no module-level thermodynamic state here). |
| set_status | config_schema | Subroutine | Fan out a success flag and optional message to caller-provided outputs. |
| set_status_2d | config_schema_2d | Subroutine | Fan out a success flag and message to optional outputs (mirrors 1D). |
| setup_band_storage | time_integration | Subroutine | Compute banded-storage dimensions for the Newton-step Jacobian. |
| setup_decomp_2d | mpi_cart_2d | Subroutine | Build the MPI Cartesian decomposition and store it on the state (MPI runs). |
| solver_build | version_info | Function | Full build identity: the stamped |
| solver_session_advance | solver_session | Subroutine | Advance the runtime by at most |
| solver_session_copy_global_solution | solver_session | Subroutine | Gather the current solution from every rank onto rank 0 and fill the caller-owned global arrays. Collective: must be invoked on every rank with the same call sequence as the MPI worker pool. On non-root ranks the output arrays may be size 0 and are not written. |
| solver_session_copy_global_solution_2d | solver_session | Subroutine | Gather the 2D solution to rank 0 and pack the requested primitive fields
into ONE flat buffer, one nxny block per primitive in request order,
each block i-fastest (x-contiguous) — the pack order of
solution_gather_2d.write_global_field, so these fields match
result_2d.dat columns exactly. |
| solver_session_copy_solution | solver_session | Subroutine | Copy the current primitive-variable solution into caller-owned arrays. |
| solver_session_create | solver_session | Subroutine | Reset a session to its default empty state. |
| solver_session_destroy | solver_session | Subroutine | Tear down any live runtime allocations and clear the last error. |
| solver_session_get_global_grid_shape | solver_session | Subroutine | Global structured-grid shape. dim=2: (nx_global, ny_global); dim=1: (n_pt_global, 1). Feeds the nx/ny fields of the 2D INITIALIZE and COPY_SOLUTION replies (spec §4.2). |
| solver_session_get_global_point_count | solver_session | Subroutine | Return the global grid-point count (= n_cell + 1, identical on every rank). Distinct from solver_session_get_point_count, which returns this rank's local interior point count after domain decomposition. Callers that need to size a whole-domain buffer (e.g. the GUI's plot frame, post-run result reader) want this value. |
| solver_session_get_integer | solver_session | Subroutine | Read an integer configuration field by canonical schema key. |
| solver_session_get_logical | solver_session | Subroutine | Read a logical configuration field by canonical schema key. |
| solver_session_get_point_count | solver_session | Subroutine | Return the current grid-point count expected by solution copy-out buffers. |
| solver_session_get_progress | solver_session | Subroutine | Copy out a lightweight progress snapshot for polling clients. |
| solver_session_get_real | solver_session | Subroutine | Read a scalar real configuration field by canonical schema key. |
| solver_session_get_real3 | solver_session | Subroutine | Read a real-3 configuration field by canonical schema key. |
| solver_session_get_string | solver_session | Subroutine | Read a string or choice-token configuration field by canonical schema key. |
| solver_session_initialize | solver_session | Subroutine | Validate the current configuration and allocate the runtime context. |
| solver_session_last_error | solver_session | Subroutine | Copy the last stored writable-operation error message. |
| solver_session_load_namelist | solver_session | Subroutine | Load configuration from a namelist file into the session. |
| solver_session_prepare_inline | solver_session | Subroutine | Prepare a session to receive a LOAD_CONFIG_INLINE config: discard any live runtime, fix the problem dimension, and record the case directory that anchors relative file paths (inline configs carry no namelist path to derive it from). Must be called BEFORE applying the config entries so the dim-aware SET_* setters target the correct 1D/2D config. Collective-safe: every rank passes the same decoded dim/case_dir. |
| solver_session_resolve_case_paths | solver_session | Subroutine | Resolve relative file-valued parameters (grid_file) in the active config against the session's case directory. The inline path bypasses read_config/read_config_2d, where this resolution otherwise lives, so it is applied here after the inline entries land. Absolute paths and an empty case_dir are left unchanged. |
| solver_session_run_to_end | solver_session | Subroutine | Run the current session until |
| solver_session_set_integer | solver_session | Subroutine | Set an integer configuration field and invalidate any live runtime. |
| solver_session_set_logical | solver_session | Subroutine | Set a logical configuration field and invalidate any live runtime. |
| solver_session_set_real | solver_session | Subroutine | Set a scalar real configuration field and invalidate any live runtime. |
| solver_session_set_real3 | solver_session | Subroutine | Set a real-3 configuration field and invalidate any live runtime. |
| solver_session_set_string | solver_session | Subroutine | Set a string or choice-token configuration field and invalidate any runtime. |
| solver_session_write_checkpoint | solver_session | Subroutine | Force an immediate checkpoint write using the configured or overridden base name. |
| solver_session_write_result | solver_session | Subroutine | Write the current solution in the standard |
| split_contravariant_2d | euler_physics_2d | Subroutine | Contravariant flux-vector splitting along a general metric/area vector
|
| split_flux_2d | euler_physics_2d | Subroutine | Dispatch to one of the three FVS routines by scheme name. dir=1 → x-splitting (uses F, eigenvalues u±c); dir=2 → y-splitting (uses G, v±c). scheme: 'lax_friedrichs' | 'steger_warming' | 'van_leer'. NOT pure: may call steger_warming_split_2d (which calls LAPACK). |
| ssprk22_step | time_integration | Subroutine | Advance the solution by one time step using the SSPRK(2,2) scheme. |
| ssprk22_step_2d | time_integration_2d | Subroutine | SSPRK(2,2) via the shared kernel (see rk4_step_2d notes). Q2a authorized last-bit change: the kernel's 1D-verbatim distributed stage groupings replace the legacy factored groupings (spec 2026-07-10 §5). |
| ssprk54_step | time_integration | Subroutine | Advance the solution by one time step using the SSPRK(5,4) scheme. |
| ssprk54_step_2d | time_integration_2d | Subroutine | SSPRK(5,4) via the shared kernel (see rk4_step_2d notes). |
| steger_warming_split | euler_physics | Subroutine | Steger-Warming flux vector splitting. |
| steger_warming_split_2d | euler_physics_2d | Subroutine | Steger-Warming splitting: F± = R·diag(λ±)·R⁻¹·Q. Exact for the homogeneous Euler flux (F = A·Q); fp+fm == F to machine precision. Eigenvalue order: x → (u-c, u, u, u+c); y → (v-c, v, v, v+c). NOT pure: calls compute_eigensystem_2d which uses LAPACK. |
| steger_warming_split_both | euler_physics | Subroutine | Fused Steger-Warming flux splitting: returns F^+ and F^- in one call. |
| string_to_bytes | protocol_codec | Subroutine | |
| subsonic_inlet_ghost | boundary_conditions | Subroutine | 'subsonic_inlet' ghost: characteristic-based subsonic inflow. |
| subsonic_outlet_ghost | boundary_conditions | Subroutine | 'subsonic_outlet' ghost: characteristic-based subsonic outflow. |
| teardown_run_context_2d | solver_runtime_2d | Subroutine | Release runtime handles and finalise the logger. The state's allocatable
arrays are released by intrinsic assignment when the owner resets the
context ( |
| teardown_runtime | solver_runtime | Subroutine | Release all allocations held by |
| teno5_reconstruct | teno5 | Subroutine | Perform TENO5 reconstruction on the supplied stencil. |
| tick_seconds | run_step_engine | Function | Convert a system_clock delta to seconds. |
| timer_elapsed_running_s | timer | Function | Return elapsed wall time in seconds, including the current running segment. |
| timer_elapsed_s | timer | Function | Return accumulated wall time in seconds. |
| timer_report | timer | Subroutine | Print a one-line performance report to stdout. |
| timer_reset | timer | Subroutine | Reset a timer to the zero state. |
| timer_start | timer | Subroutine | Start (or resume) the timer. |
| timer_stop | timer | Subroutine | Stop the timer and accumulate elapsed counts. |
| to_lower | string_utils | Function | Return a lowercased copy of an ASCII string, preserving length and whitespace. |
| token_in_list | option_registry | Function | |
| tvd_rk3_step | time_integration | Subroutine | Advance the solution by one time step using the TVD-RK3 scheme. |
| tvd_rk3_step_2d | time_integration_2d | Subroutine | TVD-RK3 via the shared kernel (see rk4_step_2d notes). Q2a authorized last-bit change, as ssprk22 above. This is every 2D deck's default integrator, so all 2D golden outputs move at the last bit. |
| unpack_add | time_integration | Subroutine | Add a flattened 1-D correction to a (neq x n_pt) 2-D field in place. |
| update_latest_pointer | checkpoint_io | Subroutine | Write the most-recent checkpoint path to the pointer file (rank 0 only — the caller gates on rank). |
| upwind1_reconstruct | upwind1 | Subroutine | First-order upwind reconstruction. |
| upwind2_reconstruct | upwind2 | Subroutine | Second-order upwind reconstruction. |
| validate_config | config | Subroutine | Validate that all namelist parameters are physically and numerically sensible. |
| validate_config_2d | config_2d | Subroutine | Validate ranges and enumerated selectors. |
| validate_decomp | domain_decomposition | Subroutine | Abort with a clear message if this rank's n_local is too small to hold the halo cells the chosen reconstruction scheme requires. |
| validate_decomp_2d | domain_decomposition_2d | Subroutine | Abort with a clear message if either local tile dimension is too small to
hold the halo cells the chosen reconstruction scheme requires. Mirrors the
1D |
| validate_fields | config_engine | Subroutine | Enforce every unconditional per-field constraint, in table order; first
violation wins. |
| van_leer_split | euler_physics | Subroutine | van Leer flux vector splitting. |
| van_leer_split_2d | euler_physics_2d | Subroutine | van Leer splitting: Mach-split mass flux carrying transverse momentum.
Pressure split: p± = p(M±1)²(2∓M)/4 (subsonic); supersonic branches are
fully upwind (fp==F, fm==0 for M≥1; fp==0, fm==F for M≤-1).
Uses |
| van_leer_split_both | euler_physics | Subroutine | Fused van Leer flux splitting: returns F^+ and F^- in one call. |
| wall_edges_2d | boundary_2d | Subroutine | Report which of the four block edges are PHYSICAL solid (reflecting) walls, for the curvilinear residual's weak pressure-wall flux. Mirrors apply_halos_2d's serial/MPI dual-path edge selection exactly (single source of truth): serial (np=1 or no Cart comm) => all four edges are physical; MPI => an edge is physical only if its Cartesian neighbour is MPI_PROC_NULL. An edge is a wall iff it is physical AND its cfg % bc_* is 'reflecting'. |
| wall_flux_2d_normal | euler_riemann_2d | Subroutine | Inviscid solid-wall (no-penetration) face flux through unit normal nrm.
At a solid wall v.n = 0, so the Euler flux collapses to the pressure term:
F = [ 0, pnx, pny, 0 ],
with p the interior-side pressure and (nx,ny) the boundary-face normal.
Mass and energy flux are EXACTLY zero by construction (a "weak"/pressure
wall), so no spurious mass crosses the wall and no spurious entropy is
generated by an acoustic over-pressure -- unlike a ghost-reflection wall,
whose Riemann star pressure carries an O(rhoc|v_n|) error wherever the
reconstructed interior normal velocity is non-zero (always, on a curved
wall). |
| weno11_js_reconstruct | weno11_js | Subroutine | |
| weno5_js_reconstruct | weno5_js | Subroutine | Perform WENO5-JS reconstruction on the supplied stencil. |
| weno5_smoothness | weno_family | Subroutine | Compute the Jiang-Shu smoothness indicators for a 5-point WENO5 stencil. |
| weno5_substencils | weno_family | Subroutine | Compute the three 3rd-order substencil reconstructions for WENO5. |
| weno5_z_reconstruct | weno5_z | Subroutine | Perform WENO5-Z reconstruction on the supplied stencil. |
| weno7_js_reconstruct | weno7_js | Subroutine | Perform WENO7-JS reconstruction on the supplied stencil. |
| weno9_js_reconstruct | weno9_js | Subroutine | |
| weno_cu6_reconstruct | weno_cu6 | Subroutine | |
| write_checkpoint | checkpoint | Subroutine | Write a checkpoint file for the current solver state. |
| write_checkpoint_2d | checkpoint_2d | Subroutine | Write a checkpoint: gather to root, write the global file on rank 0, agree outcome across ranks, update the latest_checkpoint_2d pointer file. |
| write_ckpt_header | checkpoint_io | Subroutine | Write the unified header (magic/ |
| write_global_field | solution_gather_2d | Subroutine | Write the assembled global field to |
| write_global_field_vtk | solution_gather_2d | Subroutine | Write the assembled global field as legacy-ASCII VTK STRUCTURED_POINTS. Cell-centred: ORIGIN at the first cell centre, SPACING=(dx,dy). Emits SCALARS rho, SCALARS pressure, VECTORS velocity (i fastest, then j). |
| write_grid_record | checkpoint_io | Subroutine | Write the grid record: grid_type token + 2-component fingerprint. |
| write_result_2d | output_2d | Subroutine | Write this rank's interior cells as "x y rho u v p" (6ES24.12E3), i
fastest, with a blank line after each constant-j row (gnuplot/ParaView
structured grid). This is the per-rank/test-only writer; the production
gathered-field writer is |
| write_snapshot | solver_runtime | Subroutine | Write a live snapshot of the current solution to |
| write_solution_file | solver_runtime | Subroutine | Write the current solution to a text file. |
| write_solution_file_2d | solver_runtime_2d | Subroutine | Gather to root and write the standard 6-column |
| write_tecplot_ascii | tecplot_writer | Subroutine | |
| write_tecplot_binary | tecplot_writer | Subroutine | |
| write_tp_string | tecplot_writer | Subroutine | Write a Tecplot binary string: each character as an int32, null-terminated.
Returns |