Commit cbb7a2bb authored by Timo Koch's avatar Timo Koch
Browse files

[box] Try using an overlapping parallel AMG/BiCGSTAB

parent 4540d2c6
......@@ -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
......
......@@ -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>
......
[TimeLoop]
DtInitial = 100 # [s]
TEnd = 3000 # [s]
TEnd = 30000 # [s]
[Grid]
UpperRight = 6 4
Cells = 24 16
Overlap = 3
[Problem]
Name = richardslens
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment