PolarPoissonSolver Class ReferenceΒΆ

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

#include <polar_poisson_solver.hpp>

+ Collaboration diagram for pops::PolarPoissonSolver:

Public Member Functions

 PolarPoissonSolver (const PolarGeometry &geom, const BoxArray &ba, const BCRec &bc=BCRec{})
 
MultiFabrhs ()
 
MultiFabphi ()
 
const PolarGeometrygeom () const
 
void solve ()
 Solves (1/r) d_r(r d_r phi) + (1/r^2) d_theta^2 phi = rhs in place, by FFT-in-theta then a tridiagonal solve (Thomas) per azimuthal mode.
 
Real residual ()
 Discrete residual ||L_h phi - rhs|| (inf norm), reduced over the ranks.
 

Constructor & Destructor Documentation

◆ PolarPoissonSolver()

pops::PolarPoissonSolver::PolarPoissonSolver ( const PolarGeometry geom,
const BoxArray ba,
const BCRec bc = BCRec{} 
)
inline
Parameters
geomannulus (r, theta), domain.nx() = nr radial cells, ny() = ntheta azimuthal.
baBoxArray with ONE box covering the whole annulus (single-rank).
bcradial BC: xlo/xhi (Dirichlet -> xlo_val/xhi_val; Foextrap -> homogeneous Neumann). theta (ylo/yhi) is treated as PERIODIC regardless of the value (FFT).

Member Function Documentation

◆ geom()

const PolarGeometry & pops::PolarPoissonSolver::geom ( ) const
inline

◆ phi()

MultiFab & pops::PolarPoissonSolver::phi ( )
inline

◆ residual()

Real pops::PolarPoissonSolver::residual ( )
inline

Discrete residual ||L_h phi - rhs|| (inf norm), reduced over the ranks.

L_h is the EXACT operator that solve() inverts: FFT in theta (mode m, spectral eigenvalue -k(m)^2/r^2) + conservative order-2 radial stencil, folded radial BC (Dirichlet: constant value = m=0 part; Neumann: homogeneous reflection). We evaluate it MODE BY MODE in Fourier space (where the theta diagonalization is exact), so the residual reflects ONLY the quality of the solve (and not the spectral gap vs finite differences of a physical theta stencil). For this DIRECT solver, ~round-off. The m=0 double-Neumann mode is EXCLUDED (its row 0 is pinned = gauge: trivial identity equation).

+ Here is the call graph for this function:

◆ rhs()

MultiFab & pops::PolarPoissonSolver::rhs ( )
inline

◆ solve()

void pops::PolarPoissonSolver::solve ( )
inline

Solves (1/r) d_r(r d_r phi) + (1/r^2) d_theta^2 phi = rhs in place, by FFT-in-theta then a tridiagonal solve (Thomas) per azimuthal mode.

phi() holds the solution after the call.

+ Here is the call graph for this function:

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