From f517d479c6aaa06a3f37ecba20f60835f1a28295 Mon Sep 17 00:00:00 2001 From: Kilian Weishaupt <kilian.weishaupt@iws.uni-stuttgart.de> Date: Mon, 28 Nov 2016 11:11:06 +0100 Subject: [PATCH] [staggeredGrid] Use correct matrix type * Fixed bug in definition of multitype matrix --- dumux/implicit/staggered/newtoncontroller.hh | 2 +- dumux/implicit/staggered/propertydefaults.hh | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/dumux/implicit/staggered/newtoncontroller.hh b/dumux/implicit/staggered/newtoncontroller.hh index 791d8779e5..ba4031ba27 100644 --- a/dumux/implicit/staggered/newtoncontroller.hh +++ b/dumux/implicit/staggered/newtoncontroller.hh @@ -82,7 +82,7 @@ public: this->initialResidual_ = std::sqrt(norm2); } - int converged = 1;//this->linearSolver_.solve(A, x, b); //TODO: fix + int converged = this->linearSolver_.solve(A, x, b); // make sure all processes converged int convergedRemote = converged; diff --git a/dumux/implicit/staggered/propertydefaults.hh b/dumux/implicit/staggered/propertydefaults.hh index 315d3a305c..3aeeb348f0 100644 --- a/dumux/implicit/staggered/propertydefaults.hh +++ b/dumux/implicit/staggered/propertydefaults.hh @@ -209,8 +209,8 @@ public: using MatrixBlockFaceToCC = typename Dune::BCRSMatrix<MatrixLittleBlockFaceToCC>; // the row types - using RowCellCenter = typename Dune::MultiTypeBlockVector<MatrixLittleBlockCCToCC, MatrixLittleBlockCCToFace>; - using RowFace = typename Dune::MultiTypeBlockVector<MatrixLittleBlockFaceToCC, MatrixLittleBlockFaceToFace>; + using RowCellCenter = typename Dune::MultiTypeBlockVector<MatrixBlockCCToCC, MatrixBlockCCToFace>; + using RowFace = typename Dune::MultiTypeBlockVector<MatrixBlockFaceToCC, MatrixBlockFaceToFace>; // the jacobian matrix using type = typename Dune::MultiTypeBlockMatrix<RowCellCenter, RowFace>; @@ -223,6 +223,12 @@ SET_PROP(StaggeredModel, DofTypeIndices) using FaceIdx = Dune::index_constant<1>; }; +//! set default solver +SET_TYPE_PROP(StaggeredModel, LinearSolver, Dumux::GSBiCGSTABBackend<TypeTag>); + +//! set the block level to 2, suitable for e.g. the Dune::MultiTypeBlockMatrix +SET_INT_PROP(StaggeredModel, LinearSolverPreconditionerBlockLevel, 2); + } // namespace Properties -- GitLab