diff --git a/dumux/decoupled/2p/cellData2padaptive.hh b/dumux/decoupled/2p/cellData2padaptive.hh index 911728dc1a6d6be22ee9c91bf8b6292521c66e07..2dbf9af560cd02f8f6506b177357c5af4f364b87 100644 --- a/dumux/decoupled/2p/cellData2padaptive.hh +++ b/dumux/decoupled/2p/cellData2padaptive.hh @@ -162,9 +162,9 @@ public: * the adaptation container in order to be mapped on a new grid. * * @param adaptedValues Container for model-specific values to be adapted - * @param problem The problem + * @param element The element to be stored */ - void storeAdaptionValues(AdaptedValues& adaptedValues, const Problem& problem) + void storeAdaptionValues(AdaptedValues& adaptedValues, const Element& element) { adaptedValues.saturationW = this->saturation(wPhaseIdx); adaptedValues.saturationNW = this->saturation(nPhaseIdx); @@ -180,9 +180,11 @@ public: * * @param adaptedValues Container for model-specific values to be adapted * @param adaptedValuesFather Values to be adapted of father cell - * @param problem The problem + * @param fatherElement The element of the father */ - static void storeAdaptionValues(AdaptedValues& adaptedValues, AdaptedValues& adaptedValuesFather, const Problem& problem) + static void storeAdaptionValues(AdaptedValues& adaptedValues, + AdaptedValues& adaptedValuesFather, + const Element& fatherElement) { adaptedValuesFather.saturationW += adaptedValues.saturationW / adaptedValues.count; adaptedValuesFather.saturationNW += adaptedValues.saturationNW / adaptedValues.count; @@ -197,9 +199,9 @@ public: * decoupled models. * * @param adaptedValues Container for model-specific values to be adapted - * @param problem The problem + * @param element The element where things are stored. */ - void setAdaptionValues(AdaptedValues& adaptedValues, const Problem& problem) + void setAdaptionValues(AdaptedValues& adaptedValues, const Element& element) { this->setSaturation(wPhaseIdx, adaptedValues.saturationW / adaptedValues.count); this->setSaturation(nPhaseIdx, adaptedValues.saturationNW / adaptedValues.count); diff --git a/dumux/decoupled/common/variableclassadaptive.hh b/dumux/decoupled/common/variableclassadaptive.hh index a6fa8f824704156af64c13f74ff43690352af556..9443dd096fb0848e8ef3d6093192f03701bcabdc 100644 --- a/dumux/decoupled/common/variableclassadaptive.hh +++ b/dumux/decoupled/common/variableclassadaptive.hh @@ -111,7 +111,7 @@ public: CellData& cellData = this->cellData(indexI); - cellData.storeAdaptionValues(adaptedValues, problem); + cellData.storeAdaptionValues(adaptedValues, *eIt); adaptedValues.count = 1; } @@ -120,8 +120,9 @@ public: { ElementPointer epFather = eIt->father(); AdaptedValues& adaptedValuesFather = adaptationMap_[*epFather]; - CellData::storeAdaptionValues(adaptedValues, adaptedValuesFather, problem); adaptedValuesFather.count += 1; + CellData::storeAdaptionValues(adaptedValues, adaptedValuesFather, + *epFather); } } } @@ -159,7 +160,7 @@ public: CellData& cellData = this->cellData(newIdxI); - cellData.setAdaptionValues(adaptedValues, problem); + cellData.setAdaptionValues(adaptedValues, *eIt); } } else @@ -184,7 +185,7 @@ public: int newIdxI = this->index(*eIt); CellData& cellData = this->cellData(newIdxI); - cellData.setAdaptionValues(adaptedValues, problem); + cellData.setAdaptionValues(adaptedValues, *eIt); } } }