diff --git a/dumux/boxmodels/common/boxlocalresidual.hh b/dumux/boxmodels/common/boxlocalresidual.hh index 275cb2a1957ac752ff477efcaa4a1e350da0847d..639b9b26852512384f56162b5262925e2eaafb80 100644 --- a/dumux/boxmodels/common/boxlocalresidual.hh +++ b/dumux/boxmodels/common/boxlocalresidual.hh @@ -210,7 +210,7 @@ public: ElementVolumeVariables volVars; // update the hints - model_().setHints(volVars); + model_().setHints(element, volVars); // calculate volume current variables volVars.update(problem_(), element, fvElemGeom_(), false); diff --git a/dumux/boxmodels/common/boxmodel.hh b/dumux/boxmodels/common/boxmodel.hh index 8cca9657e1901454f74be30714951bfff6a349ed..141b5ce4f1645620a95f08d03e9d4ce63719ec38 100644 --- a/dumux/boxmodels/common/boxmodel.hh +++ b/dumux/boxmodels/common/boxmodel.hh @@ -160,7 +160,10 @@ public: if (!enableHints) return; - for (int i = 0; i < curVolVars.size(); ++i) { + int n = elem.template count<dim>(); + prevVolVars.resize(n); + curVolVars.resize(n); + for (int i = 0; i < n; ++i) { int globalIdx = problem_().vertexMapper().map(elem, i, dim); if (!hintsUsable_[globalIdx]) { @@ -180,7 +183,9 @@ public: if (!enableHints) return; - for (int i = 0; i < curVolVars.size(); ++i) { + int n = elem.template count<dim>(); + curVolVars.resize(n); + for (int i = 0; i < n; ++i) { int globalIdx = problem_().vertexMapper().map(elem, i, dim); if (!hintsUsable_[globalIdx])