diff --git a/dumux/boxmodels/2pni/2pnilocalresidual.hh b/dumux/boxmodels/2pni/2pnilocalresidual.hh index 222336999c3f264ab3f786f2c7dae64eb8d5fdf5..82d787599c06f7cced8ac18779b1d3ee241ad6e5 100644 --- a/dumux/boxmodels/2pni/2pnilocalresidual.hh +++ b/dumux/boxmodels/2pni/2pnilocalresidual.hh @@ -153,7 +153,10 @@ public: // current sub control volume face fluxVars.intrinsicPermeability().mv(fluxVars.potentialGrad(phaseIdx), tmpVec); - Scalar normalFlux = - (tmpVec*fluxVars.face().normal); + Scalar normalFlux = 0; + for (int i = 0; i < Vector::size; ++i) + normalFlux += tmpVec[i]*fluxVars.face().normal[i]; + normalFlux *= -1; // data attached to upstream and the downstream vertices // of the current phase diff --git a/test/boxmodels/2p2c/injectionspatialparameters.hh b/test/boxmodels/2p2c/injectionspatialparameters.hh index 820ca1a329b8e344f2ad2a8553435e09e8c918ab..47258404d19521aef2b1e475e0495d15e98419ec 100644 --- a/test/boxmodels/2p2c/injectionspatialparameters.hh +++ b/test/boxmodels/2p2c/injectionspatialparameters.hh @@ -253,8 +253,8 @@ public: // arithmetic mean of the liquid saturation and the porosity const int i = fvElemGeom.subContVolFace[scvfIdx].i; const int j = fvElemGeom.subContVolFace[scvfIdx].j; - Scalar Sl = std::max(0.0, (vDat[i].saturation(lPhaseIdx) + - vDat[j].saturation(lPhaseIdx)) / 2); + Scalar Sl = std::max<Scalar>(0.0, (vDat[i].saturation(lPhaseIdx) + + vDat[j].saturation(lPhaseIdx)) / 2); Scalar poro = (porosity(element, fvElemGeom, i) + porosity(element, fvElemGeom, j)) / 2; diff --git a/test/boxmodels/2pni/injectionproblem2pni.hh b/test/boxmodels/2pni/injectionproblem2pni.hh index 6f8b92f894201e948e501902298b30462499fcf3..7e6f82c5ca3cd8448727650e4d0a26143ab89fd8 100644 --- a/test/boxmodels/2pni/injectionproblem2pni.hh +++ b/test/boxmodels/2pni/injectionproblem2pni.hh @@ -26,8 +26,8 @@ * passes a high temperature area. */ -#ifndef DUMUX_INJECTIONPROBLEM2PNI_HH -#define DUMUX_INJECTIONPROBLEM2PNI_HH +#ifndef DUMUX_INJECTION_PROBLEM_2PNI_HH +#define DUMUX_INJECTION_PROBLEM_2PNI_HH #include <dune/grid/io/file/dgfparser/dgfug.hh> #include <dune/grid/io/file/dgfparser/dgfs.hh>