47 <<
"sizes of addressing and field are different" 53 intf[addr[facei]] += pf[facei];
67 addToInternalField(addr, tpf(), intf);
84 <<
"sizes of addressing and field are different" 90 intf[addr[facei]] -= pf[facei];
104 subtractFromInternalField(addr, tpf(), intf);
120 lduAddr().patchAddr(
patchi),
135 lduAddr().patchAddr(
patchi),
157 addToInternalField(lduAddr().patchAddr(
patchi), pbc, source);
168 source[addr[facei]] +=
cmptMultiply(pbc[facei], pnf[facei]);
176 template<
template<
class>
class ListType>
180 const ListType<Type>& values
198 const label celli = cellLabels[i];
199 const Type& value = values[i];
202 source_[celli] = value*Diag[celli];
204 if (symmetric() || asymmetric())
206 const cell&
c = cells[celli];
210 const label facei = c[j];
216 if (celli == own[facei])
218 source_[nei[facei]] -= upper()[facei]*value;
222 source_[own[facei]] -= upper()[facei]*value;
225 upper()[facei] = 0.0;
229 if (celli == own[facei])
231 source_[nei[facei]] -= lower()[facei]*value;
235 source_[own[facei]] -= upper()[facei]*value;
238 upper()[facei] = 0.0;
239 lower()[facei] = 0.0;
246 if (internalCoeffs_[patchi].size())
251 internalCoeffs_[
patchi][patchFacei] =
254 boundaryCoeffs_[
patchi][patchFacei] =
277 internalCoeffs_(psi.
mesh().boundary().size()),
278 boundaryCoeffs_(psi.
mesh().boundary().size()),
279 faceFluxCorrectionPtr_(
nullptr)
284 <<
"Constructing fvMatrix<Type> for field " << psi_.name() <<
endl;
317 psiRef.
eventNo() = currentStatePsi;
327 dimensions_(fvm.dimensions_),
328 source_(fvm.source_),
329 internalCoeffs_(fvm.internalCoeffs_),
330 boundaryCoeffs_(fvm.boundaryCoeffs_),
331 faceFluxCorrectionPtr_(nullptr)
336 <<
"Copying fvMatrix<Type> for field " << psi_.name() <<
endl;
339 if (fvm.faceFluxCorrectionPtr_)
341 faceFluxCorrectionPtr_ =
new 344 *(fvm.faceFluxCorrectionPtr_)
355 const_cast<
fvMatrix<Type>&>(tfvm()),
359 dimensions_(tfvm().dimensions_),
362 const_cast<
fvMatrix<Type>&>(tfvm()).source_,
367 const_cast<
fvMatrix<Type>&>(tfvm()).internalCoeffs_,
372 const_cast<
fvMatrix<Type>&>(tfvm()).boundaryCoeffs_,
375 faceFluxCorrectionPtr_(nullptr)
380 <<
"Copying fvMatrix<Type> for field " << psi_.name() <<
endl;
383 if (tfvm().faceFluxCorrectionPtr_)
387 faceFluxCorrectionPtr_ = tfvm().faceFluxCorrectionPtr_;
388 tfvm().faceFluxCorrectionPtr_ =
nullptr;
392 faceFluxCorrectionPtr_ =
new 395 *(tfvm().faceFluxCorrectionPtr_)
415 internalCoeffs_(psi.
mesh().boundary().size()),
416 boundaryCoeffs_(psi.
mesh().boundary().size()),
417 faceFluxCorrectionPtr_(
nullptr)
422 <<
"Constructing fvMatrix<Type> for field " << psi_.name() <<
endl;
470 <<
"Destroying fvMatrix<Type> for field " << psi_.name() <<
endl;
473 if (faceFluxCorrectionPtr_)
475 delete faceFluxCorrectionPtr_;
509 const bool forceReference
512 if ((forceReference || psi_.needReference()) && celli >= 0)
531 <<
"Relaxing " << psi_.name() <<
" by " << alpha <<
endl;
587 scalar d = (sumOff[celli] - D[celli])/
mag(D[celli]);
592 maxNon =
max(maxNon, d);
621 <<
"Matrix dominance test for " << psi_.name() <<
nl 622 <<
" number of non-dominant cells : " << nNon <<
nl 623 <<
" maximum relative non-dominance : " << maxNon <<
nl 624 <<
" average relative non-dominance : " << sumNon <<
nl 633 D[celli] =
max(
mag(D[celli]), sumOff[celli]);
667 S += (D - D0)*psi_.primitiveField();
676 psi_.mesh().data::template lookupOrDefault<bool>
677 (
"finalIteration",
false)
678 && psi_.mesh().relaxEquation(psi_.name() +
"Final")
681 relax(psi_.mesh().equationRelaxationFactor(psi_.name() +
"Final"));
683 else if (psi_.mesh().relaxEquation(psi_.name()))
685 relax(psi_.mesh().equationRelaxationFactor(psi_.name()));
699 bFields[
patchi].manipulateMatrix(*
this);
744 "A("+psi_.name()+
')',
746 dimensions_/psi_.dimensions()/
dimVol,
747 extrapolatedCalculatedFvPatchScalarField::typeName
751 tAphi.
ref().primitiveFieldRef() =
D()/psi_.mesh().V();
752 tAphi.
ref().correctBoundaryConditions();
766 "H("+psi_.name()+
')',
769 extrapolatedCalculatedFvPatchScalarField::typeName
775 for (
direction cmpt=0; cmpt<Type::nComponents; cmpt++)
777 scalarField psiCmpt(psi_.primitiveField().component(cmpt));
781 boundaryDiagCmpt.negate();
793 typename Type::labelType validComponents
795 psi_.mesh().template validComponents<Type>()
798 for (
direction cmpt=0; cmpt<Type::nComponents; cmpt++)
800 if (validComponents[cmpt] == -1)
823 dimensions_/(
dimVol*psi_.dimensions()),
824 extrapolatedCalculatedFvPatchScalarField::typeName
846 H1_.primitiveFieldRef() /= psi_.mesh().V();
847 H1_.correctBoundaryConditions();
858 if (!psi_.mesh().fluxRequired(psi_.name()))
861 <<
"flux requested but " << psi_.name()
862 <<
" not specified in the fluxRequired sub-dictionary" 872 "flux("+psi_.name()+
')',
880 for (
direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
897 psi_.boundaryField()[
patchi].patchInternalField()
905 if (psi_.boundaryField()[
patchi].coupled())
907 NeighbourContrib[
patchi] =
911 psi_.boundaryField()[
patchi].patchNeighbourField()
924 if (faceFluxCorrectionPtr_)
926 fieldFlux += *faceFluxCorrectionPtr_;
941 <<
"attempted assignment to self" 945 if (&psi_ != &(fvmv.psi_))
948 <<
"different fields" 952 dimensions_ = fvmv.dimensions_;
954 source_ = fvmv.source_;
955 internalCoeffs_ = fvmv.internalCoeffs_;
956 boundaryCoeffs_ = fvmv.boundaryCoeffs_;
958 if (faceFluxCorrectionPtr_ && fvmv.faceFluxCorrectionPtr_)
960 *faceFluxCorrectionPtr_ = *fvmv.faceFluxCorrectionPtr_;
962 else if (fvmv.faceFluxCorrectionPtr_)
964 faceFluxCorrectionPtr_ =
966 (*fvmv.faceFluxCorrectionPtr_);
984 internalCoeffs_.negate();
985 boundaryCoeffs_.negate();
987 if (faceFluxCorrectionPtr_)
989 faceFluxCorrectionPtr_->negate();
999 dimensions_ += fvmv.dimensions_;
1001 source_ += fvmv.source_;
1002 internalCoeffs_ += fvmv.internalCoeffs_;
1003 boundaryCoeffs_ += fvmv.boundaryCoeffs_;
1005 if (faceFluxCorrectionPtr_ && fvmv.faceFluxCorrectionPtr_)
1007 *faceFluxCorrectionPtr_ += *fvmv.faceFluxCorrectionPtr_;
1009 else if (fvmv.faceFluxCorrectionPtr_)
1011 faceFluxCorrectionPtr_ =
new 1014 *fvmv.faceFluxCorrectionPtr_
1020 template<
class Type>
1028 template<
class Type>
1033 dimensions_ -= fvmv.dimensions_;
1035 source_ -= fvmv.source_;
1036 internalCoeffs_ -= fvmv.internalCoeffs_;
1037 boundaryCoeffs_ -= fvmv.boundaryCoeffs_;
1039 if (faceFluxCorrectionPtr_ && fvmv.faceFluxCorrectionPtr_)
1041 *faceFluxCorrectionPtr_ -= *fvmv.faceFluxCorrectionPtr_;
1043 else if (fvmv.faceFluxCorrectionPtr_)
1045 faceFluxCorrectionPtr_ =
1047 (-*fvmv.faceFluxCorrectionPtr_);
1052 template<
class Type>
1060 template<
class Type>
1061 void Foam::fvMatrix<Type>::operator+=
1067 source() -= su.mesh().V()*su.field();
1071 template<
class Type>
1072 void Foam::fvMatrix<Type>::operator+=
1082 template<
class Type>
1083 void Foam::fvMatrix<Type>::operator+=
1093 template<
class Type>
1094 void Foam::fvMatrix<Type>::operator-=
1100 source() += su.mesh().V()*su.field();
1104 template<
class Type>
1105 void Foam::fvMatrix<Type>::operator-=
1115 template<
class Type>
1116 void Foam::fvMatrix<Type>::operator-=
1126 template<
class Type>
1127 void Foam::fvMatrix<Type>::operator+=
1136 template<
class Type>
1137 void Foam::fvMatrix<Type>::operator-=
1146 template<
class Type>
1147 void Foam::fvMatrix<Type>::operator+=
1154 template<
class Type>
1155 void Foam::fvMatrix<Type>::operator-=
1162 template<
class Type>
1163 void Foam::fvMatrix<Type>::operator*=
1168 dimensions_ *= dsf.dimensions();
1170 source_ *= dsf.field();
1176 dsf.mesh().boundary()[
patchi].patchInternalField(dsf.field())
1179 internalCoeffs_[
patchi] *= pisf;
1180 boundaryCoeffs_[
patchi] *= pisf;
1183 if (faceFluxCorrectionPtr_)
1186 <<
"cannot scale a matrix containing a faceFluxCorrection" 1192 template<
class Type>
1193 void Foam::fvMatrix<Type>::operator*=
1203 template<
class Type>
1204 void Foam::fvMatrix<Type>::operator*=
1214 template<
class Type>
1215 void Foam::fvMatrix<Type>::operator*=
1220 dimensions_ *= ds.dimensions();
1222 source_ *= ds.value();
1223 internalCoeffs_ *= ds.value();
1224 boundaryCoeffs_ *= ds.value();
1226 if (faceFluxCorrectionPtr_)
1228 *faceFluxCorrectionPtr_ *= ds.value();
1233 template<
class Type>
1234 void Foam::fvMatrix<Type>::operator/=
1239 dimensions_ /= dsf.dimensions();
1241 source_ /= dsf.field();
1247 dsf.mesh().boundary()[
patchi].patchInternalField(dsf.field())
1250 internalCoeffs_[
patchi] /= pisf;
1251 boundaryCoeffs_[
patchi] /= pisf;
1254 if (faceFluxCorrectionPtr_)
1257 <<
"cannot scale a matrix containing a faceFluxCorrection" 1263 template<
class Type>
1264 void Foam::fvMatrix<Type>::operator/=
1274 template<
class Type>
1275 void Foam::fvMatrix<Type>::operator/=
1285 template<
class Type>
1286 void Foam::fvMatrix<Type>::operator/=
1291 dimensions_ /= ds.dimensions();
1293 source_ /= ds.value();
1294 internalCoeffs_ /= ds.value();
1295 boundaryCoeffs_ /= ds.value();
1297 if (faceFluxCorrectionPtr_)
1299 *faceFluxCorrectionPtr_ /= ds.value();
1306 template<
class Type>
1314 if (&fvm1.
psi() != &fvm2.
psi())
1317 <<
"incompatible fields for operation " 1319 <<
"[" << fvm1.
psi().name() <<
"] " 1321 <<
" [" << fvm2.
psi().name() <<
"]" 1328 <<
"incompatible dimensions for operation " 1338 template<
class Type>
1358 template<
class Type>
1369 <<
"incompatible dimensions for operation " 1379 template<
class Type>
1395 template<
class Type>
1413 template<
class Type>
1424 template<
class Type>
1435 template<
class Type>
1446 template<
class Type>
1457 template<
class Type>
1466 tC.
ref().source() += su.mesh().V()*su.field();
1470 template<
class Type>
1479 tC.
ref().source() += tsu().mesh().V()*tsu().field();
1484 template<
class Type>
1493 tC.
ref().source() += tsu().mesh().V()*tsu().primitiveField();
1498 template<
class Type>
1507 tC.
ref().source() += su.mesh().V()*su.field();
1511 template<
class Type>
1520 tC.
ref().source() += tsu().mesh().V()*tsu().field();
1525 template<
class Type>
1534 tC.
ref().source() += tsu().mesh().V()*tsu().primitiveField();
1539 template<
class Type>
1548 tC.
ref().source() += A.
psi().mesh().V()*su.value();
1552 template<
class Type>
1561 tC.
ref().source() += tC().psi().mesh().V()*su.value();
1565 template<
class Type>
1576 template<
class Type>
1587 template<
class Type>
1598 template<
class Type>
1610 template<
class Type>
1623 template<
class Type>
1636 template<
class Type>
1649 template<
class Type>
1663 template<
class Type>
1672 tC.
ref().source() -= su.mesh().V()*su.field();
1676 template<
class Type>
1685 tC.
ref().source() -= tsu().mesh().V()*tsu().field();
1690 template<
class Type>
1699 tC.
ref().source() -= tsu().mesh().V()*tsu().primitiveField();
1704 template<
class Type>
1713 tC.
ref().source() -= su.mesh().V()*su.field();
1717 template<
class Type>
1726 tC.
ref().source() -= tsu().mesh().V()*tsu().field();
1731 template<
class Type>
1740 tC.
ref().source() -= tsu().mesh().V()*tsu().primitiveField();
1745 template<
class Type>
1754 tC.
ref().source() -= su.mesh().V()*su.field();
1758 template<
class Type>
1767 tC.
ref().source() -= tsu().mesh().V()*tsu().field();
1772 template<
class Type>
1781 tC.
ref().source() -= tsu().mesh().V()*tsu().primitiveField();
1786 template<
class Type>
1795 tC.
ref().source() -= su.mesh().V()*su.field();
1799 template<
class Type>
1808 tC.
ref().source() -= tsu().mesh().V()*tsu().field();
1813 template<
class Type>
1822 tC.
ref().source() -= tsu().mesh().V()*tsu().primitiveField();
1828 template<
class Type>
1841 template<
class Type>
1854 template<
class Type>
1868 template<
class Type>
1882 template<
class Type>
1891 tC.
ref().source() += su.mesh().V()*su.field();
1895 template<
class Type>
1904 tC.
ref().source() += tsu().mesh().V()*tsu().field();
1909 template<
class Type>
1918 tC.
ref().source() += tsu().mesh().V()*tsu().primitiveField();
1923 template<
class Type>
1932 tC.
ref().source() += su.mesh().V()*su.field();
1936 template<
class Type>
1945 tC.
ref().source() += tsu().mesh().V()*tsu().field();
1950 template<
class Type>
1959 tC.
ref().source() += tsu().mesh().V()*tsu().primitiveField();
1964 template<
class Type>
1974 tC.
ref().source() -= su.mesh().V()*su.field();
1978 template<
class Type>
1988 tC.
ref().source() -= tsu().mesh().V()*tsu().field();
1993 template<
class Type>
2003 tC.
ref().source() -= tsu().mesh().V()*tsu().primitiveField();
2008 template<
class Type>
2018 tC.ref().source() -= su.mesh().V()*su.field();
2022 template<
class Type>
2032 tC.ref().source() -= tsu().mesh().V()*tsu().field();
2037 template<
class Type>
2047 tC.ref().source() -= tsu().mesh().V()*tsu().primitiveField();
2052 template<
class Type>
2061 tC.
ref().source() -= su.value()*A.psi().mesh().V();
2065 template<
class Type>
2074 tC.
ref().source() -= su.value()*tC().psi().mesh().V();
2078 template<
class Type>
2087 tC.
ref().source() -= su.value()*A.psi().mesh().V();
2091 template<
class Type>
2100 tC.
ref().source() -= su.value()*tC().psi().mesh().V();
2104 template<
class Type>
2113 tC.
ref().source() += su.value()*tC().psi().mesh().V();
2117 template<
class Type>
2126 tC.
ref().source() += su.value()*tC().psi().mesh().V();
2130 template<
class Type>
2140 tC.
ref().source() -= su.value()*A.psi().mesh().V();
2144 template<
class Type>
2154 tC.ref().source() -= su.value()*tC().psi().mesh().V();
2159 template<
class Type>
2171 template<
class Type>
2183 template<
class Type>
2195 template<
class Type>
2207 template<
class Type>
2219 template<
class Type>
2231 template<
class Type>
2243 template<
class Type>
2256 template<
class Type>
2268 template<
class Type>
2280 template<
class Type>
2292 template<
class Type>
2304 template<
class Type>
2316 template<
class Type>
2328 template<
class Type>
2340 template<
class Type>
2353 template<
class Type>
2368 extrapolatedCalculatedFvPatchScalarField::typeName
2376 for (
direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
2380 M.addBoundaryDiag(boundaryDiagCmpt, cmpt);
2398 template<
class Type>
2411 template<
class Type>
2424 template<
class Type>
2437 template<
class Type>
2451 template<
class Type>
2468 template<
class Type>
2469 Foam::Ostream& Foam::operator<<(Ostream& os, const fvMatrix<Type>& fvm)
2471 os << static_cast<const lduMatrix&>(fvm) <<
nl 2472 << fvm.dimensions_ <<
nl 2473 << fvm.source_ <<
nl 2474 << fvm.internalCoeffs_ <<
nl 2475 << fvm.boundaryCoeffs_ <<
endl;
2477 os.
check(
"Ostream& operator<<(Ostream&, fvMatrix<Type>&");
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
void addToInternalField(const labelUList &addr, const Field< Type2 > &pf, Field< Type2 > &intf) const
Add patch contribution to internal field.
void replace(const direction, const GeometricField< cmptType, PatchField, GeoMesh > &)
tmp< fvMatrix< Type > > correction(const fvMatrix< Type > &)
Return the correction form of the given matrix.
tmp< Field< Type > > faceH(const Field< Type > &) const
void cmptMax(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return name.
void clear() const
If object pointer points to valid object:
void addBoundaryDiag(scalarField &diag, const direction cmpt) const
A face is a list of labels corresponding to mesh vertices.
Reference counter for various OpenFOAM components.
void relax()
Relax matrix (for steady-state solution).
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
tmp< DimensionedField< typename DimensionedField< Type, GeoMesh >::cmptType, GeoMesh >> cmptAv(const DimensionedField< Type, GeoMesh > &df)
lduMatrix(const lduMesh &)
Construct given an LDU addressed mesh.
T & ref() const
Return non-const reference or generate a fatal error.
const GeometricField< Type, fvPatchField, volMesh > & psi() const
void addCmptAvBoundaryDiag(scalarField &diag) const
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
void size(const label)
Override size to be inconsistent with allocated storage.
void setReference(const label celli, const Type &value, const bool forceReference=false)
Set reference level for solution.
volScalarField alpha(IOobject("alpha", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE), lambda *max(Ua &U, zeroSensitivity))
static tmp< GeometricField< scalar, fvPatchField, volMesh > > New(const word &name, const Internal &, const PtrList< fvPatchField< scalar >> &)
Return a temporary field constructed from name,.
Ostream & endl(Ostream &os)
Add newline and flush stream.
tmp< GeometricField< Type, fvPatchField, volMesh > > H() const
Return the H operation source.
Traits class for primitives.
void operator-=(const fvMatrix< Type > &)
Abstract base class with a fat-interface to all derived classes covering all possible ways in which t...
const cellList & cells() const
Generic GeometricField class.
static int & msgType()
Message tag of standard messages.
Generic dimensioned Type class.
tmp< volScalarField > H1() const
Return H(1)
void subtractFromInternalField(const labelUList &addr, const Field< Type2 > &pf, Field< Type2 > &intf) const
Subtract patch contribution from internal field.
DimensionedField< scalar, volMesh > Internal
Type of the internal field from which this GeometricField is derived.
tmp< scalarField > H1() const
void sumMagOffDiag(scalarField &sumOff) const
const dimensionedScalar c
Speed of light in a vacuum.
conserve primitiveFieldRef()+
tmp< scalarField > D() const
Return the matrix scalar diagonal.
void operator=(const fvMatrix< Type > &)
const labelUList & neighbour() const
Internal face neighbour.
const dimensionSet & dimensions() const
Return dimensions.
Dimension set for the base types.
void diag(pointPatchField< vector > &, const pointPatchField< tensor > &)
void operator/=(const volScalarField::Internal &)
Pre-declare SubField and related Field type.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual tmp< Field< Type > > patchNeighbourField() const
Return patchField on the opposite patch of a coupled patch.
tmp< fvMatrix< Type > > S(const Pair< tmp< volScalarField::Internal >> &, const GeometricField< Type, fvPatchField, volMesh > &)
void setValues(const labelUList &cells, const UList< Type > &values)
Set solution in given cells to the specified values.
const dimensionSet dimVol
virtual const labelUList & patchAddr(const label patchNo) const =0
Return patch to internal addressing given patch number.
virtual ~fvMatrix()
Destructor.
virtual bool coupled() const
Return true if this patch field is coupled.
A special matrix type and solver, designed for finite volume solutions of scalar equations. Face addressing is used to make all matrix assembly and solution loops vectorise.
label eventNo() const
Event number at last update.
errorManip< error > abort(error &err)
void operator=(const lduMatrix &)
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
bool isInternalFace(const label faceIndex) const
Return true if given face label is internal to the mesh.
void cmptMag(FieldField< Field, Type > &cf, const FieldField< Field, Type > &f)
tmp< fvMatrix< Type > > clone() const
Clone.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
Internal::FieldType & primitiveFieldRef()
Return a reference to the internal field.
void operator*=(const scalarField &)
void operator/=(const scalarField &)
const Mesh & mesh() const
Return mesh.
void operator*=(const volScalarField::Internal &)
const word & name() const
Return const reference to name.
const Field< Type > & field() const
void reduce(const List< UPstream::commsStruct > &comms, T &Value, const BinaryOp &bop, const int tag, const label comm)
const labelUList & owner() const
Internal face owner.
Internal & ref()
Return a reference to the dimensioned internal field.
void operator+=(const fvMatrix< Type > &)
tmp< Field< Type > > DD() const
Return the matrix Type diagonal.
lduMatrix is a general matrix class in which the coefficients are stored as three arrays...
tmp< volScalarField > A() const
Return the central coefficient.
const lduAddressing & lduAddr() const
Return the LDU addressing.
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
dimensioned< scalar > dimensionedScalar
Dimensioned scalar obtained from generic dimensioned type.
A cell is defined as a list of faces with extra functionality.
Mesh data needed to do the Finite Volume discretisation.
A List with indirect addressing.
Field with dimensions and associated with geometry type GeoMesh which is used to size the field and a...
const dimensionSet & dimensions() const
Return const reference to dimensions.
const dimensionSet dimVolume
void setValuesFromList(const labelUList &cells, const ListType< Type > &values)
Set solution in given cells to the specified values.
void correctBoundaryConditions()
Correct boundary field.
void checkMethod(const fvMatrix< Type > &, const fvMatrix< Type > &, const char *)
A class representing the concept of 0 used to avoid unnecessary manipulations for objects that are kn...
dimensioned< scalar > mag(const dimensioned< Type > &)
void addBoundarySource(Field< Type > &source, const bool couples=true) const
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
tmp< GeometricField< Type, fvsPatchField, surfaceMesh > > flux() const
Return the face-flux field from the matrix.
void boundaryManipulate(typename GeometricField< Type, fvPatchField, volMesh >::Boundary &values)
Manipulate based on a boundary field.
tmp< Field< Type > > H(const Field< Type > &) const
void operator-=(const lduMatrix &)
void operator+=(const lduMatrix &)
T * ptr() const
Return tmp pointer for reuse.
A class for managing temporary objects.
void cmptMin(FieldField< Field, typename FieldField< Field, Type >::cmptType > &cf, const FieldField< Field, Type > &f)
label size() const
Return the number of elements in the UList.
void deleteDemandDrivenData(DataPtr &dataPtr)
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
fvMatrix(const GeometricField< Type, fvPatchField, volMesh > &, const dimensionSet &)
Construct given a field to solve for.
label whichPatch(const label faceIndex) const
Return patch index for a given face label.
#define InfoInFunction
Report an information message using Foam::Info.
const dimensionSet & dimensions() const