Go to the documentation of this file.
44 <<
"Addressing already calculated."
61 label nInsertedFaces = 0;
65 if (directAddr[faceI] < 0)
68 directAddr[faceI] = 0;
69 insertedFaces[nInsertedFaces] = faceI;
74 insertedFaces.
setSize(nInsertedFaces);
91 const labelList& mo = ffp[ffpI].masterObjects();
93 label faceI = ffp[ffpI].index();
95 if (addr[faceI].
size())
98 <<
"Master face " << faceI
99 <<
" mapped from point faces " << mo
113 const labelList& mo = ffe[ffeI].masterObjects();
115 label faceI = ffe[ffeI].index();
117 if (addr[faceI].
size())
120 <<
"Master face " << faceI
121 <<
" mapped from edge faces " << mo
135 const labelList& mo = fff[fffI].masterObjects();
137 label faceI = fff[fffI].index();
139 if (addr[faceI].
size())
142 <<
"Master face " << faceI
143 <<
" mapped from face faces " << mo
159 if (fm[faceI] > -1 && addr[faceI].empty())
173 label nInsertedFaces = 0;
177 if (addr[faceI].empty())
183 insertedFaces[nInsertedFaces] = faceI;
188 insertedFaces.
setSize(nInsertedFaces);
209 insertedFaces_(true),
211 directAddrPtr_(NULL),
212 interpolationAddrPtr_(NULL),
214 insertedFaceLabelsPtr_(NULL)
249 fm[ffp[ffpI].index()] = 0;
256 fm[ffe[ffeI].index()] = 0;
263 fm[fff[fffI].index()] = 0;
286 return mesh_.nFaces();
292 return mpm_.nOldFaces();
298 return mpm_.nOldInternalFaces();
307 <<
"Requested direct addressing for an interpolative mapper."
311 if (!insertedObjects())
314 return mpm_.faceMap();
323 return *directAddrPtr_;
333 <<
"Requested interpolative addressing for a direct mapper."
337 if (!interpolationAddrPtr_)
342 return *interpolationAddrPtr_;
351 <<
"Requested interpolative weights for a direct mapper."
366 if (!insertedFaceLabelsPtr_)
368 if (!insertedObjects())
371 insertedFaceLabelsPtr_ =
new labelList(0);
379 return *insertedFaceLabelsPtr_;
385 return mpm_.flipFaceFlux();
391 return mpm_.nOldInternalFaces();
397 return mpm_.oldPatchStarts();
403 return mpm_.oldPatchSizes();
const List< objectMap > & facesFromPointsMap() const
Faces inflated from points.
List< scalar > scalarList
A List of scalars.
virtual const labelUList & directAddressing() const
Return direct addressing.
virtual const labelList & oldPatchSizes() const
Return old patch sizes.
volScalarField w(IOobject("w", runTime.timeName(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE), mesh, dimensionedScalar("w", dimensionSet(0, 0, 0, 0, 0, 0, 0), 0.0))
List< label > labelList
A List of labels.
#define forAll(list, i)
Loop across all elements in list.
virtual label size() const
Return size.
Template functions to aid in the implementation of demand driven data.
virtual const labelList & oldPatchStarts() const
Return old patch starts.
virtual label internalSizeBeforeMapping() const
Return number of internal faces before mapping.
bool direct_
Is the mapping direct.
const polyMesh & mesh_
Reference to polyMesh.
virtual label sizeBeforeMapping() const
Return size of field before mapping.
labelList * directAddrPtr_
Direct addressing (only one for of addressing is used)
void deleteDemandDrivenData(DataPtr &dataPtr)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
bool insertedFaces_
Are there any inserted (unmapped) faces.
labelList * insertedFaceLabelsPtr_
Inserted faces.
const List< objectMap > & facesFromEdgesMap() const
Faces inflated from edges.
const List< objectMap > & facesFromFacesMap() const
Faces originating from faces.
void calcAddressing() const
Calculate addressing for mapping with inserted faces.
scalarListList * weightsPtr_
Interpolation weights.
virtual const scalarListList & weights() const
Return interpolaion weights.
virtual bool direct() const
Is the mapping direct.
errorManip< error > abort(error &err)
virtual const labelHashSet & flipFaceFlux() const
Return flux flip map.
virtual ~faceMapper()
Destructor.
void setSize(const label)
Reset size of List.
List< labelList > labelListList
A List of labelList.
void clearOut()
Clear out local storage.
const mapPolyMesh & mpm_
Reference to mapPolyMesh.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
faceMapper(const faceMapper &)
Disallow default bitwise copy construct.
virtual const labelList & insertedObjectLabels() const
Return list of inserted faces.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const labelList & faceMap() const
Old face map.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
void size(const label)
Override size to be inconsistent with allocated storage.
List< scalarList > scalarListList
virtual label nOldInternalFaces() const
Return number of old internalFaces.
labelListList * interpolationAddrPtr_
Interpolated addressing (only one for of addressing is used)
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
virtual const labelListList & addressing() const
Return interpolated addressing.