36 void Foam::fvSurfaceMapper::calcAddressing()
const 43 || insertedObjectsPtr_
47 <<
"Addressing already calculated" 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_;
110 inserted.
resize(insFaces.size());
113 for (
const label facei : insFaces)
118 inserted[
count] = facei;
123 inserted.resize(
count);
139 Foam::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_;
List< scalar > scalarList
List of scalar.
void resize(const label len)
Adjust allocated size of list.
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
This object provides mapping and fill-in information for face data between the two meshes after the t...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
virtual bool direct() const
Is the mapping direct.
virtual const labelList & insertedObjectLabels() const
Return list of inserted faces.
SubList< label > subList
Declare type of subList.
virtual label size() const
Return size.
#define forAll(list, i)
Loop across all elements in list.
virtual ~fvSurfaceMapper()
Destructor.
unsigned int count(const UList< bool > &bools, const bool val=true)
Count number of 'true' entries.
virtual bool insertedObjects() const
Are there any inserted faces.
virtual const labelListList & addressing() const
Return interpolated addressing.
virtual const labelUList & directAddressing() const
Return direct addressing.
virtual const scalarListList & weights() const
Return interpolaion weights.
errorManip< error > abort(error &err)
virtual const labelList & insertedObjectLabels() const
Return list of inserted faces.
Mesh data needed to do the Finite Volume discretisation.
virtual const scalarListList & weights() const
Return interpolation weights.
A class representing the concept of 0 (zero) that can be used to avoid manipulating objects known to ...
virtual label nOldInternalFaces() const
Return number of old internalFaces.
List< label > labelList
A List of labels.
virtual const labelUList & directAddressing() const
Return direct addressing.
virtual const labelListList & addressing() const
Return interpolated addressing.