35 template<
class GeoField>
36 void Foam::fvMeshTools::addPatchFields
39 const dictionary& patchFieldDict,
40 const word& defaultPatchFieldType,
41 const typename GeoField::value_type& defaultPatchValue
44 for (GeoField&
fld :
mesh.objectRegistry::sorted<GeoField>())
46 auto& bfld =
fld.boundaryFieldRef();
48 const label newPatchi = bfld.size();
49 bfld.resize(newPatchi+1);
60 mesh.boundary()[newPatchi],
73 defaultPatchFieldType,
74 mesh.boundary()[newPatchi],
78 bfld[newPatchi] == defaultPatchValue;
84 template<
class GeoField>
85 void Foam::fvMeshTools::setPatchFields
89 const dictionary& patchFieldDict
92 for (GeoField&
fld :
mesh.objectRegistry::sorted<GeoField>())
94 auto& bfld =
fld.boundaryFieldRef();
115 template<
class GeoField>
116 void Foam::fvMeshTools::setPatchFields
120 const typename GeoField::value_type& value
123 for (GeoField&
fld :
mesh.objectRegistry::sorted<GeoField>())
125 auto& bfld =
fld.boundaryFieldRef();
127 bfld[patchi] == value;
133 template<
class GeoField>
134 void Foam::fvMeshTools::trimPatchFields(fvMesh&
mesh,
const label
nPatches)
136 for (GeoField&
fld :
mesh.objectRegistry::sorted<GeoField>())
138 auto& bfld =
fld.boundaryFieldRef();
146 template<
class GeoField>
147 void Foam::fvMeshTools::reorderPatchFields
153 for (GeoField&
fld :
mesh.objectRegistry::sorted<GeoField>())
155 auto& bfld =
fld.boundaryFieldRef();
157 bfld.reorder(oldToNew);
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
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))
const fvBoundaryMesh & boundary() const noexcept
Return reference to boundary mesh.
entry * set(entry *entryPtr)
Assign a new entry, overwriting any existing entry.
List< label > labelList
A List of labels.
const dictionary * findDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a sub-dictionary pointer if present (and it is a dictionary) otherwise return nullptr...