Go to the documentation of this file.
34 template<
class Type,
class DType,
class LUType>
38 const word& fieldName,
43 const word solverName(solverDict.
get<
word>(
"solver"));
59 auto* ctorPtr = symMatrixConstructorTable(solverName);
66 "symmetric matrix solver",
68 *symMatrixConstructorTablePtr_
84 auto* ctorPtr = asymMatrixConstructorTable(solverName);
91 "asymmetric matrix solver",
93 *asymMatrixConstructorTablePtr_
109 <<
"cannot solve incomplete matrix, "
110 "no diagonal or off-diagonal coefficient"
119 template<
class Type,
class DType,
class LUType>
122 const word& fieldName,
127 fieldName_(fieldName),
130 controlDict_(solverDict),
134 maxIter_(defaultMaxIter_),
144 template<
class Type,
class DType,
class LUType>
147 controlDict_.readIfPresent(
"log", log_);
148 controlDict_.readIfPresent(
"minIter", minIter_);
149 controlDict_.readIfPresent(
"maxIter", maxIter_);
150 controlDict_.readIfPresent(
"tolerance", tolerance_);
151 controlDict_.readIfPresent(
"relTol", relTol_);
155 template<
class Type,
class DType,
class LUType>
161 controlDict_ = solverDict;
166 template<
class Type,
class DType,
class LUType>
175 matrix_.sumA(tmpField);
A class for handling words, derived from Foam::string.
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
static constexpr const zero Zero
Type gAverage(const FieldField< Field, Type > &f)
A class representing the concept of 1 (one) that can be used to avoid manipulating objects known to b...
Type gSum(const FieldField< Field, Type > &f)
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
const word & fieldName() const noexcept
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
virtual void read(const dictionary &solverDict)
tmp< DimensionedField< scalar, GeoMesh > > stabilise(const DimensionedField< scalar, GeoMesh > &dsf, const dimensioned< scalar > &ds)
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
errorManipArg< error, int > exit(error &err, const int errNo=1)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A traits class, which is primarily used for primitives.
const dimensionedScalar e
solver(const word &fieldName, const LduMatrix< Type, DType, LUType > &matrix, const dictionary &solverDict)
#define FatalIOErrorInFunction(ios)
const volScalarField & psi
Type normFactor(const Field< Type > &psi, const Field< Type > &Apsi, Field< Type > &tmpField) const
bool readIfPresent(const word &keyword, T &val, enum keyType::option matchOpt=keyType::REGEX) const
static autoPtr< solver > New(const word &fieldName, const LduMatrix< Type, DType, LUType > &matrix, const dictionary &solverDict)
const LduMatrix< Type, DType, LUType > & matrix() const noexcept
virtual void readControls()