43 #ifndef Foam_faMatrix_H 44 #define Foam_faMatrix_H 60 Ostream& operator<<(Ostream&, const faMatrix<Type>&);
154 mutable std::unique_ptr<faceFluxFieldType> faceFluxCorrectionPtr_;
166 template<
class Type2>
174 template<
class Type2>
183 template<
class Type2>
191 template<
class Type2>
213 const bool couples =
true 220 template<
template<
class>
class ListType>
224 const ListType<Type>&
values 245 solver_(
std::move(sol))
331 return internalCoeffs_;
338 return internalCoeffs_;
345 return boundaryCoeffs_;
352 return boundaryCoeffs_;
361 return faceFluxCorrectionPtr_;
367 faceFluxCorrectionPtr_.reset(
flux);
373 return bool(faceFluxCorrectionPtr_);
408 const bool forceReference =
false 416 const bool forceReference =
false 424 const bool forceReference =
false 517 void operator*=(
const tmp<areaScalarField::Internal>&);
525 friend tmp<GeometricField<Type, faPatchField, areaMesh>>
528 const faMatrix<Type>&,
529 const DimensionedField<Type, areaMesh>&
532 friend tmp<GeometricField<Type, faPatchField, areaMesh>>
535 const faMatrix<Type>&,
536 const tmp<GeometricField<Type, faPatchField, areaMesh>>&
539 friend tmp<GeometricField<Type, faPatchField, areaMesh>>
542 const tmp<faMatrix<Type>>&,
543 const DimensionedField<Type, areaMesh>&
546 friend tmp<GeometricField<Type, faPatchField, areaMesh>>
549 const tmp<faMatrix<Type>>&,
550 const tmp<GeometricField<Type, faPatchField, areaMesh>>&
556 friend Ostream& operator<< <Type>
559 const faMatrix<Type>&
569 const faMatrix<Type>&,
570 const faMatrix<Type>&,
577 const faMatrix<Type>&,
578 const DimensionedField<Type, areaMesh>&,
585 const faMatrix<Type>&,
586 const dimensioned<Type>&,
594 SolverPerformance<Type>
solve 597 const dictionary& solverControls
604 SolverPerformance<Type>
solve 606 const tmp<faMatrix<Type>>&,
607 const dictionary& solverControls
614 SolverPerformance<Type>
solve(faMatrix<Type>&,
const word&
name);
1006 template<
class Type>
1013 template<
class Type>
1021 template<
class Type>
1028 template<
class Type>
1036 template<
class Type>
1043 template<
class Type>
1050 template<
class Type>
1057 template<
class Type>
1064 template<
class Type>
1071 template<
class Type>
1079 template<
class Type>
1086 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.
const scalarField & diag() const
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...
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.
std::unique_ptr< faceFluxFieldType > faceFluxFieldPtrType
Declare return type of the faceFluxCorrectionPtr() function.
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...
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.