diff --git a/dumux/discretization/box/elementsolution.hh b/dumux/discretization/box/elementsolution.hh index 62a66c43bceef0bf11472929b9dee51a02f09800..f4c9e312b954c8e8f52de9269632786309009a81 100644 --- a/dumux/discretization/box/elementsolution.hh +++ b/dumux/discretization/box/elementsolution.hh @@ -82,6 +82,12 @@ public: priVars_[scv.indexInElement()] = sol[scv.dofIndex()]; } + //! resize method + void resize(std::size_t size) + { + priVars_.resize(size); + } + //! bracket operator const access template<typename IndexType> const PrimaryVariables& operator [](IndexType i) const diff --git a/dumux/discretization/cellcentered/elementsolution.hh b/dumux/discretization/cellcentered/elementsolution.hh index 3e22982cad9530b87199b38fafff7efdc726571f..58795d64816befbdc8c55b515d48d6cddc71f4e2 100644 --- a/dumux/discretization/cellcentered/elementsolution.hh +++ b/dumux/discretization/cellcentered/elementsolution.hh @@ -84,6 +84,12 @@ public: return priVars_; } + //! resize method + void resize(std::size_t size) + { + assert(size == 1 && "Cell-centered element solution can only have one entry." ); + } + private: PrimaryVariables priVars_; };