peclet.voro 1.0.4
Device-native moving-particle Voronoi dynamics
Loading...
Searching...
No Matches
peclet::voro::fv::PressureSolver< Real > Struct Template Reference

#include <covolume.hpp>

Public Types

using Exec = peclet::core::ExecSpace
 

Public Member Functions

void setHooks (std::function< void(const DV< Real > &, int)> ex, std::function< Real(Real)> s)
 
void setupVelocity (const FaceMesh< Real > &mesh, Real nu, Real dt, bool withAmg)
 
void setup (const FaceMesh< Real > &mesh, bool withAmg)
 
void applyK (const DV< Real > &zz, const DV< Real > &qq) const
 
Real dot (const DV< Real > &a, const DV< Real > &bb) const
 
void precond (const DV< Real > &rr, const DV< Real > &zz) const
 
int solve (const DV< Real > &f, const DV< Real > &p)
 Solve −L p = f (mean of f removed, mean of p pinned to zero). Returns iterations.
 

Public Attributes

FaceMesh< Real > m
 
bool useAmg = false
 
Real tol = 1e-12
 
int maxIter = 5000
 
Real lapScale = 1
 
bool deflate = true
 
DV< Real > extraDiag
 
int lastIters = 0
 
Real lastRes = 0
 
peclet::core::solver::GraphAMGDevice amg
 
std::function< void(const DV< Real > &, int)> exchange
 
std::function< Real(Real)> sum
 
Real localVtot_ = 0
 
DV< Real > r
 
DV< Real > z
 
DV< Real > q
 
DV< Real > b
 
DV< Real > Kd
 
Kokkos::View< double *, peclet::core::MemSpace > rd
 
Kokkos::View< double *, peclet::core::MemSpace > zd
 
Real Vtot = 0
 

Detailed Description

template<class Real>
struct peclet::voro::fv::PressureSolver< Real >

Pressure Poisson solver: −L φ = f, unpreconditioned CG (C1) or GraphAMGDevice-PCG on the symmetric form K = −V L (K_ii = Σ A_f/d_f, K_ij = −A_f/d_f), b = V (f − mean f).

Member Typedef Documentation

◆ Exec

template<class Real >
using peclet::voro::fv::PressureSolver< Real >::Exec = peclet::core::ExecSpace

Member Function Documentation

◆ applyK()

template<class Real >
void peclet::voro::fv::PressureSolver< Real >::applyK ( const DV< Real > &  zz,
const DV< Real > &  qq 
) const
inline

◆ dot()

template<class Real >
Real peclet::voro::fv::PressureSolver< Real >::dot ( const DV< Real > &  a,
const DV< Real > &  bb 
) const
inline

◆ precond()

template<class Real >
void peclet::voro::fv::PressureSolver< Real >::precond ( const DV< Real > &  rr,
const DV< Real > &  zz 
) const
inline

◆ setHooks()

template<class Real >
void peclet::voro::fv::PressureSolver< Real >::setHooks ( std::function< void(const DV< Real > &, int)>  ex,
std::function< Real(Real)>  s 
)
inline

Install the distributed hooks (after setup): the total volume of the mean deflation becomes the GLOBAL volume — with the rank-local one the deflated right-hand side is not mean-free and CG on the singular Neumann system drifts (the C5 bug found by the isolated-solve gate).

◆ setup()

template<class Real >
void peclet::voro::fv::PressureSolver< Real >::setup ( const FaceMesh< Real > &  mesh,
bool  withAmg 
)
inline

◆ setupVelocity()

template<class Real >
void peclet::voro::fv::PressureSolver< Real >::setupVelocity ( const FaceMesh< Real > &  mesh,
Real  nu,
Real  dt,
bool  withAmg 
)
inline

Velocity-solve configuration: (V/Δt + ν Σ_wall A/h_A) u − ν V L u; Uwall-independent (the Dirichlet wall value enters the right-hand side). Rebuild when Δt or ν change.

◆ solve()

template<class Real >
int peclet::voro::fv::PressureSolver< Real >::solve ( const DV< Real > &  f,
const DV< Real > &  p 
)
inline

Solve −L p = f (mean of f removed, mean of p pinned to zero). Returns iterations.

Member Data Documentation

◆ amg

template<class Real >
peclet::core::solver::GraphAMGDevice peclet::voro::fv::PressureSolver< Real >::amg

◆ b

template<class Real >
DV<Real> peclet::voro::fv::PressureSolver< Real >::b

◆ deflate

template<class Real >
bool peclet::voro::fv::PressureSolver< Real >::deflate = true

◆ exchange

template<class Real >
std::function<void(const DV<Real>&, int)> peclet::voro::fv::PressureSolver< Real >::exchange

◆ extraDiag

template<class Real >
DV<Real> peclet::voro::fv::PressureSolver< Real >::extraDiag

◆ Kd

template<class Real >
DV<Real> peclet::voro::fv::PressureSolver< Real >::Kd

◆ lapScale

template<class Real >
Real peclet::voro::fv::PressureSolver< Real >::lapScale = 1

◆ lastIters

template<class Real >
int peclet::voro::fv::PressureSolver< Real >::lastIters = 0

◆ lastRes

template<class Real >
Real peclet::voro::fv::PressureSolver< Real >::lastRes = 0

◆ localVtot_

template<class Real >
Real peclet::voro::fv::PressureSolver< Real >::localVtot_ = 0

◆ m

template<class Real >
FaceMesh<Real> peclet::voro::fv::PressureSolver< Real >::m

◆ maxIter

template<class Real >
int peclet::voro::fv::PressureSolver< Real >::maxIter = 5000

◆ q

template<class Real >
DV<Real> peclet::voro::fv::PressureSolver< Real >::q

◆ r

template<class Real >
DV<Real> peclet::voro::fv::PressureSolver< Real >::r

◆ rd

template<class Real >
Kokkos::View<double*, peclet::core::MemSpace> peclet::voro::fv::PressureSolver< Real >::rd

◆ sum

template<class Real >
std::function<Real(Real)> peclet::voro::fv::PressureSolver< Real >::sum

◆ tol

template<class Real >
Real peclet::voro::fv::PressureSolver< Real >::tol = 1e-12

◆ useAmg

template<class Real >
bool peclet::voro::fv::PressureSolver< Real >::useAmg = false

◆ Vtot

template<class Real >
Real peclet::voro::fv::PressureSolver< Real >::Vtot = 0

◆ z

template<class Real >
DV<Real> peclet::voro::fv::PressureSolver< Real >::z

◆ zd

template<class Real >
Kokkos::View<double*, peclet::core::MemSpace> peclet::voro::fv::PressureSolver< Real >::zd

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