flow 1.3.0
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
peclet::flow::CutcellMG Class Reference

#include <mac_cutcell_mg.hpp>

Classes

struct  Level
 
struct  OverlayScope
 

Public Types

enum  : int {
  kPAp = 0 , kRn = 1 , kStop = 2 , kBottomFlag = 3 ,
  kRz = 4 , kRzNew = 5 , kBeta = 6 , kAlpha = 7 ,
  kMsum = 8
}
 
enum class  EigenStart { Cold , ColdKeep , Warm }
 
enum  : int { kBottomAuto = 0 , kBottomDirect = 1 , kBottomAlgebraic = 2 }
 

Public Member Functions

void setMetric (const double hp[3])
 Per-axis cell spacings h_a' = h_a / hRef of the physical domain (doc/anisotropic_metric.md §1.1).
 
std::vector< C3 > levelRatios () const
 The per-level coarsening ratio actually chosen (the level table of §5, gate §8.5).
 
void init (int nx, int ny, int nz, int nLevels)
 
int nLevels () const
 
Level & level (int L)
 
void setBoundaryConditions (const int bc[6])
 
void applyOutflowGhost (const Level &lv, CCField x, int g=G)
 
void applyNeumannGhost (const Level &lv, CCField x, int g=G)
 
void applyBoundaryOpenness (Level &lv, Level *fine=nullptr)
 
void applyBoundaryOpennessFrom (Level &lv, const CCField *fo, C3 fext, int fg, C3 fratio)
 
void saveOutflowPlanes (Level &lv)
 
void setOpenness (CCConst ox, CCConst oy, CCConst oz, double idx2, double idy2, double idz2)
 
int solvePCG (CCField b, CCField x, CCField r, CCField p, CCField z, CCField Ap, int maxit, double rtol, int pre, int post, int bottom, const StarOverlay *star=nullptr, int nStar=0, C3 nnStar=C3{0, 0, 0})
 
void ensureScalars ()
 
Kokkos::View< double, CCMem > slot (int k) const
 
double readSlot (int k) const
 
void setSlot (int k, double v)
 
void dotTo (Level &lv, CCField a, CCField b, int k)
 
void maxabsTo (Level &lv, CCField a, int k)
 
void setDebugBreakdown (int which, int iter)
 
int solvePCGResident (CCField b, CCField x, CCField r, CCField p, CCField z, CCField Ap, int maxit, double rtol, int pre, int post, int bottom, const StarOverlay *star, int nStar, C3 nnStar)
 
int solveFCG (CCField b, CCField x, CCField r, CCField p, CCField z, CCField zp, CCField Ap, int maxit, double rtol, int pre, int post, int bottom, const StarOverlay *star=nullptr, int nStar=0, C3 nnStar=C3{0, 0, 0})
 
int solveBiCGStab (CCField b, CCField x, CCField r, CCField rh, CCField p, CCField v, CCField t, CCField z, CCField z2, int maxit, double rtol, int pre, int post, int bottom, const GpOverlayReal< MReal > &ov, int nOv, C3 nn)
 
void precondVcycle (CCField zz, CCField rr)
 
void vcycle (int L, bool sym)
 
void vcycleImpl (int L, bool sym)
 
bool caSmooth (const Level &lv) const
 
bool fusedWrapReads () const
 
bool fusedWrapSmooth (const Level &lv) const
 
void smooth (Level &lv, int sweeps, bool reverse)
 
bool agglomerateBottom () const
 
const char * directBottomIneligible () const
 
void buildBottomStore ()
 
void evalBottomComponents ()
 
template<class FR = float>
BottomKernel< FR > makeBottomKernel (bool precondOnly)
 
void noteBottomFlag (double v)
 
template<class FR >
int launchDirectFactor (const BottomDirect< FR > &D, int team, double tauPiv0, bool probe=true, bool teamAlgorithm=false)
 
template<class FR >
int launchDirectKernel (const BottomDirect< FR > &D, bool precondOnly, int team, bool noMean, CCField zOut=CCField(), CCField rIn=CCField(), bool probe=true)
 
void directBottomSolve ()
 
void buildAmg (Level &lv)
 
void graphAmgSolveBottom (Level &lv)
 
void pcgAmg (std::vector< double > &b, std::vector< double > &x)
 
void matvecOverlap (Level &l0, CCField y, CCField v)
 
void fill (Level &lv, CCField f)
 
void fillWrap (Level &lv, CCField f)
 
void fillOpenness (Level &lv)
 
void fillAxis (Level &lv, CCField f, int axis)
 
void axpy (CCField y, double a, CCField x)
 
void aypx (CCField y, double a, CCField x)
 
void scale (CCField y, double a)
 
void lin (CCField out, double a, CCField x, double b, CCField y)
 
void maskSolid (Level &lv, CCField f)
 
CCField workVector (int slot, std::size_t n, const char *label)
 
bool eigenWarmReady () const
 
CCField eigenWarmMax () const
 
CCField eigenWarmMin () const
 
void setEigenWarm (CCField vmax, CCField vmin)
 
void estimateEigenvalues (CCConst seed, double &lmin, double &lmax, int iters, int pre, int post, int bottom, EigenStart start=EigenStart::Cold)
 
int solveChebyshev (CCField b, CCField x, int maxit, double rtol, int pre, int post, int bottom, double a, double bnd, bool guard3=false)
 
void setStopReference (double ref)
 
bool chebyshevGuardTripped () const
 
double rhsNorm (CCField b, CCField scratch)
 
double residualNorm (CCField b, CCField x, CCField r, CCField Ap)
 
double dot (Level &lv, CCField a, CCField b)
 
double maxabs (Level &lv, CCField a)
 
void removeMean (Level &lv, CCField f, bool stopGuard=false)
 
void setMeanRemovalScope (bool all)
 
double allreduceSeconds () const
 
long allreduceCount () const
 
bool lastSolveFailed ()
 
void resetAllreduceCounters ()
 
void setAgglomerationMode (int mode)
 
void setAgglomerationExtent (int cells)
 
int agglomerationExtent () const
 
void setTelescope (bool on)
 
void setCoarseGhost (bool on)
 Neumann coarse ghost on wall/inflow faces before the prolongation (see bcGhost_).
 
bool coarseGhost () const
 
void setAspectThreshold (double theta)
 Anisotropic-coarsening aspect threshold theta (see aspectTheta_).
 
double aspectThreshold () const
 
void setCommAvoiding (int mask)
 Communication-avoiding smoothing mask (kCaMomentum | kCaMg); only kCaMg is read here.
 
int commAvoiding () const
 
void setStrictPressure (bool on)
 Throw instead of reporting when the preconditioner returns a non-finite correction.
 
bool strictPressure () const
 
void setExactResidual (bool on)
 The exact double flux-form level-0 apply in the residual and the Krylov matvec.
 
bool exactResidual () const
 
void setOutflowCoefficient (bool on)
 
bool outflowCoefficient () const
 
int telescopeCount () const
 
int repartitionCount () const
 
C3 coarsestGlobal () const
 
bool telescope () const
 
void setTelescopeForceLevel (int L)
 
void setTelescopeMinExtent (int e)
 
void setRepartition (bool on)
 Repartition stages for a weighted level-0 decomposition (see repartition_); before initMpi.
 
bool repartition () const
 
int localLevels () const
 
int agglomerationMode () const
 
void setGraphAmgBottom (bool on)
 
void setBottomSolver (int m)
 
int bottomSolver () const
 
bool bottomConnected () const
 
int bottomComponents () const
 
void bottomForceForTest ()
 
const BottomPlanes & directPlanes () const
 
template<class FR >
BottomDirect< FR > directFactorForTest (int team, double tauPiv0=kBottomPivotTol, int *Tused=nullptr, bool teamAlgorithm=false)
 
template<class FR >
int directApplyForTest (const BottomDirect< FR > &D, CCField z, CCField r, int team, bool noMean=false)
 
int directSolveForTest ()
 
int directSolveTeamForTest (int team, int *Tused=nullptr)
 
int directRestarts () const
 
void directPivotTolForTest (double t)
 
void directMarkStaleForTest ()
 

Static Public Member Functions

static C3 parityOg (const Level &lv)
 
static C3 mgChooseRatio (const double H[3], const bool canA[3], bool aniso, double theta)
 
static bool touchesGlobalFace (const Level &lv, int f)
 
template<class K >
static int directTeam (const K &k, int team, bool probe, std::size_t scratch=0, int hostTeam=kBottomHostTeam)
 

Public Attributes

Kokkos::View< double *, CCMem > ks_
 
Kokkos::View< long, CCMem > kcnt_
 
Kokkos::View< double *, Kokkos::HostSpace > kpk_
 

Static Public Attributes

static constexpr int G = 1
 
static constexpr int kNSlots = 9
 
static constexpr int kPacket = 4
 
static constexpr double kBrkPAp = 1.0
 
static constexpr double kBrkRz = 2.0
 
static constexpr bool kHostMemory
 

Detailed Description

Definition at line 876 of file mac_cutcell_mg.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : int
Enumerator
kPAp 
kRn 
kStop 
kBottomFlag 
kRz 
kRzNew 
kBeta 
kAlpha 
kMsum 

Definition at line 1853 of file mac_cutcell_mg.hpp.

◆ EigenStart

Enumerator
Cold 
ColdKeep 
Warm 

Definition at line 3745 of file mac_cutcell_mg.hpp.

◆ anonymous enum

anonymous enum : int
Enumerator
kBottomAuto 
kBottomDirect 
kBottomAlgebraic 

Definition at line 4450 of file mac_cutcell_mg.hpp.

Member Function Documentation

◆ parityOg()

static C3 peclet::flow::CutcellMG::parityOg ( const Level &  lv)
inlinestatic

Definition at line 955 of file mac_cutcell_mg.hpp.

Referenced by smooth().

◆ mgChooseRatio()

static C3 peclet::flow::CutcellMG::mgChooseRatio ( const double  H[3],
const bool  canA[3],
bool  aniso,
double  theta 
)
inlinestatic

◆ setMetric()

void peclet::flow::CutcellMG::setMetric ( const double  hp[3])
inline

Per-axis cell spacings h_a' = h_a / hRef of the physical domain (doc/anisotropic_metric.md §1.1).

Call BEFORE init/initMpi (trap 5): the level table is built there, long before setOpenness, and the aspect rule of §5 needs the metric at that point. The default (1, 1, 1) is the isotropic / cell-unit path, on which the rule is inert BY CONSTRUCTION (aniso_ is false, so mgChooseRatio returns today's decision verbatim).

Definition at line 1011 of file mac_cutcell_mg.hpp.

Referenced by main(), and peclet::flow::Solver< Grid >::setSolidInitPressureMg().

◆ levelRatios()

std::vector< C3 > peclet::flow::CutcellMG::levelRatios ( ) const
inline

The per-level coarsening ratio actually chosen (the level table of §5, gate §8.5).

Definition at line 1017 of file mac_cutcell_mg.hpp.

Referenced by main(), and peclet::flow::Solver< Grid >::pressureMgLevelRatios().

◆ init()

void peclet::flow::CutcellMG::init ( int  nx,
int  ny,
int  nz,
int  nLevels 
)
inline

◆ nLevels()

int peclet::flow::CutcellMG::nLevels ( ) const
inline

Definition at line 1498 of file mac_cutcell_mg.hpp.

Referenced by init(), and main().

◆ level()

Level & peclet::flow::CutcellMG::level ( int  L)
inline

Definition at line 1499 of file mac_cutcell_mg.hpp.

Referenced by main(), and setupAndSolve().

◆ setBoundaryConditions()

void peclet::flow::CutcellMG::setBoundaryConditions ( const int  bc[6])
inline

◆ applyOutflowGhost()

void peclet::flow::CutcellMG::applyOutflowGhost ( const Level &  lv,
CCField  x,
int  g = G 
)
inline

◆ applyNeumannGhost()

void peclet::flow::CutcellMG::applyNeumannGhost ( const Level &  lv,
CCField  x,
int  g = G 
)
inline

Definition at line 1550 of file mac_cutcell_mg.hpp.

References peclet::flow::bcNeumannGhost(), and touchesGlobalFace().

Referenced by vcycleImpl().

◆ touchesGlobalFace()

static bool peclet::flow::CutcellMG::touchesGlobalFace ( const Level &  lv,
int  f 
)
inlinestatic

◆ applyBoundaryOpenness()

void peclet::flow::CutcellMG::applyBoundaryOpenness ( Level &  lv,
Level *  fine = nullptr 
)
inline

Definition at line 1574 of file mac_cutcell_mg.hpp.

References applyBoundaryOpennessFrom().

Referenced by setOpenness().

◆ applyBoundaryOpennessFrom()

void peclet::flow::CutcellMG::applyBoundaryOpennessFrom ( Level &  lv,
const CCField *  fo,
C3  fext,
int  fg,
C3  fratio 
)
inline

◆ saveOutflowPlanes()

void peclet::flow::CutcellMG::saveOutflowPlanes ( Level &  lv)
inline

Definition at line 1620 of file mac_cutcell_mg.hpp.

References peclet::flow::mgSaveFacePlane(), and touchesGlobalFace().

Referenced by setOpenness().

◆ setOpenness()

◆ solvePCG()

int peclet::flow::CutcellMG::solvePCG ( CCField  b,
CCField  x,
CCField  r,
CCField  p,
CCField  z,
CCField  Ap,
int  maxit,
double  rtol,
int  pre,
int  post,
int  bottom,
const StarOverlay *  star = nullptr,
int  nStar = 0,
C3  nnStar = C3{0, 0, 0} 
)
inline

◆ ensureScalars()

void peclet::flow::CutcellMG::ensureScalars ( )
inline

Definition at line 1870 of file mac_cutcell_mg.hpp.

References kcnt_, kNSlots, kPacket, kpk_, and ks_.

Referenced by makeBottomKernel(), removeMean(), and solvePCGResident().

◆ slot()

Kokkos::View< double, CCMem > peclet::flow::CutcellMG::slot ( int  k) const
inline

Definition at line 1877 of file mac_cutcell_mg.hpp.

References ks_.

Referenced by dotTo(), lastSolveFailed(), maxabsTo(), readSlot(), removeMean(), setSlot(), and workVector().

◆ readSlot()

double peclet::flow::CutcellMG::readSlot ( int  k) const
inline

Definition at line 1880 of file mac_cutcell_mg.hpp.

References slot().

Referenced by solvePCGResident().

◆ setSlot()

void peclet::flow::CutcellMG::setSlot ( int  k,
double  v 
)
inline

Definition at line 1885 of file mac_cutcell_mg.hpp.

References slot().

Referenced by noteBottomFlag(), and solvePCGResident().

◆ dotTo()

void peclet::flow::CutcellMG::dotTo ( Level &  lv,
CCField  a,
CCField  b,
int  k 
)
inline

Definition at line 1888 of file mac_cutcell_mg.hpp.

References peclet::flow::ccReduce3(), and slot().

Referenced by solvePCGResident().

◆ maxabsTo()

void peclet::flow::CutcellMG::maxabsTo ( Level &  lv,
CCField  a,
int  k 
)
inline

Definition at line 1902 of file mac_cutcell_mg.hpp.

References peclet::flow::ccReduce3(), and slot().

Referenced by solvePCGResident().

◆ setDebugBreakdown()

void peclet::flow::CutcellMG::setDebugBreakdown ( int  which,
int  iter 
)
inline

Definition at line 1922 of file mac_cutcell_mg.hpp.

◆ solvePCGResident()

int peclet::flow::CutcellMG::solvePCGResident ( CCField  b,
CCField  x,
CCField  r,
CCField  p,
CCField  z,
CCField  Ap,
int  maxit,
double  rtol,
int  pre,
int  post,
int  bottom,
const StarOverlay *  star,
int  nStar,
C3  nnStar 
)
inline

◆ solveFCG()

int peclet::flow::CutcellMG::solveFCG ( CCField  b,
CCField  x,
CCField  r,
CCField  p,
CCField  z,
CCField  zp,
CCField  Ap,
int  maxit,
double  rtol,
int  pre,
int  post,
int  bottom,
const StarOverlay *  star = nullptr,
int  nStar = 0,
C3  nnStar = C3{0, 0, 0} 
)
inline

◆ solveBiCGStab()

int peclet::flow::CutcellMG::solveBiCGStab ( CCField  b,
CCField  x,
CCField  r,
CCField  rh,
CCField  p,
CCField  v,
CCField  t,
CCField  z,
CCField  z2,
int  maxit,
double  rtol,
int  pre,
int  post,
int  bottom,
const GpOverlayReal< MReal > &  ov,
int  nOv,
C3  nn 
)
inline

◆ precondVcycle()

void peclet::flow::CutcellMG::precondVcycle ( CCField  zz,
CCField  rr 
)
inline

◆ vcycle()

void peclet::flow::CutcellMG::vcycle ( int  L,
bool  sym 
)
inline

Definition at line 2548 of file mac_cutcell_mg.hpp.

References peclet::flow::mgDebugLevel(), and vcycleImpl().

Referenced by precondVcycle(), and vcycleImpl().

◆ vcycleImpl()

◆ caSmooth()

bool peclet::flow::CutcellMG::caSmooth ( const Level &  lv) const
inline

Definition at line 2682 of file mac_cutcell_mg.hpp.

Referenced by smooth().

◆ fusedWrapReads()

bool peclet::flow::CutcellMG::fusedWrapReads ( ) const
inline

Definition at line 2688 of file mac_cutcell_mg.hpp.

Referenced by fusedWrapSmooth(), matvecOverlap(), and vcycleImpl().

◆ fusedWrapSmooth()

bool peclet::flow::CutcellMG::fusedWrapSmooth ( const Level &  lv) const
inline

Definition at line 2689 of file mac_cutcell_mg.hpp.

References fusedWrapReads().

Referenced by smooth().

◆ smooth()

void peclet::flow::CutcellMG::smooth ( Level &  lv,
int  sweeps,
bool  reverse 
)
inline

◆ agglomerateBottom()

bool peclet::flow::CutcellMG::agglomerateBottom ( ) const
inline

Definition at line 2790 of file mac_cutcell_mg.hpp.

Referenced by directBottomIneligible(), and vcycleImpl().

◆ directBottomIneligible()

const char * peclet::flow::CutcellMG::directBottomIneligible ( ) const
inline

◆ buildBottomStore()

◆ evalBottomComponents()

void peclet::flow::CutcellMG::evalBottomComponents ( )
inline

◆ makeBottomKernel()

template<class FR = float>
BottomKernel< FR > peclet::flow::CutcellMG::makeBottomKernel ( bool  precondOnly)
inline

Definition at line 2917 of file mac_cutcell_mg.hpp.

References ensureScalars(), kBottomFlag, and ks_.

◆ noteBottomFlag()

void peclet::flow::CutcellMG::noteBottomFlag ( double  v)
inline

Definition at line 2947 of file mac_cutcell_mg.hpp.

References kBottomFlag, and setSlot().

Referenced by lastSolveFailed(), and solvePCGResident().

◆ directTeam()

template<class K >
static int peclet::flow::CutcellMG::directTeam ( const K &  k,
int  team,
bool  probe,
std::size_t  scratch = 0,
int  hostTeam = kBottomHostTeam 
)
inlinestatic

Definition at line 2959 of file mac_cutcell_mg.hpp.

References kHostMemory.

Referenced by launchDirectFactor(), and launchDirectKernel().

◆ launchDirectFactor()

template<class FR >
int peclet::flow::CutcellMG::launchDirectFactor ( const BottomDirect< FR > &  D,
int  team,
double  tauPiv0,
bool  probe = true,
bool  teamAlgorithm = false 
)
inline

◆ launchDirectKernel()

template<class FR >
int peclet::flow::CutcellMG::launchDirectKernel ( const BottomDirect< FR > &  D,
bool  precondOnly,
int  team,
bool  noMean,
CCField  zOut = CCField(),
CCField  rIn = CCField(),
bool  probe = true 
)
inline

Definition at line 2999 of file mac_cutcell_mg.hpp.

References directTeam().

Referenced by directApplyForTest(), directBottomSolve(), and directSolveTeamForTest().

◆ directBottomSolve()

◆ buildAmg()

void peclet::flow::CutcellMG::buildAmg ( Level &  lv)
inline

Definition at line 3049 of file mac_cutcell_mg.hpp.

Referenced by graphAmgSolveBottom().

◆ graphAmgSolveBottom()

void peclet::flow::CutcellMG::graphAmgSolveBottom ( Level &  lv)
inline

◆ pcgAmg()

void peclet::flow::CutcellMG::pcgAmg ( std::vector< double > &  b,
std::vector< double > &  x 
)
inline

Definition at line 3319 of file mac_cutcell_mg.hpp.

References dot().

Referenced by graphAmgSolveBottom().

◆ matvecOverlap()

◆ fill()

void peclet::flow::CutcellMG::fill ( Level &  lv,
CCField  f 
)
inline

Definition at line 3510 of file mac_cutcell_mg.hpp.

References fillAxis(), and fillWrap().

Referenced by fillOpenness(), graphAmgSolveBottom(), matvecOverlap(), smooth(), and vcycleImpl().

◆ fillWrap()

void peclet::flow::CutcellMG::fillWrap ( Level &  lv,
CCField  f 
)
inline

Definition at line 3535 of file mac_cutcell_mg.hpp.

References G, and peclet::flow::hostRunSerial().

Referenced by fill().

◆ fillOpenness()

void peclet::flow::CutcellMG::fillOpenness ( Level &  lv)
inline

Definition at line 3626 of file mac_cutcell_mg.hpp.

References fill().

Referenced by setOpenness().

◆ fillAxis()

void peclet::flow::CutcellMG::fillAxis ( Level &  lv,
CCField  f,
int  axis 
)
inline

Definition at line 3631 of file mac_cutcell_mg.hpp.

References G, and N.

Referenced by fill().

◆ axpy()

void peclet::flow::CutcellMG::axpy ( CCField  y,
double  a,
CCField  x 
)
inline

Definition at line 3681 of file mac_cutcell_mg.hpp.

Referenced by residualNorm(), solveChebyshev(), and solvePCGResident().

◆ aypx()

void peclet::flow::CutcellMG::aypx ( CCField  y,
double  a,
CCField  x 
)
inline

Definition at line 3689 of file mac_cutcell_mg.hpp.

◆ scale()

void peclet::flow::CutcellMG::scale ( CCField  y,
double  a 
)
inline

Definition at line 3697 of file mac_cutcell_mg.hpp.

Referenced by estimateEigenvalues().

◆ lin()

void peclet::flow::CutcellMG::lin ( CCField  out,
double  a,
CCField  x,
double  b,
CCField  y 
)
inline

Definition at line 3705 of file mac_cutcell_mg.hpp.

Referenced by estimateEigenvalues(), and solveChebyshev().

◆ maskSolid()

void peclet::flow::CutcellMG::maskSolid ( Level &  lv,
CCField  f 
)
inline

Definition at line 3714 of file mac_cutcell_mg.hpp.

Referenced by estimateEigenvalues().

◆ workVector()

CCField peclet::flow::CutcellMG::workVector ( int  slot,
std::size_t  n,
const char *  label 
)
inline

Definition at line 3730 of file mac_cutcell_mg.hpp.

References slot().

Referenced by estimateEigenvalues(), and solveChebyshev().

◆ eigenWarmReady()

bool peclet::flow::CutcellMG::eigenWarmReady ( ) const
inline

◆ eigenWarmMax()

CCField peclet::flow::CutcellMG::eigenWarmMax ( ) const
inline

Definition at line 3753 of file mac_cutcell_mg.hpp.

◆ eigenWarmMin()

CCField peclet::flow::CutcellMG::eigenWarmMin ( ) const
inline

Definition at line 3754 of file mac_cutcell_mg.hpp.

◆ setEigenWarm()

void peclet::flow::CutcellMG::setEigenWarm ( CCField  vmax,
CCField  vmin 
)
inline

Definition at line 3755 of file mac_cutcell_mg.hpp.

◆ estimateEigenvalues()

void peclet::flow::CutcellMG::estimateEigenvalues ( CCConst  seed,
double &  lmin,
double &  lmax,
int  iters,
int  pre,
int  post,
int  bottom,
EigenStart  start = EigenStart::Cold 
)
inline

◆ solveChebyshev()

int peclet::flow::CutcellMG::solveChebyshev ( CCField  b,
CCField  x,
int  maxit,
double  rtol,
int  pre,
int  post,
int  bottom,
double  a,
double  bnd,
bool  guard3 = false 
)
inline

◆ setStopReference()

void peclet::flow::CutcellMG::setStopReference ( double  ref)
inline

◆ chebyshevGuardTripped()

bool peclet::flow::CutcellMG::chebyshevGuardTripped ( ) const
inline

◆ rhsNorm()

double peclet::flow::CutcellMG::rhsNorm ( CCField  b,
CCField  scratch 
)
inline

◆ residualNorm()

double peclet::flow::CutcellMG::residualNorm ( CCField  b,
CCField  x,
CCField  r,
CCField  Ap 
)
inline

◆ dot()

double peclet::flow::CutcellMG::dot ( Level &  lv,
CCField  a,
CCField  b 
)
inline

Definition at line 3926 of file mac_cutcell_mg.hpp.

References peclet::flow::ccReduce3().

Referenced by estimateEigenvalues(), and pcgAmg().

◆ maxabs()

double peclet::flow::CutcellMG::maxabs ( Level &  lv,
CCField  a 
)
inline

◆ removeMean()

void peclet::flow::CutcellMG::removeMean ( Level &  lv,
CCField  f,
bool  stopGuard = false 
)
inline

◆ setMeanRemovalScope()

void peclet::flow::CutcellMG::setMeanRemovalScope ( bool  all)
inline

◆ allreduceSeconds()

double peclet::flow::CutcellMG::allreduceSeconds ( ) const
inline

Definition at line 4044 of file mac_cutcell_mg.hpp.

◆ allreduceCount()

long peclet::flow::CutcellMG::allreduceCount ( ) const
inline

Definition at line 4045 of file mac_cutcell_mg.hpp.

◆ lastSolveFailed()

bool peclet::flow::CutcellMG::lastSolveFailed ( )
inline

◆ resetAllreduceCounters()

void peclet::flow::CutcellMG::resetAllreduceCounters ( )
inline

Definition at line 4059 of file mac_cutcell_mg.hpp.

Referenced by peclet::flow::Solver< Grid >::step().

◆ setAgglomerationMode()

◆ setAgglomerationExtent()

void peclet::flow::CutcellMG::setAgglomerationExtent ( int  cells)
inline

◆ agglomerationExtent()

int peclet::flow::CutcellMG::agglomerationExtent ( ) const
inline

◆ setTelescope()

void peclet::flow::CutcellMG::setTelescope ( bool  on)
inline

◆ setCoarseGhost()

void peclet::flow::CutcellMG::setCoarseGhost ( bool  on)
inline

Neumann coarse ghost on wall/inflow faces before the prolongation (see bcGhost_).

Definition at line 4257 of file mac_cutcell_mg.hpp.

Referenced by peclet::flow::Solver< Grid >::setPressureCoarseGhost().

◆ coarseGhost()

bool peclet::flow::CutcellMG::coarseGhost ( ) const
inline

◆ setAspectThreshold()

void peclet::flow::CutcellMG::setAspectThreshold ( double  theta)
inline

Anisotropic-coarsening aspect threshold theta (see aspectTheta_).

Definition at line 4260 of file mac_cutcell_mg.hpp.

Referenced by peclet::flow::Solver< Grid >::setMultigridAspectThreshold().

◆ aspectThreshold()

double peclet::flow::CutcellMG::aspectThreshold ( ) const
inline

Definition at line 4261 of file mac_cutcell_mg.hpp.

◆ setCommAvoiding()

void peclet::flow::CutcellMG::setCommAvoiding ( int  mask)
inline

Communication-avoiding smoothing mask (kCaMomentum | kCaMg); only kCaMg is read here.

Definition at line 4263 of file mac_cutcell_mg.hpp.

Referenced by peclet::flow::Solver< Grid >::setCommAvoiding().

◆ commAvoiding()

int peclet::flow::CutcellMG::commAvoiding ( ) const
inline

Definition at line 4264 of file mac_cutcell_mg.hpp.

◆ setStrictPressure()

void peclet::flow::CutcellMG::setStrictPressure ( bool  on)
inline

Throw instead of reporting when the preconditioner returns a non-finite correction.

Definition at line 4266 of file mac_cutcell_mg.hpp.

Referenced by peclet::flow::Solver< Grid >::setPressureStrict().

◆ strictPressure()

bool peclet::flow::CutcellMG::strictPressure ( ) const
inline

Definition at line 4267 of file mac_cutcell_mg.hpp.

Referenced by peclet::flow::Solver< Grid >::pressureStrict().

◆ setExactResidual()

void peclet::flow::CutcellMG::setExactResidual ( bool  on)
inline

The exact double flux-form level-0 apply in the residual and the Krylov matvec.

Definition at line 4269 of file mac_cutcell_mg.hpp.

Referenced by peclet::flow::Solver< Grid >::setPressureExactResidual().

◆ exactResidual()

bool peclet::flow::CutcellMG::exactResidual ( ) const
inline

Definition at line 4270 of file mac_cutcell_mg.hpp.

◆ setOutflowCoefficient()

void peclet::flow::CutcellMG::setOutflowCoefficient ( bool  on)
inline

◆ outflowCoefficient()

bool peclet::flow::CutcellMG::outflowCoefficient ( ) const
inline

Definition at line 4275 of file mac_cutcell_mg.hpp.

◆ telescopeCount()

int peclet::flow::CutcellMG::telescopeCount ( ) const
inline

◆ repartitionCount()

int peclet::flow::CutcellMG::repartitionCount ( ) const
inline

Definition at line 4288 of file mac_cutcell_mg.hpp.

Referenced by main().

◆ coarsestGlobal()

C3 peclet::flow::CutcellMG::coarsestGlobal ( ) const
inline

Definition at line 4296 of file mac_cutcell_mg.hpp.

Referenced by main().

◆ telescope()

bool peclet::flow::CutcellMG::telescope ( ) const
inline

◆ setTelescopeForceLevel()

void peclet::flow::CutcellMG::setTelescopeForceLevel ( int  L)
inline

◆ setTelescopeMinExtent()

void peclet::flow::CutcellMG::setTelescopeMinExtent ( int  e)
inline

Definition at line 4434 of file mac_cutcell_mg.hpp.

Referenced by main().

◆ setRepartition()

void peclet::flow::CutcellMG::setRepartition ( bool  on)
inline

Repartition stages for a weighted level-0 decomposition (see repartition_); before initMpi.

Definition at line 4436 of file mac_cutcell_mg.hpp.

Referenced by main(), and peclet::flow::Solver< Grid >::setSolidInitPressureMg().

◆ repartition()

bool peclet::flow::CutcellMG::repartition ( ) const
inline

Definition at line 4437 of file mac_cutcell_mg.hpp.

◆ localLevels()

int peclet::flow::CutcellMG::localLevels ( ) const
inline

Definition at line 4440 of file mac_cutcell_mg.hpp.

Referenced by main().

◆ agglomerationMode()

int peclet::flow::CutcellMG::agglomerationMode ( ) const
inline

Definition at line 4441 of file mac_cutcell_mg.hpp.

◆ setGraphAmgBottom()

void peclet::flow::CutcellMG::setGraphAmgBottom ( bool  on)
inline

◆ setBottomSolver()

void peclet::flow::CutcellMG::setBottomSolver ( int  m)
inline

◆ bottomSolver()

int peclet::flow::CutcellMG::bottomSolver ( ) const
inline

Definition at line 4452 of file mac_cutcell_mg.hpp.

◆ bottomConnected()

bool peclet::flow::CutcellMG::bottomConnected ( ) const
inline

Definition at line 4456 of file mac_cutcell_mg.hpp.

◆ bottomComponents()

int peclet::flow::CutcellMG::bottomComponents ( ) const
inline

Definition at line 4457 of file mac_cutcell_mg.hpp.

◆ bottomForceForTest()

void peclet::flow::CutcellMG::bottomForceForTest ( )
inline

Definition at line 4458 of file mac_cutcell_mg.hpp.

References buildBottomStore(), and evalBottomComponents().

Referenced by main().

◆ directPlanes()

const BottomPlanes & peclet::flow::CutcellMG::directPlanes ( ) const
inline

Definition at line 4471 of file mac_cutcell_mg.hpp.

Referenced by main().

◆ directFactorForTest()

template<class FR >
BottomDirect< FR > peclet::flow::CutcellMG::directFactorForTest ( int  team,
double  tauPiv0 = kBottomPivotTol,
int *  Tused = nullptr,
bool  teamAlgorithm = false 
)
inline

Definition at line 4473 of file mac_cutcell_mg.hpp.

References peclet::flow::BottomDirect< FacReal >::allocate(), and launchDirectFactor().

Referenced by main().

◆ directApplyForTest()

template<class FR >
int peclet::flow::CutcellMG::directApplyForTest ( const BottomDirect< FR > &  D,
CCField  z,
CCField  r,
int  team,
bool  noMean = false 
)
inline

Definition at line 4483 of file mac_cutcell_mg.hpp.

References launchDirectKernel().

◆ directSolveForTest()

int peclet::flow::CutcellMG::directSolveForTest ( )
inline

Definition at line 4489 of file mac_cutcell_mg.hpp.

References directBottomSolve().

◆ directSolveTeamForTest()

int peclet::flow::CutcellMG::directSolveTeamForTest ( int  team,
int *  Tused = nullptr 
)
inline

Definition at line 4498 of file mac_cutcell_mg.hpp.

References launchDirectFactor(), and launchDirectKernel().

◆ directRestarts()

int peclet::flow::CutcellMG::directRestarts ( ) const
inline

Definition at line 4512 of file mac_cutcell_mg.hpp.

◆ directPivotTolForTest()

void peclet::flow::CutcellMG::directPivotTolForTest ( double  t)
inline

Definition at line 4516 of file mac_cutcell_mg.hpp.

◆ directMarkStaleForTest()

void peclet::flow::CutcellMG::directMarkStaleForTest ( )
inline

Definition at line 4517 of file mac_cutcell_mg.hpp.

Member Data Documentation

◆ G

constexpr int peclet::flow::CutcellMG::G = 1
staticconstexpr

◆ kNSlots

constexpr int peclet::flow::CutcellMG::kNSlots = 9
staticconstexpr

Definition at line 1864 of file mac_cutcell_mg.hpp.

Referenced by ensureScalars().

◆ kPacket

constexpr int peclet::flow::CutcellMG::kPacket = 4
staticconstexpr

Definition at line 1865 of file mac_cutcell_mg.hpp.

Referenced by ensureScalars(), and solvePCGResident().

◆ kBrkPAp

constexpr double peclet::flow::CutcellMG::kBrkPAp = 1.0
staticconstexpr

Definition at line 1866 of file mac_cutcell_mg.hpp.

Referenced by solvePCGResident().

◆ kBrkRz

constexpr double peclet::flow::CutcellMG::kBrkRz = 2.0
static

Definition at line 1866 of file mac_cutcell_mg.hpp.

Referenced by solvePCGResident().

◆ ks_

Kokkos::View<double*, CCMem> peclet::flow::CutcellMG::ks_

◆ kcnt_

Kokkos::View<long, CCMem> peclet::flow::CutcellMG::kcnt_

Definition at line 1868 of file mac_cutcell_mg.hpp.

Referenced by ensureScalars(), and removeMean().

◆ kpk_

Kokkos::View<double*, Kokkos::HostSpace> peclet::flow::CutcellMG::kpk_

Definition at line 1869 of file mac_cutcell_mg.hpp.

Referenced by ensureScalars(), and solvePCGResident().

◆ kHostMemory

constexpr bool peclet::flow::CutcellMG::kHostMemory
staticconstexpr
Initial value:
=
std::is_same_v<typename CCExec::memory_space, Kokkos::HostSpace>

Definition at line 2823 of file mac_cutcell_mg.hpp.

Referenced by directTeam().


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