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];
100 const polyPatch& pp =
patches[patchI];
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();
118 forAll(pp.faceCells(), faceI)
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];
166 forAll(pp.faceCells(), faceI)
168 const label globalFaceI =
169 mesh.faceBoundMap()[i][patchI][faceI];
171 if (globalFaceI != -1)
173 faceAreas[globalFaceI] = sf[faceI];
189 faceAreas/
sqrt(
mag(faceAreas)),
198 const fvMesh& fvmesh = refCast<const fvMesh>(matrix.
mesh());
207 fvmesh.Sf().primitiveField()
208 /
sqrt(fvmesh.magSf().primitiveField()),
221 const lduMatrix& matrix,
236 faceAreas/
sqrt(
mag(faceAreas)),
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
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.
void agglomerate(const lduMesh &mesh, const scalarField &faceWeights)
Agglomerate all levels starting from the given face weights.
~assemblyFaceAreaPairGAMGAgglomeration()
Destructor.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
virtual const labelUList & upperAddr() const =0
Return upper addressing.
List< scalar > scalarList
A List of scalars.
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.
addToRunTimeSelectionTable(decompositionMethod, kahipDecomp, dictionary)
lduMatrix is a general matrix class in which the coefficients are stored as three arrays...
const lduMesh & mesh() const
List< scalarList > scalarListList
A List of scalarList.
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
Field< vector > vectorField
Specialisation of Field<T> for vector.
const fvBoundaryMesh & boundary() const
Return reference to boundary mesh.
static constexpr const zero Zero
Global zero (0)
const labelListList & faceMap(const label fineLeveli) const
Mapping from processor to procMesh face.