mantaflow  0.10
A framework for fluid simulation
Public Member Functions | Protected Attributes | List of all members
Manta::GridCg< APPLYMAT > Class Template Reference

Run single iteration of the cg solver. More...

#include <conjugategrad.h>

Inheritance diagram for Manta::GridCg< APPLYMAT >:
Manta::GridCgInterface

Public Member Functions

 GridCg (Grid< Real > &dst, Grid< Real > &rhs, Grid< Real > &residual, Grid< Real > &search, FlagGrid &flags, Grid< Real > &tmp, Grid< Real > *A0, Grid< Real > *pAi, Grid< Real > *pAj, Grid< Real > *pAk)
 constructor
 
void doInit ()
 
bool iterate ()
 
void solve (int maxIter)
 
void setICPreconditioner (PreconditionType method, Grid< Real > *A0, Grid< Real > *Ai, Grid< Real > *Aj, Grid< Real > *Ak)
 init pointers, and copy values from "normal" matrix
 
void setMGPreconditioner (PreconditionType method, GridMg *MG)
 
void forceReinit ()
 force reinit upon next iterate() call, can be used for doing multiple solves
 
Real getSigma () const
 
Real getIterations () const
 
Real getResNorm () const
 
void setAccuracy (Real set)
 
Real getAccuracy () const
 
- Public Member Functions inherited from Manta::GridCgInterface
void setUseL2Norm (bool set)
 

Protected Attributes

bool mInited
 
int mIterations
 
Grid< Real > & mDst
 
Grid< Real > & mRhs
 
Grid< Real > & mResidual
 
Grid< Real > & mSearch
 
FlagGridmFlags
 
Grid< Real > & mTmp
 
Grid< Real > * mpA0
 
Grid< Real > * mpAi
 
Grid< Real > * mpAj
 
Grid< Real > * mpAk
 
PreconditionType mPcMethod
 
Grid< Real > * mpPCA0
 preconditioning grids
 
Grid< Real > * mpPCAi
 
Grid< Real > * mpPCAj
 
Grid< Real > * mpPCAk
 
GridMgmMG
 
Real mSigma
 sigma / residual
 
Real mAccuracy
 accuracy of solver (max. residuum)
 
Real mResNorm
 norm of the residual
 
- Protected Attributes inherited from Manta::GridCgInterface
bool mUseL2Norm
 

Additional Inherited Members

- Public Types inherited from Manta::GridCgInterface
enum  PreconditionType { PC_None =0, PC_ICP, PC_mICP, PC_MGP }
 

Detailed Description

template<class APPLYMAT>
class Manta::GridCg< APPLYMAT >

Run single iteration of the cg solver.

the template argument determines the type of matrix multiplication, typically a ApplyMatrix kernel, another one is needed e.g. for the mesh-based wave equation solver


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