From d86f8627409637e0a492b38943277eaf772bd44b Mon Sep 17 00:00:00 2001 From: Thomas Fetzer Date: Mon, 31 Oct 2016 14:41:17 +0100 Subject: [PATCH 1/2] [mulitdomain][localresiduals] Allow pwsn formulation --- .../multidomain/2cnistokes2p2cni/2p2cnicouplinglocalresidual.hh | 2 -- dumux/multidomain/2cstokes2p2c/2p2ccouplinglocalresidual.hh | 2 -- 2 files changed, 4 deletions(-) diff --git a/dumux/multidomain/2cnistokes2p2cni/2p2cnicouplinglocalresidual.hh b/dumux/multidomain/2cnistokes2p2cni/2p2cnicouplinglocalresidual.hh index 4487c37390..21568b6541 100644 --- a/dumux/multidomain/2cnistokes2p2cni/2p2cnicouplinglocalresidual.hh +++ b/dumux/multidomain/2cnistokes2p2cni/2p2cnicouplinglocalresidual.hh @@ -123,8 +123,6 @@ public: const VolumeVariables &volVars = this->curVolVars_()[scvIdx]; // set pressure as part of the momentum coupling - static_assert(GET_PROP_VALUE(TypeTag, Formulation) == TwoPTwoCFormulation::pnsw, - "This coupling condition is only implemented for a pnsw formulation."); if (this->bcTypes_(scvIdx).isCouplingDirichlet(massBalanceIdx)) this->residual_[scvIdx][massBalanceIdx] = volVars.pressure(nPhaseIdx); diff --git a/dumux/multidomain/2cstokes2p2c/2p2ccouplinglocalresidual.hh b/dumux/multidomain/2cstokes2p2c/2p2ccouplinglocalresidual.hh index 36a6142760..7b9a211688 100644 --- a/dumux/multidomain/2cstokes2p2c/2p2ccouplinglocalresidual.hh +++ b/dumux/multidomain/2cstokes2p2c/2p2ccouplinglocalresidual.hh @@ -123,8 +123,6 @@ public: const VolumeVariables &volVars = this->curVolVars_()[scvIdx]; // set pressure as part of the momentum coupling - static_assert(GET_PROP_VALUE(TypeTag, Formulation) == TwoPTwoCFormulation::pnsw, - "This coupling condition is only implemented for a pnsw formulation."); if (this->bcTypes_(scvIdx).isCouplingDirichlet(massBalanceIdx)) this->residual_[scvIdx][massBalanceIdx] = volVars.pressure(nPhaseIdx); -- GitLab From 196941455961ba526ef5384dd03b99eca86a9f4d Mon Sep 17 00:00:00 2001 From: Thomas Fetzer Date: Mon, 31 Oct 2016 14:41:44 +0100 Subject: [PATCH 2/2] [mulitdomain][localresiduals] Cleanup unused indices --- .../2p2cnicouplinglocalresidual.hh | 15 ++------------- .../2cstokes2p2c/2p2ccouplinglocalresidual.hh | 17 ++--------------- 2 files changed, 4 insertions(+), 28 deletions(-) diff --git a/dumux/multidomain/2cnistokes2p2cni/2p2cnicouplinglocalresidual.hh b/dumux/multidomain/2cnistokes2p2cni/2p2cnicouplinglocalresidual.hh index 21568b6541..f3422f812d 100644 --- a/dumux/multidomain/2cnistokes2p2cni/2p2cnicouplinglocalresidual.hh +++ b/dumux/multidomain/2cnistokes2p2cni/2p2cnicouplinglocalresidual.hh @@ -51,24 +51,13 @@ class TwoPTwoCNICouplingLocalResidual : public NILocalResidual enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) }; enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) }; enum { useMoles = GET_PROP_VALUE(TypeTag, UseMoles) }; - enum { - pressureIdx = Indices::pressureIdx, - temperatureIdx = Indices::temperatureIdx - }; - enum { - nPhaseIdx = Indices::nPhaseIdx - }; + enum { nPhaseIdx = Indices::nPhaseIdx }; + enum { wCompIdx = Indices::wCompIdx, }; enum { massBalanceIdx = GET_PROP_VALUE(TypeTag, ReplaceCompEqIdx), contiWEqIdx = Indices::contiWEqIdx, energyEqIdx = Indices::energyEqIdx }; - enum { - wCompIdx = Indices::wCompIdx, - nCompIdx = Indices::nCompIdx - }; - enum { phaseIdx = nPhaseIdx }; // index of the phase for the phase flux calculation - enum { compIdx = wCompIdx}; // index of the component for the phase flux calculation typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables; typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables; diff --git a/dumux/multidomain/2cstokes2p2c/2p2ccouplinglocalresidual.hh b/dumux/multidomain/2cstokes2p2c/2p2ccouplinglocalresidual.hh index 7b9a211688..9d9a480da3 100644 --- a/dumux/multidomain/2cstokes2p2c/2p2ccouplinglocalresidual.hh +++ b/dumux/multidomain/2cstokes2p2c/2p2ccouplinglocalresidual.hh @@ -48,26 +48,13 @@ class TwoPTwoCCouplingLocalResidual : public TwoPTwoCLocalResidual typedef typename GET_PROP_TYPE(TypeTag, Indices) Indices; enum { dim = GridView::dimension }; - enum { numEq = GET_PROP_VALUE(TypeTag, NumEq) }; - enum { numPhases = GET_PROP_VALUE(TypeTag, NumPhases) }; enum { useMoles = GET_PROP_VALUE(TypeTag, UseMoles) }; - enum { - pressureIdx = Indices::pressureIdx - }; - enum { - wPhaseIdx = Indices::wPhaseIdx, - nPhaseIdx = Indices::nPhaseIdx - }; + enum { nPhaseIdx = Indices::nPhaseIdx }; + enum { wCompIdx = Indices::wCompIdx }; enum { massBalanceIdx = GET_PROP_VALUE(TypeTag, ReplaceCompEqIdx), contiWEqIdx = Indices::contiWEqIdx }; - enum { - wCompIdx = Indices::wCompIdx, - nCompIdx = Indices::nCompIdx - }; - enum { phaseIdx = nPhaseIdx }; // index of the phase for the phase flux calculation - enum { compIdx = wCompIdx}; // index of the component for the phase flux calculation typedef typename GET_PROP_TYPE(TypeTag, VolumeVariables) VolumeVariables; typedef typename GET_PROP_TYPE(TypeTag, ElementVolumeVariables) ElementVolumeVariables; -- GitLab