76Ostream&
operator<<(Ostream&,
const lduMatrix&);
77Ostream&
operator<<(Ostream&,
const InfoProxy<lduMatrix>&);
90 std::reference_wrapper<const lduMesh> lduMesh_;
144 virtual const word&
type()
const = 0;
307 virtual const word&
type()
const = 0;
450 virtual const word&
type()
const = 0;
464 (sol, solverControls)
476 (sol, solverControls)
626 return (diagPtr_ && !lowerPtr_ && !upperPtr_);
631 return (diagPtr_ && (!lowerPtr_ && upperPtr_));
636 return (diagPtr_ && lowerPtr_ && upperPtr_);
718 const label startRequest
726 const word& fieldName,
A field of fields is a PtrList of fields with reference counting.
A helper class for outputting values to Ostream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
An edge is a list of two point labels. The functionality it provides supports the discretisation on a...
The class contains the addressing required by the lduMatrix: upper, lower and losort.
virtual const lduSchedule & patchSchedule() const =0
Return patch field evaluation schedule.
Abstract base-class for lduMatrix preconditioners.
declareRunTimeSelectionTable(autoPtr, preconditioner, symMatrix,(const solver &sol, const dictionary &solverControls),(sol, solverControls))
const solver & solver_
Reference to the base-solver this preconditioner is used with.
static autoPtr< preconditioner > New(const solver &sol, const dictionary &solverControls)
Return a new preconditioner.
preconditioner(const solver &sol)
declareRunTimeSelectionTable(autoPtr, preconditioner, asymMatrix,(const solver &sol, const dictionary &solverControls),(sol, solverControls))
virtual void precondition(solveScalarField &wA, const solveScalarField &rA, const direction cmpt=0) const =0
Return wA the preconditioned form of residual rA.
virtual void preconditionT(solveScalarField &wT, const solveScalarField &rT, const direction cmpt=0) const
virtual void read(const dictionary &)
static word getName(const dictionary &)
Find the preconditioner name (directly or from a sub-dictionary)
virtual const word & type() const =0
Runtime type information.
virtual ~preconditioner()=default
Destructor.
Abstract base-class for lduMatrix smoothers.
const FieldField< Field, scalar > & interfaceIntCoeffs() const noexcept
const lduMatrix & matrix_
const lduInterfaceFieldPtrsList & interfaces_
const lduInterfaceFieldPtrsList & interfaces() const noexcept
virtual ~smoother()=default
Destructor.
declareRunTimeSelectionTable(autoPtr, smoother, symMatrix,(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces),(fieldName, matrix, interfaceBouCoeffs, interfaceIntCoeffs, interfaces))
const FieldField< Field, scalar > & interfaceBouCoeffs_
virtual void scalarSmooth(solveScalarField &psi, const solveScalarField &source, const direction cmpt, const label nSweeps) const =0
Smooth the solution for a given number of sweeps.
const lduMatrix & matrix() const noexcept
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.
const FieldField< Field, scalar > & interfaceIntCoeffs_
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.
static word getName(const dictionary &)
Find the smoother name (directly or from a sub-dictionary)
const FieldField< Field, scalar > & interfaceBouCoeffs() const noexcept
declareRunTimeSelectionTable(autoPtr, smoother, asymMatrix,(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces),(fieldName, matrix, interfaceBouCoeffs, interfaceIntCoeffs, interfaces))
virtual const word & type() const =0
Runtime type information.
const word & fieldName() const noexcept
Abstract base-class for lduMatrix solvers.
const FieldField< Field, scalar > & interfaceIntCoeffs() const noexcept
const lduMatrix & matrix_
declareRunTimeSelectionTable(autoPtr, solver, symMatrix,(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls),(fieldName, matrix, interfaceBouCoeffs, interfaceIntCoeffs, interfaces, solverControls))
label maxIter_
Maximum number of iterations in the solver.
profilingTrigger profiling_
scalar tolerance_
Final convergence tolerance.
const lduInterfaceFieldPtrsList & interfaces() const noexcept
lduInterfaceFieldPtrsList interfaces_
const FieldField< Field, scalar > & interfaceBouCoeffs_
declareRunTimeSelectionTable(autoPtr, solver, asymMatrix,(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls),(fieldName, matrix, interfaceBouCoeffs, interfaceIntCoeffs, interfaces, solverControls))
label minIter_
Minimum number of iterations in the solver.
const lduMatrix & matrix() const noexcept
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.
solveScalarField::cmptType normFactor(const solveScalarField &psi, const solveScalarField &source, const solveScalarField &Apsi, solveScalarField &tmpField) const
int log_
Level of verbosity in the solver output statements.
virtual solverPerformance scalarSolve(solveScalarField &psi, const solveScalarField &source, const direction cmpt=0) const
Solve with given field and rhs (in solveScalar precision).
virtual ~solver()=default
Destructor.
scalar relTol_
Convergence tolerance relative to the initial.
const FieldField< Field, scalar > & interfaceIntCoeffs_
virtual void readControls()
Read the control parameters from the controlDict_.
virtual void read(const dictionary &)
Read and reset the solver parameters from the given stream.
static const label defaultMaxIter_
Default maximum number of iterations in the solver.
const FieldField< Field, scalar > & interfaceBouCoeffs() const noexcept
dictionary controlDict_
Dictionary of controls.
virtual const word & type() const =0
Runtime type information.
const word & fieldName() const noexcept
virtual solverPerformance solve(scalarField &psi, const scalarField &source, const direction cmpt=0) const =0
Solve with given field and rhs.
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
tmp< scalarField > H1() const
void operator=(const lduMatrix &)
tmp< Field< Type > > faceH(const Field< Type > &) const
const lduAddressing & lduAddr() const
Return the LDU addressing.
friend Ostream & operator<<(Ostream &, const InfoProxy< lduMatrix > &)
void residual(solveScalarField &rA, const solveScalarField &psi, const scalarField &source, const FieldField< Field, scalar > &interfaceBouCoeffs, const lduInterfaceFieldPtrsList &interfaces, const direction cmpt) const
void Tmul(solveScalarField &, const tmp< solveScalarField > &, const FieldField< Field, scalar > &, const lduInterfaceFieldPtrsList &, const direction cmpt) const
Matrix transpose multiplication with updated interfaces.
friend Ostream & operator<<(Ostream &, const lduMatrix &)
tmp< Field< Type > > faceH(const tmp< Field< Type > > &) const
void initMatrixInterfaces(const bool add, const FieldField< Field, scalar > &interfaceCoeffs, const lduInterfaceFieldPtrsList &interfaces, const solveScalarField &psiif, solveScalarField &result, const direction cmpt) const
void setLduMesh(const lduMesh &m)
Set the LDU mesh containing the addressing is obtained.
const lduMesh & mesh() const
Return the LDU mesh from which the addressing is obtained.
void sumA(solveScalarField &, const FieldField< Field, scalar > &, const lduInterfaceFieldPtrsList &) const
Sum the coefficients on each row of the matrix.
void setResidualField(const scalarField &residual, const word &fieldName, const bool initial) const
const lduSchedule & patchSchedule() const
Return the patch evaluation schedule.
void operator*=(const scalarField &)
InfoProxy< lduMatrix > info() const
Return info proxy.
tmp< Field< Type > > H(const Field< Type > &) const
void operator+=(const lduMatrix &)
void sumMagOffDiag(scalarField &sumOff) const
void Amul(solveScalarField &, const tmp< solveScalarField > &, const FieldField< Field, scalar > &, const lduInterfaceFieldPtrsList &, const direction cmpt) const
Matrix multiplication with updated interfaces.
void operator-=(const lduMatrix &)
tmp< Field< Type > > H(const tmp< Field< Type > > &) const
void updateMatrixInterfaces(const bool add, const FieldField< Field, scalar > &interfaceCoeffs, const lduInterfaceFieldPtrsList &interfaces, const solveScalarField &psiif, solveScalarField &result, const direction cmpt, const label startRequest) const
Update interfaced interfaces for matrix operations.
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
virtual const lduAddressing & lduAddr() const =0
Return ldu addressing.
Triggers for starting/stopping code profiling.
A class for managing temporary objects.
A class for handling words, derived from Foam::string.
#define ClassName(TypeNameString)
Add typeName information from argument TypeNameString to a class.
const volScalarField & psi
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
lduMatrix member H operations.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
Forward declarations of the specialisations of Field<T> for scalar, vector and tensor.
Macros to ease declaration of run-time selection tables.
#define declareRunTimeSelectionTable(ptrWrapper, baseType, argNames, argList, parList)
Declare a run-time selection (variables and adder classes)