mantaflow
0.10
A framework for fluid simulation
|
Run single iteration of the cg solver. More...
#include <conjugategrad.h>
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 |
FlagGrid & | mFlags |
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 |
GridMg * | mMG |
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 } |
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