34 #ifndef MapGeometricFields_H 35 #define MapGeometricFields_H 44 template<
class Type,
class MeshMapper,
class GeoMesh>
55 const MeshMapper& mapper
66 template<
class>
class PatchField,
72 const MeshMapper& mapper
77 mapper.thisDb().objectRegistry::template
78 lookupClass<GeometricField<Type, PatchField, GeoMesh>>()
89 iterator fieldIter = fields.
begin();
90 fieldIter != fields.
end();
100 if (&field.
mesh() == &mapper.mesh())
109 iterator fieldIter = fields.
begin();
110 fieldIter != fields.
end();
118 if (&field.
mesh() == &mapper.mesh())
148 else if (polyMesh::debug)
151 <<
" since originating mesh differs from that of mapper." 158 template<
class GeoField>
162 const label insertPatchi,
164 const word& defaultPatchFieldType,
165 const typename GeoField::value_type& defaultPatchValue
174 GeoField&
fld = *flds[fldNames[i]];
176 typename GeoField::Boundary& bfld = fld.boundaryFieldRef();
178 if (bfld.size() != fld.mesh().boundary().size())
181 <<
" mesh size:" << fld.mesh().boundary().size()
185 if (patchFieldDict.
found(fld.name()))
192 fld.mesh().boundary()[insertPatchi],
194 patchFieldDict.
subDict(fld.name())
205 defaultPatchFieldType,
206 fld.mesh().boundary()[insertPatchi],
210 bfld[insertPatchi] == defaultPatchValue;
216 template<
class GeoField>
227 GeoField&
fld = *flds[fldNames[i]];
228 typename GeoField::Boundary& bfld = fld.boundaryFieldRef();
230 bfld.shuffle(newToOld);
bool found(const word &, bool recursive=false, bool patternMatch=true) const
Search dictionary for given keyword.
#define forAll(list, i)
Loop across all elements in list.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
const word & name() const
Return name.
errorManipArg< error, int > exit(error &err, const int errNo=1)
static iteratorEnd end()
iteratorEnd set to beyond the end of any HashTable
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
static const char *const typeName
Ostream & endl(Ostream &os)
Add newline and flush stream.
Generic GeometricField class.
multivariateSurfaceInterpolationScheme< scalar >::fieldTable fields
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
void MapGeometricFields(const MeshMapper &mapper)
Generic Geometric field mapper.
const dictionary & subDict(const word &) const
Find and return a sub-dictionary.
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< ' ';}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< ' ';}gmvFile<< nl;forAll(lagrangianScalarNames, i){ const word &name=lagrangianScalarNames[i];IOField< scalar > fld(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
void storeOldTimes() const
Store the old-time fields.
Pre-declare SubField and related Field type.
A class for handling words, derived from string.
void AddPatchFields(objectRegistry &obr, const label insertPatchi, const dictionary &patchFieldDict, const word &defaultPatchFieldType, const typename GeoField::value_type &defaultPatchValue)
iterator begin()
Iterator set to the beginning of the HashTable.
An STL-conforming hash table.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Internal::FieldType & primitiveFieldRef()
Return a reference to the internal field.
const Mesh & mesh() const
Return mesh.
Generic internal field mapper. For "real" mapping, add template specialisations for mapping of intern...
const fileName & instance() const
Boundary & boundaryFieldRef()
Return a reference to the boundary field.
const Time & time() const
Return time.
List< Key > sortedToc() const
Return the table of contents as a sorted list.
void ReorderPatchFields(objectRegistry &obr, const labelUList &newToOld)
Generic mesh wrapper used by volMesh, surfaceMesh, pointMesh etc.
Registry of regIOobjects.
HashTable< const Type * > lookupClass(const bool strict=false) const
Lookup and return all objects of the given Type.