31 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
32 void Foam::rawTopoChangerFvMesh::setUnmappedValues
34 GeometricField<Type, PatchField, GeoMesh>&
fld,
35 const bitSet& mappedFace,
36 const GeometricField<Type, PatchField, GeoMesh>& baseFld
43 auto& fvp =
const_cast<PatchField<Type>&
>(
fld.boundaryField()[patchi]);
45 const label start = fvp.patch().start();
48 if (!mappedFace[start+i])
54 fvp[i] = baseFld.boundaryField()[patchi][i];
61 template<
class Type,
template<
class>
class PatchField,
class GeoMesh>
62 void Foam::rawTopoChangerFvMesh::zeroUnmappedValues
64 const bitSet& mappedFace
67 typedef GeometricField<Type, PatchField, GeoMesh> FieldType;
69 std::unique_ptr<FieldType> zeroFieldPtr;
71 for (
const word& fldName : names<FieldType>())
73 FieldType&
fld = lookupObjectRef<FieldType>(fldName);
78 zeroFieldPtr = std::make_unique<FieldType>
80 this->newIOobject(
"zero"),
87 zeroFieldPtr->dimensions().reset(
fld.dimensions());
89 setUnmappedValues(
fld, mappedFace, *zeroFieldPtr);
const dimensionSet dimless
Dimensionless.
#define forAll(list, i)
Loop across all elements in list.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< ' ';}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< ' ';}gmvFile<< nl;for(const word &name :lagrangianScalarNames){ IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...