41 cyclicACMIGAMGInterfaceField,
47 cyclicACMIGAMGInterfaceField,
53 cyclicACMIGAMGInterfaceField,
61 Foam::cyclicACMIGAMGInterfaceField::cyclicACMIGAMGInterfaceField
75 refCast<const cyclicAMILduInterfaceField>(fineInterface);
77 doTransform_ =
p.doTransform();
82 Foam::cyclicACMIGAMGInterfaceField::cyclicACMIGAMGInterfaceField
85 const bool doTransform,
91 doTransform_(doTransform),
98 Foam::cyclicACMIGAMGInterfaceField::cyclicACMIGAMGInterfaceField
113 Foam::cyclicACMIGAMGInterfaceField::cyclicACMIGAMGInterfaceField
127 const auto&
p = refCast<const cyclicACMILduInterfaceField>(
local);
129 doTransform_ =
p.doTransform();
142 recvRequests_.start(),
147 recvRequests_.clear();
153 sendRequests_.start(),
158 sendRequests_.clear();
172 const lduAddressing& lduAddr,
182 cyclicACMIInterface_.owner()
183 ? cyclicACMIInterface_.AMI()
184 : cyclicACMIInterface_.neighbPatch().AMI()
187 if (AMI.distributed())
189 DebugPout<<
"cyclicACMIFvPatchField::initInterfaceMatrixUpdate() :" 190 <<
" interface:" << cyclicACMIInterface_.index()
191 <<
" size:" << cyclicACMIInterface_.size()
192 <<
" owner:" << cyclicACMIInterface_.owner()
193 <<
" AMI distributed:" << AMI.distributed()
200 <<
"Can only evaluate distributed AMI with nonBlocking" 206 lduAddr.patchAddr(cyclicACMIInterface_.neighbPatchID());
211 transformCoupleField(pnf, cmpt);
215 cyclicACMIInterface_.owner()
221 if (!recvRequests_.empty())
224 <<
"Outstanding recv request(s) on patch " 225 << cyclicACMIInterface_.index()
230 sendRequests_.clear();
252 const lduAddressing& lduAddr,
264 cyclicACMIInterface_.owner()
265 ? cyclicACMIInterface_.AMI()
266 : cyclicACMIInterface_.neighbPatch().AMI()
269 DebugPout<<
"cyclicACMIGAMGInterfaceField::updateInterfaceMatrix() :" 270 <<
" interface:" << cyclicACMIInterface_.index()
271 <<
" size:" << cyclicACMIInterface_.size()
272 <<
" owner:" << cyclicACMIInterface_.owner()
273 <<
" AMI distributed:" << AMI.distributed()
277 if (AMI.distributed())
281 cyclicACMIInterface_.owner()
289 map.receive(recvRequests_, scalarRecvBufs_, work);
292 recvRequests_.
clear();
297 cyclicACMIInterface_.owner(),
304 this->addToInternalField(result, !
add, faceCells, coeffs, pnf);
310 lduAddr.patchAddr(cyclicACMIInterface_.neighbPatchID());
315 transformCoupleField(pnf, cmpt);
317 if (cyclicACMIInterface_.owner())
319 pnf = AMI.interpolateToSource(pnf);
323 pnf = AMI.interpolateToTarget(pnf);
328 this->addToInternalField(result, !
add,
faceCells, coeffs, pnf);
GAMG agglomerated cyclic ACMI interface.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Field< solveScalar > solveScalarField
virtual void updateInterfaceMatrix(solveScalarField &result, const bool add, const lduAddressing &lduAddr, const label patchId, const solveScalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const
Update result field based on interface functionality.
commsTypes
Communications types.
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.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
Type & refCast(U &obj)
A dynamic_cast (for references) to Type reference.
static const Field< solveScalar > & null() noexcept
Return a null Field (reference to a nullObject). Behaves like an empty Field.
Ostream & endl(Ostream &os)
Add newline and flush stream.
label readLabel(const char *buf)
Parse entire buffer as a label, skipping leading/trailing whitespace.
Smooth ATC in cells next to a set of patches supplied by type.
An abstract base class for implicitly-coupled interface fields e.g. processor and cyclic patch fields...
Macros for easy insertion into run-time selection tables.
UList< label > labelUList
A UList of labels.
virtual bool ready() const
Are all (receive) data available?
static label commWarn(const label communicator) noexcept
Alter communicator debugging setting. Warns for use of any communicator differing from specified...
Abstract base class for cyclic AMI coupled interfaces.
void clear()
Clear the list, i.e. set size to zero.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
A list of pointers to objects of type <T>, without allocation/deallocation management of the pointers...
errorManip< error > abort(error &err)
void add(FieldField< Field1, typename typeOfSum< Type1, Type2 >::type > &f, const FieldField< Field1, Type1 > &f1, const FieldField< Field2, Type2 > &f2)
OBJstream os(runTime.globalPath()/outputName)
defineTypeNameAndDebug(combustionModel, 0)
Abstract base class for GAMG agglomerated interfaces.
virtual void initInterfaceMatrixUpdate(solveScalarField &result, const bool add, const lduAddressing &lduAddr, const label patchId, const solveScalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const
Initialise neighbour matrix update.
#define DebugPout
Report an information message using Foam::Pout.
::Foam::direction rank(const expressions::valueTypeCode) noexcept
The vector-space rank associated with given valueTypeCode.
"nonBlocking" (immediate) : (MPI_Isend, MPI_Irecv)
Abstract base class for GAMG agglomerated interface fields.
List< label > labelList
A List of labels.
virtual void write(Ostream &) const
Write to stream.
bool readBool(Istream &is)
Read bool from stream using Foam::Switch(Istream&)
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)
static bool finishedRequests(const label pos, label len=-1)
Non-blocking comms: have all requests (from position onwards) finished? Corresponds to MPI_Testall() ...
static constexpr const zero Zero
Global zero (0)