diff --git a/dumux/porousmediumflow/compositional/privarswitchnewtoncontroller.hh b/dumux/porousmediumflow/compositional/privarswitchnewtoncontroller.hh index 1300445f67dee7f985d892720d5f49977782f0a9..7b9dee7443333ea3217cc56ba36432cda080b511 100644 --- a/dumux/porousmediumflow/compositional/privarswitchnewtoncontroller.hh +++ b/dumux/porousmediumflow/compositional/privarswitchnewtoncontroller.hh @@ -124,58 +124,61 @@ public: problem, fvGridGeometry); Dune::Hybrid::ifElse(std::integral_constant<bool, GET_PROP_VALUE(TypeTag, EnableGridVolumeVariablesCache)>(), - [&](auto IF) { - - std::cout << "blub"; - - // update the secondary variables if global caching is enabled - // \note we only updated if phase presence changed as the volume variables - // are already updated once by the switch - for (const auto& element : elements(fvGridGeometry.gridView())) - { - // make sure FVElementGeometry & vol vars are bound to the element - auto fvGeometry = localView(fvGridGeometry); - fvGeometry.bindElement(element); - - if (switchedInLastIteration_) - { - for (auto&& scv : scvs(fvGeometry)) - { - const auto dofIdxGlobal = scv.dofIndex(); - if (priVarSwitch_->wasSwitched(dofIdxGlobal)) - { - const auto eIdx = fvGridGeometry.elementMapper().index(element); - const ElementSolution elemSol(element, this->curSol(), fvGridGeometry); - this->nonConstCurGridVolVars().volVars(eIdx, scv.indexInElement()).update(elemSol, - problem, - element, - scv); - } - } - } - - // handle the boundary volume variables for cell-centered models - if(!isBox) - { - for (auto&& scvf : scvfs(fvGeometry)) - { - // if we are not on a boundary, skip the rest - if (!scvf.boundary()) - continue; - - // check if boundary is a pure dirichlet boundary - const auto bcTypes = problem.boundaryTypes(element, scvf); - if (bcTypes.hasOnlyDirichlet()) - { - const auto insideScvIdx = scvf.insideScvIdx(); - const auto& insideScv = fvGeometry.scv(insideScvIdx); - const ElementSolution elemSol(problem.dirichlet(element, scvf)); - - this->nonConstCurGridVolVars().volVars(scvf.outsideScvIdx(), 0/*indexInElement*/).update(elemSol, problem, element, insideScv); - } - } - } - } + [&](auto&& _if) + { + DUNE_THROW(Dune::NotImplemented, "Privar switch and volume varaible caching! Please implement!"); + + // TODO: + // std::cout << "blub"; + // + // // update the secondary variables if global caching is enabled + // // \note we only updated if phase presence changed as the volume variables + // // are already updated once by the switch + // for (const auto& element : elements(fvGridGeometry.gridView())) + // { + // // make sure FVElementGeometry & vol vars are bound to the element + // auto fvGeometry = localView(fvGridGeometry); + // fvGeometry.bindElement(element); + // + // if (switchedInLastIteration_) + // { + // for (auto&& scv : scvs(fvGeometry)) + // { + // const auto dofIdxGlobal = scv.dofIndex(); + // if (priVarSwitch_->wasSwitched(dofIdxGlobal)) + // { + // const auto eIdx = fvGridGeometry.elementMapper().index(element); + // const ElementSolution elemSol(element, this->curSol(), fvGridGeometry); + // this->nonConstCurGridVolVars().volVars(eIdx, scv.indexInElement()).update(elemSol, + // problem, + // element, + // scv); + // } + // } + // } + // + // // handle the boundary volume variables for cell-centered models + // if(!isBox) + // { + // for (auto&& scvf : scvfs(fvGeometry)) + // { + // // if we are not on a boundary, skip the rest + // if (!scvf.boundary()) + // continue; + // + // // check if boundary is a pure dirichlet boundary + // const auto bcTypes = problem.boundaryTypes(element, scvf); + // if (bcTypes.hasOnlyDirichlet()) + // { + // const auto insideScvIdx = scvf.insideScvIdx(); + // const auto& insideScv = fvGeometry.scv(insideScvIdx); + // const ElementSolution elemSol(problem.dirichlet(element, scvf)); + // + // this->nonConstCurGridVolVars().volVars(scvf.outsideScvIdx(), 0/*indexInElement*/).update(elemSol, problem, element, insideScv); + // } + // } + // } + // } }); }