AmrCompiledHooks Struct ReferenceΒΆ

adc_cpp: pops::AmrCompiledHooks 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::AmrCompiledHooks Struct Reference

Type-erased closures of a compiled AMR block, produced by amr_dsl_block::build_amr_compiled and installed via AmrSystem::set_compiled_block. More...

#include <amr_system.hpp>

+ Collaboration diagram for pops::AmrCompiledHooks:

Public Attributes

std::shared_ptr< void > coupler_holder
 keeps the AmrCouplerMP<Model> alive
 
std::function< void(double)> step
 one macro-step (periodic regrid included)
 
std::function< double()> max_speed
 max wave speed (CFL step)
 
std::function< double()> mass
 coarse mass
 
std::function< int()> n_patches
 number of fine patches
 
std::function< std::vector< double >()> density
 coarse density, n*n row-major
 
std::function< std::vector< double >()> potential
 coarse-level phi, n*n row-major
 
std::function< std::vector< PatchBox >()> patch_boxes
 index-space signatures of the fine patches
 
std::function< double()> source_frequency
 coarse max of mu [1/s] (0 = does not constrain)
 
std::function< double()> stability_dt
 coarse min of the admissible step (0 = does not constrain)
 
std::function< void(int)> set_macro_step
 restores the cadence (regrid) phase of the mono-block
 
std::function< int()> n_levels
 number of levels (>= 1)
 
std::function< int()> n_vars
 conserved components of the block
 
std::function< std::vector< double >(int)> level_state
 full state of level k (c*nf*nf+j*nf+i)
 
std::function< void(int, const std::vector< double > &)> set_level_state
 restores the state of level k
 
std::function< std::vector< double >(int)> level_potential
 phi of level k (nf*nf row-major)
 
std::function< void(int, const std::vector< double > &)> set_level_potential
 restores phi of level k
 
std::function< void(const std::vector< PatchBox > &)> set_hierarchy
 imposes the saved fine patches
 
std::function< int()> coarse_local_boxes
 per-rank owned coarse (level-0) fab count
 
std::function< int()> coarse_total_boxes
 global coarse box count (identical on all ranks)
 
std::function< std::vector< double >(int)> level_state_global
 level k state, gathered
 
std::function< std::vector< double >(int)> level_potential_global
 level k phi, gathered
 

Detailed Description

Type-erased closures of a compiled AMR block, produced by amr_dsl_block::build_amr_compiled and installed via AmrSystem::set_compiled_block.

Symmetric with the std::function hooks of AmrSystem::Impl.

Member Data Documentation

◆ coarse_local_boxes

std::function<int()> pops::AmrCompiledHooks::coarse_local_boxes

per-rank owned coarse (level-0) fab count

◆ coarse_total_boxes

std::function<int()> pops::AmrCompiledHooks::coarse_total_boxes

global coarse box count (identical on all ranks)

◆ coupler_holder

std::shared_ptr<void> pops::AmrCompiledHooks::coupler_holder

keeps the AmrCouplerMP<Model> alive

◆ density

std::function<std::vector<double>()> pops::AmrCompiledHooks::density

coarse density, n*n row-major

◆ level_potential

std::function<std::vector<double>(int)> pops::AmrCompiledHooks::level_potential

phi of level k (nf*nf row-major)

◆ level_potential_global

std::function<std::vector<double>(int)> pops::AmrCompiledHooks::level_potential_global

level k phi, gathered

◆ level_state

std::function<std::vector<double>(int)> pops::AmrCompiledHooks::level_state

full state of level k (c*nf*nf+j*nf+i)

◆ level_state_global

std::function<std::vector<double>(int)> pops::AmrCompiledHooks::level_state_global

level k state, gathered

◆ mass

std::function<double()> pops::AmrCompiledHooks::mass

coarse mass

◆ max_speed

std::function<double()> pops::AmrCompiledHooks::max_speed

max wave speed (CFL step)

◆ n_levels

std::function<int()> pops::AmrCompiledHooks::n_levels

number of levels (>= 1)

◆ n_patches

std::function<int()> pops::AmrCompiledHooks::n_patches

number of fine patches

◆ n_vars

std::function<int()> pops::AmrCompiledHooks::n_vars

conserved components of the block

◆ patch_boxes

std::function<std::vector<PatchBox>()> pops::AmrCompiledHooks::patch_boxes

index-space signatures of the fine patches

◆ potential

std::function<std::vector<double>()> pops::AmrCompiledHooks::potential

coarse-level phi, n*n row-major

◆ set_hierarchy

std::function<void(const std::vector<PatchBox>&)> pops::AmrCompiledHooks::set_hierarchy

imposes the saved fine patches

◆ set_level_potential

std::function<void(int, const std::vector<double>&)> pops::AmrCompiledHooks::set_level_potential

restores phi of level k

◆ set_level_state

std::function<void(int, const std::vector<double>&)> pops::AmrCompiledHooks::set_level_state

restores the state of level k

◆ set_macro_step

std::function<void(int)> pops::AmrCompiledHooks::set_macro_step

restores the cadence (regrid) phase of the mono-block

◆ source_frequency

std::function<double()> pops::AmrCompiledHooks::source_frequency

coarse max of mu [1/s] (0 = does not constrain)

◆ stability_dt

std::function<double()> pops::AmrCompiledHooks::stability_dt

coarse min of the admissible step (0 = does not constrain)

◆ step

std::function<void(double)> pops::AmrCompiledHooks::step

one macro-step (periodic regrid included)


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