Go to the documentation of this file.
165 const label fineLevelIndex,
173 const label fineLevelIndex,
186 const label meshComm,
label postSweepsLevelMultiplier_
Lever multiplier for the number of post-smoothing sweeps.
const lduInterfaceFieldPtrsList & interfaces() const
A class for handling words, derived from string.
Geometric agglomerated algebraic multigrid agglomeration class.
void initVcycle(PtrList< scalarField > &coarseCorrFields, PtrList< scalarField > &coarseSources, PtrList< lduMatrix::smoother > &smoothers, scalarField &scratch1, scalarField &scratch2) const
Initialise the data structures for the V-cycle.
label preSweepsLevelMultiplier_
Lever multiplier for the number of pre-smoothing sweeps.
lduMatrix is a general matrix class in which the coefficients are stored as three arrays,...
void agglomerateInterfaceCoefficients(const label fineLevelIndex, const lduInterfacePtrsList &coarseMeshInterfaces, PtrList< lduInterfaceField > &coarsePrimInterfaces, lduInterfaceFieldPtrsList &coarseInterfaces, FieldField< Field, scalar > &coarseInterfaceBouCoeffs, FieldField< Field, scalar > &coarseInterfaceIntCoeffs) const
Agglomerate coarse interface coefficients.
autoPtr< LUscalarMatrix > coarsestLUMatrixPtr_
LU decompsed coarsest matrix.
bool directSolveCoarsest_
Direct or iteratively solve the coarsest level.
virtual solverPerformance solve(scalarField &psi, const scalarField &source, const direction cmpt=0) const
Solve.
const lduMatrix & matrixLevel(const label i) const
Simplified access to matrix level.
const lduMatrix & matrix() const
PtrList< FieldField< Field, scalar > > interfaceLevelsIntCoeffs_
Hierarchy of interface internal coefficients.
virtual ~GAMGSolver()
Destructor.
Abstract base-class for lduMatrix solvers.
Specialisations of Field<T> for scalar, vector and tensor.
const lduInterfaceFieldPtrsList & interfaceLevel(const label i) const
Simplified access to interface level.
simpleMatrix< scalar > A(Nc)
virtual void readControls()
Read control parameters from the control dictionary.
void Vcycle(const PtrList< lduMatrix::smoother > &smoothers, scalarField &psi, const scalarField &source, scalarField &Apsi, scalarField &finestCorrection, scalarField &finestResidual, scalarField &scratch1, scalarField &scratch2, PtrList< scalarField > &coarseCorrFields, PtrList< scalarField > &coarseSources, const direction cmpt=0) const
Perform a single GAMG V-cycle with pre, post and finest smoothing.
PtrList< lduMatrix > matrixLevels_
Hierarchy of matrix levels.
PtrList< FieldField< Field, scalar > > interfaceLevelsBouCoeffs_
Hierarchy of interface boundary coefficients.
const FieldField< Field, scalar > & interfaceIntCoeffsLevel(const label i) const
Simplified access to interface internal coeffs level.
label maxPostSweeps_
Maximum number of post-smoothing sweeps.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
label nPostSweeps_
Number of post-smoothing sweeps.
Pre-declare SubField and related Field type.
bool scaleCorrection_
Choose if the corrections should be scaled.
label nPreSweeps_
Number of pre-smoothing sweeps.
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
void interpolate(scalarField &psi, scalarField &Apsi, const lduMatrix &m, const FieldField< Field, scalar > &interfaceBouCoeffs, const lduInterfaceFieldPtrsList &interfaces, const direction cmpt) const
Interpolate the correction after injected prolongation.
TypeName("GAMG")
Runtime type information.
void solveCoarsestLevel(scalarField &coarsestCorrField, const scalarField &coarsestSource) const
Solve the coarsest level with either an iterative or direct solver.
A list of keyword definitions, which are a keyword followed by any number of values (e....
PtrList< lduInterfaceFieldPtrsList > interfaceLevels_
Hierarchy of interfaces in lduInterfaceFieldPtrs form.
PtrList< PtrList< lduInterfaceField > > primitiveInterfaceLevels_
Hierarchy of interfaces.
Geometric agglomerated algebraic multigrid preconditioner.
bool interpolateCorrection_
Choose if the corrections should be interpolated after injection.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
void procAgglomerateMatrix(const labelList &procAgglomMap, const List< label > &agglomProcIDs, const label levelI, autoPtr< lduMatrix > &allMatrixPtr, FieldField< Field, scalar > &allInterfaceBouCoeffs, FieldField< Field, scalar > &allInterfaceIntCoeffs, PtrList< lduInterfaceField > &allPrimitiveInterfaces, lduInterfaceFieldPtrsList &allInterfaces) const
Agglomerate processor matrices.
label maxPreSweeps_
Maximum number of pre-smoothing sweeps.
const volScalarField & psi
Geometric agglomerated algebraic multigrid solver.
const GAMGAgglomeration & agglomeration_
The agglomeration.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
const FieldField< Field, scalar > & interfaceBouCoeffsLevel(const label i) const
Simplified access to interface boundary coeffs level.
const FieldField< Field, scalar > & interfaceBouCoeffs() const
void scale(scalarField &field, scalarField &Acf, const lduMatrix &A, const FieldField< Field, scalar > &interfaceLevelBouCoeffs, const lduInterfaceFieldPtrsList &interfaceLevel, const scalarField &source, const direction cmpt) const
Calculate and apply the scaling factor from Acf, coarseSource.
GAMGSolver(const word &fieldName, const lduMatrix &matrix, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, const dictionary &solverControls)
Construct from lduMatrix and solver controls.
void gatherMatrices(const labelList &procIDs, const lduMesh &dummyMesh, const label meshComm, const lduMatrix &mat, const FieldField< Field, scalar > &interfaceBouCoeffs, const FieldField< Field, scalar > &interfaceIntCoeffs, const lduInterfaceFieldPtrsList &interfaces, PtrList< lduMatrix > &otherMats, PtrList< FieldField< Field, scalar > > &otherBouCoeffs, PtrList< FieldField< Field, scalar > > &otherIntCoeffs, List< boolList > &otherTransforms, List< List< label > > &otherRanks) const
Collect matrices from other processors.
const word & fieldName() const
const FieldField< Field, scalar > & interfaceIntCoeffs() const
void agglomerateMatrix(const label fineLevelIndex, const lduMesh &coarseMesh, const lduInterfacePtrsList &coarseMeshInterfaces)
Agglomerate coarse matrix. Supply mesh to use - so we can.
Abstract base class for meshes which provide LDU addressing for the construction of lduMatrix and LDU...
label nFinestSweeps_
Number of smoothing sweeps on finest mesh.