From c5da45778a980a1eb90856e7bfbf2235e091b0ff Mon Sep 17 00:00:00 2001 From: Bernd Flemisch <bernd@iws.uni-stuttgart.de> Date: Mon, 2 Feb 2015 11:19:28 +0000 Subject: [PATCH] remove unused local variables Reviewed by gruenich. git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@14163 2fb0f335-1f38-0410-981e-8018bf24f1b0 --- .../fvmpfal2dpressurevelocity2padaptive.hh | 4 ---- .../fvmpfa/omethod/fvmpfao2dpressurevelocity2p.hh | 4 ---- .../decoupled/2p2c/fvpressure2p2cmultiphysics.hh | 15 ++++++--------- dumux/implicit/2p2c/2p2cvolumevariables.hh | 1 - .../implicit/mpnc/mpncvolumevariablesiakinetic.hh | 7 ------- 5 files changed, 6 insertions(+), 25 deletions(-) diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2padaptive.hh b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2padaptive.hh index a108c812da..017947077c 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2padaptive.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/lmethod/fvmpfal2dpressurevelocity2padaptive.hh @@ -574,7 +574,6 @@ void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocityOnBoundary(c //determine saturation at the boundary -> if no saturation is known directly at the boundary use the cell saturation Scalar satW = 0; - Scalar satNw = 0; if (bcType.isDirichlet(satEqIdx)) { switch (saturationType_) @@ -582,13 +581,11 @@ void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocityOnBoundary(c case sw: { satW = boundValues[saturationIdx]; - satNw = 1 - boundValues[saturationIdx]; break; } case sn: { satW = 1 - boundValues[saturationIdx]; - satNw = boundValues[saturationIdx]; break; } } @@ -596,7 +593,6 @@ void FvMpfaL2dPressureVelocity2pAdaptive<TypeTag>::calculateVelocityOnBoundary(c else { satW = cellData.saturation(wPhaseIdx); - satNw = cellData.saturation(nPhaseIdx); } Scalar pressBound = boundValues[pressureIdx]; diff --git a/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dpressurevelocity2p.hh b/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dpressurevelocity2p.hh index 45aa6303c9..81687cc11d 100644 --- a/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dpressurevelocity2p.hh +++ b/dumux/decoupled/2p/diffusion/fvmpfa/omethod/fvmpfao2dpressurevelocity2p.hh @@ -437,7 +437,6 @@ void FvMpfaO2dPressureVelocity2p<TypeTag>::calculateVelocityOnBoundary(const Int //determine saturation at the boundary -> if no saturation is known directly at the boundary use the cell saturation Scalar satW = 0; - Scalar satNw = 0; if (bcType.isDirichlet(satEqIdx)) { switch (saturationType_) @@ -445,13 +444,11 @@ void FvMpfaO2dPressureVelocity2p<TypeTag>::calculateVelocityOnBoundary(const Int case sw: { satW = boundValues[saturationIdx]; - satNw = 1 - boundValues[saturationIdx]; break; } case sn: { satW = 1 - boundValues[saturationIdx]; - satNw = boundValues[saturationIdx]; break; } } @@ -459,7 +456,6 @@ void FvMpfaO2dPressureVelocity2p<TypeTag>::calculateVelocityOnBoundary(const Int else { satW = cellData.saturation(wPhaseIdx); - satNw = cellData.saturation(nPhaseIdx); } Scalar pressBound = boundValues[pressureIdx]; diff --git a/dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh b/dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh index 2fa19766d2..4b7685fb70 100644 --- a/dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh +++ b/dumux/decoupled/2p2c/fvpressure2p2cmultiphysics.hh @@ -565,7 +565,6 @@ void FVPressure2P2CMultiPhysics<TypeTag>::get1pFlux(Dune::FieldVector<Scalar, 2> int phaseIdx = std::min(cellDataI.subdomain(), cellDataJ.subdomain()); Scalar rhoMean = 0.5 * (cellDataI.density(phaseIdx) + cellDataJ.density(phaseIdx)); - //Scalar density = 0; // 1p => no pc => only 1 pressure, potential Scalar potential = (cellDataI.pressure(phaseIdx) - cellDataJ.pressure(phaseIdx)) / dist; @@ -579,21 +578,18 @@ void FVPressure2P2CMultiPhysics<TypeTag>::get1pFlux(Dune::FieldVector<Scalar, 2> lambda = cellDataI.mobility(phaseIdx); cellDataJ.setUpwindCell(intersection.indexInOutside(), contiWEqIdx, false); // store in cellJ since cellI is const cellDataJ.setUpwindCell(intersection.indexInOutside(), contiNEqIdx, false); // store in cellJ since cellI is const - //density = cellDataI.density(phaseIdx); } else if (potential < 0.) { lambda = cellDataJ.mobility(phaseIdx); cellDataJ.setUpwindCell(intersection.indexInOutside(), contiWEqIdx, true); cellDataJ.setUpwindCell(intersection.indexInOutside(), contiNEqIdx, true); - //density = cellDataJ.density(phaseIdx); } else { lambda = harmonicMean(cellDataI.mobility(phaseIdx) , cellDataJ.mobility(phaseIdx)); cellDataJ.setUpwindCell(intersection.indexInOutside(), contiWEqIdx, false); cellDataJ.setUpwindCell(intersection.indexInOutside(), contiNEqIdx, false); - //density = cellDataJ.density(phaseIdx); } entries[0] = lambda * faceArea * fabs(permeability * unitOuterNormal) / (dist); @@ -721,17 +717,18 @@ void FVPressure2P2CMultiPhysics<TypeTag>::get1pFluxOnBoundary(Dune::FieldVector< potential += rhoMean * (unitDistVec * gravity_); - Scalar density = 0; Scalar lambda(0.); - if (potential >= 0.) + if (Dune::FloatCmp::eq<Scalar, Dune::FloatCmp::absolute>(potential, 0.0, 1.0e-30)) { - density = (Dune::FloatCmp::eq<Scalar, Dune::FloatCmp::absolute>(potential, 0.0, 1.0e-30)) ? rhoMean : cellDataI.density(phaseIdx); - lambda = (Dune::FloatCmp::eq<Scalar, Dune::FloatCmp::absolute>(potential, 0.0, 1.0e-30)) ? 0.5 * (lambdaI + lambdaBound) : lambdaI; + lambda = 0.5*(lambdaI + lambdaBound); + } + else if (potential > 0.) + { + lambda = lambdaI; } else { - density = densityBound; lambda = lambdaBound; } diff --git a/dumux/implicit/2p2c/2p2cvolumevariables.hh b/dumux/implicit/2p2c/2p2cvolumevariables.hh index eb4e5d3a84..02e609f3bf 100644 --- a/dumux/implicit/2p2c/2p2cvolumevariables.hh +++ b/dumux/implicit/2p2c/2p2cvolumevariables.hh @@ -436,7 +436,6 @@ public: // note that the gas phase is actually not existing! // thus, this is used as phase switch criterion Scalar xwn = priVars[switchIdx]; - Scalar xww = 1 - xwn; //first, xnw: //psteam = xnw * pn = partial pressure of water in gas phase diff --git a/dumux/implicit/mpnc/mpncvolumevariablesiakinetic.hh b/dumux/implicit/mpnc/mpncvolumevariablesiakinetic.hh index 0d5a33909c..fb1dca130f 100644 --- a/dumux/implicit/mpnc/mpncvolumevariablesiakinetic.hh +++ b/dumux/implicit/mpnc/mpncvolumevariablesiakinetic.hh @@ -137,13 +137,6 @@ public: } else #endif - - - -if (AwnSurface::interfacialArea(aWettingNonWettingSurfaceParams, materialParams, Sw, pc ) < 0) -{ - Scalar dummy = 0 ; -} awn = AwnSurface::interfacialArea(aWettingNonWettingSurfaceParams, materialParams, Sw, pc ); // 10.; // interfacialArea_[wPhaseIdx][nPhaseIdx] = awn ; //10. ;// -- GitLab