Go to the documentation of this file.
45 <<
"Addressing already calculated"
50 const label oldPatchStart =
53 const label oldPatchEnd =
77 addr[faceI] >= oldPatchStart
78 && addr[faceI] < oldPatchEnd
81 addr[faceI] -= oldPatchStart;
96 <<
"Unmapped entry in patch mapping for patch "
128 min(curAddr) >= oldPatchStart
129 &&
max(curAddr) < oldPatchEnd
135 curAddr[i] -= oldPatchStart;
149 curAddr[lfI] >= oldPatchStart
150 && curAddr[lfI] < oldPatchEnd
153 newAddr[nActive] = curAddr[lfI] - oldPatchStart;
154 newWeights[nActive] = curW[lfI];
168 newWeights.setSize(nActive);
173 newWeights /=
sum(newWeights);
190 if (
min(addr[i]) < 0)
193 <<
"Error in patch mapping for patch "
208 hasUnmapped_ =
false;
223 sizeBeforeMapping_(
faceMap.oldPatchSizes()[patch_.index()]),
225 directAddrPtr_(NULL),
226 interpolationAddrPtr_(NULL),
246 <<
"Requested direct addressing for an interpolative mapper."
255 return *directAddrPtr_;
264 <<
"Requested interpolative addressing for a direct mapper."
268 if (!interpolationAddrPtr_)
273 return *interpolationAddrPtr_;
282 <<
"Requested interpolative weights for a direct mapper."
fvPatchMapper(const fvPatchMapper &)
Disallow default bitwise copy construct.
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))
Pair< int > faceMap(const label facePi, const face &faceP, const label faceNi, const face &faceN)
List< label > labelList
A List of labels.
virtual const labelUList & directAddressing() const
Return direct addressing.
#define forAll(list, i)
Loop across all elements in list.
virtual const labelList & oldPatchStarts() const
Return old patch starts.
Ostream & endl(Ostream &os)
Add newline and flush stream.
const fvPatch & patch_
Reference to patch.
virtual const labelListList & addressing() const
Return interpolated addressing.
const List< T >::subList patchSlice(const List< T > &l) const
Slice list to patch.
const faceMapper & faceMap_
Reference to face mapper.
const word & name() const
Return name.
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.
Pre-declare SubField and related Field type.
virtual const scalarListList & weights() const
Return interpolaion weights.
labelList * directAddrPtr_
Direct addressing (only one for of addressing is used)
A finiteVolume patch using a polyPatch and a fvBoundaryMesh.
void clearOut()
Clear out local storage.
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)
labelListList * interpolationAddrPtr_
Interpolated addressing (only one for of addressing is used)
void calcAddressing() const
Calculate addressing for mapping with inserted cells.
dimensioned< Type > max(const dimensioned< Type > &, const dimensioned< Type > &)
void setSize(const label)
Reset size of List.
List< labelList > labelListList
A List of labelList.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
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...
scalarListList * weightsPtr_
Interpolation weights.
dimensioned< Type > sum(const DimensionedField< Type, GeoMesh > &df)
void size(const label)
Override size to be inconsistent with allocated storage.
List< scalarList > scalarListList
dimensioned< Type > min(const dimensioned< Type > &, const dimensioned< Type > &)
virtual const labelListList & addressing() const
Return interpolated addressing.
#define WarningInFunction
Report a warning using Foam::Warning.