Go to the documentation of this file.
39 lduMatrix::solver::addsymMatrixConstructorToTable<smoothSolver>
42 lduMatrix::solver::addasymMatrixConstructorToTable<smoothSolver>
51 const word& fieldName,
122 solveScalar normFactor = 0;
132 matrix_.Amul(Apsi,
psi, interfaceBouCoeffs_, interfaces_, cmpt);
135 normFactor = this->normFactor(
psi, tsource(), Apsi, temp);
137 residual = tsource() - Apsi;
148 gSumMag(residual, matrix().
mesh().comm())/normFactor;
155 <<
" Normalisation factor = " << normFactor <<
endl;
201 gSumMag(residual, matrix().
mesh().comm())/normFactor;
int debug
Static debugging option.
typeOfMag< Type >::type gSumMag(const FieldField< Field, Type > &f)
lduMatrix::solver::addasymMatrixConstructorToTable< smoothSolver > addsmoothSolverAsymMatrixConstructorToTable_
A class for handling words, derived from Foam::string.
A field of fields is a PtrList of fields with reference counting.
OSstream & masterStream(const label communicator)
Convert to OSstream.
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
Abstract base-class for lduMatrix solvers.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual void readControls()
Read the control parameters from the controlDict_.
virtual solverPerformance solve(scalarField &psi, const scalarField &source, const direction cmpt=0) const
Solve the matrix with this solver.
void setResidualField(const scalarField &residual, const word &fieldName, const bool initial) const
messageStream Info
Information stream (uses stdout - output is on the master only)
smoothSolver(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls)
Construct from matrix components and solver controls.
SolverPerformance< Type > solve(faMatrix< Type > &, Istream &)
Solve returning the solution statistics given convergence tolerance.
#define addProfiling(name, descr)
Define profiling trigger with specified name and description string.
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_.
label nSweeps_
Number of sweeps before the evaluation of residual.
static autoPtr< smoother > 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 smoother.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A Field wrapper with possible data conversion.
dictionary controlDict_
Dictionary of controls.
FieldType & ref()
Allow modification without const-ref check.
A const Field wrapper with possible data conversion.
virtual void smooth(solveScalarField &psi, const scalarField &source, const direction cmpt, const label nSweeps) const =0
Smooth the solution for a given number of sweeps.
lduMatrix::solver::addsymMatrixConstructorToTable< smoothSolver > addsmoothSolverSymMatrixConstructorToTable_
T getOrDefault(const word &keyword, const T &deflt, enum keyType::option matchOpt=keyType::REGEX) const
const volScalarField & psi
defineTypeNameAndDebug(combustionModel, 0)