core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
Loading...
Searching...
No Matches
fv_op.hpp File Reference

Go to the source code of this file.

Classes

struct  peclet::core::amr::FvOp
 

Namespaces

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

Functions

template<int Dim, unsigned Bits>
void peclet::core::amr::laplacian (BlockOctreeView< Dim, Bits > dev, View< double > x, View< double > y, double inv)
 y = inv · Σ_faces (x_nb − x_i) (= ∇² in spacing h0 with inv = 1/h0²), on device.
 
template<int Dim, unsigned Bits>
void peclet::core::amr::jacobiSweep (BlockOctreeView< Dim, Bits > dev, View< double > x, View< const double > b, View< double > lx, double inv, double omega)
 One weighted-Jacobi sweep of L u = b with L = ∇² (negative-definite, diagonal −2·Dim·inv), on device.
 
FvCsrOpT< View< const double >, View< const Index > > peclet::core::amr::fvView (const FvOp &op)
 View the assembled FV operator through the shared backend-agnostic FvCsrOpT, so the device kernels and the host AmrPoisson run the same row arithmetic (face_csr.hpp).
 
void peclet::core::amr::applyFv (const FvOp &op, View< const double > u, View< double > Lu)
 Hu = (c0·I + cD·L) u (consistent conservative FV Laplacian, c0=0/cD=1 ⇒ pure L).
 
void peclet::core::amr::residualFv (const FvOp &op, View< const double > u, View< const double > rhs, View< double > res)
 res = rhs − H u.
 
void peclet::core::amr::jacobiFv (const FvOp &op, View< double > u, View< const double > rhs, View< double > tmp, double omega)
 One weighted-Jacobi sweep of H u = rhs (in place).
 
void peclet::core::amr::removeMeanFv (const FvOp &op, View< double > u)
 Project u to volume-weighted-mean-zero over the ACTIVE (fluid) cells of the operator — the constant-nullspace removal for the singular periodic (pure-Neumann) operator.
 
void peclet::core::amr::quadDelta (View< const Index > qStart, View< const Index > qSlot, View< const double > qCoef, View< const double > u, View< double > dq, Index n)
 dq = (L_quad − L_std) u, the quadratic coarse-fine correction as its own SpMV over a precomputed CSR (built from AmrPoisson::coarseStar).