ElectrostaticLorentzCondensation Class ReferenceΒΆ

adc_cpp: pops::ElectrostaticLorentzCondensation Class 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::ElectrostaticLorentzCondensation Class Reference

GENERIC builder of the condensed source stage for the electrostatic + Lorentz source (kind="electrostatic_lorentz" on the future Python facade side, PR5). More...

#include <schur_condensation.hpp>

+ Collaboration diagram for pops::ElectrostaticLorentzCondensation:

Public Member Functions

 ElectrostaticLorentzCondensation (const VariableSet &vars, Real alpha, Real theta, Real dt)
 vars: descriptor of the fluid block; MUST expose the roles Density / MomentumX / MomentumY.
 
Real c_coeff () const
 c = theta^2 dt^2 alpha
 
int density_comp () const
 
int momentum_x_comp () const
 
int momentum_y_comp () const
 
void assemble_operator (const MultiFab &state, const MultiFab &bz, const Geometry &geom, const BCRec &bc, MultiFab &eps_x, MultiFab &eps_y, MultiFab &a_xy, MultiFab &a_yx) const
 Assembles ONLY the coefficients of the tensor operator A_op = I + c rho B^{-1} into MultiFab eps_x/eps_y (1 ghost, for the operator face harmonic mean) and a_xy/a_yx (1 ghost, for the face arithmetic mean of the cross fluxes).
 
void assemble_rhs (MultiFab &phi_n, const MultiFab &state, const MultiFab &bz, const Geometry &geom, const BCRec &bc, MultiFab &rhs) const
 Assembles ONLY the condensed right-hand side -Lap phi^n - theta dt alpha div(rho B^{-1} v^n).
 
SchurCondensationOperator assemble (MultiFab &phi_n, const MultiFab &state, const MultiFab &bz, const Geometry &geom, const BCRec &bc) const
 COMPLETE assembly (operator + RHS) into one SchurCondensationOperator object allocated on the layout of state.
 

Detailed Description

GENERIC builder of the condensed source stage for the electrostatic + Lorentz source (kind="electrostatic_lorentz" on the future Python facade side, PR5).

Reads the roles of a fluid block, does NOT solve. This is the "level 1+4 partial" object of docs/SCHUR_CONDENSATION_DESIGN.md restricted to ASSEMBLY (operator + RHS), without the solve nor the velocity reconstruction.

Constructor & Destructor Documentation

◆ ElectrostaticLorentzCondensation()

pops::ElectrostaticLorentzCondensation::ElectrostaticLorentzCondensation ( const VariableSet vars,
Real  alpha,
Real  theta,
Real  dt 
)
inline

vars: descriptor of the fluid block; MUST expose the roles Density / MomentumX / MomentumY.

alpha: coupling constant (electrostatic). theta: implicitness of the theta-scheme (0.5 = Crank-Nicolson). dt: time step of the source stage. The role contract is validated HERE (host, before any kernel): missing roles -> clear exception.

Member Function Documentation

◆ assemble()

SchurCondensationOperator pops::ElectrostaticLorentzCondensation::assemble ( MultiFab phi_n,
const MultiFab state,
const MultiFab bz,
const Geometry geom,
const BCRec bc 
) const
inline

COMPLETE assembly (operator + RHS) into one SchurCondensationOperator object allocated on the layout of state.

Convenience for the PR4 caller; the coefficients carry 1 ghost (operator faces), the RHS 0 ghost. phi_n is modified (ghosts filled).

+ Here is the call graph for this function:

◆ assemble_operator()

void pops::ElectrostaticLorentzCondensation::assemble_operator ( const MultiFab state,
const MultiFab bz,
const Geometry geom,
const BCRec bc,
MultiFab eps_x,
MultiFab eps_y,
MultiFab a_xy,
MultiFab a_yx 
) const
inline

Assembles ONLY the coefficients of the tensor operator A_op = I + c rho B^{-1} into MultiFab eps_x/eps_y (1 ghost, for the operator face harmonic mean) and a_xy/a_yx (1 ghost, for the face arithmetic mean of the cross fluxes).

The ghosts are filled by the BC bc (zero-gradient extrapolation on the physical boundaries, like the existing eps wiring). state: fluid state (reads rho at the center); bz: B_z field at the center (1 ghost minimum recommended; read at (i,j) only here). state/bz/eps_x/... share BoxArray + DistributionMapping (same decomposition). MPI-clean.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ assemble_rhs()

void pops::ElectrostaticLorentzCondensation::assemble_rhs ( MultiFab phi_n,
const MultiFab state,
const MultiFab bz,
const Geometry geom,
const BCRec bc,
MultiFab rhs 
) const
inline

Assembles ONLY the condensed right-hand side -Lap phi^n - theta dt alpha div(rho B^{-1} v^n).

phi_n: current potential phi^n (ghosts filled by the BC bc before the Laplacian); state: fluid state (reads mx, my); bz: B_z field at the center; rhs: output (0 ghost is enough). Internal buffers (Lap phi^n, flux F) allocated on the layout of rhs: transient memory, but the API stays pure-assembly (no persistent state between calls). MPI-clean (local_size() loops).

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ c_coeff()

Real pops::ElectrostaticLorentzCondensation::c_coeff ( ) const
inline

c = theta^2 dt^2 alpha

+ Here is the caller graph for this function:

◆ density_comp()

int pops::ElectrostaticLorentzCondensation::density_comp ( ) const
inline

◆ momentum_x_comp()

int pops::ElectrostaticLorentzCondensation::momentum_x_comp ( ) const
inline

◆ momentum_y_comp()

int pops::ElectrostaticLorentzCondensation::momentum_y_comp ( ) const
inline

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