AmrBuildParams Struct ReferenceΒΆ

adc_cpp: pops::AmrBuildParams Struct Reference
adc_cpp 0.3.0
Model-free C++23 core for coupled hyperbolic-elliptic systems on adaptive (AMR) meshes, with MPI and GPU (Kokkos) backends
pops::AmrBuildParams Struct Reference

Frozen parameters passed to the deferred build of the compiled path (add_compiled_model). More...

#include <amr_system.hpp>

+ Collaboration diagram for pops::AmrBuildParams:

Public Attributes

int n = 128
 
double L = 1.0
 
int regrid_every = 20
 
double gamma = 1.4
 
int substeps = 1
 
bool recon_prim = false
 recon == "primitive" (frozen by add_compiled_model)
 
bool imex = false
 time == "imex": stiff implicit source (backward_euler)
 
double refine_threshold = 1e30
 1e30 => no refinement
 
BCRec poisson_bc
 coarse Poisson BC (resolved by set_poisson)
 
std::function< bool(Real, Real)> wall
 conductive wall predicate (empty = none)
 
bool has_density = false
 
std::vector< double > density
 initial coarse density (component 0), n*n
 
bool distribute_coarse = false
 distributed multi-box coarse (AMR strong-scaling)
 
int coarse_max_grid = 0
 tile size of the distributed coarse (0 => n/2)
 
bool has_state = false
 
std::vector< double > state
 ncomp*n*n, component-major c*n*n + j*n + i; ncomp == Model::n_vars
 
bool schur = false
 true: GLOBAL condensed source stage (instead of local explicit/imex)
 
double schur_theta = 0.5
 theta-scheme of the condensed stage (0.5 = Crank-Nicolson)
 
double schur_alpha = 1.0
 electrostatic coupling constant of the condensed stage
 
bool schur_strang
 true: Strang splitting H(dt/2) S(dt) H(dt/2); false: Lie H(dt) S(dt)
 
std::vector< double > bz_field
 coarse B_z(x,y) field, n*n row-major (required by the condensed stage)
 
std::map< int, std::vector< double > > named_aux
 Model-NAMED aux fields (ADC-291): component (>= kAuxNamedBase) -> coarse base-level field (n*n row-major).
 
std::map< int, AuxHaloPolicynamed_aux_bc
 Per-field aux HALO policies (ADC-369): component -> uniform boundary policy, seeded onto the engine at build (single-block coupler + multi-block runtime), applied after the shared aux fill.
 
double schur_krylov_tol = 0.0
 tolerance of the coarse Krylov solve (<= 0 = default 1e-10)
 
int schur_krylov_max_iters = 0
 iteration budget (<= 0 = default 400)
 
std::string schur_density
 
std::string schur_momentum_x
 
std::string schur_momentum_y
 
std::string schur_energy
 
NewtonOptions newton_options {}
 
int time_method = 0
 
double pos_floor = 0.0
 

Detailed Description

Frozen parameters passed to the deferred build of the compiled path (add_compiled_model).

Materialized by AmrSystem at ensure_built time: the geometry + the refine/poisson/density choices known at that moment. The amr_dsl_block header consumes them to instantiate AmrCouplerMP<Model>.

Member Data Documentation

◆ bz_field

std::vector<double> pops::AmrBuildParams::bz_field

coarse B_z(x,y) field, n*n row-major (required by the condensed stage)

◆ coarse_max_grid

int pops::AmrBuildParams::coarse_max_grid = 0

tile size of the distributed coarse (0 => n/2)

◆ density

std::vector<double> pops::AmrBuildParams::density

initial coarse density (component 0), n*n

◆ distribute_coarse

bool pops::AmrBuildParams::distribute_coarse = false

distributed multi-box coarse (AMR strong-scaling)

◆ gamma

double pops::AmrBuildParams::gamma = 1.4

◆ has_density

bool pops::AmrBuildParams::has_density = false

◆ has_state

bool pops::AmrBuildParams::has_state = false

◆ imex

bool pops::AmrBuildParams::imex = false

time == "imex": stiff implicit source (backward_euler)

◆ L

double pops::AmrBuildParams::L = 1.0

◆ n

int pops::AmrBuildParams::n = 128

◆ named_aux

std::map<int, std::vector<double> > pops::AmrBuildParams::named_aux

Model-NAMED aux fields (ADC-291): component (>= kAuxNamedBase) -> coarse base-level field (n*n row-major).

Seeded onto the coupler's shared aux at build (build_amr_compiled), like bz_field; the coupler re-applies them each update so they persist across regrid. Empty -> bit-identical.

◆ named_aux_bc

std::map<int, AuxHaloPolicy> pops::AmrBuildParams::named_aux_bc

Per-field aux HALO policies (ADC-369): component -> uniform boundary policy, seeded onto the engine at build (single-block coupler + multi-block runtime), applied after the shared aux fill.

Empty -> bit-identical.

◆ newton_options

NewtonOptions pops::AmrBuildParams::newton_options {}

◆ poisson_bc

BCRec pops::AmrBuildParams::poisson_bc

coarse Poisson BC (resolved by set_poisson)

◆ pos_floor

double pops::AmrBuildParams::pos_floor = 0.0

◆ recon_prim

bool pops::AmrBuildParams::recon_prim = false

recon == "primitive" (frozen by add_compiled_model)

◆ refine_threshold

double pops::AmrBuildParams::refine_threshold = 1e30

1e30 => no refinement

◆ regrid_every

int pops::AmrBuildParams::regrid_every = 20

◆ schur

bool pops::AmrBuildParams::schur = false

true: GLOBAL condensed source stage (instead of local explicit/imex)

◆ schur_alpha

double pops::AmrBuildParams::schur_alpha = 1.0

electrostatic coupling constant of the condensed stage

◆ schur_density

std::string pops::AmrBuildParams::schur_density

◆ schur_energy

std::string pops::AmrBuildParams::schur_energy

◆ schur_krylov_max_iters

int pops::AmrBuildParams::schur_krylov_max_iters = 0

iteration budget (<= 0 = default 400)

◆ schur_krylov_tol

double pops::AmrBuildParams::schur_krylov_tol = 0.0

tolerance of the coarse Krylov solve (<= 0 = default 1e-10)

◆ schur_momentum_x

std::string pops::AmrBuildParams::schur_momentum_x

◆ schur_momentum_y

std::string pops::AmrBuildParams::schur_momentum_y

◆ schur_strang

bool pops::AmrBuildParams::schur_strang
Initial value:
=
false

true: Strang splitting H(dt/2) S(dt) H(dt/2); false: Lie H(dt) S(dt)

◆ schur_theta

double pops::AmrBuildParams::schur_theta = 0.5

theta-scheme of the condensed stage (0.5 = Crank-Nicolson)

◆ state

std::vector<double> pops::AmrBuildParams::state

ncomp*n*n, component-major c*n*n + j*n + i; ncomp == Model::n_vars

◆ substeps

int pops::AmrBuildParams::substeps = 1

◆ time_method

int pops::AmrBuildParams::time_method = 0

◆ wall

std::function<bool(Real, Real)> pops::AmrBuildParams::wall

conductive wall predicate (empty = none)


The documentation for this struct was generated from the following file: