33 template<
class FieldType>
34 bool Foam::functionObjects::div::calcDiv()
36 const auto* fieldptr = cfindObject<FieldType>(
fieldName_);
50 fvc::div(subsetter.interpolate(*fieldptr,
false)),
51 subsetter.subMesh().thisDb()
65 bool Foam::functionObjects::div::writeField()
67 typedef GeometricField<Type, fvPatchField, volMesh> volFieldType;
69 const fvMesh& subMesh = zoneSubSetPtr_->subsetter().subMesh();
70 const auto* fieldptr = subMesh.findObject<volFieldType>(resultName_);
74 tmp<volFieldType> tfield = zoneSubSetPtr_->mapToZone<Type>(*fieldptr);
word resultName_
Name of result field.
autoPtr< Detail::zoneSubSet > zoneSubSetPtr_
Sub-set mesh.
word fieldName_
Name of field to process.
tmp< GeometricField< Type, fvPatchField, volMesh > > div(const GeometricField< Type, fvsPatchField, surfaceMesh > &ssf)
bool store(word &fieldName, const tmp< ObjectType > &tfield, bool cacheable=false)
Store the field in the (sub) objectRegistry under the given name.
Calculate the divergence of the given field.
bool storeInDb(const word &fieldName, const tmp< ObjectType > &tfield, const objectRegistry &obr)
Store the field in an optional objectRegistry under the given name.