Go to the documentation of this file.
31 template<
class Type,
class DType,
class LUType>
35 const word& fieldName,
56 typename symMatrixConstructorTable::iterator constructorIter =
57 symMatrixConstructorTablePtr_->find(solverName);
59 if (constructorIter == symMatrixConstructorTablePtr_->end())
62 <<
"Unknown symmetric matrix solver " << solverName
64 <<
"Valid symmetric matrix solvers are :" <<
endl
65 << symMatrixConstructorTablePtr_->toc()
81 typename asymMatrixConstructorTable::iterator constructorIter =
82 asymMatrixConstructorTablePtr_->find(solverName);
84 if (constructorIter == asymMatrixConstructorTablePtr_->end())
87 <<
"Unknown asymmetric matrix solver " << solverName
89 <<
"Valid asymmetric matrix solvers are :" <<
endl
90 << asymMatrixConstructorTablePtr_->toc()
107 <<
"cannot solve incomplete matrix, "
108 "no diagonal or off-diagonal coefficient"
118 template<
class Type,
class DType,
class LUType>
121 const word& fieldName,
126 fieldName_(fieldName),
129 controlDict_(solverDict),
142 template<
class Type,
class DType,
class LUType>
152 template<
class Type,
class DType,
class LUType>
158 controlDict_ = solverDict;
163 template<
class Type,
class DType,
class LUType>
172 matrix_.sumA(tmpField);
A class for handling words, derived from string.
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
Type gAverage(const FieldField< Field, Type > &f)
ITstream & lookup(const word &, bool recursive=false, bool patternMatch=true) const
Find and return an entry data stream.
label maxIter_
Maximum number of iterations in the solver.
Ostream & endl(Ostream &os)
Add newline and flush stream.
Type gSum(const FieldField< Field, Type > &f)
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
dictionary controlDict_
Dictionary of controls.
virtual void read(const dictionary &solverDict)
Read and reset the solver parameters from the given dictionary.
tmp< DimensionedField< scalar, GeoMesh > > stabilise(const DimensionedField< scalar, GeoMesh > &dsf, const dimensioned< scalar > &ds)
Type relTol_
Convergence tolerance relative to the initial.
A list of keyword definitions, which are a keyword followed by any number of values (e....
void readControl(const dictionary &controlDict, T &control, const word &controlName)
Read a control parameter from controlDict.
Type tolerance_
Final convergence tolerance.
errorManipArg< error, int > exit(error &err, const int errNo=1)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
const volScalarField & psi
label minIter_
Minimum number of iterations in the solver.
Traits class for primitives.
const dimensionedScalar e
Elementary charge.
solver(const word &fieldName, const LduMatrix< Type, DType, LUType > &matrix, const dictionary &solverDict)
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Type normFactor(const Field< Type > &psi, const Field< Type > &Apsi, Field< Type > &tmpField) const
Return the matrix norm used to normalise the residual for the.
static autoPtr< solver > New(const word &fieldName, const LduMatrix< Type, DType, LUType > &matrix, const dictionary &solverDict)
Return a new solver.
virtual void readControls()
Read the control parameters from the controlDict_.