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

flow — portable (Kokkos) geometric multigrid for the cut-cell (variable-openness) pressure Poisson. More...

#include <cmath>
#include <Kokkos_Core.hpp>
#include <memory>
#include <vector>
#include "mac_bc.hpp"
#include "mac_pressure.hpp"
#include "peclet/core/solver/graph_amg.hpp"

Go to the source code of this file.

Classes

class  peclet::flow::CutcellMG
 
struct  peclet::flow::CutcellMG::Level
 

Namespaces

namespace  peclet
 
namespace  peclet::flow
 

Typedefs

using peclet::flow::MReal = float
 
using peclet::flow::FPV = Kokkos::View< MReal *, CCMem >
 
using peclet::flow::FPC = Kokkos::View< const MReal *, CCMem >
 

Functions

void peclet::flow::coarsenOpenAvg (CCField oxc, CCField oyc, CCField ozc, CCConst oxf, CCConst oyf, CCConst ozf, C3 cext, C3 fext, int g, C3 cinner, C3 ratio)
 
void peclet::flow::residualCutcell (CCField r, CCConst x, CCConst b, FPC AC, FPC AW, FPC AE, FPC AS, FPC AN, FPC AB, FPC AT, C3 e, int g)
 
void peclet::flow::restrictAvg (CCField coarse, CCConst fine, C3 cext, C3 fext, int g, C3 cinner, C3 ratio)
 
void peclet::flow::prolongAdd (CCField fine, CCConst coarse, C3 fext, C3 cext, int g, C3 finner, C3 ratio)
 

Detailed Description

flow — portable (Kokkos) geometric multigrid for the cut-cell (variable-openness) pressure Poisson.

Single-GPU (periodic) port of CUDA's DistributedPoissonMG (mac_multigrid.cuh): a level hierarchy with the rediscretized cut-cell operator (average-coarsen the face openness per level + re-assemble the operator at the coarse spacing, mg_coarsen_open_avg_k), a V-cycle with red-black Gauss-Seidel smoothing + average restriction + trilinear prolongation + constant-null-space (mean) removal, and an MG-PCG outer driver (CG preconditioned by one symmetric V-cycle). Operator stored single-precision (mreal=float) + double iterate, exactly as CUDA. Reuses buildCutcellOp / cutcellSmoothColor / applyCutcellOp (mac_pressure). Not yet ported (noted for later): Galerkin coarse op, Chebyshev smoother, semi-coarsening, domain-BC MG, MPI. Runs on any Kokkos backend.

Definition in file mac_cutcell_mg.hpp.