Function reference
MILEVA is a flat-include code, not a package module. include/mileva.jl includes every source file in dependency order (configuration, grid, basic utilities, markers, physics, solvers, the MPI scaffold, I/O, visualization), and main_SphCon.jl defines the time loop on top of it, so all functions live in one namespace. This page lists the public entry points grouped by directory. Signatures are abbreviated: keyword arguments are omitted unless they matter for use. Follow the file paths for the full definitions; most files open with a header comment that explains the method.
using Plots # visualization/plot_panels.jl needs it loaded
include("include/mileva.jl")
include("main_SphCon.jl")Conventions used below: cfg::SimConfig, mat::MaterialProperties and temp::TemperatureConditions are the configuration structs (Parameter reference); grid is a MutableGrid2D or MutableGrid3D from setup_grid; M::Markers is the marker cloud; ETA the cell-centred viscosity, buoy the cell-centred buoyancy, Tg the grid temperature. Most functions dispatch on the grid type, so the same name has a 2-D (Matrix) and a 3-D (Array{Float64,3}) method.
Entry points
| Function / script | Purpose | File |
|---|---|---|
main_SphCon(cfg, mat, temp) | The time loop: grid and markers, then per step viscosity, buoyancy, Stokes (with Picard sweeps when a yield law is active), no-net-rotation projection, marker advection, reseeding, temperature advection and diffusion, melting and composition, diagnostics, output, checkpoints. Returns a NamedTuple of time series (time in Myr, Vrms, Vrms_nd, Nu_top, Nu_bot, Tmean, q_cmb, lid and surface diagnostics) merged with the final state (Tg, Vr, Vt, and in 3-D Vph, yang, Tg_yang). | main_SphCon.jl |
julia --project=. run_mileva.jl [param.jl] | Builds default cfg, mat, temp, includes the parameter file (which assigns to them), validates and calls main_SphCon. | run_mileva.jl |
bin/mileva run / run-mpi / test / docs / version | Shell launcher: serial run, MPI launch, a single test file (default smoke_stokes_3d_mg), docs build. | bin/mileva |
bin/run_mpi.jl <param.jl> | Generic MPI driver around solve_stokes_distributed! for a config-only parameter file. | bin/run_mpi.jl |
The order in which main_SphCon calls the functions listed on this page. Grey boxes run once at start-up; the coloured boxes run every step, grouped into material properties (orange), flow (blue), transport (green), temperature and diagnostics (purple) and output (grey). Optional stages are skipped when their cfg switch is off, and the dashed loop repeats rheology and Stokes until the velocity settles when a yield law is active.
Configuration (config/)
| Function | Purpose | File |
|---|---|---|
SimConfig(; kwargs...) | Simulation configuration (@kwdef); see Parameter reference. | config/SimConfig.jl |
validate!(cfg::SimConfig) | Consistency checks, geometry normalisation, refusal of unimplemented flags (useAMR, useDruckerPrager, useMPI in 2-D), derived constants. | config/SimConfig.jl |
disp_summary(cfg) / disp_summary(mat) / disp_summary(temp) | One-screen printout of each struct. | config/*.jl |
MaterialProperties(; kwargs...), validate!(mat) | Material constants; validate! derives the phase radii. | config/MaterialProperties.jl |
get_layer(mat, r), get_layer_eta0(mat, layer_id) | Layer index of a radius (scalar or array) and its reference viscosity. | config/MaterialProperties.jl |
TemperatureConditions(; kwargs...), validate!(temp) | Boundary temperatures and initial profile. | config/TemperatureConditions.jl |
get_initial_profile(temp, r, R_in, R_out; m = 1) | 1-D initial m = 1 and m = 2. | config/TemperatureConditions.jl |
cmb_temperature(tc, θ, φ = 0), cmb_temperature_field(tc, grid) | Base T_cmb plus any Gaussian T_cmb_patches. | config/TemperatureConditions.jl |
Geometry and grid (utils/geometry.jl, utils/setup_grid.jl)
| Function | Purpose | File |
|---|---|---|
geometry_exponent(cfg) | The exponent "spherical_annulus", 1 for "cylindrical_annulus". Every radial metric factor in the 2-D path is derived from it. | utils/geometry.jl |
shell_measure(r, cfg), radial_flux_weight(rF, cfg) | Shell area per unit angle, | utils/geometry.jl |
cell_measure(rF_lo, rF_hi, dth, cfg) | Exact cell measure from the face radii, | utils/geometry.jl |
geometry_area_ratio(cfg, R_in, R_out), describe_geometry(cfg, R_in, R_out) | Inner/outer boundary area ratio; one-line description for logs. | utils/geometry.jl |
big_output_dir(cfg) | Resolved directory for VTK and checkpoints (cfg.bigOutputDir, MILEVA_BIGOUT, or outputDir). | utils/geometry.jl |
setup_grid(cfg, temp) | Build MutableGrid2D (annulus, Nr × Nt) or MutableGrid3D (Yin patch Nr × Nth × Nph, θ in amrStretchFactor, amrStretchTheta, amrStretchPhi). | utils/setup_grid.jl |
grid_size(g) | (Nr, Nt) or (Nr, Nth, Nph). | utils/setup_grid.jl |
yy_yin_to_yang(θ, φ), yy_yang_to_yin(θ, φ) | Kageyama & Sato (2004) coordinate maps between the two patches. | utils/setup_grid.jl |
Markers (markers/)
| Function | Purpose | File |
|---|---|---|
Markers | Struct-of-arrays marker cloud: position, persistent measure w, temperature, composition (basalt, depletion, continent, pile), grain size, accumulated strain, heat-production field and other per-parcel fields. | markers/init_markers.jl |
init_markers(cfg, grid, temp, mat) | Seed cfg.markersPerCell markers per cell with measure cell_measure and the initial temperature and composition. | markers/init_markers.jl |
advect_markers!(M, Vr, Vt, grid, dt, cfg; Vp = nothing) | RK4 or RK2 (cfg.advectionScheme) advection through the staggered velocity; 3-D passes Vp and handles Yin-Yang ownership. | markers/advect_markers.jl |
MarkerScatterWS(N, nt) | Thread-local scatter workspace; keeps the accumulated marker measure W per node for the conservative hand-back. | markers/markers_to_grid.jl |
markers_to_grid(M, grid, Tfill[, ws]) | Project marker temperature and composition to the grid (cells without markers take Tfill). | markers/markers_to_grid.jl |
interp_grid_to_markers!(M, field, grid, property, mode) | Grid to markers, either overwriting or adding an increment (mode). | markers/interp_grid_to_markers.jl |
delivery_scale(grid, cfg, ws) | Per-node factor cell measure / marker measure, capped at cfg.deliveryScaleMax, that makes the marker hand-back of the diffusion increment conserve energy exactly. | markers/interp_grid_to_markers.jl |
subgrid_temperature_correction!(M, Tg, grid, cfg, dt) | Gerya & Yuen (2003) sub-grid relaxation of marker temperature toward the grid, with exact grid-side compensation over the containing cell. | markers/subgrid_diffusion.jl |
reseed_markers!(M, Tg, dg, Cg, pg, eps_acc_g, grid; N_min, N_max, basalt_g, depletion_g, cfg) | Conservative reseeding: new markers inherit cell-averaged fields; overfull cells are culled with their measure redistributed. | markers/reseed_markers.jl |
subset_markers!(M, idx) | Keep the markers idx in every per-marker array. | markers/init_markers.jl |
Physics (physics/)
| Function | Purpose | File |
|---|---|---|
compute_viscosity(T, grid, cfg, mat) | Simple-path viscosity: layered law MaterialProperties, clamped to [eta_min, eta_max]. The time loop calls it when cfg.useCompositeRheology is false and then applies Frank-Kamenetskii and depletion stiffening if enabled. | physics/compute_viscosity.jl |
composite_rheology(T, P, strainII, r, d, mat, cfg, C = nothing; smooth = true) | Diffusion + dislocation (+ Peierls, GBS) creep combined with the yield viscosity ("min" or "harmonic"), depletion stiffening, layered activation energies, lower-mantle offset. | physics/composite_rheology.jl |
lower_mantle_creep_prefactors(T_iface, P_iface, mat, cfg), lower_mantle_interface_TP(T, P, r, mat, cfg) | Lower-mantle creep prefactors chosen so the viscosity offset is evaluated at the interface. | physics/composite_rheology.jl |
compute_buoyancy(Tg, grid, cfg, mat = nothing, phase_id = nothing, C_comp = nothing) | Buoyancy per cell: thermal (Boussinesq or ALA reference), phase-transition jumps or smooth Clapeyron terms, basalt/eclogite, depletion, crust, piles, sticky air. | physics/compute_buoyancy.jl |
compressibility(T, P, r, mat, cfg), adiabat_temperature(depth, cfg), conductive_baseline_C(grid, cfg; m) | ALA/TALA reference state, adiabatic heating term, conductive baseline used by the Nusselt number. | physics/compressibility.jl |
melt_phase(T, P, r, mat, cfg; T_prev, dt, Vr, Vt) | Melt fraction, phase index, smooth phase fraction and latent heat. | physics/melt_phase.jl |
mantle_pressure(depth, cfg), melt_temperature(T, depth, cfg) | The single pressure model of the melting laws; the temperature compared with the solidus. | physics/melt_phase.jl |
basalt_evolution!(M, T, P, Vr, grid, dt, cfg, mat; time_s) | Melting, extraction, eruption and intrusion with a conservative per-column backlog, depletion, heat pipe. Returns (basalt_grid, depletion_grid, H_magma, ledger, hpe_grid); the fifth value is the projected conserved HPE field that diffuse_temperature reads. | physics/basalt_evolution.jl |
project_marker_field_2d(Fm, M, grid) | Measure-weighted projection of any per-marker field to the 2-D grid. | physics/basalt_evolution.jl |
cmb_heat_flux(Tg, grid, cfg, temp, dt, state_cmb), cmb_conductive_flux(Tg, grid, cfg) | CMB flux from the wall gradient at the face; core cooling in "parameterized" mode. | physics/cmb_heat_flux.jl |
core_heat_capacity(grid, cfg), cmb_area(grid, cfg), cool_core(T_cmb, E_J, grid, cfg, temp) | Core heat capacity and CMB area in the run's own geometry; core temperature update. | physics/cmb_heat_flux.jl |
thermochemical_piles!(M, Tg, r_grid, grid, cfg, mat, dt, state_tc) | Pile seeding and bookkeeping. | physics/thermochemical_piles.jl |
evolve_grain_size!(M, ETA, strainII, grid, dt, cfg, mat) | Marker grain-size evolution. | physics/evolve_grain_size.jl |
viscoelastoplastic(ETA_visc, strainII, tau_old, dt, mat, cfg) | Maxwell visco-elasto-plastic effective viscosity. | physics/viscoelastoplastic.jl |
evolve_damage!(D, strainII, dt, cfg), apply_damage_to_viscosity!(ETA, D, cfg) | Damage accumulation and healing; viscosity weakening. | physics/damage.jl |
antisqueeze(strainII, ETA, Vr, Vt, grid, cfg) | Strain-rate correction where the discrete flow is compressive beyond a threshold. | physics/antisqueeze.jl |
free_surface(h_old, Vr, Vt, grid, cfg, dt, state_fs) | Kinematic surface update with theta stabilisation. | physics/free_surface.jl |
isostasy(h_fs, rho, grid, cfg, dt, state_iso) | Airy or flexural isostatic topography. | physics/isostasy.jl |
compute_surface_diagnostics(M, basalt_grid, Vr, Vt, grid, cfg, dt, time_myr) | Crustal thickness, eruption rate, surface mobility, mean surface age. | physics/surface_diagnostics.jl |
Viscosity helpers (utils/)
| Function | Purpose | File |
|---|---|---|
frank_kamenetskii_viscosity!(ETA, T, cfg, tc) | Linearised or simple Frank-Kamenetskii law (cfg.fkForm); called by the time loop when cfg.useFrankKamenetskii. | utils/fk_viscosity.jl |
arrhenius_viscosity!(ETA, T, cfg) | Arrhenius law about arrhenius_T_ref (3-D arrays). Not called by main_SphCon; for custom drivers. | utils/arrhenius_viscosity.jl |
apply_660km_jump!(ETA, grid, cfg) | Lower-mantle viscosity factor on a simple-path viscosity. Not called by main_SphCon (the composite rheology applies the offset itself); for custom drivers. | utils/viscosity_jumps.jl |
apply_sticky_air!(ETA, field, grid, cfg), sticky_air_mask(grid, cfg) | Sticky-air overrides. | utils/sticky_air.jl |
apply_drucker_prager!(ETA, strainII, grid, cfg) | Regularised Drucker-Prager yield. Not called by the time loop; cfg.useDruckerPrager is refused by validate!. | utils/drucker_prager.jl |
radiogenic_H(cfg, time_myr) | Four-element radiogenic heating rate. | utils/radiogenic.jl |
smooth2d(F; passes = 1) | Periodic smoothing filter for 2-D fields. | utils/smooth2d.jl |
2-D Stokes (solvers/)
The 2-D unknowns are
| Function | Purpose | File |
|---|---|---|
assemble_stokes(grid, ETA, buoy, cfg; point_pin = false) | Assemble the scaled saddle-point system (L, rhs, meta). With cfg.useDeviatoricStress the viscous block is the factored point_pin = true pins one pressure cell instead of the mean. | solvers/stokes_assembly.jl |
unpack_stokes(sol, meta, Nr, Nt, rC, rF, dr, dth) | Solution vector to (Vr, Vt, P) in physical units. | solvers/stokes_assembly.jl |
solve_stokes_v2(grid, ETA, buoy, cfg; lu_cache_tol) | UMFPACK direct solve with factor caching (solverType = "direct"). | solvers/solve_stokes_v2.jl |
solve_stokes_mumps(grid, ETA, buoy, cfg; lu_cache_tol) | MUMPS multifrontal direct solve with factor caching and optional stale-factor GMRES (solverType = "mumps", the 2-D production choice). lu_reuse_stats() reports reuse counts. | solvers/solve_stokes_mumps.jl |
solve_stokes_amg(grid, ETA, buoy, cfg) | Krylov iterative solve that falls back to the direct solve whenever cfg.krylovTol is not met (solverType = "amg"). | solvers/solve_stokes_amg.jl |
multigrid_stokes(grid::MutableGrid2D, ETA, buoy, cfg; max_levels, num_vcycles, nu1, nu2, omega, tol) | Geometric V-cycle with a 5-DOF SCGS smoother, Galerkin coarse operators and point pin (solverType = "multigrid"). | solvers/multigrid_stokes.jl |
3-D Stokes and Yin-Yang (solvers/, utils/yy_*.jl)
| Function | Purpose | File |
|---|---|---|
assemble_stokes_3d(grid, ETA, buoy, cfg; bc_Vth_jmin, bc_Vth_jmax, ..., rhs_only) | Finite-volume assembly of one Yin-Yang patch. Accepts Schwarz Dirichlet values on the θ- and φ-walls; rhs_only = true rebuilds only the right-hand side for a new set of wall values. | solvers/stokes_assembly_3d.jl |
unpack_stokes_3d(sol, meta, grid) | Solution to (Vr, Vth, Vph, P, divMax). | solvers/stokes_assembly_3d.jl |
verify_g_minus_bt(L, meta) | Returns (rel_err, G, B) with rel_err | solvers/stokes_assembly_3d.jl |
multigrid_stokes(grid::MutableGrid3D, ETA, buoy, cfg; max_levels, tol, max_iter, n_schwarz = 5, buoy_yang) | Serial 3-D solve: FGMRES preconditioned by a geometric V-cycle (SCGS smoother, Galerkin coarse operators, matrix-dependent pressure prolongation) on each patch, inside an additive Yin-Yang Schwarz iteration. With mgLevels = 1 it falls back to a direct LU of the patch operator, which is not usable beyond small grids. Returns (Vr, Vth, Vph, P, divMax, info) with the Yang solution in info.yang. | solvers/multigrid_stokes.jl |
yy_rotation_yin_to_yang(θ, φ), yy_rotation_yang_to_yin(θ, φ) | Tangent-vector rotation between patches (Kageyama & Sato 2004, Eqs. 22-23). | utils/yy_interp.jl |
yy_compute_th_bcs(direction, Vr, Vth, Vph, grid; full), yy_compute_ph_bcs(direction, Vr, Vth, Vph, grid) | Wall values for one patch sampled from the peer's interior (bilinear, angular offset of 30° to stay clear of the peer's own wall). | utils/yy_interp.jl |
yy_interp_velocity(direction, Vr, Vθ, Vφ, θ_grid, φ_grid, i_r, θ_t, φ_t) | Interpolate and rotate the peer velocity to one point. | utils/yy_interp.jl |
yy_compute_T_wall_bcs(peer_T, grid), yy_sync_T_walls!(Tg_yin, Tg_yang, grid), yy_init_scalar_yang(Tg_yin, grid) | Temperature coupling between patches. | utils/yy_interp.jl |
yy_redundant_mask(grid; n_halo), yy_compute_redundant_values(...), yy_sync_T_redundant!(...) | Minimum-overlap (useMinOverlapGrid) support: redundant-cell mask and peer values. | utils/yy_interp.jl |
YYBufferTheta(Nr, Nph; δ), YYBufferPhi(Nr, Nth; δ), yy_fill_theta_buffer!, yy_fill_phi_buffer! | Overlap-buffer storage for δ_yy > 0 (experimental). | utils/yy_buffer.jl |
estimate_dofs(cfg; n_ranks_per_patch, ram_per_rank_gb), estimate_dofs_raw(Nr, Nth, Nph; ...), sweep_resolution(Nr_range, Nth_range; ...) | Degrees of freedom and memory per rank for a 3-D configuration, with a recommended solver mode. | utils/dof_estimator.jl |
Temperature (solvers/diffuse_temperature.jl, utils/advect_temperature.jl)
| Function | Purpose | File |
|---|---|---|
diffuse_temperature(Tg, grid, cfg, dt; temp, Cg, H_latent, time_myr) | Conservative radial and lateral conduction (flux difference with the geometry's face weights), explicit or theta-implicit, wall Dirichlet values held at the faces through a half-cell ghost, radiogenic, internal and latent sources. The 3-D method also takes Yin-Yang wall values bc_T_jmin, bc_T_jmax. internal_power_last() returns the internal power of the last call, which the energy budget uses. | solvers/diffuse_temperature.jl |
advect_temperature_2d(T, Vr, Vt, grid, cfg, dt, T_cmb, T_surf) | Grid advection in 2-D, dispatching on cfg.tempAdvectionScheme to advect_temperature_2d_upwind! or advect_temperature_2d_tvd!. | utils/advect_temperature.jl |
advect_temperature_3d_upwind!(...), advect_temperature_3d_tvd!(...) | 3-D upwind and van Leer TVD advection in advective form with the spherical metric factors. | utils/advect_temperature.jl |
interp_velocity(r, th, Vr, Vt, grid), interp_velocity_3d(r, th, ph, Vr, Vt, Vp, grid) | Staggered velocity at arbitrary points. | utils/interp_velocity.jl |
compute_timestep(Vr, Vt, grid, cfg, dt_prev) | CFL step, growth limited to 15 % per step, clamped to [dtMin, dtMax]; cfl_floor_hits() counts how often the floor overrode CFL. | utils/compute_timestep.jl |
Diagnostics (utils/compute_diagnostics.jl, utils/diagnostics_csv.jl, utils/compute_strain_rate.jl)
| Function | Purpose | File |
|---|---|---|
compute_diagnostics(Tg, Vr, Vt, ETA, grid, cfg) | utils/compute_diagnostics.jl | |
compute_strain_rate(Vr, Vt, grid, cfg) | Strain-rate tensor components and | utils/compute_strain_rate.jl |
cell_areas(grid, cfg), cell_volumes(grid), surface_measure(grid, cfg) | Measures for weighted integrals. | utils/compute_diagnostics.jl |
lid_mobility_diagnostics(Vr, Vt, grid, cfg), lid_rotation_rate(Vt, grid) | Surface velocity and lid mobility in the no-net-lithospheric-rotation frame. | utils/compute_diagnostics.jl |
thermal_lid_thickness_km(Tg, grid; T_lid = 1300) | Depth of the interpolated isotherm crossing. | utils/compute_diagnostics.jl |
compute_crust_thickness(basalt, grid; ...), crust_mass_equivalent(basalt, grid; ...) | Threshold-based crust depth and its mass-equivalent thickness. | utils/compute_diagnostics.jl |
field_inventory(C, grid, cfg), inventory_to_km(I, grid, cfg), depth_band_mean(C, grid, cfg, d_lo, d_hi) | Measure-weighted inventories and band averages. | utils/compute_diagnostics.jl |
marker_mass_measure(M, grid, cfg) | Marker mass as a measure at cfg.rho0, M.w .* rho_ref ./ rho0 (M.w under Boussinesq); the weight of the melt ledger, melt deposition and the CSV inventories. | physics/compressibility.jl |
detect_resurfacing_event(vrms_now, hist_vrms; mobility, ...), group_resurfacing_episodes(flags, t_myr; gap_myr) | Resurfacing flag (requires a velocity spike and surface mobility) and grouping of contiguous flags into episodes. | utils/compute_diagnostics.jl |
open_diagnostics_csv(path; resume_step), diagnostics_row(...), write_diagnostics_row!(io, row) | The in-loop diagnostics.csv, including the energy budget (E_th_J, dEdt_W, P_supplied_W, budget_resid) and core ledger. | utils/diagnostics_csv.jl |
boundary_power(Tg, grid, cfg) | Wall powers with the diffusion solver's own theta weighting, accumulated every step for budget_resid. | utils/diagnostics_csv.jl |
MeltLedger, accumulate_ledger!(L, step_ledger) | Cumulative melt bookkeeping (produced, erupted, intruded, backlog). | utils/diagnostics_csv.jl |
Output and restart (utils/, visualization/)
| Function | Purpose | File |
|---|---|---|
save_vtu(filename, grid, fields) / save_vtu(filename, grid3d, fields; fields_yang) | Structured VTK output; in 3-D writes Yin and Yang as separate blocks. | utils/save_vtu.jl |
write_pvd_file(filename, vtu_files, times_myr) | ParaView time collection. | utils/write_pvd_file.jl |
save_checkpoint(filename, grid, M, state, cfg, mat; kwargs...), load_checkpoint(filename), markers_from_checkpoint(obj, grid) | JLD2 checkpoint and restart (cfg.resumeFrom). | utils/save_checkpoint.jl, utils/load_checkpoint.jl |
save_snapshot(Tg, ETA, Vr, Vt, grid, cfg, step, time_myr, out_dir; ...) | 2-D figure snapshot with time-series panels. | utils/save_snapshot.jl |
plot_panels(grid, Tg, ETA, Vr, Vt, strainII, diss, step, time_myr, cfg; ...) | Six-panel 2-D figure (temperature, viscosity, velocity, strain rate, dissipation, optional composition). | visualization/plot_panels.jl |
MPI (parallel/, solvers/distributed_*.jl)
These are 3-D only and are reached through bin/run_mpi.jl or a driver that calls solve_stokes_distributed!; the serial time loop in main_SphCon does not use them.
| Function | Purpose | File |
|---|---|---|
mpi_init!(cfg), RankInfo, is_serial(ri) | Rank layout: Yin/Yang split and mpiNr × mpiNt × mpiNp per patch. | parallel/mpi_init.jl |
LocalGrid3D(parent, ri; halo = 1), allocate_local_cell_array, fill_from_global!, gather_to_global, scatter_from_global! | Rank-local subgrid with halo and the gather/scatter primitives. | parallel/local_grid.jl |
halo_exchange_3d!(F, lg, ri) | Six-face halo exchange. | parallel/halo_3d.jl |
yy_sync_T_walls_mpi!(T_local, grid, ri) | Yin-Yang temperature wall coupling across the two patch ranks. | parallel/yinyang_mpi.jl |
distributed_advect_temperature_upwind!(...), distributed_diffuse_temperature_explicit!(...) | Halo-aware temperature transport. | parallel/distributed_temperature.jl |
solve_stokes_distributed!(lg, ETA_local, buoy_local, cfg, ri; mode = :auto, ...) | Single entry point for distributed Stokes. :auto picks serial (1 rank), multigrid_stokes_mpi! (2 ranks), MUMPS distributed (Nr ≤ 64) or FGMRES with block Jacobi (larger). Explicit modes :phase_a, :direct, :b4p, :iter, :rich. | solvers/solve_stokes_distributed.jl |
multigrid_stokes_mpi!(grid, ETA_local, buoy_local, cfg, ri; n_schwarz) | Two-rank Yin/Yang Schwarz with one patch per rank. | solvers/multigrid_stokes_mpi.jl |
distributed_stokes_phaseb!, distributed_stokes_mumps!, distributed_stokes_phasebpp!, distributed_stokes_phasebppp!, distributed_stokes_phaseb4p! | Successive distributed direct tiers: gather to the patch leader; MUMPS distributed factorisation; distributed matrix input; row-filtered assembly; fully distributed assembly (assemble_stokes_3d_local). | parallel/distributed_stokes_phaseb.jl, solvers/distributed_stokes_*.jl |
distributed_stokes_fgmres!(...), distributed_stokes_iterative!(...) | Distributed FGMRES and damped Richardson with block-Jacobi preconditioning. | solvers/distributed_stokes_fgmres.jl, solvers/distributed_stokes_iterative.jl |
assemble_stokes_3d_local(grid, ETA_loc, buoy_loc, cfg, lg, ri; ...) | Owned-rows assembly; must stay a structural mirror of assemble_stokes_3d (tests/test_assembly_3d_mirror.jl). | solvers/stokes_assembly_3d_local.jl |
all_reduce_max(x, ri), all_reduce_sum(x, ri) | Scalar reductions. | parallel/mpi_comm.jl |
halo_exchange!, yinyang_exchange!, schwarz_iterate_mpi! | Stubs that throw on the multi-rank branch and name the function to use instead. | parallel/mpi_comm.jl, parallel/yinyang_mpi.jl |
Refinement prototype
solvers/amr/ (indicators.jl, refine.jl, coarsen.jl, hanging_nodes.jl) is an indicator prototype for dynamic refinement. include/mileva.jl does not include it and validate! refuses cfg.useAMR = true. It is exercised only by tests/test_amr_indicators.jl and tests/test_amr_full.jl.
Related pages: Parameter reference, Benchmarks and verification.