Commit 8a2fd7d7 authored by Timo Koch's avatar Timo Koch
Browse files

Merge branch 'fix/mimetic-compiler-warnings' into 'master'

[mimetic][2p] At default to switch that throws NotImplemented

See merge request !1920
parents 58d7efbc b3e3f9f5
...@@ -361,6 +361,8 @@ private: ...@@ -361,6 +361,8 @@ private:
case Sn: case Sn:
sat = cellData.saturation(nPhaseIdx); sat = cellData.saturation(nPhaseIdx);
break; break;
default:
DUNE_THROW(Dune::NotImplemented, "Only saturation formulation Sw and Sn are implemented!");
} }
Scalar error = (sat > 1.0) ? sat - 1.0 : 0.0; Scalar error = (sat > 1.0) ? sat - 1.0 : 0.0;
...@@ -641,6 +643,8 @@ void MimeticTwoPLocalStiffness<TypeTag>::assembleElementMatrices(const Element& ...@@ -641,6 +643,8 @@ void MimeticTwoPLocalStiffness<TypeTag>::assembleElementMatrices(const Element&
fracFlow = -cellData.fracFlowFunc(wPhaseIdx); fracFlow = -cellData.fracFlowFunc(wPhaseIdx);
break; break;
} }
default:
DUNE_THROW(Dune::NotImplemented, "Only pressure formulation pw and pn are implemented!");
} }
...@@ -669,6 +673,8 @@ void MimeticTwoPLocalStiffness<TypeTag>::assembleElementMatrices(const Element& ...@@ -669,6 +673,8 @@ void MimeticTwoPLocalStiffness<TypeTag>::assembleElementMatrices(const Element&
fracFlow = -cellData.fracFlowFunc(wPhaseIdx); fracFlow = -cellData.fracFlowFunc(wPhaseIdx);
break; break;
} }
default:
DUNE_THROW(Dune::NotImplemented, "Only pressure formulation pw and pn are implemented!");
} }
} }
else if (flux < 0. && bctype.isDirichlet(satEqIdx)) else if (flux < 0. && bctype.isDirichlet(satEqIdx))
...@@ -695,6 +701,8 @@ void MimeticTwoPLocalStiffness<TypeTag>::assembleElementMatrices(const Element& ...@@ -695,6 +701,8 @@ void MimeticTwoPLocalStiffness<TypeTag>::assembleElementMatrices(const Element&
/ (krw / viscosity_[wPhaseIdx] + krn / viscosity_[nPhaseIdx]); / (krw / viscosity_[wPhaseIdx] + krn / viscosity_[nPhaseIdx]);
break; break;
} }
default:
DUNE_THROW(Dune::NotImplemented, "Only pressure formulation pw and pn are implemented!");
} }
} }
......
...@@ -377,6 +377,8 @@ private: ...@@ -377,6 +377,8 @@ private:
case Sn: case Sn:
sat = cellData.saturation(nPhaseIdx); sat = cellData.saturation(nPhaseIdx);
break; break;
default:
DUNE_THROW(Dune::NotImplemented, "Only saturation formulation Sw and Sn are implemented!");
} }
Scalar error = (sat > 1.0) ? sat - 1.0 : 0.0; Scalar error = (sat > 1.0) ? sat - 1.0 : 0.0;
...@@ -661,6 +663,8 @@ void MimeticTwoPLocalStiffnessAdaptive<TypeTag>::assembleElementMatrices(const E ...@@ -661,6 +663,8 @@ void MimeticTwoPLocalStiffnessAdaptive<TypeTag>::assembleElementMatrices(const E
fracFlow = -cellData.fracFlowFunc(wPhaseIdx); fracFlow = -cellData.fracFlowFunc(wPhaseIdx);
break; break;
} }
default:
DUNE_THROW(Dune::NotImplemented, "Only pressure formulation pw and pn are implemented!");
} }
rhs_[eIdxGlobal] -= (faceVol[idx] * fracFlow * flux); rhs_[eIdxGlobal] -= (faceVol[idx] * fracFlow * flux);
...@@ -688,6 +692,8 @@ void MimeticTwoPLocalStiffnessAdaptive<TypeTag>::assembleElementMatrices(const E ...@@ -688,6 +692,8 @@ void MimeticTwoPLocalStiffnessAdaptive<TypeTag>::assembleElementMatrices(const E
fracFlow = -cellData.fracFlowFunc(wPhaseIdx); fracFlow = -cellData.fracFlowFunc(wPhaseIdx);
break; break;
} }
default:
DUNE_THROW(Dune::NotImplemented, "Only pressure formulation pw and pn are implemented!");
} }
} }
else if (flux < 0. && bctype.isDirichlet(satEqIdx)) else if (flux < 0. && bctype.isDirichlet(satEqIdx))
...@@ -714,6 +720,8 @@ void MimeticTwoPLocalStiffnessAdaptive<TypeTag>::assembleElementMatrices(const E ...@@ -714,6 +720,8 @@ void MimeticTwoPLocalStiffnessAdaptive<TypeTag>::assembleElementMatrices(const E
/ (krw / viscosity_[wPhaseIdx] + krn / viscosity_[nPhaseIdx]); / (krw / viscosity_[wPhaseIdx] + krn / viscosity_[nPhaseIdx]);
break; break;
} }
default:
DUNE_THROW(Dune::NotImplemented, "Only pressure formulation pw and pn are implemented!");
} }
} }
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#ifndef DUMUX_MIMETICPRESSURE2P_HH #ifndef DUMUX_MIMETICPRESSURE2P_HH
#define DUMUX_MIMETICPRESSURE2P_HH #define DUMUX_MIMETICPRESSURE2P_HH
#include <dune/common/exceptions.hh>
// dumux environment // dumux environment
#include <dumux/porousmediumflow/sequential/mimetic/properties.hh> #include <dumux/porousmediumflow/sequential/mimetic/properties.hh>
#include <dumux/porousmediumflow/sequential/cellcentered/pressure.hh> #include <dumux/porousmediumflow/sequential/cellcentered/pressure.hh>
...@@ -136,6 +138,8 @@ template<class TypeTag> class MimeticPressure2P ...@@ -136,6 +138,8 @@ template<class TypeTag> class MimeticPressure2P
case sn: case sn:
sat = problem_.variables().cellData(i).saturation(nPhaseIdx); sat = problem_.variables().cellData(i).saturation(nPhaseIdx);
break; break;
default:
DUNE_THROW(Dune::NotImplemented, "Only saturation formulation sw and sn are implemented!");
} }
if (sat > 1.0) if (sat > 1.0)
{ {
......
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#ifndef DUMUX_MIMETICPRESSURE2PADAPTIVE_HH #ifndef DUMUX_MIMETICPRESSURE2PADAPTIVE_HH
#define DUMUX_MIMETICPRESSURE2PADAPTIVE_HH #define DUMUX_MIMETICPRESSURE2PADAPTIVE_HH
#include <dune/common/exceptions.hh>
// dumux environment // dumux environment
#include <dumux/porousmediumflow/sequential/mimetic/properties.hh> #include <dumux/porousmediumflow/sequential/mimetic/properties.hh>
#include <dumux/porousmediumflow/sequential/cellcentered/pressure.hh> #include <dumux/porousmediumflow/sequential/cellcentered/pressure.hh>
...@@ -137,6 +139,8 @@ template<class TypeTag> class MimeticPressure2PAdaptive ...@@ -137,6 +139,8 @@ template<class TypeTag> class MimeticPressure2PAdaptive
case Sn: case Sn:
sat = problem_.variables().cellData(i).saturation(nPhaseIdx); sat = problem_.variables().cellData(i).saturation(nPhaseIdx);
break; break;
default:
DUNE_THROW(Dune::NotImplemented, "Only saturation formulation Sw and Sn are implemented!");
} }
if (sat > 1.0) if (sat > 1.0)
{ {
......
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