38 const GeometricField<Type, fvPatchField, volMesh>&
fld
49 const dimensioned<Type>& su,
50 const GeometricField<Type, fvPatchField, volMesh>&
fld
53 auto tmat = tmp<fvMatrix<Type>>::New
56 dimVol*su.dimensions()
58 auto& mat = tmat.ref();
59 const auto& domain =
fld.mesh().V();
61 if (
magSqr(su.value()) > VSMALL)
63 mat.source() -= domain*su.value();
74 const DimensionedField<Type, volMesh>& su,
75 const GeometricField<Type, fvPatchField, volMesh>&
fld
78 auto tmat = tmp<fvMatrix<Type>>::New
81 dimVol*su.dimensions()
83 auto& mat = tmat.ref();
84 const auto& domain =
fld.mesh().V();
86 mat.source() -= domain*su.field();
96 const tmp<DimensionedField<Type, volMesh>>& tsu,
97 const GeometricField<Type, fvPatchField, volMesh>&
fld
100 tmp<fvMatrix<Type>> tmat = fvm::Su(tsu(),
fld);
110 const tmp<GeometricField<Type, fvPatchField, volMesh>>& tsu,
111 const GeometricField<Type, fvPatchField, volMesh>&
fld
114 tmp<fvMatrix<Type>> tmat = fvm::Su(tsu(),
fld);
127 const GeometricField<Type, fvPatchField, volMesh>&
138 const dimensionedScalar& sp,
139 const GeometricField<Type, fvPatchField, volMesh>&
fld
142 auto tmat = tmp<fvMatrix<Type>>::New
145 dimVol*sp.dimensions()*
fld.dimensions()
147 auto& mat = tmat.ref();
148 const auto& domain =
fld.mesh().V();
150 if (
mag(sp.value()) > ROOTVSMALL)
152 mat.diag() += domain*sp.value();
163 const DimensionedField<scalar, volMesh>& sp,
164 const GeometricField<Type, fvPatchField, volMesh>&
fld
167 auto tmat = tmp<fvMatrix<Type>>::New
170 dimVol*sp.dimensions()*
fld.dimensions()
172 auto& mat = tmat.ref();
173 const auto& domain =
fld.mesh().V();
175 mat.diag() += domain*sp.field();
185 const tmp<DimensionedField<scalar, volMesh>>& tsp,
186 const GeometricField<Type, fvPatchField, volMesh>&
fld
189 tmp<fvMatrix<Type>> tmat = fvm::Sp(tsp(),
fld);
199 const tmp<volScalarField>& tsp,
200 const GeometricField<Type, fvPatchField, volMesh>&
fld
203 tmp<fvMatrix<Type>> tmat = fvm::Sp(tsp(),
fld);
216 const GeometricField<Type, fvPatchField, volMesh>&
fld
227 const dimensionedScalar& susp,
228 const GeometricField<Type, fvPatchField, volMesh>&
fld
231 auto tmat = tmp<fvMatrix<Type>>::New
234 dimVol*susp.dimensions()*
fld.dimensions()
236 auto& mat = tmat.ref();
237 const auto& domain =
fld.mesh().V();
239 if (susp.value() > ROOTVSMALL)
241 mat.diag() += domain*susp.value();
243 else if (susp.value() < -ROOTVSMALL)
245 mat.source() -= domain*susp.value()*
fld.primitiveField();
256 const DimensionedField<scalar, volMesh>& susp,
257 const GeometricField<Type, fvPatchField, volMesh>&
fld
260 auto tmat = tmp<fvMatrix<Type>>::New
263 dimVol*susp.dimensions()*
fld.dimensions()
265 auto& mat = tmat.ref();
266 const auto& domain =
fld.mesh().V();
268 mat.diag() += domain*
max(susp.field(), scalar(0));
270 mat.source() -= domain*
min(susp.field(), scalar(0))*
fld.primitiveField();
280 const tmp<DimensionedField<scalar, volMesh>>& tsusp,
281 const GeometricField<Type, fvPatchField, volMesh>&
fld
284 tmp<fvMatrix<Type>> tmat = fvm::SuSp(tsusp(),
fld);
294 const tmp<volScalarField>& tsusp,
295 const GeometricField<Type, fvPatchField, volMesh>&
fld
298 tmp<fvMatrix<Type>> tmat = fvm::SuSp(tsusp(),
fld);
Info<< nl<< "Wrote faMesh in vtk format: "<< writer.output().name()<< nl;}{ vtk::lineWriter writer(aMesh.points(), aMesh.edges(), fileName(aMesh.mesh().time().globalPath()/"finiteArea-edges"));writer.writeGeometry();writer.beginCellData(4);writer.writeProcIDs();{ Field< scalar > fld(faMeshTools::flattenEdgeField(aMesh.magLe(), true))
A class for managing temporary objects.
A class representing the concept of a field of 0 used to avoid unnecessary manipulations for objects ...
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
zeroField Su(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
zeroField SuSp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
zeroField Sp(const Foam::zero, const GeometricField< Type, fvPatchField, volMesh > &)
A no-op source.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
dimensioned< typename typeOfMag< Type >::type > magSqr(const dimensioned< Type > &dt)