51 coarseInterfaces_(coarseInterfaces),
97 auto& coarseCoeffs = tcoarseCoeffs.ref();
99 if (fineCoeffs.
size() != faceRestrictAddressing_.size())
102 <<
"Size of coefficients " << fineCoeffs.
size()
103 <<
" does not correspond to the size of the restriction "
104 << faceRestrictAddressing_.size()
107 if (debug &&
max(faceRestrictAddressing_) > size())
110 <<
"Face restrict addressing addresses outside of coarse interface"
111 <<
" size. Max addressing:" <<
max(faceRestrictAddressing_)
112 <<
" coarse size:" << size()
116 forAll(faceRestrictAddressing_, ffi)
121 return tcoarseCoeffs;
Abstract base class for GAMG agglomerated interfaces.
virtual label size() const
Return size.
labelList faceRestrictAddressing_
Face restrict addressing.
virtual label index() const
virtual const lduInterfacePtrsList & coarseInterfaces() const
virtual const labelUList & faceCells() const
Return faceCell addressing.
virtual tmp< scalarField > agglomerateCoeffs(const scalarField &fineCoeffs) const
Agglomerating the given fine-level coefficients and return.
const lduInterfacePtrsList & coarseInterfaces_
All interfaces.
void combine(const GAMGInterface &)
Merge the next level with this level.
tmp< Field< Type > > interfaceInternalField(const UList< Type > &internalData) const
Return the interface internal field of the given field.
labelList faceCells_
Face-cell addressing.
const label index_
My index in coarseInterfaces.
GAMGInterface(const GAMGInterface &)=delete
No copy construct.
virtual void write(Ostream &) const =0
Write to stream.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
void size(const label n)
Older name for setAddressableSize.
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches.
lduInterface() noexcept=default
Default construct.
A class for managing temporary objects.
static tmp< T > New(Args &&... args)
Construct tmp with forwarding arguments.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
OBJstream os(runTime.globalPath()/outputName)
Namespace for handling debugging switches.
label max(const labelHashSet &set, label maxValue=labelMin)
Find the max value in labelHashSet, optionally limited by second argument.
List< label > labelList
A List of labels.
UPtrList< const lduInterface > lduInterfacePtrsList
Store lists of lduInterface as a UPtrList.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
errorManip< error > abort(error &err)
static constexpr const zero Zero
Global zero (0).
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.
#define defineRunTimeSelectionTable(baseType, argNames)
Define run-time selection table.
#define forAll(list, i)
Loop across all elements in list.