43 assemblyFaceAreaPairGAMGAgglomeration,
50 assemblyFaceAreaPairGAMGAgglomeration,
75 if (isA<lduPrimitiveMeshAssembly>(ldumesh))
78 refCast<const lduPrimitiveMeshAssembly>(ldumesh);
84 for (label i=0; i <
mesh.meshes().size(); ++i)
86 const fvMesh& m = refCast<const fvMesh>(
mesh.meshes()[i]);
92 faceAreas[subFaceMap[facei]] = areas[facei];
101 label globalPatchID =
mesh.patchMap()[i][patchI];
103 if (globalPatchID == -1)
105 if (
pp.masterImplicit())
109 if (isA<cyclicAMIPolyPatch>(
pp))
111 const cyclicAMIPolyPatch& mpp =
112 refCast<const cyclicAMIPolyPatch>(
pp);
115 mpp.AMI().srcWeights();
122 for(label j=0; j<w.size(); j++)
124 const label globalFaceI =
125 mesh.faceBoundMap()[i][patchI][subFaceI];
127 if (globalFaceI != -1)
129 faceAreas[globalFaceI] = w[j]*sf[faceI];
135 else if (isA<cyclicACMIPolyPatch>(
pp))
137 const cyclicACMIPolyPatch& mpp =
138 refCast<const cyclicACMIPolyPatch>(
pp);
141 mpp.AMI().srcWeights();
144 const scalar tol = mpp.tolerance();
150 for(label j=0; j<w.size(); j++)
152 if (mask[faceI] > tol)
154 const label globalFaceI =
155 mesh.faceBoundMap()[i]
158 faceAreas[globalFaceI] = w[j]*sf[faceI];
168 const label globalFaceI =
169 mesh.faceBoundMap()[i][patchI][faceI];
171 if (globalFaceI != -1)
173 faceAreas[globalFaceI] = sf[faceI];
190 faceAreas/
sqrt(
mag(faceAreas)),
200 const fvMesh& fvmesh = refCast<const fvMesh>(matrix.
mesh());
210 fvmesh.Sf().primitiveField()
211 /
sqrt(fvmesh.magSf().primitiveField()),
225 const lduMatrix& matrix,
241 faceAreas/
sqrt(
mag(faceAreas)),
List< scalar > scalarList
List of scalar.
void size(const label n)
Older name for setAddressableSize.
const surfaceVectorField & Sf() const
Return cell face area vectors.
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.
const Internal & internalField() const noexcept
Return a const-reference to the dimensioned internal field.
dimensionedScalar sqrt(const dimensionedScalar &ds)
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
Macros for easy insertion into run-time selection tables.
#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.
~assemblyFaceAreaPairGAMGAgglomeration()
Destructor.
const lduMesh & mesh() const noexcept
Reference to the mesh.
List< scalarList > scalarListList
List of scalarList.
const polyBoundaryMesh & boundaryMesh() const noexcept
Return boundary mesh.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
virtual const lduAddressing & lduAddr() const =0
Return ldu addressing.
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 > &)
assemblyFaceAreaPairGAMGAgglomeration(const lduMatrix &matrix, const dictionary &controlDict)
Construct given mesh and controls.
defineTypeNameAndDebug(combustionModel, 0)
An assembly of lduMatrix that is specific inter-region coupling through mapped patches.
lduMatrix is a general matrix class in which the coefficients are stored as three arrays...
const lduMesh & mesh() const noexcept
Return the LDU mesh from which the addressing is obtained.
Mesh data needed to do the Finite Volume discretisation.
const polyBoundaryMesh & patches
const fvBoundaryMesh & boundary() const noexcept
Return reference to boundary mesh.
Field< vector > vectorField
Specialisation of Field<T> for vector.
label nCellsInCoarsestLevel_
Number of cells in coarsest level.
uindirectPrimitivePatch pp(UIndirectList< face >(mesh.faces(), faceLabels), mesh.points())
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)
static constexpr const zero Zero
Global zero (0)
const labelListList & faceMap(const label fineLeveli) const
Mapping from processor to procMesh face.