35template<
class GeoField>
36void Foam::fvMeshTools::addPatchFields
39 const dictionary& patchFieldDict,
40 const word& defaultPatchFieldType,
41 const typename GeoField::value_type& defaultPatchValue
44 HashTable<GeoField*> flds
46 mesh.objectRegistry::lookupClass<GeoField>()
51 GeoField&
fld = *iter.val();
52 auto& bfld =
fld.boundaryFieldRef();
54 const label newPatchi = bfld.size();
55 bfld.resize(newPatchi+1);
79 defaultPatchFieldType,
84 bfld[newPatchi] == defaultPatchValue;
90template<
class GeoField>
91void Foam::fvMeshTools::setPatchFields
95 const dictionary& patchFieldDict
98 HashTable<GeoField*> flds
100 mesh.objectRegistry::lookupClass<GeoField>()
105 GeoField&
fld = *iter.val();
106 auto& bfld =
fld.boundaryFieldRef();
127template<
class GeoField>
128void Foam::fvMeshTools::setPatchFields
132 const typename GeoField::value_type& value
135 HashTable<GeoField*> flds
137 mesh.objectRegistry::lookupClass<GeoField>()
142 GeoField&
fld = *iter.val();
143 auto& bfld =
fld.boundaryFieldRef();
145 bfld[patchi] == value;
151template<
class GeoField>
152void Foam::fvMeshTools::trimPatchFields(fvMesh&
mesh,
const label
nPatches)
154 HashTable<GeoField*> flds
156 mesh.objectRegistry::lookupClass<GeoField>()
161 GeoField&
fld = *iter.val();
168template<
class GeoField>
169void Foam::fvMeshTools::reorderPatchFields
175 HashTable<GeoField*> flds
177 mesh.objectRegistry::lookupClass<GeoField>()
182 GeoField&
fld = *iter.val();
183 auto& bfld =
fld.boundaryFieldRef();
185 bfld.reorder(oldToNew);
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))
dictionary * findDict(const word &keyword, enum keyType::option matchOpt=keyType::REGEX)
Find and return a sub-dictionary pointer if present.
entry * set(entry *entryPtr)
Assign a new entry, overwriting any existing entry.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
List< label > labelList
A List of labels.
#define forAllIters(container, iter)
Iterate across all elements in the container object.