core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
Loading...
Searching...
No Matches
peclet::core::amr::VelocityMG< Bits > Class Template Reference

#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< doublex (std::size_t L=0)
 
View< doubleb (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.
 

Detailed Description

template<unsigned Bits = 21u>
class peclet::core::amr::VelocityMG< Bits >

Definition at line 41 of file velocity_mg.hpp.

Member Typedef Documentation

◆ Octree

template<unsigned Bits = 21u>
using peclet::core::amr::VelocityMG< Bits >::Octree = BlockOctree<3, Bits>

Definition at line 43 of file velocity_mg.hpp.

◆ M

Definition at line 44 of file velocity_mg.hpp.

◆ Code

Definition at line 45 of file velocity_mg.hpp.

◆ Poisson

template<unsigned Bits = 21u>
using peclet::core::amr::VelocityMG< Bits >::Poisson = AmrPoisson<3, Bits>

Definition at line 46 of file velocity_mg.hpp.

Member Function Documentation

◆ build()

template<unsigned Bits = 21u>
void peclet::core::amr::VelocityMG< Bits >::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 
)
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().

◆ numLevels()

template<unsigned Bits = 21u>
std::size_t peclet::core::amr::VelocityMG< Bits >::numLevels ( ) const
inline

Definition at line 127 of file velocity_mg.hpp.

◆ numLeaves()

template<unsigned Bits = 21u>
Index peclet::core::amr::VelocityMG< Bits >::numLeaves ( std::size_t  L = 0) const
inline

Definition at line 128 of file velocity_mg.hpp.

◆ x()

template<unsigned Bits = 21u>
View< double > peclet::core::amr::VelocityMG< Bits >::x ( std::size_t  L = 0)
inline

Definition at line 129 of file velocity_mg.hpp.

◆ b()

template<unsigned Bits = 21u>
View< double > peclet::core::amr::VelocityMG< Bits >::b ( std::size_t  L = 0)
inline

Definition at line 130 of file velocity_mg.hpp.

◆ setFineOp()

template<unsigned Bits = 21u>
void peclet::core::amr::VelocityMG< Bits >::setFineOp ( const MomentumOp fineOp)
inline

Re-point level 0 at the (possibly FOU-updated) fine operator before a solve.

Definition at line 132 of file velocity_mg.hpp.

◆ setGaussSeidel()

template<unsigned Bits = 21u>
void peclet::core::amr::VelocityMG< Bits >::setGaussSeidel ( bool  on)
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.

◆ vcycle()

template<unsigned Bits = 21u>
void peclet::core::amr::VelocityMG< Bits >::vcycle ( int  pre = 2,
int  post = 2,
int  bottom = 30,
double  omega = 0.7,
std::size_t  L = 0 
)
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().


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