|
core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
|
#include <velocity_mg.hpp>
Public Types | |
| using | Octree = BlockOctree< 3, Bits > |
| using | M = typename Octree::M |
| using | Code = typename Octree::Code |
| using | Poisson = AmrPoisson< 3, Bits > |
Public Member Functions | |
| void | build (const Octree &finest, double h0, double idiag, double mu, const MomentumOp &fineOp, const std::vector< double > &kappa, const std::vector< char > &fluid, const std::vector< char > &cut, Index minCoarse=256) |
| Build the rediscretized hierarchy. | |
| std::size_t | numLevels () const |
| Index | numLeaves (std::size_t L=0) const |
| View< double > | x (std::size_t L=0) |
| View< double > | b (std::size_t L=0) |
| void | setFineOp (const MomentumOp &fineOp) |
| Re-point level 0 at the (possibly FOU-updated) fine operator before a solve. | |
| void | setGaussSeidel (bool on) |
| Opt-in: use multicolour Gauss–Seidel as the smoother (per-level colouring) instead of Jacobi — the strong fine smoother that "owns the cut band" (flow uses RB-GS), markedly improving the staircase at high resolution. | |
| void | vcycle (int pre=2, int post=2, int bottom=30, double omega=0.7, std::size_t L=0) |
| One V-cycle (correction scheme) solving the fine operator. | |
Definition at line 41 of file velocity_mg.hpp.
| using peclet::core::amr::VelocityMG< Bits >::Octree = BlockOctree<3, Bits> |
Definition at line 43 of file velocity_mg.hpp.
Definition at line 44 of file velocity_mg.hpp.
| using peclet::core::amr::VelocityMG< Bits >::Code = typename Octree::Code |
Definition at line 45 of file velocity_mg.hpp.
| using peclet::core::amr::VelocityMG< Bits >::Poisson = AmrPoisson<3, Bits> |
Definition at line 46 of file velocity_mg.hpp.
|
inline |
Build the rediscretized hierarchy.
fineOp is the sharp cut-cell operator (level 0); kappa / fluid are the per-fine-cell fluid fraction + flag (AmrCutCell::kappa / isFluid). idiag = ρ/dt, mu = μ. The fine octree is coarsened uniformly (one local octree per level), as in AmrMultigrid. The fine operator is referenced (not copied); rebuild it (e.g. with the FOU) before each solve and the V-cycle picks it up. minCoarse clamps the coarsening depth (flow's pore-scale cap): levels are dropped once a level would have fewer than minCoarse cells, so the coarsest grid still resolves the immersed feature. Coarsening below the feature scale makes a small object vanish from the staircase classification, leaving an inconsistent coarse operator that diverges (deep coarsening only sets the rate, not the answer — the fine smoother + exclude carry it).
Definition at line 58 of file velocity_mg.hpp.
References peclet::core::amr::greedyColoring(), and peclet::core::toDevice().
|
inline |
Definition at line 127 of file velocity_mg.hpp.
|
inline |
Definition at line 128 of file velocity_mg.hpp.
|
inline |
Definition at line 129 of file velocity_mg.hpp.
|
inline |
Definition at line 130 of file velocity_mg.hpp.
|
inline |
Re-point level 0 at the (possibly FOU-updated) fine operator before a solve.
Definition at line 132 of file velocity_mg.hpp.
|
inline |
Opt-in: use multicolour Gauss–Seidel as the smoother (per-level colouring) instead of Jacobi — the strong fine smoother that "owns the cut band" (flow uses RB-GS), markedly improving the staircase at high resolution.
Default off (Jacobi).
Definition at line 136 of file velocity_mg.hpp.
|
inline |
One V-cycle (correction scheme) solving the fine operator.
Average restriction, masked piecewise-constant prolongation, clean-fluid residual exclude; Jacobi or multicolour-GS smoother.
Definition at line 141 of file velocity_mg.hpp.
References peclet::core::amr::prolongAddMasked(), peclet::core::amr::residualMom(), peclet::core::amr::restrictField(), peclet::core::amr::VelocityMG< Bits >::vcycle(), and peclet::core::amr::zeroMasked().
Referenced by peclet::core::amr::VelocityMG< Bits >::vcycle().