core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
Loading...
Searching...
No Matches
momentum.hpp File Reference
#include <cmath>
#include <functional>
#include <map>
#include <vector>
#include "peclet/core/amr/block_octree.hpp"
#include "peclet/core/amr/face_csr.hpp"
#include "peclet/core/amr/multigrid.hpp"
#include "peclet/core/amr/pcg.hpp"
#include "peclet/core/common/view.hpp"

Go to the source code of this file.

Classes

struct  peclet::core::amr::MomentumOp
 Assembled momentum operator on the device: (A u)_i = diag_i u_i + Σ coef·u[nbr], with an optional implicit-FOU advection part (rebuilt each step from the lagged velocity): a per-cell outflow diagonal advDiag + per-face inflow coefficients over a second (face-geometry) CSR. More...
 
struct  peclet::core::amr::Coloring
 A graph colouring of a face CSR: cells grouped by colour. More...
 
class  peclet::core::amr::MomentumMG< Bits >
 
class  peclet::core::amr::MomentumSolver< Bits >
 
struct  peclet::core::amr::MomentumSolver< Bits >::Result
 

Namespaces

namespace  peclet
 
namespace  peclet::core
 
namespace  peclet::core::amr
 

Functions

FaceCsrOpT< View< const double >, View< const Index > > peclet::core::amr::momView (const MomentumOp &op)
 View the assembled momentum operator through the shared, backend-agnostic FaceCsrOpT, so the device kernels and the host serial solver (cut_cell.hpp) run the same row arithmetic (face_csr.hpp) and cannot drift.
 
void peclet::core::amr::applyMom (const MomentumOp &op, View< const double > u, View< double > Au)
 Au = A u (cut-cell operator + optional implicit-FOU advection).
 
void peclet::core::amr::residualMom (const MomentumOp &op, View< const double > u, View< const double > b, View< double > res)
 res = b − A u.
 
void peclet::core::amr::jacobiMom (const MomentumOp &op, View< double > u, View< const double > b, View< double > tmp, double omega)
 One weighted-Jacobi sweep of A u = b (in place).
 
double peclet::core::amr::dotPlain (View< const double > a, View< const double > b, Index n)
 Plain (unweighted) dot product.
 
void peclet::core::amr::bicgPUpdate (View< double > p, View< const double > r, View< const double > v, double beta, double omega, Index n)
 BiCGStab direction update: p = r + β(p − ω v).
 
Coloring peclet::core::amr::greedyColoring (const std::vector< Index > &start, const std::vector< Index > &nbr, Index n)
 Greedy colouring of the face CSR (start/nbr, host): each cell gets the smallest colour not used by any face neighbour, so cells of one colour share no edge (race-free parallel GS sweep).
 
void peclet::core::amr::multicolorGSMom (const MomentumOp &op, View< double > u, View< const double > b, const Coloring &col, double omega)
 One symmetric multicolour Gauss–Seidel sweep of A u = b in place (momentum operator: diag + face CSR + optional implicit-FOU advection): a forward pass over colours 0…C-1 followed by a reverse pass C-1…0.