|
core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
|
Geometric multigrid for AmrPoisson over a uniformly-coarsened octree hierarchy. More...
#include <poisson.hpp>
Public Types | |
| using | Octree = BlockOctree< Dim, Bits > |
| using | M = typename Octree::M |
| using | Code = typename Octree::Code |
Public Member Functions | |
| void | build (const Octree &finest, Real h0) |
| Build the hierarchy from a finest octree by uniform coarsening until a single leaf remains (or no full sibling group can be merged). | |
| std::size_t | numLevels () const |
| const AmrPoisson< Dim, Bits > & | op (std::size_t L=0) const |
| void | setPeriodic (bool p) |
| Apply a boundary condition to every level (periodic default, or non-periodic homogeneous Dirichlet). | |
| void | setImmersedWall (bool w) |
| Enable the immersed no-slip (Dirichlet) wall on every level — the velocity operator. | |
| void | vcycle (std::size_t L, std::vector< double > &u, const std::vector< double > &rhs, int pre=2, int post=2) |
| One V-cycle on level L solving L u = rhs (correction scheme). | |
| double | solveQuad (std::vector< double > &u, const std::vector< double > &rhs, int outer=30, int cyclesPerOuter=1) |
| Solve the quadratic C/F operator L_quad u = rhs by deferred correction: the standard-operator V-cycle solves L_std u = rhs - (L_quad - L_std) u, with the cheap-to-evaluate quadratic correction lagged. | |
| template<class OpenFn > | |
| void | setOpenness (OpenFn &&openFn) |
| Set cut-cell face openness on the finest level from a geometry callable openFn(faceCentreWorld, axis) -> [0,1], then coarsen it to every coarser level by area-averaging the fine sub-faces (flow's coarsenOpenAvg). | |
Geometric multigrid for AmrPoisson over a uniformly-coarsened octree hierarchy.
Definition at line 511 of file poisson.hpp.
| using peclet::core::amr::AmrMultigrid< Dim, Bits >::Octree = BlockOctree<Dim, Bits> |
Definition at line 513 of file poisson.hpp.
| using peclet::core::amr::AmrMultigrid< Dim, Bits >::M = typename Octree::M |
Definition at line 514 of file poisson.hpp.
| using peclet::core::amr::AmrMultigrid< Dim, Bits >::Code = typename Octree::Code |
Definition at line 515 of file poisson.hpp.
Build the hierarchy from a finest octree by uniform coarsening until a single leaf remains (or no full sibling group can be merged).
Definition at line 519 of file poisson.hpp.
|
inline |
Definition at line 549 of file poisson.hpp.
|
inline |
Definition at line 550 of file poisson.hpp.
|
inline |
Apply a boundary condition to every level (periodic default, or non-periodic homogeneous Dirichlet).
Call after build().
Definition at line 554 of file poisson.hpp.
|
inline |
Enable the immersed no-slip (Dirichlet) wall on every level — the velocity operator.
Call after setOpenness() (the wall is derived per level from that level's coarsened aperture, so it is consistent down the hierarchy). Call after build().
Definition at line 562 of file poisson.hpp.
|
inline |
One V-cycle on level L solving L u = rhs (correction scheme).
Definition at line 568 of file poisson.hpp.
References peclet::core::amr::AmrMultigrid< Dim, Bits >::vcycle().
Referenced by peclet::core::amr::AmrMultigrid< Dim, Bits >::solveQuad(), and peclet::core::amr::AmrMultigrid< Dim, Bits >::vcycle().
|
inline |
Solve the quadratic C/F operator L_quad u = rhs by deferred correction: the standard-operator V-cycle solves L_std u = rhs - (L_quad - L_std) u, with the cheap-to-evaluate quadratic correction lagged.
Returns the final L_quad residual norm. cyclesPerOuter V-cycles per correction update.
Definition at line 613 of file poisson.hpp.
References peclet::core::amr::AmrMultigrid< Dim, Bits >::vcycle().
|
inline |
Set cut-cell face openness on the finest level from a geometry callable openFn(faceCentreWorld, axis) -> [0,1], then coarsen it to every coarser level by area-averaging the fine sub-faces (flow's coarsenOpenAvg).
The per-level operators are thereby rediscretized with consistent openness, and the openness-weighted quadratic C/F flux applies on every level. Call after build().
Definition at line 638 of file poisson.hpp.