43 #ifndef Foam_faMatrix_H 44 #define Foam_faMatrix_H 64 Ostream& operator<<(Ostream&, const faMatrix<Type>&);
170 template<
class Type2>
178 template<
class Type2>
187 template<
class Type2>
195 template<
class Type2>
217 const bool couples =
true 224 template<
template<
class>
class ListType>
228 const ListType<Type>&
values 249 solver_(
std::move(sol))
335 return internalCoeffs_;
342 return internalCoeffs_;
349 return boundaryCoeffs_;
356 return boundaryCoeffs_;
366 return faceFluxCorrectionPtr_;
372 return bool(faceFluxCorrectionPtr_);
407 const bool forceReference =
false 415 const bool forceReference =
false 423 const bool forceReference =
false 516 void operator*=(
const tmp<areaScalarField::Internal>&);
524 friend tmp<GeometricField<Type, faPatchField, areaMesh>>
527 const faMatrix<Type>&,
528 const DimensionedField<Type, areaMesh>&
531 friend tmp<GeometricField<Type, faPatchField, areaMesh>>
534 const faMatrix<Type>&,
535 const tmp<GeometricField<Type, faPatchField, areaMesh>>&
538 friend tmp<GeometricField<Type, faPatchField, areaMesh>>
541 const tmp<faMatrix<Type>>&,
542 const DimensionedField<Type, areaMesh>&
545 friend tmp<GeometricField<Type, faPatchField, areaMesh>>
548 const tmp<faMatrix<Type>>&,
549 const tmp<GeometricField<Type, faPatchField, areaMesh>>&
555 friend Ostream& operator<< <Type>
558 const faMatrix<Type>&
568 const faMatrix<Type>&,
569 const faMatrix<Type>&,
576 const faMatrix<Type>&,
577 const DimensionedField<Type, areaMesh>&,
584 const faMatrix<Type>&,
585 const dimensioned<Type>&,
593 SolverPerformance<Type>
solve 596 const dictionary& solverControls
603 SolverPerformance<Type>
solve 605 const tmp<faMatrix<Type>>&,
606 const dictionary& solverControls
1005 template<
class Type>
1012 template<
class Type>
1020 template<
class Type>
1027 template<
class Type>
1035 template<
class Type>
1042 template<
class Type>
1049 template<
class Type>
1056 template<
class Type>
1063 template<
class Type>
1070 template<
class Type>
1078 template<
class Type>
1085 template<
class Type>
void negate()
Inplace negate.
void setValues(const labelUList &faceLabels, const Type &value)
Set solution in given faces to the specified value and eliminate the corresponding equations from the...
faceFluxFieldPtrType & faceFluxCorrectionPtr()
Return pointer to face-flux non-orthogonal correction field.
void operator-=(const faMatrix< Type > &)
tmp< scalarField > D() const
Return the matrix diagonal.
const dimensionSet & dimensions() const noexcept
GeometricField< Type, faPatchField, areaMesh > psiFieldType
The geometric field type for psi.
void operator+=(const faMatrix< Type > &)
const dictionary & solverDict() const
Return the solver dictionary for psi.
Reference counter for various OpenFOAM components.
faMatrix(const GeometricField< Type, faPatchField, areaMesh > &psi, const dimensionSet &ds)
Construct given a field to solve for.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
GeometricField< Type, faePatchField, edgeMesh > * faceFluxFieldPtrType
Declare return type of the faceFluxCorrectionPtr() function.
void addToInternalField(const labelUList &addr, const Field< Type2 > &pf, Field< Type2 > &intf) const
Add patch contribution to internal field.
SolverPerformance< Type > solve()
Solve returning the solution statistics.
void setComponentReference(const label patchi, const label facei, const direction cmpt, const scalar value)
Set reference level for a component of the solution on a given patch face.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
void addBoundaryDiag(scalarField &diag, const direction cmpt) const
Field< Type > & source() noexcept
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
void setReferences(const labelUList &faceLabels, const Type &value, const bool forceReference=false)
Set reference level for solution.
Generic GeometricField class.
Generic dimensioned Type class.
faPatchField<Type> abstract base class. This class gives a fat-interface to all derived classes cover...
labelList faceLabels(nFaceLabels)
DimensionedField< scalar, areaMesh > Internal
The internal field type from which this GeometricField is derived.
void addBoundarySource(Field< Type > &source, const bool couples=true) const
const FieldField< Field, Type > & boundaryCoeffs() const noexcept
faBoundary scalar field containing pseudo-matrix coeffs for boundary cells
A field of fields is a PtrList of fields with reference counting.
const FieldField< Field, Type > & internalCoeffs() const noexcept
faBoundary scalar field containing pseudo-matrix coeffs for internal cells
class FOAM_DEPRECATED_FOR(2017-05, "Foam::Enum") NamedEnum
tmp< GeometricField< Type, faePatchField, edgeMesh > > flux() const
Return the face-flux field from the matrix.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
void subtractFromInternalField(const labelUList &addr, const Field< Type2 > &pf, Field< Type2 > &intf) const
Subtract patch contribution from internal field.
SolverPerformance< Type > solve()
Solve returning the solution statistics.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
void relax()
Relax matrix (for steady-state solution).
void operator=(const faMatrix< Type > &)
void operator*=(const areaScalarField::Internal &)
Generic templated field type.
A class for handling words, derived from Foam::string.
void checkMethod(const faMatrix< Type > &, const faMatrix< Type > &, const char *)
faSolver(faMatrix< Type > &faMat, autoPtr< lduMatrix::solver > &&sol)
tmp< GeometricField< Type, faPatchField, areaMesh > > H() const
Return the H operation source.
void setValuesFromList(const labelUList &faceLabels, const ListType< Type > &values)
Set solution in given faces to the specified values.
SolverPerformance< Type > solve(faMatrix< Type > &, const dictionary &solverControls)
Solve returning the solution statistics given convergence tolerance.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
bool hasFaceFluxCorrection() const noexcept
True if face-flux non-orthogonal correction field exists.
tmp< areaScalarField > A() const
Return the central coefficient.
void setReference(const label facei, const Type &value, const bool forceReference=false)
Set reference level for solution.
lduMatrix is a general matrix class in which the coefficients are stored as three arrays...
Solver class returned by the solver function used for systems in which it is useful to cache the solv...
Macro definitions for declaring ClassName(), NamespaceName(), etc.
tmp< Field< Type > > residual() const
Return the matrix residual.
A List with indirect addressing. Like IndirectList but does not store addressing. ...
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
Mesh data needed to do the Finite Area discretisation.
A special matrix type and solver, designed for finite area solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
GeometricField< Type, faePatchField, edgeMesh > faceFluxFieldType
Field type for face flux (for non-orthogonal correction)
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
const GeometricField< Type, faPatchField, areaMesh > & psi() const
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
void addCmptAvBoundaryDiag(scalarField &diag) const
A class for managing temporary objects.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
tmp< faMatrix< Type > > clone() const
Construct and return a clone.
virtual ~faMatrix()
Destructor.