Go to the documentation of this file.
37 void Foam::fvPatchMapper::calcAddressing()
const
42 || interpolationAddrPtr_
47 <<
"Addressing already calculated"
52 const label oldPatchStart =
55 const label oldPatchEnd =
79 addr[facei] >= oldPatchStart
80 && addr[facei] < oldPatchEnd
83 addr[facei] -= oldPatchStart;
98 <<
"Unmapped entry in patch mapping for patch "
99 << patch_.
index() <<
" named " << patch_.
name()
107 interpolationAddrPtr_ =
130 min(curAddr) >= oldPatchStart
131 &&
max(curAddr) < oldPatchEnd
137 curAddr[i] -= oldPatchStart;
143 labelList newAddr(curAddr.size(),
false);
151 curAddr[lfI] >= oldPatchStart
152 && curAddr[lfI] < oldPatchEnd
155 newAddr[nActive] = curAddr[lfI] - oldPatchStart;
156 newWeights[nActive] = curW[lfI];
161 newAddr.setSize(nActive);
162 newWeights.setSize(nActive);
167 newWeights /=
sum(newWeights);
184 if (
min(addr[i]) < 0)
187 <<
"Error in patch mapping for patch "
188 << patch_.
index() <<
" named " << patch_.
name()
197 void Foam::fvPatchMapper::clearOut()
202 hasUnmapped_ =
false;
208 Foam::fvPatchMapper::fvPatchMapper
216 sizeBeforeMapping_(
faceMap.oldPatchSizes()[patch_.index()]),
218 directAddrPtr_(
nullptr),
219 interpolationAddrPtr_(
nullptr),
239 <<
"Requested direct addressing for an interpolative mapper."
248 return *directAddrPtr_;
257 <<
"Requested interpolative addressing for a direct mapper."
261 if (!interpolationAddrPtr_)
266 return *interpolationAddrPtr_;
275 <<
"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
Return direct addressing.
virtual const labelList & oldPatchSizes() const
Return old patch sizes.
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
virtual const labelUList & directAddressing() const
Return direct addressing.
virtual const labelList & oldPatchStarts() const
Return old patch starts.
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual const word & name() const
Return name.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
virtual const labelListList & addressing() const
Return interpolated addressing.
const List< T >::subList patchSlice(const List< T > &l) const
Slice list to patch.
#define forAll(list, i)
Loop across all elements in list.
void deleteDemandDrivenData(DataPtr &dataPtr)
static int debug
Debug switch.
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 scalarListList & weights() const
Return interpolation weights.
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
virtual ~fvPatchMapper()
Destructor.
virtual const scalarListList & weights() const
Return interpolaion weights.
This object provides mapping and fill-in information for face data between the two meshes after the t...
label index() const
Return the index of this patch in the fvBoundaryMesh.
virtual bool direct() const
Is the mapping direct.
errorManip< error > abort(error &err)
List< labelList > labelListList
A List of labelList.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const std::string patch
OpenFOAM patch number as a std::string.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
virtual const labelListList & addressing() const
Return interpolated addressing.
#define WarningInFunction
Report a warning using Foam::Warning.