flow
Kokkos cut-cell IBM incompressible Navier-Stokes solver + pnm pore extraction
Loading...
Searching...
No Matches
mac_velocity_mg.hpp File Reference

flow — portable (Kokkos) velocity (momentum) multigrid for the IBM diffusion solve: the STAIRCASE coarse operator. More...

#include <functional>
#include <Kokkos_Core.hpp>
#include <vector>
#include "mac_cutcell_mg.hpp"
#include "mac_ibm.hpp"
#include "staggered_advection.hpp"

Go to the source code of this file.

Classes

class  peclet::flow::VelocityMG
 
struct  peclet::flow::VelocityMG::Level
 

Namespaces

namespace  peclet
 
namespace  peclet::flow
 

Functions

void peclet::flow::residualVarPin (CCField r, CCConst x, CCConst b, FPC AC, FPC AW, FPC AE, FPC AS, FPC AN, FPC AB, FPC AT, CCConst pin, C3 e, int g)
 
void peclet::flow::prolongMasked (CCField fine, CCConst coarse, CCConst mask, C3 fext, C3 cext, int g, C3 finner, C3 ratio, double eps)
 
void peclet::flow::buildVelocityStaircase (FPV AC, FPV AW, FPV AE, FPV AS, FPV AN, FPV AB, FPV AT, CCConst theta, C3 e, int g, double bx, double by, double bz, double thresh, double idiag)
 
void peclet::flow::buildAdvCoarse (FPV AC, FPV AW, FPV AE, FPV AS, FPV AN, FPV AB, FPV AT, CCConst U, CCConst V, CCConst W, int comp, C3 e, int g, double bx, double by, double bz, double fouw, double sx, double sy, double sz, double idiag)
 
void peclet::flow::buildConstAniso (FPV AC, FPV AW, FPV AE, FPV AS, FPV AN, FPV AB, FPV AT, C3 e, double bx, double by, double bz, double idiag)
 
void peclet::flow::boundaryFold (FPV AC, C3 e, int g, int a, int s, double beta)
 
void peclet::flow::fillBcGhost (CCField x, C3 e, int g, int a, int s, int dirichlet)
 
void peclet::flow::zeroPlane (CCField m, C3 e, int axis, int idx)
 
void peclet::flow::thresholdMask (CCField m, CCConst theta, double thresh)
 
void peclet::flow::mulMask (CCField r, CCConst m)
 

Detailed Description

flow — portable (Kokkos) velocity (momentum) multigrid for the IBM diffusion solve: the STAIRCASE coarse operator.

Single-GPU (periodic) port of the velocity-MG path in CUDA's DistributedPoissonMG (mac_multigrid.cuh): the fine level is the sharp Robust-Scaled IBM stencil As_[c] (so the residual + smoother use the TRUE operator and the fixed point is the exact sharp solution); the coarse levels use the geometry-aware STAIRCASE Helmholtz (volume fraction theta only CLASSIFIES cells: theta>=0.5 fluid / <0.5 solid-pinned, then a plain constant-coefficient Helmholtz at fluid cells). The fine IBM-cell residuals are excluded from coarsening (clean-fluid mask) and no coarse correction is pumped back into the cut-cell band (masked prolong); the fine smoother owns the boundary. See [[velocity-mg-design]].

The whole hierarchy uses ghost width G=2 (the velocity block's width), so level 0 IS the solver's velocity block: the IBM stencil + RHS + solution need no g=2<->g=1 bridging. Reuses restrictAvg / prolongAdd (mac_cutcell_mg) and ibmRbgsStencilColor (the pin-aware variable-coeff RB-GS smoother == mg_smooth_var_k). Runs on any Kokkos backend.

Definition in file mac_velocity_mg.hpp.