PolarTensorKrylovSolver Class ReferenceΒΆ

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

MATRIX-FREE BiCGStab Krylov solver for the FULL-tensor POLAR elliptic operator L_int(phi) = div(A grad phi), A = [[a_rr, a_rt], [a_tr, a_tt]] possibly NON symmetric. More...

#include <polar_tensor_operator.hpp>

+ Collaboration diagram for pops::PolarTensorKrylovSolver:

Public Member Functions

 PolarTensorKrylovSolver (const PolarGeometry &geom, const BoxArray &ba, const BCRec &bc, PolarPrecond precond=PolarPrecond::RadialLine)
 
 PolarTensorKrylovSolver (const PolarTensorKrylovSolver &)=delete
 
PolarTensorKrylovSolveroperator= (const PolarTensorKrylovSolver &)=delete
 
 PolarTensorKrylovSolver (PolarTensorKrylovSolver &&)=delete
 
PolarTensorKrylovSolveroperator= (PolarTensorKrylovSolver &&)=delete
 
MultiFabrhs ()
 
MultiFabphi ()
 
const PolarGeometrygeom () const
 
void set_coefficients (MultiFab *a_rr, MultiFab *a_tt, MultiFab *a_rt=nullptr, MultiFab *a_tr=nullptr)
 Sets the tensor A coefficients.
 
Real residual ()
 Current GLOBAL L2 residual ||rhs - L_int(phi)|| (collective). Prepares once if needed.
 
void solve ()
 
PolarKrylovResult solve (Real rel_tol, int max_iters)
 MATRIX-FREE BiCGStab preconditioned by precond_ (RadialLine by default, Jacobi as fallback); fixes the gauge (project_mean) when pin_gauge_ (singular pure Neumann/periodic case).
 

Detailed Description

MATRIX-FREE BiCGStab Krylov solver for the FULL-tensor POLAR elliptic operator L_int(phi) = div(A grad phi), A = [[a_rr, a_rt], [a_tr, a_tt]] possibly NON symmetric.

SIMPLE preconditioner (diagonal Jacobi or RadialLine = radial Thomas per theta line). NO MG V-cycle (stagnation on polar 1/r^2, cf. header and PolarPrecond).

LIFE CYCLE: built on a PolarGeometry + BoxArray + BCRec (radial). In multi-rank MPI, the BoxArray must be split in THETA ONLY (each box covers the full radial range) for the RadialLine preconditioner (cf. scope + check_radial_columns); the Jacobi fallback has no such constraint. rhs()/phi() are the solve fields (warm start on phi()). set_coefficients(...) sets the tensor (pointers to coefficient fields at the CENTER, ghosts filled by the caller before solve). In the isotropic case, call without a_rt/a_tr and provide a_rr/a_tt = fields at 1 (fill_one helper).

Constructor & Destructor Documentation

◆ PolarTensorKrylovSolver() [1/3]

pops::PolarTensorKrylovSolver::PolarTensorKrylovSolver ( const PolarGeometry geom,
const BoxArray ba,
const BCRec bc,
PolarPrecond  precond = PolarPrecond::RadialLine 
)
inline
Parameters
geomring (r, theta);
baBoxArray (single box or THETA splitting in MPI/multi-box);
bcradial BC (xlo/xhi), theta periodic.
precondsimple preconditioner (RadialLine by default; Jacobi as fallback/sanity check).
+ Here is the call graph for this function:

◆ PolarTensorKrylovSolver() [2/3]

pops::PolarTensorKrylovSolver::PolarTensorKrylovSolver ( const PolarTensorKrylovSolver )
delete

◆ PolarTensorKrylovSolver() [3/3]

pops::PolarTensorKrylovSolver::PolarTensorKrylovSolver ( PolarTensorKrylovSolver &&  )
delete

Member Function Documentation

◆ geom()

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

◆ operator=() [1/2]

PolarTensorKrylovSolver & pops::PolarTensorKrylovSolver::operator= ( const PolarTensorKrylovSolver )
delete

◆ operator=() [2/2]

PolarTensorKrylovSolver & pops::PolarTensorKrylovSolver::operator= ( PolarTensorKrylovSolver &&  )
delete

◆ phi()

MultiFab & pops::PolarTensorKrylovSolver::phi ( )
inline
+ Here is the caller graph for this function:

◆ residual()

Real pops::PolarTensorKrylovSolver::residual ( )
inline

Current GLOBAL L2 residual ||rhs - L_int(phi)|| (collective). Prepares once if needed.

+ Here is the call graph for this function:

◆ rhs()

MultiFab & pops::PolarTensorKrylovSolver::rhs ( )
inline
+ Here is the caller graph for this function:

◆ set_coefficients()

void pops::PolarTensorKrylovSolver::set_coefficients ( MultiFab a_rr,
MultiFab a_tt,
MultiFab a_rt = nullptr,
MultiFab a_tr = nullptr 
)
inline

Sets the tensor A coefficients.

a_rr/a_tt at the CENTER (internal default = 1 if not called); a_rt/a_tr cross terms (nullptr -> absent). The ghosts of the provided fields are filled HERE (coeff_bc: theta periodic preserved, radial Foextrap). The caller keeps ownership of the fields (pointers).

+ Here is the caller graph for this function:

◆ solve() [1/2]

void pops::PolarTensorKrylovSolver::solve ( )
inline
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ solve() [2/2]

PolarKrylovResult pops::PolarTensorKrylovSolver::solve ( Real  rel_tol,
int  max_iters 
)
inline

MATRIX-FREE BiCGStab preconditioned by precond_ (RadialLine by default, Jacobi as fallback); fixes the gauge (project_mean) when pin_gauge_ (singular pure Neumann/periodic case).

phi() = unknown (warm start), rhs() = right-hand side. Returns iterations + relative residual + convergence.

+ Here is the call graph for this function:

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