core
Shared MPI block decomposition + asynchronous ghost-layer exchange (header-only C++20)
Loading...
Searching...
No Matches
peclet::core::amr::PCG< Dim, Bits > Class Template Reference

#include <pcg.hpp>

Classes

struct  Result
 

Public Types

using MG = Multigrid< Dim, Bits >
 

Public Member Functions

void setVcycle (int pre, int post, int bottom, double omega)
 V-cycle parameters used for the preconditioner application.
 
void setCyclesPerPrec (int k)
 Number of V-cycles per preconditioner application (default 1).
 
void setSingular (bool s)
 Whether to project out the constant nullspace (default true; set false for the non-singular homogeneous-Dirichlet operator).
 
Result solve (MG &mg, View< double > x, View< const double > rhs, int maxIters=200, double tol=1e-10)
 Solve L x = rhs on mg's finest level into x (size n).
 

Detailed Description

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
class peclet::core::amr::PCG< Dim, Bits >

Definition at line 115 of file pcg.hpp.

Member Typedef Documentation

◆ MG

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
using peclet::core::amr::PCG< Dim, Bits >::MG = Multigrid<Dim, Bits>

Definition at line 117 of file pcg.hpp.

Member Function Documentation

◆ setVcycle()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
void peclet::core::amr::PCG< Dim, Bits >::setVcycle ( int  pre,
int  post,
int  bottom,
double  omega 
)
inline

V-cycle parameters used for the preconditioner application.

Definition at line 126 of file pcg.hpp.

◆ setCyclesPerPrec()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
void peclet::core::amr::PCG< Dim, Bits >::setCyclesPerPrec ( int  k)
inline

Number of V-cycles per preconditioner application (default 1).

Definition at line 133 of file pcg.hpp.

◆ setSingular()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
void peclet::core::amr::PCG< Dim, Bits >::setSingular ( bool  s)
inline

Whether to project out the constant nullspace (default true; set false for the non-singular homogeneous-Dirichlet operator).

Definition at line 136 of file pcg.hpp.

◆ solve()

template<int Dim, unsigned Bits = (Dim == 2 ? 32u : (Dim == 3 ? 21u : 16u))>
Result peclet::core::amr::PCG< Dim, Bits >::solve ( MG mg,
View< double x,
View< const double rhs,
int  maxIters = 200,
double  tol = 1e-10 
)
inline

Solve L x = rhs on mg's finest level into x (size n).

Returns iteration count and residual history. tol is relative to the initial residual; maxIters caps the CG iterations. The multigrid mg must already be built (operator + hierarchy).

Definition at line 141 of file pcg.hpp.

References peclet::core::amr::applyFv(), peclet::core::amr::axpy(), peclet::core::amr::buildFluidMask(), peclet::core::amr::dotVol(), peclet::core::amr::FvOp::invVol, peclet::core::amr::maskSolid(), peclet::core::amr::negate(), peclet::core::amr::removeMeanVol(), and peclet::core::amr::zpby().


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