Go to the documentation of this file.
46 const word& fieldName,
73 auto cstrIter = symMatrixConstructorTablePtr_->cfind(
name);
75 if (!cstrIter.found())
80 "symmetric matrix solver",
82 *symMatrixConstructorTablePtr_
101 auto cstrIter = asymMatrixConstructorTablePtr_->cfind(
name);
103 if (!cstrIter.found())
108 "asymmetric matrix solver",
110 *asymMatrixConstructorTablePtr_
129 <<
"cannot solve incomplete matrix, "
130 "no diagonal or off-diagonal coefficient"
141 const word& fieldName,
149 fieldName_(fieldName),
151 interfaceBouCoeffs_(interfaceBouCoeffs),
152 interfaceIntCoeffs_(interfaceIntCoeffs),
153 interfaces_(interfaces),
154 controlDict_(solverControls),
155 profiling_(
"lduMatrix::solver." + fieldName)
174 controlDict_ = solverControls;
205 matrix_.sumA(tmpField, interfaceBouCoeffs_, interfaces_);
207 tmpField *=
gAverage(
psi, matrix_.lduMesh_.comm());
212 (
mag(Apsi - tmpField) +
mag(source - tmpField))(),
213 matrix_.lduMesh_.comm()
A class for handling words, derived from Foam::string.
A field of fields is a PtrList of fields with reference counting.
Type gAverage(const FieldField< Field, Type > &f)
defineRunTimeSelectionTable(reactionRateFlameArea, dictionary)
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
virtual solverPerformance scalarSolve(solveScalarField &psi, const solveScalarField &source, const direction cmpt=0) const
Solve with given field and rhs (in solveScalar precision).
Type gSum(const FieldField< Field, Type > &f)
solveScalarField::cmptType normFactor(const solveScalarField &psi, const solveScalarField &source, const solveScalarField &Apsi, solveScalarField &tmpField) const
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
label minIter_
Minimum number of iterations in the solver.
pTraits< solveScalar >::cmptType cmptType
Component type.
#define FatalIOErrorInLookup(ios, lookupTag, lookupName, lookupTable)
Report an error message using Foam::FatalIOError.
virtual void read(const dictionary &)
Read and reset the solver parameters from the given stream.
word name(const complex &c)
Return string representation of complex.
label maxIter_
Maximum number of iterations in the solver.
SolverPerformance< Type > solve(faMatrix< Type > &, Istream &)
Solve returning the solution statistics given convergence tolerance.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
virtual void readControls()
Read the control parameters from the controlDict_.
static autoPtr< solver > New(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls)
Return a new solver.
scalar relTol_
Convergence tolerance relative to the initial.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A Field wrapper with possible data conversion.
dictionary controlDict_
Dictionary of controls.
scalar tolerance_
Final convergence tolerance.
FieldType & ref()
Allow modification without const-ref check.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const dimensionedScalar e
Elementary charge.
A const Field wrapper with possible data conversion.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
const volScalarField & psi
static const label defaultMaxIter_
Default maximum number of iterations in the solver.
solver(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls)