Go to the documentation of this file.
39 void Foam::fvPatchMapper::calcAddressing()
const
44 || interpolationAddrPtr_
49 <<
"Addressing already calculated"
54 const label oldPatchStart =
57 const label oldPatchEnd =
81 addr[facei] >= oldPatchStart
82 && addr[facei] < oldPatchEnd
85 addr[facei] -= oldPatchStart;
100 <<
"Unmapped entry in patch mapping for patch "
101 << patch_.
index() <<
" named " << patch_.
name()
109 interpolationAddrPtr_ =
132 min(curAddr) >= oldPatchStart
133 &&
max(curAddr) < oldPatchEnd
139 curAddr[i] -= oldPatchStart;
145 labelList newAddr(curAddr.size(),
false);
153 curAddr[lfI] >= oldPatchStart
154 && curAddr[lfI] < oldPatchEnd
157 newAddr[nActive] = curAddr[lfI] - oldPatchStart;
158 newWeights[nActive] = curW[lfI];
163 newAddr.setSize(nActive);
164 newWeights.setSize(nActive);
169 newWeights /=
sum(newWeights);
186 if (
min(addr[i]) < 0)
189 <<
"Error in patch mapping for patch "
190 << patch_.
index() <<
" named " << patch_.
name()
199 void Foam::fvPatchMapper::clearOut()
204 hasUnmapped_ =
false;
210 Foam::fvPatchMapper::fvPatchMapper
218 sizeBeforeMapping_(
faceMap.oldPatchSizes()[patch_.index()]),
220 directAddrPtr_(nullptr),
221 interpolationAddrPtr_(nullptr),
241 <<
"Requested direct addressing for an interpolative mapper."
250 return *directAddrPtr_;
259 <<
"Requested interpolative addressing for a direct mapper."
263 if (!interpolationAddrPtr_)
268 return *interpolationAddrPtr_;
277 <<
"Requested interpolative weights for a direct mapper."
List< label > labelList
A List of labels.
List< scalarList > scalarListList
A List of scalarList.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
List< scalar > scalarList
A List of scalars.
virtual const labelUList & directAddressing() const
virtual const labelList & oldPatchSizes() const
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
virtual const labelUList & directAddressing() const
Template functions to aid in the implementation of demand driven data.
virtual const labelList & oldPatchStarts() const
Ostream & endl(Ostream &os)
virtual const word & name() const
label min(const labelHashSet &set, label minValue=labelMax)
virtual const labelListList & addressing() const
const List< T >::subList patchSlice(const List< T > &l) const
void deleteDemandDrivenData(DataPtr &dataPtr)
virtual const scalarListList & weights() const
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
label max(const labelHashSet &set, label maxValue=labelMin)
virtual const scalarListList & weights() const
This object provides mapping and fill-in information for face data between the two meshes after the t...
virtual bool direct() const
errorManip< error > abort(error &err)
List< labelList > labelListList
A List of labelList.
#define FatalErrorInFunction
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...
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
virtual const labelListList & addressing() const
#define WarningInFunction