2-level COMPOSITE FAC Poisson solver (scalar).
More...
#include <composite_fac_poisson.hpp>
|
| | CompositeFacPoisson (const Geometry &geom_c, const BoxArray &ba_c, const BCRec &bc, const Box2D &fine_box, int ratio=2) |
| | MONO-PATCH CTOR (Phase 1): DELEGATES to the multi-patch ctor with a fine BoxArray of a single box, so BIT-IDENTICAL to the old path.
|
| |
| | CompositeFacPoisson (const Geometry &geom_c, const BoxArray &ba_c, const BCRec &bc, const BoxArray &fine_boxes, int ratio=2) |
| | MULTI-PATCH CTOR (Phase 4a).
|
| |
| MultiFab & | rhs_coarse () |
| | coarse right-hand side f_c (div(eps grad phi_c) = f_c)
|
| |
| MultiFab & | rhs_fine () |
| | fine right-hand side f_f (div(eps grad phi_f) = f_f)
|
| |
| MultiFab & | phi_coarse () |
| |
| MultiFab & | phi_fine () |
| |
| MultiFab & | eps_coarse () |
| | VARIABLE permittivity eps (at cell centers) PER LEVEL.
|
| |
| MultiFab & | eps_fine () |
| |
| void | use_variable_coefficient (bool v) |
| |
| MultiFab & | a_xy_coarse () |
| | Cross terms a_xy / a_yx (at cell centers) PER LEVEL: FULL tensor A = diag(eps,eps) + [[0,a_xy],[a_yx,0]].
|
| |
| MultiFab & | a_yx_coarse () |
| |
| MultiFab & | a_xy_fine () |
| |
| MultiFab & | a_yx_fine () |
| |
| void | use_cross_terms (bool v) |
| |
| const Box2D & | patch_coarse () const |
| | Coarse footprint of the FIRST fine patch (mono-patch compat). Multi-patch: see patch_coarse(g).
|
| |
| const Box2D & | patch_coarse (int g) const |
| | Coarse footprint of fine patch g (0 <= g < n_fine_patches()).
|
| |
| int | n_fine_patches () const |
| | Number of fine patches (size of the fine BoxArray).
|
| |
| void | set_verbose (bool v) |
| |
| void | set_two_way (bool v) |
| | true: iterate the FAC two-way coupling (C-F flux correction + coarse correction).
|
| |
| Real | solve (int max_iters=30, int fine_sweeps=400, Real tol=1e-9) |
| | Solves the composite system.
|
| |
| Real | last_residual () const |
| |
2-level COMPOSITE FAC Poisson solver (scalar).
Built on the coarse layout (replicated mono-box)
- the fine patch (mono-box). The caller provides f_c (coarse) and f_f (fine); the solver returns phi_c (coarse, covered = average_down of the fine) and phi_f (fine).
◆ CompositeFacPoisson() [1/2]
| pops::CompositeFacPoisson::CompositeFacPoisson |
( |
const Geometry & |
geom_c, |
|
|
const BoxArray & |
ba_c, |
|
|
const BCRec & |
bc, |
|
|
const Box2D & |
fine_box, |
|
|
int |
ratio = 2 |
|
) |
| |
|
inline |
MONO-PATCH CTOR (Phase 1): DELEGATES to the multi-patch ctor with a fine BoxArray of a single box, so BIT-IDENTICAL to the old path.
Kept for existing callers (AmrCouplerMP Option-A composite, mono-patch MMS tests). geom_c: coarse geometry (whole domain). ba_c: coarse BoxArray (mono-box covering the domain). bc: domain BC (Dirichlet for this milestone). fine_box: box of the fine patch (FINE index space, ratio 2, strictly interior). ratio: 2.
◆ CompositeFacPoisson() [2/2]
| pops::CompositeFacPoisson::CompositeFacPoisson |
( |
const Geometry & |
geom_c, |
|
|
const BoxArray & |
ba_c, |
|
|
const BCRec & |
bc, |
|
|
const BoxArray & |
fine_boxes, |
|
|
int |
ratio = 2 |
|
) |
| |
|
inline |
MULTI-PATCH CTOR (Phase 4a).
fine_boxes: tiling of the fine level (1..N disjoint patches, FINE index space, ratio 2, strictly interior, aligned lo even / hi odd, SEPARATED by at least one coarse cell). The coarse stays replicated mono-box (single-rank). N == 1 -> mono-patch path.
◆ a_xy_coarse()
| MultiFab & pops::CompositeFacPoisson::a_xy_coarse |
( |
| ) |
|
|
inline |
Cross terms a_xy / a_yx (at cell centers) PER LEVEL: FULL tensor A = diag(eps,eps) + [[0,a_xy],[a_yx,0]].
This is the condensed Schur operator at B_z != 0 (a_xy = c rho w/det, a_yx = -a_xy, w = theta dt B_z) – antisymmetric, NON self-adjoint. Small for the Schur step (c = theta^2 dt^2 alpha) -> convergent SOR/V-cycle (EXPLICIT cross terms). Not enabled -> diagonal block only (Phase 3a/1), bit-identical. Requires use_variable_coefficient(true) (the diagonal block).
◆ a_xy_fine()
| MultiFab & pops::CompositeFacPoisson::a_xy_fine |
( |
| ) |
|
|
inline |
◆ a_yx_coarse()
| MultiFab & pops::CompositeFacPoisson::a_yx_coarse |
( |
| ) |
|
|
inline |
◆ a_yx_fine()
| MultiFab & pops::CompositeFacPoisson::a_yx_fine |
( |
| ) |
|
|
inline |
◆ eps_coarse()
| MultiFab & pops::CompositeFacPoisson::eps_coarse |
( |
| ) |
|
|
inline |
VARIABLE permittivity eps (at cell centers) PER LEVEL.
Fill + use_variable_coefficient(true) to go from Lap phi = f to div(eps grad phi) = f – the condensed Schur operator at B_z = 0 (eps = 1 + theta^2 dt^2 alpha rho). eps unfilled / not enabled -> scalar (Phase 1), bit-identical.
◆ eps_fine()
| MultiFab & pops::CompositeFacPoisson::eps_fine |
( |
| ) |
|
|
inline |
◆ last_residual()
| Real pops::CompositeFacPoisson::last_residual |
( |
| ) |
const |
|
inline |
◆ n_fine_patches()
| int pops::CompositeFacPoisson::n_fine_patches |
( |
| ) |
const |
|
inline |
Number of fine patches (size of the fine BoxArray).
◆ patch_coarse() [1/2]
| const Box2D & pops::CompositeFacPoisson::patch_coarse |
( |
| ) |
const |
|
inline |
Coarse footprint of the FIRST fine patch (mono-patch compat). Multi-patch: see patch_coarse(g).
◆ patch_coarse() [2/2]
| const Box2D & pops::CompositeFacPoisson::patch_coarse |
( |
int |
g | ) |
const |
|
inline |
◆ phi_coarse()
| MultiFab & pops::CompositeFacPoisson::phi_coarse |
( |
| ) |
|
|
inline |
◆ phi_fine()
| MultiFab & pops::CompositeFacPoisson::phi_fine |
( |
| ) |
|
|
inline |
◆ rhs_coarse()
| MultiFab & pops::CompositeFacPoisson::rhs_coarse |
( |
| ) |
|
|
inline |
coarse right-hand side f_c (div(eps grad phi_c) = f_c)
◆ rhs_fine()
| MultiFab & pops::CompositeFacPoisson::rhs_fine |
( |
| ) |
|
|
inline |
fine right-hand side f_f (div(eps grad phi_f) = f_f)
◆ set_two_way()
| void pops::CompositeFacPoisson::set_two_way |
( |
bool |
v | ) |
|
|
inline |
true: iterate the FAC two-way coupling (C-F flux correction + coarse correction).
false: ONE-WAY path (coarse solve + fine solve with bilinear C-F ghosts) – the patch refines locally.
◆ set_verbose()
| void pops::CompositeFacPoisson::set_verbose |
( |
bool |
v | ) |
|
|
inline |
◆ solve()
| Real pops::CompositeFacPoisson::solve |
( |
int |
max_iters = 30, |
|
|
int |
fine_sweeps = 400, |
|
|
Real |
tol = 1e-9 |
|
) |
| |
|
inline |
Solves the composite system.
- Returns
- the final max composite residual.
max_iters FAC iterations (two-way); fine_sweeps SOR sweeps per fine solve; tol tolerance.
◆ use_cross_terms()
| void pops::CompositeFacPoisson::use_cross_terms |
( |
bool |
v | ) |
|
|
inline |
◆ use_variable_coefficient()
| void pops::CompositeFacPoisson::use_variable_coefficient |
( |
bool |
v | ) |
|
|
inline |
The documentation for this class was generated from the following file: