diff --git a/dumux/boxmodels/common/boxpropertydefaults.hh b/dumux/boxmodels/common/boxpropertydefaults.hh index 98217a17ae08545e2a811b17a5b9689fa44d96e8..841b486b6ca1bb6a868ce2d8a28ec33e2559facd 100644 --- a/dumux/boxmodels/common/boxpropertydefaults.hh +++ b/dumux/boxmodels/common/boxpropertydefaults.hh @@ -218,6 +218,13 @@ SET_PROP(BoxModel, LSMaxIterations) {public: static constexpr int value = 250; }; + +//! set number of equations of the mathematical model as default +SET_PROP_DEFAULT(LSBlockSize) +{public: + static constexpr int value = GET_PROP_VALUE(TypeTag, PTAG(NumEq)); +}; + } // namespace Properties } // namespace Dumux diff --git a/dumux/decoupled/common/decoupledproperties.hh b/dumux/decoupled/common/decoupledproperties.hh index 6256ab81f2b51d659e0f9ae033d794370d4f44cf..4931f9c0d25111c10dd4cb3805edc4a8654dddeb 100644 --- a/dumux/decoupled/common/decoupledproperties.hh +++ b/dumux/decoupled/common/decoupledproperties.hh @@ -53,6 +53,7 @@ NEW_TYPE_TAG(DecoupledModel, INHERITS_FROM(ExplicitModel, LinearSolverTypeTag)); //! grid, and elements, and shape functions. NEW_PROP_TAG( SolutionTypes); NEW_PROP_TAG( TransportSolutionType); +NEW_PROP_TAG( PrimaryVariables); NEW_PROP_TAG( Grid); //!< The type of the DUNE grid NEW_PROP_TAG( GridView); //!< The type of the grid view @@ -163,6 +164,8 @@ public: typedef Dune::BlockVector<Dune::FieldVector<Dune::FieldVector<Scalar, dim>, 2*dim > > DimVecElemFace;//!<type for vector of vectors (of size 2 x dimension) of vector (of size dimension) of scalars }; +SET_TYPE_PROP(DecoupledModel, PrimaryVariables, typename GET_PROP(TypeTag, PTAG(SolutionTypes))::PrimaryVariables); + /*! * \brief Default implementation for the Vector of the transportet quantity * @@ -203,6 +206,12 @@ SET_PROP(DecoupledModel, LSMaxIterations) {public: static constexpr int value = 500; }; + +//! set the default number of maximum iterations for the linear solver +SET_PROP(DecoupledModel, LSBlockSize) +{public: + static constexpr int value = 1; +}; // \} } diff --git a/dumux/linear/linearsolverproperties.hh b/dumux/linear/linearsolverproperties.hh index 2606805aba7aef3fa33780e8fa1e4f0cc3b92aad..c39becb3b78b15d826cc2557c85160ef2fff17ef 100644 --- a/dumux/linear/linearsolverproperties.hh +++ b/dumux/linear/linearsolverproperties.hh @@ -65,6 +65,15 @@ NEW_PROP_TAG(PreconditionerIterations); //! restart parameter for GMRes NEW_PROP_TAG(GMResRestart); +//! Size of the matrix/vector blocks +/*! + * The number of different types of equations which build the system of equations to solve + * can differ from the number of equations given by the mathematical/physical model (e.g. IMPES). + * Thus, the block size does not have to be equal to NumEq. + * (Especially important for the SuperLU solver!) + */ +NEW_PROP_TAG(LSBlockSize); + //! do not print anything by default SET_PROP_DEFAULT(NewtonLinearSolverVerbosity) {public: @@ -92,6 +101,7 @@ SET_PROP_DEFAULT(GMResRestart) {public: static constexpr int value = 10; }; + } // namespace Properties } // namespace Dumux diff --git a/dumux/linear/seqsolverbackend.hh b/dumux/linear/seqsolverbackend.hh index 43e27026b52a8450c48380b0b16cf807b6c0a2a8..40c864113515e52ebafc5509713601a9599f56d7 100644 --- a/dumux/linear/seqsolverbackend.hh +++ b/dumux/linear/seqsolverbackend.hh @@ -471,8 +471,8 @@ public: Vector bTmp(b); typedef typename GET_PROP_TYPE(TypeTag, PTAG(Scalar)) Scalar; - enum {numEq = GET_PROP_VALUE(TypeTag, PTAG(NumEq))}; - typedef typename Dune::FieldMatrix<Scalar, numEq, numEq> MatrixBlock; + enum {blockSize = GET_PROP_VALUE(TypeTag, PTAG(LSBlockSize))}; + typedef typename Dune::FieldMatrix<Scalar, blockSize, blockSize> MatrixBlock; typedef typename Dune::BCRSMatrix<MatrixBlock> ISTLMatrix; Dune::SuperLU<ISTLMatrix> solver(A);