Go to the documentation of this file.
63 template<
class Type>
class fvMatrix;
64 template<
class T>
class UIndirectList;
67 Ostream&
operator<<(Ostream&,
const fvMatrix<Type>&);
71 tmp<GeometricField<Type, fvPatchField, volMesh>>
operator&
73 const fvMatrix<Type>&,
74 const DimensionedField<Type, volMesh>&
78 tmp<GeometricField<Type, fvPatchField, volMesh>>
operator&
80 const fvMatrix<Type>&,
81 const tmp<DimensionedField<Type, volMesh>>&
85 tmp<GeometricField<Type, fvPatchField, volMesh>>
operator&
87 const fvMatrix<Type>&,
88 const tmp<GeometricField<Type, fvPatchField, volMesh>>&
92 tmp<GeometricField<Type, fvPatchField, volMesh>>
operator&
94 const tmp<fvMatrix<Type>>&,
95 const DimensionedField<Type, volMesh>&
99 tmp<GeometricField<Type, fvPatchField, volMesh>>
operator&
101 const tmp<fvMatrix<Type>>&,
102 const tmp<DimensionedField<Type, volMesh>>&
106 tmp<GeometricField<Type, fvPatchField, volMesh>>
operator&
108 const tmp<fvMatrix<Type>>&,
109 const tmp<GeometricField<Type, fvPatchField, volMesh>>&
153 word lduAssemblyName_;
185 template<
class Type2>
193 template<
class Type2>
202 template<
class Type2>
210 template<
class Type2>
238 const bool couples=
true
245 template<
template<
class>
class ListType>
249 const ListType<Type>&
values
272 solver_(std::move(sol))
329 return (nMatrix_ == 0 ? 1 : nMatrix_);
334 return (nMatrix_ == 0 ? *
this : subMatrices_[i]);
339 return (nMatrix_ == 0 ? *
this : subMatrices_[i]);
406 (i == 0 && nMatrix_ == 0) ? psi_ :
matrix(i).
psi()
418 (i == 0 && nMatrix_ == 0)
436 subMatrices_.
clear();
460 return internalCoeffs_;
467 return internalCoeffs_;
474 return boundaryCoeffs_;
481 return boundaryCoeffs_;
491 return faceFluxCorrectionPtr_;
497 return bool(faceFluxCorrectionPtr_);
532 const bool forceReference =
false
540 const bool forceReference =
false
548 const bool forceReference =
false
721 friend Ostream& operator<< <Type>
734 const fvMatrix<Type>&,
735 const fvMatrix<Type>&,
742 const fvMatrix<Type>&,
743 const DimensionedField<Type, volMesh>&,
750 const fvMatrix<Type>&,
751 const dimensioned<Type>&,
759 SolverPerformance<Type>
solve(fvMatrix<Type>&,
const dictionary&);
766 SolverPerformance<Type>
solve
768 const tmp<fvMatrix<Type>>&,
776 SolverPerformance<Type>
solve(fvMatrix<Type>&);
783 SolverPerformance<Type>
solve(
const tmp<fvMatrix<Type>>&);
789 tmp<fvMatrix<Type>>
correction(
const fvMatrix<Type>&);
795 tmp<fvMatrix<Type>>
correction(
const tmp<fvMatrix<Type>>&);
801 tmp<fvMatrix<Type>>
operator==
803 const fvMatrix<Type>&,
804 const fvMatrix<Type>&
808 tmp<fvMatrix<Type>>
operator==
810 const tmp<fvMatrix<Type>>&,
811 const fvMatrix<Type>&
815 tmp<fvMatrix<Type>>
operator==
817 const fvMatrix<Type>&,
818 const tmp<fvMatrix<Type>>&
822 tmp<fvMatrix<Type>>
operator==
824 const tmp<fvMatrix<Type>>&,
825 const tmp<fvMatrix<Type>>&
830 tmp<fvMatrix<Type>>
operator==
832 const fvMatrix<Type>&,
833 const DimensionedField<Type, volMesh>&
837 tmp<fvMatrix<Type>>
operator==
839 const fvMatrix<Type>&,
840 const tmp<DimensionedField<Type, volMesh>>&
844 tmp<fvMatrix<Type>>
operator==
846 const fvMatrix<Type>&,
847 const tmp<GeometricField<Type, fvPatchField, volMesh>>&
851 tmp<fvMatrix<Type>>
operator==
853 const tmp<fvMatrix<Type>>&,
854 const DimensionedField<Type, volMesh>&
858 tmp<fvMatrix<Type>>
operator==
860 const tmp<fvMatrix<Type>>&,
861 const tmp<DimensionedField<Type, volMesh>>&
865 tmp<fvMatrix<Type>>
operator==
867 const tmp<fvMatrix<Type>>&,
868 const tmp<GeometricField<Type, fvPatchField, volMesh>>&
872 tmp<fvMatrix<Type>>
operator==
874 const fvMatrix<Type>&,
875 const dimensioned<Type>&
879 tmp<fvMatrix<Type>>
operator==
881 const tmp<fvMatrix<Type>>&,
882 const dimensioned<Type>&
887 tmp<fvMatrix<Type>>
operator==
889 const fvMatrix<Type>&,
894 tmp<fvMatrix<Type>>
operator==
896 const tmp<fvMatrix<Type>>&,
902 tmp<fvMatrix<Type>>
operator-
904 const fvMatrix<Type>&
908 tmp<fvMatrix<Type>>
operator-
910 const tmp<fvMatrix<Type>>&
915 tmp<fvMatrix<Type>>
operator+
917 const fvMatrix<Type>&,
918 const fvMatrix<Type>&
922 tmp<fvMatrix<Type>>
operator+
924 const tmp<fvMatrix<Type>>&,
925 const fvMatrix<Type>&
929 tmp<fvMatrix<Type>>
operator+
931 const fvMatrix<Type>&,
932 const tmp<fvMatrix<Type>>&
936 tmp<fvMatrix<Type>>
operator+
938 const tmp<fvMatrix<Type>>&,
939 const tmp<fvMatrix<Type>>&
944 tmp<fvMatrix<Type>>
operator+
946 const fvMatrix<Type>&,
947 const DimensionedField<Type, volMesh>&
951 tmp<fvMatrix<Type>>
operator+
953 const fvMatrix<Type>&,
954 const tmp<DimensionedField<Type, volMesh>>&
958 tmp<fvMatrix<Type>>
operator+
960 const fvMatrix<Type>&,
961 const tmp<GeometricField<Type, fvPatchField, volMesh>>&
965 tmp<fvMatrix<Type>>
operator+
967 const tmp<fvMatrix<Type>>&,
968 const DimensionedField<Type, volMesh>&
972 tmp<fvMatrix<Type>>
operator+
974 const tmp<fvMatrix<Type>>&,
975 const tmp<DimensionedField<Type, volMesh>>&
979 tmp<fvMatrix<Type>>
operator+
981 const tmp<fvMatrix<Type>>&,
982 const tmp<GeometricField<Type, fvPatchField, volMesh>>&
986 tmp<fvMatrix<Type>>
operator+
988 const DimensionedField<Type, volMesh>&,
989 const fvMatrix<Type>&
993 tmp<fvMatrix<Type>>
operator+
995 const tmp<DimensionedField<Type, volMesh>>&,
996 const fvMatrix<Type>&
1000 tmp<fvMatrix<Type>>
operator+
1002 const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
1003 const fvMatrix<Type>&
1006 template<
class Type>
1007 tmp<fvMatrix<Type>>
operator+
1009 const DimensionedField<Type, volMesh>&,
1010 const tmp<fvMatrix<Type>>&
1013 template<
class Type>
1014 tmp<fvMatrix<Type>>
operator+
1016 const tmp<DimensionedField<Type, volMesh>>&,
1017 const tmp<fvMatrix<Type>>&
1020 template<
class Type>
1021 tmp<fvMatrix<Type>>
operator+
1023 const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
1024 const tmp<fvMatrix<Type>>&
1028 template<
class Type>
1029 tmp<fvMatrix<Type>>
operator+
1031 const fvMatrix<Type>&,
1032 const dimensioned<Type>&
1035 template<
class Type>
1036 tmp<fvMatrix<Type>>
operator+
1038 const tmp<fvMatrix<Type>>&,
1039 const dimensioned<Type>&
1042 template<
class Type>
1043 tmp<fvMatrix<Type>>
operator+
1045 const dimensioned<Type>&,
1046 const fvMatrix<Type>&
1049 template<
class Type>
1050 tmp<fvMatrix<Type>>
operator+
1052 const dimensioned<Type>&,
1053 const tmp<fvMatrix<Type>>&
1057 template<
class Type>
1058 tmp<fvMatrix<Type>>
operator-
1060 const fvMatrix<Type>&,
1061 const fvMatrix<Type>&
1064 template<
class Type>
1065 tmp<fvMatrix<Type>>
operator-
1067 const tmp<fvMatrix<Type>>&,
1068 const fvMatrix<Type>&
1071 template<
class Type>
1072 tmp<fvMatrix<Type>>
operator-
1074 const fvMatrix<Type>&,
1075 const tmp<fvMatrix<Type>>&
1078 template<
class Type>
1079 tmp<fvMatrix<Type>>
operator-
1081 const tmp<fvMatrix<Type>>&,
1082 const tmp<fvMatrix<Type>>&
1086 template<
class Type>
1087 tmp<fvMatrix<Type>>
operator-
1089 const fvMatrix<Type>&,
1090 const DimensionedField<Type, volMesh>&
1093 template<
class Type>
1094 tmp<fvMatrix<Type>>
operator-
1096 const fvMatrix<Type>&,
1097 const tmp<DimensionedField<Type, volMesh>>&
1100 template<
class Type>
1101 tmp<fvMatrix<Type>>
operator-
1103 const fvMatrix<Type>&,
1104 const tmp<GeometricField<Type, fvPatchField, volMesh>>&
1107 template<
class Type>
1108 tmp<fvMatrix<Type>>
operator-
1110 const tmp<fvMatrix<Type>>&,
1111 const DimensionedField<Type, volMesh>&
1114 template<
class Type>
1115 tmp<fvMatrix<Type>>
operator-
1117 const tmp<fvMatrix<Type>>&,
1118 const tmp<DimensionedField<Type, volMesh>>&
1121 template<
class Type>
1122 tmp<fvMatrix<Type>>
operator-
1124 const tmp<fvMatrix<Type>>&,
1125 const tmp<GeometricField<Type, fvPatchField, volMesh>>&
1128 template<
class Type>
1129 tmp<fvMatrix<Type>>
operator-
1131 const DimensionedField<Type, volMesh>&,
1132 const fvMatrix<Type>&
1135 template<
class Type>
1136 tmp<fvMatrix<Type>>
operator-
1138 const tmp<DimensionedField<Type, volMesh>>&,
1139 const fvMatrix<Type>&
1142 template<
class Type>
1143 tmp<fvMatrix<Type>>
operator-
1145 const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
1146 const fvMatrix<Type>&
1149 template<
class Type>
1150 tmp<fvMatrix<Type>>
operator-
1152 const DimensionedField<Type, volMesh>&,
1153 const tmp<fvMatrix<Type>>&
1156 template<
class Type>
1157 tmp<fvMatrix<Type>>
operator-
1159 const tmp<DimensionedField<Type, volMesh>>&,
1160 const tmp<fvMatrix<Type>>&
1163 template<
class Type>
1164 tmp<fvMatrix<Type>>
operator-
1166 const tmp<GeometricField<Type, fvPatchField, volMesh>>&,
1167 const tmp<fvMatrix<Type>>&
1171 template<
class Type>
1172 tmp<fvMatrix<Type>>
operator-
1174 const fvMatrix<Type>&,
1175 const dimensioned<Type>&
1178 template<
class Type>
1179 tmp<fvMatrix<Type>>
operator-
1181 const tmp<fvMatrix<Type>>&,
1182 const dimensioned<Type>&
1185 template<
class Type>
1186 tmp<fvMatrix<Type>>
operator-
1188 const dimensioned<Type>&,
1189 const fvMatrix<Type>&
1192 template<
class Type>
1193 tmp<fvMatrix<Type>>
operator-
1195 const dimensioned<Type>&,
1196 const tmp<fvMatrix<Type>>&
1200 template<
class Type>
1201 tmp<fvMatrix<Type>>
operator*
1204 const fvMatrix<Type>&
1207 template<
class Type>
1208 tmp<fvMatrix<Type>>
operator*
1210 const tmp<volScalarField::Internal>&,
1211 const fvMatrix<Type>&
1214 template<
class Type>
1215 tmp<fvMatrix<Type>>
operator*
1217 const tmp<volScalarField>&,
1218 const fvMatrix<Type>&
1221 template<
class Type>
1222 tmp<fvMatrix<Type>>
operator*
1225 const tmp<fvMatrix<Type>>&
1228 template<
class Type>
1229 tmp<fvMatrix<Type>>
operator*
1231 const tmp<volScalarField::Internal>&,
1232 const tmp<fvMatrix<Type>>&
1235 template<
class Type>
1236 tmp<fvMatrix<Type>>
operator*
1238 const tmp<volScalarField>&,
1239 const tmp<fvMatrix<Type>>&
1243 template<
class Type>
1244 tmp<fvMatrix<Type>>
operator*
1246 const dimensioned<scalar>&,
1247 const fvMatrix<Type>&
1250 template<
class Type>
1251 tmp<fvMatrix<Type>>
operator*
1253 const dimensioned<scalar>&,
1254 const tmp<fvMatrix<Type>>&
void checkMethod(const faMatrix< Type > &, const faMatrix< Type > &, const char *)
label globalPatchID(const label fieldi, const label patchi) const
tmp< Field< Type > > residual() const
Return the matrix residual.
const lduPrimitiveMeshAssembly & lduMeshAssembly()
Return optional lduAdressing.
SolverPerformance< Type > solve()
Solve returning the solution statistics.
label checkImplicit(const label fieldI=0)
Name the implicit assembly addressing.
tmp< GeometricField< Type, fvPatchField, volMesh > > H() const
Return the H operation source.
void addBoundarySource(Field< Type > &source, const bool couples=true) const
void boundaryManipulate(typename GeometricField< Type, fvPatchField, volMesh >::Boundary &values)
Manipulate based on a boundary field.
void createOrUpdateLduPrimitiveAssembly()
Create or update ldu assembly.
A class for handling words, derived from Foam::string.
void addCmptAvBoundaryDiag(scalarField &diag) const
A field of fields is a PtrList of fields with reference counting.
A class for managing temporary objects.
List< T > values(const HashTable< T, Key, Hash > &tbl, const bool doSort=false)
List of values from HashTable, optionally sorted.
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
const labelListList & patchMap() const
Return patchMap.
SolverPerformance< Type > solveSegregatedOrCoupled(const dictionary &)
Solve segregated or coupled returning the solution statistics.
tmp< scalarField > D() const
Return the matrix scalar diagonal.
void subtractFromInternalField(const labelUList &addr, const Field< Type2 > &pf, Field< Type2 > &intf) const
Subtract patch contribution from internal field.
const dimensionedScalar alpha
Fine-structure constant: default SI units: [].
void operator=(const fvMatrix< Type > &)
SolverPerformance< Type > solve()
Solve returning the solution statistics.
const dimensionSet & dimensions() const
void manipulateMatrix(direction cmp)
Manipulate matrix.
GeometricField< Type, fvsPatchField, surfaceMesh > faceFluxFieldType
Field type for face flux (for non-orthogonal correction)
void relax()
Relax matrix (for steady-state solution).
FieldField< Field, Type > & internalCoeffs()
const FieldField< Field, Type > & boundaryCoeffs() const
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
void setValuesFromList(const labelUList &cellLabels, const ListType< Type > &values)
Set solution in given cells to the specified values.
void addBoundaryDiag(scalarField &diag, const direction cmpt) const
fvSolver(fvMatrix< Type > &fvMat, autoPtr< lduMatrix::solver > &&sol)
void setReference(const label celli, const Type &value, const bool forceReference=false)
Set reference level for solution.
Dimension set for the base types, which can be used to implement rigorous dimension checking for alge...
A dynamically resizable PtrList with allocation management.
void addFvMatrix(fvMatrix< Type > &matrix)
Add fvMatrix.
void setInterfaces(lduInterfaceFieldPtrsList &, PtrDynList< lduInterfaceField > &newInterfaces)
Set interfaces.
Ostream & operator<<(Ostream &, const boundaryPatch &p)
Write boundaryPatch as dictionary entries (without surrounding braces)
fvMatrix< Type > & matrix(const label i)
bool hasFaceFluxCorrection() const noexcept
True if face-flux non-orthogonal correction field exists.
SolverPerformance< Type > solveCoupled(const dictionary &)
Solve coupled returning the solution statistics.
void operator-=(const fvMatrix< Type > &)
Generic templated field type.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void transferFvMatrixCoeffs()
Transfer lower, upper, diag and source to this fvMatrix.
void operator*=(const volScalarField::Internal &)
DimensionedField< scalar, volMesh > Internal
Type of the internal field from which this GeometricField is derived.
tmp< volScalarField > H1() const
Return H(1)
Macro definitions for declaring ClassName(), NamespaceName(), etc.
virtual ~fvMatrix()
Destructor.
SolverPerformance< Type > solve(faMatrix< Type > &, Istream &)
Solve returning the solution statistics given convergence tolerance.
void setReferences(const labelUList &cellLabels, const Type &value, const bool forceReference=false)
Set reference level for solution.
A list of pointers to objects of type <T>, with allocation/deallocation management of the pointers....
void clear()
Clear multiple fvMatrices.
GeometricField< Type, fvPatchField, volMesh > psiFieldType
Field type for psi.
const GeometricField< Type, fvPatchField, volMesh > & psi(const label i=0) const
Return psi.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
A scalar instance of fvMatrix.
tmp< Field< Type > > DD() const
Return the matrix Type diagonal.
Generic dimensioned Type class.
tmp< volScalarField > A() const
Return the central coefficient.
void clear()
Clear the PtrList. Delete allocated entries and set size to zero.
fvMatrix(const GeometricField< Type, fvPatchField, volMesh > &psi, const dimensionSet &ds)
Construct given a field to solve for.
autoPtr< fvSolver > solver()
Construct and return the solver.
void setValues(const labelUList &cellLabels, const Type &value)
FieldField< Field, Type > & boundaryCoeffs()
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
const fvMatrix< Type > & matrix(const label i) const
GeometricField< Type, fvsPatchField, surfaceMesh > * faceFluxFieldPtrType
Declare return type of the faceFluxCorrectionPtr() function.
const Field< Type > & source() const
void operator+=(const fvMatrix< Type > &)
const dictionary & solverDict() const
Return the solver dictionary taking into account finalIteration.
tmp< fvMatrix< Type > > clone() const
Clone.
A special matrix type and solver, designed for finite volume solutions of scalar equations....
A List with indirect addressing.
void setBounAndInterCoeffs()
Manipulate boundary/internal coeffs for coupling.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
faceFluxFieldPtrType & faceFluxCorrectionPtr()
Return pointer to face-flux non-orthogonal correction field.
lduPrimitiveMeshAssembly * lduMeshPtr()
Access to lduPrimitiveMeshAssembly.
SolverPerformance< Type > solveSegregated(const dictionary &)
Solve segregated returning the solution statistics.
const FieldField< Field, Type > & internalCoeffs() const
Generic GeometricField class.
void mapContributions(label fieldi, const FieldField< Field, Type > &fluxContrib, FieldField< Field, Type > &contrib, bool internal) const
Add internal and boundary contribution to local patches.
void addToInternalField(const labelUList &addr, const Field< Type2 > &pf, Field< Type2 > &intf) const
Add patch contribution to internal field.
void setComponentReference(const label patchi, const label facei, const direction cmpt, const scalar value)
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > flux() const
Return the face-flux field from the matrix.
An assembly of lduMatrix that is specific inter-region coupling through mapped patches.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...