46 faceAreaPairGAMGAgglomeration,
53 faceAreaPairGAMGAgglomeration,
69 const fvMesh& fvmesh = refCast<const fvMesh>(
mesh);
181 bool hasCyclicAMI =
false;
182 if (!processorAgglomerate())
184 const auto& fineInterfaces = interfaceLevel(0);
185 forAll(fineInterfaces, inti)
187 if (fineInterfaces.set(inti))
189 const auto& intf = fineInterfaces[inti];
192 isA<cyclicAMILduInterface>(intf)
193 || isA<cyclicACMILduInterface>(intf)
199 <<
"Detected cyclicA(C)MI at interface " << inti
200 <<
".Redoing patch agglomeration" <<
endl;
214 label fineLevelIndex = 0;
215 fineLevelIndex < size();
222 const auto& fineMesh = meshLevel(fineLevelIndex);
223 const auto& fineInterfaces = interfaceLevel(fineLevelIndex);
224 const lduAddressing& fineMeshAddr = fineMesh.lduAddr();
228 restrictAddressing(fineLevelIndex);
231 forAll(fineInterfaces, inti)
233 if (fineInterfaces.set(inti))
235 const auto& intf = fineInterfaces[inti];
239 isA<cyclicAMILduInterface>(intf)
240 || isA<cyclicACMILduInterface>(intf)
243 if (fineLevelIndex == 0)
245 intf.initInternalFieldTransfer
249 fineMeshAddr.patchAddr(inti)
254 intf.initInternalFieldTransfer
270 forAll(fineInterfaces, inti)
272 if (fineInterfaces.set(inti))
274 const auto& intf = fineInterfaces[inti];
278 isA<cyclicAMILduInterface>(intf)
279 || isA<cyclicACMILduInterface>(intf)
282 tmp<labelField> restrictMapInternalField;
288 if (fineLevelIndex == 0)
290 restrictMapInternalField =
291 intf.interfaceInternalField
294 fineMeshAddr.patchAddr(inti)
299 restrictMapInternalField =
300 intf.interfaceInternalField
306 tmp<labelField> nbrRestrictMapInternalField =
307 intf.internalFieldTransfer
313 lduPrimitiveMesh& coarseMesh =
314 meshLevels_[fineLevelIndex];
316 autoPtr<GAMGInterface> coarseIntf
321 coarseMesh.rawInterfaces(),
323 restrictMapInternalField(),
324 nbrRestrictMapInternalField(),
331 coarseMesh.interfaces().set
336 coarseMesh.primitiveInterfaces().set
339 &coarseMesh.interfaces()[inti]
Field< label > labelField
Specialisation of Field<T> for label.
const surfaceVectorField & Sf() const
Return cell face area vectors.
static autoPtr< GAMGInterface > New(const label index, const lduInterfacePtrsList &coarseInterfaces, const lduInterface &fineInterface, const labelField &localRestrictAddressing, const labelField &neighbourRestrictAddressing, const label fineLevelIndex, const label coarseComm)
Return a pointer to a new interface created on freestore given.
const Internal::FieldType & primitiveField() const noexcept
Return a const-reference to the internal field values.
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
Agglomerate using the pair algorithm.
static label nRequests() noexcept
Number of outstanding requests (on the internal list of requests)
dimensionedScalar sqrt(const dimensionedScalar &ds)
Ostream & endl(Ostream &os)
Add newline and flush stream.
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
static void waitRequests()
Wait for all requests to finish.
Macros for easy insertion into run-time selection tables.
faceAreaPairGAMGAgglomeration(const lduMesh &mesh, const dictionary &controlDict)
Construct given mesh and controls.
#define forAll(list, i)
Loop across all elements in list.
static tmp< labelField > agglomerate(label &nCoarseCells, const lduAddressing &fineMatrixAddressing, const scalarField &faceWeights)
Calculate and return agglomeration.
bool requiresUpdate() const
Does the agglomeration need to be fully updated?
virtual bool movePoints()
Update when the mesh moves.
const lduMesh & mesh() const noexcept
Reference to the mesh.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual bool movePoints()
Update when the mesh moves.
runTime controlDict().readEntry("adjustTimeStep"
The central control dictionary, the contents of which are either taken directly from the FOAM_CONTROL...
dimensioned< Type > cmptMultiply(const dimensioned< Type > &, const dimensioned< Type > &)
const surfaceScalarField & magSf() const
Return cell face area magnitudes.
int debug
Static debugging option.
defineTypeNameAndDebug(combustionModel, 0)
Mesh data needed to do the Finite Volume discretisation.
"nonBlocking" (immediate) : (MPI_Isend, MPI_Irecv)
Field< vector > vectorField
Specialisation of Field<T> for vector.
label nCellsInCoarsestLevel_
Number of cells in coarsest level.
#define DebugPoutInFunction
Report an information message using Foam::Pout.
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)