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
dumux-repositories
dumux
Commits
cbb7a2bb
Commit
cbb7a2bb
authored
Mar 05, 2019
by
Timo Koch
Browse files
[box] Try using an overlapping parallel AMG/BiCGSTAB
parent
4540d2c6
Changes
3
Hide whitespace changes
Inline
Side-by-side
dumux/discretization/box/fvgridgeometry.hh
View file @
cbb7a2bb
...
...
@@ -120,9 +120,9 @@ public:
:
ParentType
(
gridView
)
{
// Check if the overlap size is what we expect
if
(
!
CheckOverlapSize
<
DiscretizationMethod
::
box
>::
isValid
(
gridView
))
DUNE_THROW
(
Dune
::
InvalidStateException
,
"The box discretization method only works with zero overlap for parallel computations. "
<<
" Set the parameter
\"
Grid.Overlap
\"
in the input file."
);
//
if (!CheckOverlapSize<DiscretizationMethod::box>::isValid(gridView))
//
DUNE_THROW(Dune::InvalidStateException, "The box discretization method only works with zero overlap for parallel computations. "
//
<< " Set the parameter \"Grid.Overlap\" in the input file.");
}
//! the vertex mapper is the dofMapper
...
...
dumux/linear/amgtraits.hh
View file @
cbb7a2bb
...
...
@@ -97,29 +97,6 @@ public:
};
#endif
//! Box: use the non-overlapping AMG
template
<
class
Matrix
,
class
Vector
,
class
FVGridGeometry
>
struct
AmgTraitsImpl
<
Matrix
,
Vector
,
FVGridGeometry
,
DiscretizationMethod
::
box
>
{
using
Grid
=
typename
FVGridGeometry
::
GridView
::
Traits
::
Grid
;
enum
{
dofCodim
=
Grid
::
dimension
,
isNonOverlapping
=
true
,
// TODO: see above for description of this workaround, remove second line if fixed upstream
isParallel
=
Dune
::
Capabilities
::
canCommunicate
<
Grid
,
dofCodim
>::
v
||
Dumux
::
Temp
::
Capabilities
::
canCommunicate
<
Grid
,
dofCodim
>::
v
};
using
MType
=
Matrix
;
using
VType
=
Dune
::
BlockVector
<
Dune
::
FieldVector
<
typename
Vector
::
block_type
::
value_type
,
Vector
::
block_type
::
dimension
>>
;
using
SolverTraits
=
NonoverlappingSolverTraits
<
MType
,
VType
,
isParallel
>
;
using
Comm
=
typename
SolverTraits
::
Comm
;
using
LinearOperator
=
typename
SolverTraits
::
LinearOperator
;
using
ScalarProduct
=
typename
SolverTraits
::
ScalarProduct
;
using
Smoother
=
typename
SolverTraits
::
Smoother
;
using
DofMapper
=
typename
FVGridGeometry
::
VertexMapper
;
};
//! OverlappingSolverTraits used by discretization with overlapping parallel model
template
<
class
MType
,
class
VType
,
bool
isParallel
>
class
OverlappingSolverTraits
...
...
@@ -143,6 +120,29 @@ public:
};
#endif
//! Box: use the non-overlapping AMG
template
<
class
Matrix
,
class
Vector
,
class
FVGridGeometry
>
struct
AmgTraitsImpl
<
Matrix
,
Vector
,
FVGridGeometry
,
DiscretizationMethod
::
box
>
{
using
Grid
=
typename
FVGridGeometry
::
GridView
::
Traits
::
Grid
;
enum
{
dofCodim
=
Grid
::
dimension
,
isNonOverlapping
=
false
,
// TODO: see above for description of this workaround, remove second line if fixed upstream
isParallel
=
Dune
::
Capabilities
::
canCommunicate
<
Grid
,
dofCodim
>::
v
||
Dumux
::
Temp
::
Capabilities
::
canCommunicate
<
Grid
,
dofCodim
>::
v
};
using
MType
=
Matrix
;
using
VType
=
Dune
::
BlockVector
<
Dune
::
FieldVector
<
typename
Vector
::
block_type
::
value_type
,
Vector
::
block_type
::
dimension
>>
;
using
SolverTraits
=
OverlappingSolverTraits
<
MType
,
VType
,
isParallel
>
;
using
Comm
=
typename
SolverTraits
::
Comm
;
using
LinearOperator
=
typename
SolverTraits
::
LinearOperator
;
using
ScalarProduct
=
typename
SolverTraits
::
ScalarProduct
;
using
Smoother
=
typename
SolverTraits
::
Smoother
;
using
DofMapper
=
typename
FVGridGeometry
::
VertexMapper
;
};
//! Cell-centered tpfa: use the overlapping AMG
template
<
class
Matrix
,
class
Vector
,
class
FVGridGeometry
>
struct
AmgTraitsImpl
<
Matrix
,
Vector
,
FVGridGeometry
,
DiscretizationMethod
::
cctpfa
>
...
...
test/porousmediumflow/richards/implicit/lens/params.input
View file @
cbb7a2bb
[TimeLoop]
DtInitial = 100 # [s]
TEnd = 3000 # [s]
TEnd = 3000
0
# [s]
[Grid]
UpperRight = 6 4
Cells = 24 16
Overlap = 3
[Problem]
Name = richardslens
...
...
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