35 #ifndef distributedWeightedFvPatchFieldMapper_H 36 #define distributedWeightedFvPatchFieldMapper_H 54 const label singlePatchProc_;
71 const label singlePatchProc,
77 singlePatchProc_(singlePatchProc),
78 distMapPtr_(distMapPtr),
92 if ((singlePatchProc_ == -1) != (distMapPtr_ !=
nullptr))
95 <<
"Supply a mapDistributeBase if and only if " 96 <<
"singlePatchProc is -1" 97 <<
" singlePatchProc_:" << singlePatchProc_
98 <<
" distMapPtr_:" << (distMapPtr_ !=
nullptr)
109 virtual label
size()
const 121 virtual bool direct()
const 128 return singlePatchProc_ == -1;
136 <<
"Cannot ask for distributeMap on a non-distributed"
virtual bool direct() const
Is it a direct (non-interpolating) mapper?
virtual const scalarListList & weights() const
Return the interpolation weights.
virtual bool distributed() const
Does the mapper have remote contributions?
void size(const label n)
Older name for setAddressableSize.
FieldMapper with weighted mapping from (optionally remote) quantities.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
label constructSize() const noexcept
Constructed data size.
virtual label size() const
The size of the mapper.
virtual bool hasUnmapped() const
Any unmapped values?
A FieldMapper for finite-volume patch fields.
virtual const mapDistributeBase & distributeMap() const
Return the distribution map.
virtual ~distributedWeightedFvPatchFieldMapper()=default
Destructor.
Class containing processor-to-processor mapping information.
virtual const labelListList & addressing() const
Return the interpolation addressing.
distributedWeightedFvPatchFieldMapper(const label singlePatchProc, const mapDistributeBase *distMapPtr, const labelListList &addressing, const scalarListList &weights)
Construct given addressing.