33 void Foam::faceMapper::calcAddressing()
const 38 || interpolationAddrPtr_
40 || insertedFaceLabelsPtr_
44 <<
"Addressing already calculated." 59 labelList& insertedFaces = *insertedFaceLabelsPtr_;
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
105 w[faceI] =
scalarList(mo.size(), 1.0/mo.size());
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
127 w[faceI] =
scalarList(mo.size(), 1.0/mo.size());
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
149 w[faceI] =
scalarList(mo.size(), 1.0/mo.size());
159 if (fm[faceI] > -1 && addr[faceI].empty())
171 labelList& insertedFaces = *insertedFaceLabelsPtr_;
173 label nInsertedFaces = 0;
177 if (addr[faceI].empty())
183 insertedFaces[nInsertedFaces] = faceI;
188 insertedFaces.setSize(nInsertedFaces);
193 void Foam::faceMapper::clearOut()
209 insertedFaces_(true),
211 directAddrPtr_(NULL),
212 interpolationAddrPtr_(NULL),
214 insertedFaceLabelsPtr_(NULL)
234 insertedFaces_ =
false;
249 fm[ffp[ffpI].index()] = 0;
256 fm[ffe[ffeI].index()] = 0;
263 fm[fff[fffI].index()] = 0;
268 insertedFaces_ =
true;
308 "const labelUList& faceMapper::directAddressing() const" 309 ) <<
"Requested direct addressing for an interpolative mapper." 325 return *directAddrPtr_;
336 "const labelListList& faceMapper::addressing() const" 337 ) <<
"Requested interpolative addressing for a direct mapper." 341 if (!interpolationAddrPtr_)
346 return *interpolationAddrPtr_;
356 "const scalarListList& faceMapper::weights() const" 357 ) <<
"Requested interpolative weights for a direct mapper." 372 if (!insertedFaceLabelsPtr_)
377 insertedFaceLabelsPtr_ =
new labelList(0);
385 return *insertedFaceLabelsPtr_;
virtual const labelList & oldPatchSizes() const
Return old patch sizes.
virtual label size() const
Return size.
virtual const labelList & insertedObjectLabels() const
Return list of inserted faces.
const List< objectMap > & facesFromEdgesMap() const
Faces inflated from edges.
List< scalarList > scalarListList
virtual const labelListList & addressing() const
Return interpolated addressing.
virtual const labelUList & directAddressing() const
Return direct addressing.
virtual const scalarListList & weights() const
Return interpolaion weights.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
bool empty() const
Return true if the UList is empty (ie, size() is zero).
virtual bool direct() const
Is the mapping direct.
virtual bool insertedObjects() const
Are there any inserted faces.
const List< objectMap > & facesFromPointsMap() const
Faces inflated from points.
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.
virtual const labelList & oldPatchStarts() const
Return old patch starts.
virtual label nOldInternalFaces() const
Return number of old internalFaces.
const List< objectMap > & facesFromFacesMap() const
Faces originating from faces.
virtual ~faceMapper()
Destructor.
label nOldFaces() const
Number of old faces.
void setSize(const label)
Reset size of List.
virtual label internalSizeBeforeMapping() const
Return number of internal faces before mapping.
virtual label sizeBeforeMapping() const
Return size of field before mapping.
const labelList & faceMap() const
Old face map.
Template functions to aid in the implementation of demand driven data.
virtual const labelHashSet & flipFaceFlux() const
Return flux flip map.
List< scalar > scalarList
A List of scalars.
errorManip< error > abort(error &err)
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
label nOldInternalFaces() const
Number of old internal faces.
List< label > labelList
A List of labels.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
const labelHashSet & flipFaceFlux() const
Map of flipped face flux faces.
const labelList & oldPatchSizes() const
Return list of the old patch sizes.
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
List< labelList > labelListList
A List of labelList.
const labelList & oldPatchStarts() const
Return list of the old patch start labels.