|
peclet-amr 0.2.0
Block-local-Morton AMR octree + collocated cut-cell Navier–Stokes solver (header-only C++20, Kokkos + MPI)
|
#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. | |
| void | build (const Octree &finest, const Vec< 3 > &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) |
| Phase 3: the finest spacing per axis; every coarse level inherits the aspect ratio (AM1). | |
| 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 39 of file velocity_mg.hpp.
| using peclet::amr::VelocityMG< Bits >::Octree = BlockOctree<3, Bits> |
Definition at line 41 of file velocity_mg.hpp.
Definition at line 42 of file velocity_mg.hpp.
| using peclet::amr::VelocityMG< Bits >::Code = typename Octree::Code |
Definition at line 43 of file velocity_mg.hpp.
| using peclet::amr::VelocityMG< Bits >::Poisson = AmrPoisson<3, Bits> |
Definition at line 44 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 56 of file velocity_mg.hpp.
References peclet::amr::VelocityMG< Bits >::build(), and peclet::amr::transferFieldGradients().
Referenced by peclet::amr::VelocityMG< Bits >::build().
|
inline |
Phase 3: the finest spacing per axis; every coarse level inherits the aspect ratio (AM1).
Definition at line 62 of file velocity_mg.hpp.
References peclet::amr::transferFieldGradients().
|
inline |
Definition at line 135 of file velocity_mg.hpp.
|
inline |
Definition at line 136 of file velocity_mg.hpp.
References peclet::amr::transferFieldGradients().
|
inline |
Definition at line 137 of file velocity_mg.hpp.
References peclet::amr::transferFieldGradients().
|
inline |
Definition at line 138 of file velocity_mg.hpp.
References peclet::amr::transferFieldGradients().
|
inline |
Re-point level 0 at the (possibly FOU-updated) fine operator before a solve.
Definition at line 140 of file velocity_mg.hpp.
References peclet::amr::transferFieldGradients().
|
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 144 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 149 of file velocity_mg.hpp.
References peclet::amr::prolongAddMasked(), peclet::amr::restrictField(), peclet::amr::transferFieldGradients(), peclet::amr::VelocityMG< Bits >::vcycle(), and peclet::amr::zeroMasked().
Referenced by peclet::amr::VelocityMG< Bits >::vcycle().