49 <<
"sizes of addressing and field are different" 55 intf[addr[facei]] += pf[facei];
69 addToInternalField(addr, tpf(), intf);
86 <<
"sizes of addressing and field are different" 92 intf[addr[facei]] -= pf[facei];
106 subtractFromInternalField(addr, tpf(), intf);
122 lduAddr().patchAddr(
patchi),
137 lduAddr().patchAddr(
patchi),
159 addToInternalField(lduAddr().patchAddr(
patchi), pbc, source);
170 source[addr[facei]] +=
cmptMultiply(pbc[facei], pnf[facei]);
197 source_[celli] = value*Diag[celli];
199 if (symmetric() || asymmetric())
201 const cell&
c = cells[celli];
205 const label facei = c[j];
211 if (celli == own[facei])
213 source_[nei[facei]] -= upper()[facei]*value;
217 source_[own[facei]] -= upper()[facei]*value;
220 upper()[facei] = 0.0;
224 if (celli == own[facei])
226 source_[nei[facei]] -= lower()[facei]*value;
230 source_[own[facei]] -= upper()[facei]*value;
233 upper()[facei] = 0.0;
234 lower()[facei] = 0.0;
248 internalCoeffs_[patches[i]][patchFaces[i]] =
Zero;
249 boundaryCoeffs_[patches[i]][patchFaces[i]] =
Zero;
262 const scalar fraction,
270 psi[celli] = (1 - fraction)*psi[celli] + fraction*value;
273 fraction/(1 - fraction)
274 *(
diag()[celli] - ddtDiag[celli]);
276 diag()[celli] += coeff;
277 source()[celli] += coeff*value;
294 internalCoeffs_(psi.
mesh().boundary().size()),
295 boundaryCoeffs_(psi.
mesh().boundary().size()),
296 faceFluxCorrectionPtr_(
nullptr)
301 <<
"Constructing fvMatrix<Type> for field " << psi_.name() <<
endl;
334 psiRef.
eventNo() = currentStatePsi;
344 dimensions_(fvm.dimensions_),
345 source_(fvm.source_),
346 internalCoeffs_(fvm.internalCoeffs_),
347 boundaryCoeffs_(fvm.boundaryCoeffs_),
348 faceFluxCorrectionPtr_(nullptr)
353 <<
"Copying fvMatrix<Type> for field " << psi_.name() <<
endl;
356 if (fvm.faceFluxCorrectionPtr_)
358 faceFluxCorrectionPtr_ =
new 361 *(fvm.faceFluxCorrectionPtr_)
372 const_cast<
fvMatrix<Type>&>(tfvm()),
376 dimensions_(tfvm().dimensions_),
379 const_cast<
fvMatrix<Type>&>(tfvm()).source_,
384 const_cast<
fvMatrix<Type>&>(tfvm()).internalCoeffs_,
389 const_cast<
fvMatrix<Type>&>(tfvm()).boundaryCoeffs_,
392 faceFluxCorrectionPtr_(nullptr)
397 <<
"Copying fvMatrix<Type> for field " << psi_.name() <<
endl;
400 if (tfvm().faceFluxCorrectionPtr_)
404 faceFluxCorrectionPtr_ = tfvm().faceFluxCorrectionPtr_;
405 tfvm().faceFluxCorrectionPtr_ =
nullptr;
409 faceFluxCorrectionPtr_ =
new 412 *(tfvm().faceFluxCorrectionPtr_)
432 internalCoeffs_(psi.
mesh().boundary().size()),
433 boundaryCoeffs_(psi.
mesh().boundary().size()),
434 faceFluxCorrectionPtr_(
nullptr)
439 <<
"Constructing fvMatrix<Type> for field " << psi_.name() <<
endl;
487 <<
"Destroying fvMatrix<Type> for field " << psi_.name() <<
endl;
490 if (faceFluxCorrectionPtr_)
492 delete faceFluxCorrectionPtr_;
500 template<
template<
class>
class ListType>
504 const ListType<Type>& values
516 template<
template<
class>
class ListType>
520 const ListType<Type>& values,
537 ddtDiag += ddtEqn.
diag();
543 if (- rootSmall < fractions[i] && fractions[i] < rootSmall)
547 else if (1 - rootSmall < fractions[i] && fractions[i] < 1 + rootSmall)
555 setValue(cellLabels[i], values[i], fractions[i], ddtDiag);
566 const bool forceReference
569 if ((forceReference || psi_.needReference()) && celli >= 0)
582 psi_.mesh().data::template lookupOrDefault<bool>
583 (
"finalIteration",
false)
584 && psi_.mesh().solution().relaxEquation(psi_.name() +
"Final")
587 return psi_.mesh().solution().equationRelaxationFactor
589 psi_.name() +
"Final" 592 else if (psi_.mesh().solution().relaxEquation(psi_.name()))
594 return psi_.mesh().solution().equationRelaxationFactor(psi_.name());
614 <<
"Relaxing " << psi_.name() <<
" by " << alpha <<
endl;
670 scalar d = (sumOff[celli] - D[celli])/
mag(D[celli]);
675 maxNon =
max(maxNon, d);
704 <<
"Matrix dominance test for " << psi_.name() <<
nl 705 <<
" number of non-dominant cells : " << nNon <<
nl 706 <<
" maximum relative non-dominance : " << maxNon <<
nl 707 <<
" average relative non-dominance : " << sumNon <<
nl 716 D[celli] =
max(
mag(D[celli]), sumOff[celli]);
750 S += (D - D0)*psi_.primitiveField();
770 bFields[
patchi].manipulateMatrix(*
this);
815 "A("+psi_.name()+
')',
817 dimensions_/psi_.dimensions()/
dimVol,
818 extrapolatedCalculatedFvPatchScalarField::typeName
822 tAphi.
ref().primitiveFieldRef() =
D()/psi_.mesh().V();
823 tAphi.
ref().correctBoundaryConditions();
837 "H("+psi_.name()+
')',
840 extrapolatedCalculatedFvPatchScalarField::typeName
846 for (
direction cmpt=0; cmpt<Type::nComponents; cmpt++)
848 scalarField psiCmpt(psi_.primitiveField().component(cmpt));
852 boundaryDiagCmpt.negate();
864 typename Type::labelType validComponents
866 psi_.mesh().template validComponents<Type>()
869 for (
direction cmpt=0; cmpt<Type::nComponents; cmpt++)
871 if (validComponents[cmpt] == -1)
894 dimensions_/(
dimVol*psi_.dimensions()),
895 extrapolatedCalculatedFvPatchScalarField::typeName
917 H1_.primitiveFieldRef() /= psi_.mesh().V();
918 H1_.correctBoundaryConditions();
929 if (!psi_.mesh().schemes().fluxRequired(psi_.name()))
932 <<
"flux requested but " << psi_.name()
933 <<
" not specified in the fluxRequired sub-dictionary" 943 "flux("+psi_.name()+
')',
951 for (
direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
968 psi_.boundaryField()[
patchi].patchInternalField()
976 if (psi_.boundaryField()[
patchi].coupled())
978 NeighbourContrib[
patchi] =
982 psi_.boundaryField()[
patchi].patchNeighbourField()
995 if (faceFluxCorrectionPtr_)
997 fieldFlux += *faceFluxCorrectionPtr_;
1006 template<
class Type>
1012 <<
"attempted assignment to self" 1016 if (&psi_ != &(fvmv.psi_))
1019 <<
"different fields" 1023 dimensions_ = fvmv.dimensions_;
1025 source_ = fvmv.source_;
1026 internalCoeffs_ = fvmv.internalCoeffs_;
1027 boundaryCoeffs_ = fvmv.boundaryCoeffs_;
1029 if (faceFluxCorrectionPtr_ && fvmv.faceFluxCorrectionPtr_)
1031 *faceFluxCorrectionPtr_ = *fvmv.faceFluxCorrectionPtr_;
1033 else if (fvmv.faceFluxCorrectionPtr_)
1035 faceFluxCorrectionPtr_ =
1037 (*fvmv.faceFluxCorrectionPtr_);
1042 template<
class Type>
1050 template<
class Type>
1055 internalCoeffs_.negate();
1056 boundaryCoeffs_.negate();
1058 if (faceFluxCorrectionPtr_)
1060 faceFluxCorrectionPtr_->negate();
1065 template<
class Type>
1070 dimensions_ += fvmv.dimensions_;
1072 source_ += fvmv.source_;
1073 internalCoeffs_ += fvmv.internalCoeffs_;
1074 boundaryCoeffs_ += fvmv.boundaryCoeffs_;
1076 if (faceFluxCorrectionPtr_ && fvmv.faceFluxCorrectionPtr_)
1078 *faceFluxCorrectionPtr_ += *fvmv.faceFluxCorrectionPtr_;
1080 else if (fvmv.faceFluxCorrectionPtr_)
1082 faceFluxCorrectionPtr_ =
new 1085 *fvmv.faceFluxCorrectionPtr_
1091 template<
class Type>
1099 template<
class Type>
1104 dimensions_ -= fvmv.dimensions_;
1106 source_ -= fvmv.source_;
1107 internalCoeffs_ -= fvmv.internalCoeffs_;
1108 boundaryCoeffs_ -= fvmv.boundaryCoeffs_;
1110 if (faceFluxCorrectionPtr_ && fvmv.faceFluxCorrectionPtr_)
1112 *faceFluxCorrectionPtr_ -= *fvmv.faceFluxCorrectionPtr_;
1114 else if (fvmv.faceFluxCorrectionPtr_)
1116 faceFluxCorrectionPtr_ =
1118 (-*fvmv.faceFluxCorrectionPtr_);
1123 template<
class Type>
1131 template<
class Type>
1132 void Foam::fvMatrix<Type>::operator+=
1138 source() -= su.mesh().V()*su.field();
1142 template<
class Type>
1143 void Foam::fvMatrix<Type>::operator+=
1153 template<
class Type>
1154 void Foam::fvMatrix<Type>::operator+=
1164 template<
class Type>
1165 void Foam::fvMatrix<Type>::operator-=
1171 source() += su.mesh().V()*su.field();
1175 template<
class Type>
1176 void Foam::fvMatrix<Type>::operator-=
1186 template<
class Type>
1187 void Foam::fvMatrix<Type>::operator-=
1197 template<
class Type>
1198 void Foam::fvMatrix<Type>::operator+=
1207 template<
class Type>
1208 void Foam::fvMatrix<Type>::operator-=
1217 template<
class Type>
1218 void Foam::fvMatrix<Type>::operator+=
1225 template<
class Type>
1226 void Foam::fvMatrix<Type>::operator-=
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();
1304 template<
class Type>
1305 void Foam::fvMatrix<Type>::operator/=
1310 dimensions_ /= dsf.dimensions();
1312 source_ /= dsf.field();
1318 dsf.mesh().boundary()[
patchi].patchInternalField(dsf.field())
1321 internalCoeffs_[
patchi] /= pisf;
1322 boundaryCoeffs_[
patchi] /= pisf;
1325 if (faceFluxCorrectionPtr_)
1328 <<
"cannot scale a matrix containing a faceFluxCorrection" 1334 template<
class Type>
1335 void Foam::fvMatrix<Type>::operator/=
1345 template<
class Type>
1346 void Foam::fvMatrix<Type>::operator/=
1356 template<
class Type>
1357 void Foam::fvMatrix<Type>::operator/=
1362 dimensions_ /= ds.dimensions();
1364 source_ /= ds.value();
1365 internalCoeffs_ /= ds.value();
1366 boundaryCoeffs_ /= ds.value();
1368 if (faceFluxCorrectionPtr_)
1370 *faceFluxCorrectionPtr_ /= ds.value();
1377 template<
class Type>
1385 if (&fvm1.
psi() != &fvm2.
psi())
1388 <<
"incompatible fields for operation " 1390 <<
"[" << fvm1.
psi().name() <<
"] " 1392 <<
" [" << fvm2.
psi().name() <<
"]" 1399 <<
"incompatible dimensions for operation " 1409 template<
class Type>
1429 template<
class Type>
1440 <<
"incompatible dimensions for operation " 1450 template<
class Type>
1466 template<
class Type>
1484 template<
class Type>
1495 template<
class Type>
1506 template<
class Type>
1517 template<
class Type>
1528 template<
class Type>
1537 tC.
ref().source() += su.mesh().V()*su.field();
1541 template<
class Type>
1550 tC.
ref().source() += tsu().mesh().V()*tsu().field();
1555 template<
class Type>
1564 tC.
ref().source() += tsu().mesh().V()*tsu().primitiveField();
1569 template<
class Type>
1578 tC.
ref().source() += su.mesh().V()*su.field();
1582 template<
class Type>
1591 tC.
ref().source() += tsu().mesh().V()*tsu().field();
1596 template<
class Type>
1605 tC.
ref().source() += tsu().mesh().V()*tsu().primitiveField();
1610 template<
class Type>
1619 tC.
ref().source() += A.
psi().mesh().V()*su.value();
1623 template<
class Type>
1632 tC.
ref().source() += tC().psi().mesh().V()*su.value();
1636 template<
class Type>
1647 template<
class Type>
1658 template<
class Type>
1669 template<
class Type>
1681 template<
class Type>
1694 template<
class Type>
1707 template<
class Type>
1720 template<
class Type>
1734 template<
class Type>
1743 tC.
ref().source() -= su.mesh().V()*su.field();
1747 template<
class Type>
1756 tC.
ref().source() -= tsu().mesh().V()*tsu().field();
1761 template<
class Type>
1770 tC.
ref().source() -= tsu().mesh().V()*tsu().primitiveField();
1775 template<
class Type>
1784 tC.
ref().source() -= su.mesh().V()*su.field();
1788 template<
class Type>
1797 tC.
ref().source() -= tsu().mesh().V()*tsu().field();
1802 template<
class Type>
1811 tC.
ref().source() -= tsu().mesh().V()*tsu().primitiveField();
1816 template<
class Type>
1825 tC.
ref().source() -= su.mesh().V()*su.field();
1829 template<
class Type>
1838 tC.
ref().source() -= tsu().mesh().V()*tsu().field();
1843 template<
class Type>
1852 tC.
ref().source() -= tsu().mesh().V()*tsu().primitiveField();
1857 template<
class Type>
1866 tC.
ref().source() -= su.mesh().V()*su.field();
1870 template<
class Type>
1879 tC.
ref().source() -= tsu().mesh().V()*tsu().field();
1884 template<
class Type>
1893 tC.
ref().source() -= tsu().mesh().V()*tsu().primitiveField();
1899 template<
class Type>
1912 template<
class Type>
1925 template<
class Type>
1939 template<
class Type>
1953 template<
class Type>
1962 tC.
ref().source() += su.mesh().V()*su.field();
1966 template<
class Type>
1975 tC.
ref().source() += tsu().mesh().V()*tsu().field();
1980 template<
class Type>
1989 tC.
ref().source() += tsu().mesh().V()*tsu().primitiveField();
1994 template<
class Type>
2003 tC.
ref().source() += su.mesh().V()*su.field();
2007 template<
class Type>
2016 tC.
ref().source() += tsu().mesh().V()*tsu().field();
2021 template<
class Type>
2030 tC.
ref().source() += tsu().mesh().V()*tsu().primitiveField();
2035 template<
class Type>
2045 tC.
ref().source() -= su.mesh().V()*su.field();
2049 template<
class Type>
2059 tC.
ref().source() -= tsu().mesh().V()*tsu().field();
2064 template<
class Type>
2074 tC.
ref().source() -= tsu().mesh().V()*tsu().primitiveField();
2079 template<
class Type>
2089 tC.ref().source() -= su.mesh().V()*su.field();
2093 template<
class Type>
2103 tC.ref().source() -= tsu().mesh().V()*tsu().field();
2108 template<
class Type>
2118 tC.ref().source() -= tsu().mesh().V()*tsu().primitiveField();
2123 template<
class Type>
2132 tC.
ref().source() -= su.value()*A.psi().mesh().V();
2136 template<
class Type>
2145 tC.
ref().source() -= su.value()*tC().psi().mesh().V();
2149 template<
class Type>
2158 tC.
ref().source() -= su.value()*A.psi().mesh().V();
2162 template<
class Type>
2171 tC.
ref().source() -= su.value()*tC().psi().mesh().V();
2175 template<
class Type>
2184 tC.
ref().source() += su.value()*tC().psi().mesh().V();
2188 template<
class Type>
2197 tC.
ref().source() += su.value()*tC().psi().mesh().V();
2201 template<
class Type>
2211 tC.
ref().source() -= su.value()*A.psi().mesh().V();
2215 template<
class Type>
2225 tC.ref().source() -= su.value()*tC().psi().mesh().V();
2230 template<
class Type>
2242 template<
class Type>
2254 template<
class Type>
2266 template<
class Type>
2278 template<
class Type>
2290 template<
class Type>
2302 template<
class Type>
2314 template<
class Type>
2327 template<
class Type>
2339 template<
class Type>
2351 template<
class Type>
2363 template<
class Type>
2375 template<
class Type>
2387 template<
class Type>
2399 template<
class Type>
2411 template<
class Type>
2424 template<
class Type>
2439 extrapolatedCalculatedFvPatchScalarField::typeName
2447 for (
direction cmpt=0; cmpt<pTraits<Type>::nComponents; cmpt++)
2451 M.addBoundaryDiag(boundaryDiagCmpt, cmpt);
2469 template<
class Type>
2482 template<
class Type>
2495 template<
class Type>
2508 template<
class Type>
2522 template<
class Type>
2539 template<
class Type>
2540 Foam::Ostream& Foam::operator<<(Ostream& os, const fvMatrix<Type>& fvm)
2542 os << static_cast<const lduMatrix&>(fvm) <<
nl 2543 << fvm.dimensions_ <<
nl 2544 << fvm.source_ <<
nl 2545 << fvm.internalCoeffs_ <<
nl 2546 << fvm.boundaryCoeffs_ <<
endl;
2548 os.
check(
"Ostream& operator<<(Ostream&, fvMatrix<Type>&");
const fvPatchList & patches
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.
void setValue(const label celli, const Type &value)
Set solution in the given cell to the specified value.
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.
layerAndWeight max(const layerAndWeight &a, const layerAndWeight &b)
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).
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual bool check(const char *operation) const
Check IOstream status for given operation.
label nInternalFaces() const
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 > &)
scalar relaxationFactor() const
Return the relaxation factor for this equation.
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.
tmp< fvMatrix< Type > > S(const Pair< tmp< volScalarField::Internal >> &, const GeometricField< Type, fvPatchField, volMesh > &)
const dimensionSet dimVol
tmp< fvMatrix< Type > > ddt(const GeometricField< Type, fvPatchField, volMesh > &vf)
Calculate the matrix for the first temporal derivative.
dimensionSet cmptMag(const dimensionSet &)
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...
void updateCoeffs()
Update the boundary condition coefficients.
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.
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 > &)
void setValues(const labelUList &cells, const ListType< Type > &values)
Set solution in given cells to the specified values.
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 UCompactListList< label > & polyBFacePatchFaces() const
Return poly-bFace-patch-face addressing.
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.
const UCompactListList< label > & polyBFacePatches() const
Return poly-bFace-patch addressing.
A cell is defined as a list of faces with extra functionality.
Mesh data needed to do the Finite Volume discretisation.
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 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)
virtual tmp< Field< Type > > patchNeighbourField(const Pstream::commsTypes commsType=Pstream::commsTypes::blocking) const
Return patchField on the opposite patch of a coupled patch.
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.
#define InfoInFunction
Report an information message using Foam::Info.
const dimensionSet & dimensions() const