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

#include <mac_velocity_mg.hpp>

Classes

struct  Level

Public Types

using Comm = void*

Public Member Functions

void setMetric (const double w[3], const double hp[3])
 Per-axis metric of the physical domain (doc/anisotropic_metric.md §1.1): the weights w_a = 1/h_a'^2, which every level operator carries as b_a^L = nu_dt * w_a / cfac_a^2 (C1), and the spacings hp_a = h_a' that the aspect-ratio COARSENING rule of §5 reads (C3).
std::vector< C3 > levelRatios () const
 The per-level coarsening ratio actually chosen (the level table of §5; the two hierarchies share one rule, so on the same grid this equals CutcellMG::levelRatios()).
void init (int nx, int ny, int nz, int nLevels)
bool touches (const Level &lv, int f) const
int nLevels () const
Level & level (int L)
int levels () const
void setFineStencil (FPC AC, FPC AW, FPC AE, FPC AS, FPC AN, FPC AB, FPC AT)
void setStaircase (CCConst theta0, CCConst solid0, CCConst resmask0, double nu_dt, double idiag, double thresh)
void setStaircaseBc (int comp, CCConst theta0, CCConst solid0, CCConst resmask0, double nu_dt, double idiag, double thresh, bool upwind=false, double fouw=0.0)
void restrictAdvVelocities (CCConst u0, CCConst v0, CCConst w0)
void buildUpwindCoarse (int comp, double nu_dt, double idiag, double fouw)
void setBC (const int bc[6])
void setBcApplyL0 (std::function< void(CCField)> fn)
void setChebyshevSmoother (bool on, int degree=0, double eigRatio=10.0)
bool chebyshevSmoother () const
void setAspectThreshold (double theta)
 Anisotropic-coarsening aspect threshold theta (doc/anisotropic_metric.md §5.1).
void setDomainBcOp (int comp, double nu_dt, double idiag)
double solveMax (double v, Comm comm) const
void chebLevelBounds (Comm comm)
double level0Residual (Comm comm)
int solve (CCConst b, CCField x, int nvc, int pre, int post, int bottom, double tol=0.0, Comm comm=nullComm(), double resTol=0.0)
double lastResidualRatio () const
void vcycle (int L)
void smooth (Level &lv, int sweeps, bool isL0)
void chebSmooth (Level &lv, int degree, bool isL0, CCConst pin)
void fill (Level &lv, CCField f)
void zeroBcGhosts (Level &lv, CCField f)
void fillProlongBcGhosts (Level &lv)
void fillAxis (Level &lv, CCField f, int axis)

Static Public Member Functions

static void * nullComm ()

Static Public Attributes

static constexpr int G = 2

Detailed Description

Definition at line 337 of file mac_velocity_mg.hpp.

Member Typedef Documentation

◆ Comm

Definition at line 344 of file mac_velocity_mg.hpp.

Member Function Documentation

◆ nullComm()

void * peclet::flow::VelocityMG::nullComm ( )
inlinestatic

Definition at line 345 of file mac_velocity_mg.hpp.

◆ setMetric()

void peclet::flow::VelocityMG::setMetric ( const double w[3],
const double hp[3] )
inline

Per-axis metric of the physical domain (doc/anisotropic_metric.md §1.1): the weights w_a = 1/h_a'^2, which every level operator carries as b_a^L = nu_dt * w_a / cfac_a^2 (C1), and the spacings hp_a = h_a' that the aspect-ratio COARSENING rule of §5 reads (C3).

Call BEFORE init/initMpi (trap 5): the level table is built there. The default (1,1,1)/(1,1,1) is the isotropic / cell-unit path – every coefficient multiplied by exactly 1.0, and the aspect rule inert by construction (aniso_ false -> today's level table verbatim).

Definition at line 369 of file mac_velocity_mg.hpp.

Referenced by compare().

◆ levelRatios()

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

The per-level coarsening ratio actually chosen (the level table of §5; the two hierarchies share one rule, so on the same grid this equals CutcellMG::levelRatios()).

Definition at line 378 of file mac_velocity_mg.hpp.

◆ init()

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

◆ touches()

bool peclet::flow::VelocityMG::touches ( const Level & lv,
int f ) const
inline

◆ nLevels()

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

Definition at line 541 of file mac_velocity_mg.hpp.

Referenced by init().

◆ level()

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

Definition at line 542 of file mac_velocity_mg.hpp.

Referenced by compare(), and main().

◆ levels()

int peclet::flow::VelocityMG::levels ( ) const
inline

Definition at line 545 of file mac_velocity_mg.hpp.

Referenced by compare().

◆ setFineStencil()

void peclet::flow::VelocityMG::setFineStencil ( FPC AC,
FPC AW,
FPC AE,
FPC AS,
FPC AN,
FPC AB,
FPC AT )
inline

Definition at line 548 of file mac_velocity_mg.hpp.

References AC.

Referenced by main().

◆ setStaircase()

void peclet::flow::VelocityMG::setStaircase ( CCConst theta0,
CCConst solid0,
CCConst resmask0,
double nu_dt,
double idiag,
double thresh )
inline

◆ setStaircaseBc()

void peclet::flow::VelocityMG::setStaircaseBc ( int comp,
CCConst theta0,
CCConst solid0,
CCConst resmask0,
double nu_dt,
double idiag,
double thresh,
bool upwind = false,
double fouw = 0.0 )
inline

◆ restrictAdvVelocities()

◆ buildUpwindCoarse()

void peclet::flow::VelocityMG::buildUpwindCoarse ( int comp,
double nu_dt,
double idiag,
double fouw )
inline

Definition at line 660 of file mac_velocity_mg.hpp.

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

◆ setBC()

void peclet::flow::VelocityMG::setBC ( const int bc[6])
inline

Definition at line 679 of file mac_velocity_mg.hpp.

◆ setBcApplyL0()

void peclet::flow::VelocityMG::setBcApplyL0 ( std::function< void(CCField)> fn)
inline

Definition at line 692 of file mac_velocity_mg.hpp.

◆ setChebyshevSmoother()

void peclet::flow::VelocityMG::setChebyshevSmoother ( bool on,
int degree = 0,
double eigRatio = 10.0 )
inline

Definition at line 700 of file mac_velocity_mg.hpp.

◆ chebyshevSmoother()

bool peclet::flow::VelocityMG::chebyshevSmoother ( ) const
inline

Definition at line 705 of file mac_velocity_mg.hpp.

◆ setAspectThreshold()

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

Anisotropic-coarsening aspect threshold theta (doc/anisotropic_metric.md §5.1).

Definition at line 707 of file mac_velocity_mg.hpp.

◆ setDomainBcOp()

void peclet::flow::VelocityMG::setDomainBcOp ( int comp,
double nu_dt,
double idiag )
inline

◆ solveMax()

double peclet::flow::VelocityMG::solveMax ( double v,
Comm comm ) const
inline

Definition at line 767 of file mac_velocity_mg.hpp.

Referenced by chebLevelBounds(), level0Residual(), and solve().

◆ chebLevelBounds()

void peclet::flow::VelocityMG::chebLevelBounds ( Comm comm)
inline

Definition at line 781 of file mac_velocity_mg.hpp.

References G, peclet::flow::ibmStencilJacobiBounds(), and solveMax().

Referenced by solve().

◆ level0Residual()

◆ solve()

int peclet::flow::VelocityMG::solve ( CCConst b,
CCField x,
int nvc,
int pre,
int post,
int bottom,
double tol = 0.0,
Comm comm = nullComm(),
double resTol = 0.0 )
inline

◆ lastResidualRatio()

double peclet::flow::VelocityMG::lastResidualRatio ( ) const
inline

Definition at line 893 of file mac_velocity_mg.hpp.

◆ vcycle()

◆ smooth()

void peclet::flow::VelocityMG::smooth ( Level & lv,
int sweeps,
bool isL0 )
inline

◆ chebSmooth()

void peclet::flow::VelocityMG::chebSmooth ( Level & lv,
int degree,
bool isL0,
CCConst pin )
inline

◆ fill()

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

Definition at line 991 of file mac_velocity_mg.hpp.

References fillAxis(), and zeroBcGhosts().

Referenced by chebSmooth(), level0Residual(), restrictAdvVelocities(), smooth(), and vcycle().

◆ zeroBcGhosts()

void peclet::flow::VelocityMG::zeroBcGhosts ( Level & lv,
CCField f )
inline

Definition at line 1007 of file mac_velocity_mg.hpp.

References peclet::flow::fillBcGhost(), G, and touches().

Referenced by fill().

◆ fillProlongBcGhosts()

void peclet::flow::VelocityMG::fillProlongBcGhosts ( Level & lv)
inline

Definition at line 1015 of file mac_velocity_mg.hpp.

References peclet::flow::fillBcGhost(), G, and touches().

Referenced by vcycle().

◆ fillAxis()

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

Definition at line 1026 of file mac_velocity_mg.hpp.

References G, and N.

Referenced by fill().

Member Data Documentation

◆ G


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