Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
a3228f86
Commit
a3228f86
authored
Jun 05, 2018
by
Andrew Heather
Browse files
ENH: GAMG agglom - more robust treatment for small meshes
parent
67d4736a
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C
View file @
a3228f86
...
...
@@ -265,6 +265,14 @@ Foam::GAMGAgglomeration::GAMGAgglomeration
meshLevels_
(
maxLevels_
)
{
// Limit the cells in the coarsest level based on the local number of
// cells. Note: 2 for pair-wise
nCellsInCoarsestLevel_
=
max
(
1
,
min
(
mesh
.
lduAddr
().
size
()
/
2
,
nCellsInCoarsestLevel_
));
// Ensure all procs see the same nCellsInCoarsestLevel_
reduce
(
nCellsInCoarsestLevel_
,
minOp
<
label
>
());
procCommunicator_
.
setSize
(
maxLevels_
+
1
,
-
1
);
if
(
processorAgglomerate
())
{
...
...
src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H
View file @
a3228f86
...
...
@@ -71,7 +71,7 @@ protected:
const
label
maxLevels_
;
//- Number of cells in coarsest level
const
label
nCellsInCoarsestLevel_
;
label
nCellsInCoarsestLevel_
;
//- Cached mesh interfaces
const
lduInterfacePtrsList
meshInterfaces_
;
...
...
@@ -242,7 +242,7 @@ public:
);
//- Runtime selection table for matrix or mixed geometric/matrix
//
agglomerators
//
-
agglomerators
declareRunTimeSelectionTable
(
autoPtr
,
...
...
@@ -259,7 +259,7 @@ public:
);
//- Runtime selection table for matrix or mixed geometric/matrix
//
agglomerators
//
-
agglomerators
declareRunTimeSelectionTable
(
autoPtr
,
...
...
@@ -378,7 +378,7 @@ public:
}
//- Return number of coarse patch faces (before processor
//
agglomeration)
//
-
agglomeration)
const
labelList
&
nPatchFaces
(
const
label
leveli
)
const
{
return
nPatchFaces_
[
leveli
];
...
...
@@ -452,14 +452,14 @@ public:
}
//- Mapping from processor to agglomerated processor (global, all
//
processors have the same information). Note that level is
//
the fine, not the coarse, level index. This is to be
//
consistent with the way the restriction is stored
//
-
processors have the same information). Note that level is
//
-
the fine, not the coarse, level index. This is to be
//
-
consistent with the way the restriction is stored
const
labelList
&
procAgglomMap
(
const
label
fineLeveli
)
const
;
//- Set of processors to agglomerate. Element 0 is the
//
master processor. (local, same only on those processors that
//
agglomerate)
//
-
master processor. (local, same only on those processors that
//
-
agglomerate)
const
labelList
&
agglomProcIDs
(
const
label
fineLeveli
)
const
;
//- Check that level has combined mesh
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment