include/pops/numerics/elliptic/interface/elliptic_solver.hpp File ReferenceΒΆ

adc_cpp: include/pops/numerics/elliptic/interface/elliptic_solver.hpp File 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
elliptic_solver.hpp File Reference

EllipticSolver concept: common contract for elliptic solvers at the MultiFab level (solve D phi = f), so couplers depend on the concept and not on a concrete class. More...

+ Include dependency graph for elliptic_solver.hpp:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  pops
 

Concepts

concept  pops::EllipticSolver
 

Detailed Description

EllipticSolver concept: common contract for elliptic solvers at the MultiFab level (solve D phi = f), so couplers depend on the concept and not on a concrete class.

Layer: include/pops/numerics/elliptic/interface. Role: express the "elliptic solver" dependency through a C++20 concept rather than a hard-coded GeometricMG, which prepares swapping MG for another backend (FFT wrapper, PETSc, Hypre) without touching the coupling logic. Contract: an EllipticSolver exposes rhs() -> MultiFab& (right-hand side f, written before solve), phi() -> MultiFab& (solution read after solve, kept between calls for the warm start), solve() (solves phi from rhs in place), residual() -> Real (residual norm ||D phi - f||), geom() -> const Geometry& (geometry of the solved level).

Invariants:

  • the contract is at the MultiFab level: poisson_fft.hpp (slabs + raw vectors) does NOT model it directly; PoissonFFTSolver/DistributedFFTSolver are what wrap it;
  • phi() is kept between calls (warm start): do NOT assume an implicit reset to zero.