36void Foam::fvSurfaceMapper::calcAddressing()
const
43 || insertedObjectsPtr_
47 <<
"Addressing already calculated"
53 const label oldNInternal = faceMap_.nOldInternalFaces();
59 directAddrPtr_ = std::make_unique<labelList>
63 auto& addr = *directAddrPtr_;
68 if (addr[facei] > oldNInternal)
77 interpAddrPtr_ = std::make_unique<labelListList>
81 auto& addr = *interpAddrPtr_;
83 weightsPtr_ = std::make_unique<scalarListList>
87 auto& wght = *weightsPtr_;
92 if (
max(addr[facei]) >= oldNInternal)
102 insertedObjectsPtr_ = std::make_unique<labelList>();
103 auto& inserted = *insertedObjectsPtr_;
106 if (faceMap_.insertedObjects())
108 const labelList& insFaces = faceMap_.insertedObjectLabels();
110 inserted.
resize(insFaces.size());
113 for (
const label facei : insFaces)
118 inserted[
count] = facei;
123 inserted.resize(count);
139Foam::fvSurfaceMapper::fvSurfaceMapper
163 <<
"Requested direct addressing for an interpolative mapper."
172 return *directAddrPtr_;
181 <<
"Requested interpolative addressing for a direct mapper."
190 return *interpAddrPtr_;
199 <<
"Requested interpolative weights for a direct mapper."
214 if (!insertedObjectsPtr_)
219 return *insertedObjectsPtr_;
void resize(const label len)
Adjust allocated size of list.
This object provides mapping and fill-in information for face data between the two meshes after the t...
Mesh data needed to do the Finite Volume discretisation.
virtual label size() const
Return size.
virtual const labelListList & addressing() const
Return interpolated addressing.
virtual const scalarListList & weights() const
Return interpolation weights.
virtual const labelUList & directAddressing() const
Return direct addressing.
virtual const labelList & insertedObjectLabels() const
Return list of inserted faces.
virtual ~fvSurfaceMapper()
Destructor.
virtual bool direct() const
Is the mapping direct.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
List< scalarList > scalarListList
List of scalarList.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
List< labelList > labelListList
List of labelList.
List< label > labelList
A List of labels.
errorManip< error > abort(error &err)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
UList< label > labelUList
A UList of labels.
List< scalar > scalarList
List of scalar.
#define forAll(list, i)
Loop across all elements in list.