Commit a925fcb0 authored by Timo Koch's avatar Timo Koch
Browse files

[2p+] Remove support for deprecated materiallawparams interface

parent bc89a3ac
......@@ -38,8 +38,6 @@
#include <dumux/porousmediumflow/immiscible/localresidual.hh>
#include <dumux/porousmediumflow/2p/formulation.hh>
#include <dumux/common/deprecated.hh>
namespace Dumux {
/*!
......@@ -191,22 +189,12 @@ public:
const auto& insideVolVars = curElemVolVars[insideScvIdx];
const auto& outsideVolVars = curElemVolVars[outsideScvIdx];
// old material law interface is deprecated: Replace this by
// const auto& insidefluidMatrixInteraction = problem.spatialParams().fluidMatrixInteraction(element,
// insideScv,
// elementSolution<FVElementGeometry>(insideVolVars.priVars()));
// const auto& outsidefluidMatrixInteraction = problem.spatialParams().fluidMatrixInteraction(outsideElement,
// outsideScv,
// elementSolution<FVElementGeometry>(outsideVolVars.priVars()));
// after the release of 3.3, when the deprecated interface is no longer supported
const auto& insidefluidMatrixInteraction = Deprecated::makePcKrSw(Scalar{}, problem.spatialParams(),
element,
insideScv,
elementSolution<FVElementGeometry>(insideVolVars.priVars()));
const auto& outsidefluidMatrixInteraction = Deprecated::makePcKrSw(Scalar{}, problem.spatialParams(),
outsideElement,
outsideScv,
elementSolution<FVElementGeometry>(outsideVolVars.priVars()));
const auto insidefluidMatrixInteraction = problem.spatialParams().fluidMatrixInteraction(
element, insideScv, elementSolution<FVElementGeometry>(insideVolVars.priVars())
);
const auto outsidefluidMatrixInteraction = problem.spatialParams().fluidMatrixInteraction(
outsideElement, outsideScv, elementSolution<FVElementGeometry>(outsideVolVars.priVars())
);
// get references to the two participating derivative matrices
auto& dI_dI = derivativeMatrices[insideScvIdx];
......@@ -321,22 +309,10 @@ public:
const auto elemSol = elementSolution(element, curElemVolVars, fvGeometry);
// old material law interface is deprecated: Replace this by
// const auto& insidefluidMatrixInteraction = problem.spatialParams().fluidMatrixInteraction(element,
// insideScv,
// elemSol);
// const auto& outsidefluidMatrixInteraction = problem.spatialParams().fluidMatrixInteraction(element,
// outsideScv,
// elemSol);
// after the release of 3.3, when the deprecated interface is no longer supported
const auto& insidefluidMatrixInteraction = Deprecated::makePcKrSw(Scalar{}, problem.spatialParams(),
element,
insideScv,
elemSol);
const auto& outsidefluidMatrixInteraction = Deprecated::makePcKrSw(Scalar{}, problem.spatialParams(),
element,
outsideScv,
elemSol);
const auto insidefluidMatrixInteraction
= problem.spatialParams().fluidMatrixInteraction(element, insideScv, elemSol);
const auto outsidefluidMatrixInteraction
= problem.spatialParams().fluidMatrixInteraction(element, outsideScv, elemSol);
// some quantities to be reused (rho & mu are constant and thus equal for all cells)
static const auto rho_w = insideVolVars.density(0);
......@@ -427,16 +403,9 @@ public:
}
else
{
// old material law interface is deprecated: Replace this by
// const auto& fluidMatrixInteractionJ = problem.spatialParams().fluidMatrixInteraction(element,
// scvJ,
// elemSol);
// after the release of 3.3, when the deprecated interface is no longer supported
const auto& fluidMatrixInteractionJ = Deprecated::makePcKrSw(Scalar{}, problem.spatialParams(),
element,
scvJ,
elemSol);
const auto& fluidMatrixInteractionJ
= problem.spatialParams().fluidMatrixInteraction(element, scvJ, elemSol);
const auto swJ = curElemVolVars[scvJ].saturation(0);
const auto dFluxN_dSnJ_pc = tj_up_n*fluidMatrixInteractionJ.dpc_dsw(swJ);
dI_dJ_inside[globalJ][conti0EqIdx+1][saturationIdx] -= dFluxN_dSnJ_pc;
......@@ -485,15 +454,9 @@ public:
const auto& insideVolVars = curElemVolVars[insideScvIdx];
const auto& outsideVolVars = curElemVolVars[scvf.outsideScvIdx()];
// old material law interface is deprecated: Replace this by
// const auto& insidefluidMatrixInteraction = problem.spatialParams().fluidMatrixInteraction(element,
// insideScv,
// elementSolution<FVElementGeometry>(insideVolVars.priVars()));
// after the release of 3.3, when the deprecated interface is no longer supported
const auto& insidefluidMatrixInteraction = Deprecated::makePcKrSw(Scalar{}, problem.spatialParams(),
element,
insideScv,
elementSolution<FVElementGeometry>(insideVolVars.priVars()));
const auto insidefluidMatrixInteraction = problem.spatialParams().fluidMatrixInteraction(
element, insideScv, elementSolution<FVElementGeometry>(insideVolVars.priVars())
);
// some quantities to be reused (rho & mu are constant and thus equal for all cells)
static const auto rho_w = insideVolVars.density(0);
......
......@@ -31,8 +31,6 @@
#include <dumux/material/solidstates/updatesolidvolumefractions.hh>
#include <dumux/porousmediumflow/2p/formulation.hh>
#include <dumux/common/deprecated.hh>
namespace Dumux {
/*!
......@@ -95,10 +93,8 @@ public:
completeFluidState(elemSol, problem, element, scv, fluidState_, solidState_);
// old material law interface is deprecated: Replace this by
// const auto& fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
// after the release of 3.3, when the deprecated interface is no longer supported
const auto fluidMatrixInteraction = Deprecated::makePcKrSw(Scalar{}, problem.spatialParams(), element, scv, elemSol);
const auto& spatialParams = problem.spatialParams();
const auto fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
const int wPhaseIdx = fluidState_.wettingPhase();
const int nPhaseIdx = 1 - wPhaseIdx;
......@@ -114,7 +110,7 @@ public:
// porosity calculation over inert volumefraction
updateSolidVolumeFractions(elemSol, problem, element, scv, solidState_, numFluidComps);
EnergyVolVars::updateSolidEnergyParams(elemSol, problem, element, scv, solidState_);
permeability_ = problem.spatialParams().permeability(element, scv, elemSol);
permeability_ = spatialParams.permeability(element, scv, elemSol);
EnergyVolVars::updateEffectiveThermalConductivity();
}
......@@ -140,14 +136,12 @@ public:
{
EnergyVolVars::updateTemperature(elemSol, problem, element, scv, fluidState, solidState);
// old material law interface is deprecated: Replace this by
// const auto& fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
// after the release of 3.3, when the deprecated interface is no longer supported
const auto fluidMatrixInteraction = Deprecated::makePcKrSw(Scalar{}, problem.spatialParams(), element, scv, elemSol);
const auto& spatialParams = problem.spatialParams();
const auto fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
const auto& priVars = elemSol[scv.localDofIndex()];
const auto wPhaseIdx = problem.spatialParams().template wettingPhase<FluidSystem>(element, scv, elemSol);
const auto wPhaseIdx = spatialParams.template wettingPhase<FluidSystem>(element, scv, elemSol);
fluidState.setWettingPhase(wPhaseIdx);
if (formulation == TwoPFormulation::p0s1)
{
......@@ -161,7 +155,7 @@ public:
}
else
{
const auto Sn = Traits::SaturationReconstruction::reconstructSn(problem.spatialParams(), element,
const auto Sn = Traits::SaturationReconstruction::reconstructSn(spatialParams, element,
scv, elemSol, priVars[saturationIdx]);
fluidState.setSaturation(phase1Idx, Sn);
fluidState.setSaturation(phase0Idx, 1 - Sn);
......@@ -174,7 +168,7 @@ public:
fluidState.setPressure(phase1Idx, priVars[pressureIdx]);
if (wPhaseIdx == phase1Idx)
{
const auto Sn = Traits::SaturationReconstruction::reconstructSn(problem.spatialParams(), element,
const auto Sn = Traits::SaturationReconstruction::reconstructSn(spatialParams, element,
scv, elemSol, priVars[saturationIdx]);
fluidState.setSaturation(phase0Idx, Sn);
fluidState.setSaturation(phase1Idx, 1 - Sn);
......
......@@ -36,8 +36,6 @@
#include "primaryvariableswitch.hh"
#include <dumux/common/deprecated.hh>
namespace Dumux {
/*!
......@@ -129,10 +127,8 @@ public:
// calculate the remaining quantities
/////////////
// old material law interface is deprecated: Replace this by
// const auto& fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
// after the release of 3.3, when the deprecated interface is no longer supported
const auto fluidMatrixInteraction = Deprecated::makePcKrSw(Scalar{}, problem.spatialParams(), element, scv, elemSol);
const auto& spatialParams = problem.spatialParams();
const auto fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
// Second instance of a parameter cache.
// Could be avoided if diffusion coefficients also
......@@ -156,7 +152,7 @@ public:
// porosity calculation over inert volumefraction
updateSolidVolumeFractions(elemSol, problem, element, scv, solidState_, numFluidComps);
EnergyVolVars::updateSolidEnergyParams(elemSol, problem, element, scv, solidState_);
permeability_ = problem.spatialParams().permeability(element, scv, elemSol);
permeability_ = spatialParams.permeability(element, scv, elemSol);
EnergyVolVars::updateEffectiveThermalConductivity();
}
......@@ -181,7 +177,8 @@ public:
{
// capillary pressure parameters
const auto wPhaseIdx = problem.spatialParams().template wettingPhase<FluidSystem>(element, scv, elemSol);
const auto& spatialParams = problem.spatialParams();
const auto wPhaseIdx = spatialParams.template wettingPhase<FluidSystem>(element, scv, elemSol);
fluidState.setWettingPhase(wPhaseIdx);
const auto& priVars = elemSol[scv.localDofIndex()];
......@@ -215,11 +212,7 @@ public:
DUNE_THROW(Dune::InvalidStateException, "phasePresence: " << phasePresence << " is invalid.");
// set pressures of the fluid phases
// old material law interface is deprecated: Replace this by
// const auto& fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
// after the release of 3.3, when the deprecated interface is no longer supported
const auto fluidMatrixInteraction = Deprecated::makePcKrSw(Scalar{}, problem.spatialParams(), element, scv, elemSol);
const auto fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
pc_ = fluidMatrixInteraction.pc(fluidState.saturation(wPhaseIdx));
if (formulation == TwoPFormulation::p0s1)
{
......
......@@ -37,8 +37,6 @@
#include <dumux/material/solidstates/updatesolidvolumefractions.hh>
#include <dumux/porousmediumflow/2pnc/primaryvariableswitch.hh>
#include <dumux/common/deprecated.hh>
namespace Dumux {
// forward declaration
......@@ -143,10 +141,8 @@ public:
ParentType::update(elemSol, problem, element, scv);
asImp_().completeFluidState(elemSol, problem, element, scv, fluidState_, solidState_);
// old material law interface is deprecated: Replace this by
// const auto& fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
// after the release of 3.3, when the deprecated interface is no longer supported
const auto fluidMatrixInteraction = Deprecated::makePcKrSw(Scalar{}, problem.spatialParams(), element, scv, elemSol);
const auto& spatialParams = problem.spatialParams();
const auto fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
const int wPhaseIdx = fluidState_.wettingPhase();
const int nPhaseIdx = 1 - wPhaseIdx;
......@@ -158,7 +154,7 @@ public:
// porosity & permeabilty
updateSolidVolumeFractions(elemSol, problem, element, scv, solidState_, numFluidComps);
EnergyVolVars::updateSolidEnergyParams(elemSol, problem, element, scv, solidState_);
permeability_ = problem.spatialParams().permeability(element, scv, elemSol);
permeability_ = spatialParams.permeability(element, scv, elemSol);
auto getEffectiveDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{
......@@ -196,12 +192,9 @@ public:
const auto& priVars = elemSol[scv.localDofIndex()];
const auto phasePresence = priVars.state();
// old material law interface is deprecated: Replace this by
// const auto& fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
// after the release of 3.3, when the deprecated interface is no longer supported
const auto fluidMatrixInteraction = Deprecated::makePcKrSw(Scalar{}, problem.spatialParams(), element, scv, elemSol);
const auto wPhaseIdx = problem.spatialParams().template wettingPhase<FluidSystem>(element, scv, elemSol);
const auto& spatialParams = problem.spatialParams();
const auto fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
const auto wPhaseIdx = spatialParams.template wettingPhase<FluidSystem>(element, scv, elemSol);
fluidState.setWettingPhase(wPhaseIdx);
// set the saturations
......
......@@ -44,8 +44,6 @@
#include "primaryvariableswitch.hh"
#include <dumux/common/deprecated.hh>
namespace Dumux {
/*!
......@@ -142,11 +140,8 @@ public:
// calculate the remaining quantities
/////////////
// old material law interface is deprecated: Replace this by
// const auto& fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
// after the release of 3.3, when the deprecated interface is no longer supported
const auto fluidMatrixInteraction = Deprecated::makePcKrSw(Scalar{}, problem.spatialParams(), element, scv, elemSol);
const auto& spatialParams = problem.spatialParams();
const auto fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
const int wPhaseIdx = fluidState_.wettingPhase();
const int nPhaseIdx = 1 - wPhaseIdx;
......@@ -167,7 +162,7 @@ public:
// calculate the remaining quantities
EnergyVolVars::updateSolidEnergyParams(elemSol, problem, element, scv, solidState_);
permeability_ = problem.spatialParams().permeability(element, scv, elemSol);
permeability_ = spatialParams.permeability(element, scv, elemSol);
EnergyVolVars::updateEffectiveThermalConductivity();
}
......@@ -196,12 +191,9 @@ public:
const auto& priVars = elemSol[scv.localDofIndex()];
const auto phasePresence = priVars.state();
// old material law interface is deprecated: Replace this by
// const auto& fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
// after the release of 3.3, when the deprecated interface is no longer supported
const auto fluidMatrixInteraction = Deprecated::makePcKrSw(Scalar{}, problem.spatialParams(), element, scv, elemSol);
const auto wPhaseIdx = problem.spatialParams().template wettingPhase<FluidSystem>(element, scv, elemSol);
const auto& spatialParams = problem.spatialParams();
const auto fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
const auto wPhaseIdx = spatialParams.template wettingPhase<FluidSystem>(element, scv, elemSol);
fluidState.setWettingPhase(wPhaseIdx);
// set the saturations
......
......@@ -37,8 +37,6 @@
#include "primaryvariableswitch.hh"
#include <dumux/common/deprecated.hh>
namespace Dumux {
/*!
......@@ -137,10 +135,8 @@ public:
typename FluidSystem::ParameterCache paramCache;
paramCache.updateAll(fluidState_);
// old material law interface is deprecated: Replace this by
// const auto& fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
// after the release of 3.3, when the deprecated interface is no longer supported
const auto fluidMatrixInteraction = Deprecated::makePcKrSw(Scalar{}, problem.spatialParams(), element, scv, elemSol);
const auto& spatialParams = problem.spatialParams();
const auto fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
const int wPhaseIdx = fluidState_.wettingPhase();
const int nPhaseIdx = 1 - wPhaseIdx;
......@@ -152,7 +148,7 @@ public:
// porosity & permeabilty
updateSolidVolumeFractions(elemSol, problem, element, scv, solidState_, numFluidComps);
EnergyVolVars::updateSolidEnergyParams(elemSol, problem, element, scv, solidState_);
permeability_ = problem.spatialParams().permeability(element, scv, elemSol);
permeability_ = spatialParams.permeability(element, scv, elemSol);
auto getEffectiveDiffusionCoefficient = [&](int phaseIdx, int compIIdx, int compJIdx)
{
......@@ -191,13 +187,11 @@ public:
const auto& priVars = elemSol[scv.localDofIndex()];
const auto phasePresence = priVars.state();
const auto wPhaseIdx = problem.spatialParams().template wettingPhase<FluidSystem>(element, scv, elemSol);
const auto& spatialParams = problem.spatialParams();
const auto wPhaseIdx = spatialParams.template wettingPhase<FluidSystem>(element, scv, elemSol);
fluidState.setWettingPhase(wPhaseIdx);
// old material law interface is deprecated: Replace this by
// const auto& fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
// after the release of 3.3, when the deprecated interface is no longer supported
const auto fluidMatrixInteraction = Deprecated::makePcKrSw(Scalar{}, problem.spatialParams(), element, scv, elemSol);
const auto fluidMatrixInteraction = spatialParams.fluidMatrixInteraction(element, scv, elemSol);
// set the saturations
if (phasePresence == secondPhaseOnly)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment