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

[cleanup] Remove valgrind includes and functions deleted upstream

parent 336cde8c
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <dumux/common/properties.hh> #include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh> #include <dumux/common/parameters.hh>
#include <dumux/common/valgrind.hh>
#include <dumux/common/dumuxmessage.hh> #include <dumux/common/dumuxmessage.hh>
#include <dumux/linear/amgbackend.hh> #include <dumux/linear/amgbackend.hh>
......
...@@ -330,21 +330,14 @@ public: ...@@ -330,21 +330,14 @@ public:
Scalar temperature = fluidState.temperature(phaseIdx); Scalar temperature = fluidState.temperature(phaseIdx);
Scalar pressure = fluidState.pressure(phaseIdx); Scalar pressure = fluidState.pressure(phaseIdx);
// assume brine with viscosity effect of Ca for the liquid phase.
if (phaseIdx == liquidPhaseIdx) if (phaseIdx == liquidPhaseIdx)
{ return Brine::liquidViscosity(temperature, pressure);;
// assume brine with viscosity effect of Ca for the liquid phase.
Scalar result = Brine::liquidViscosity(temperature, pressure);
Valgrind::CheckDefined(result); // assume pure CO2 for the gas phase.
return result;
}
else if (phaseIdx == gasPhaseIdx) else if (phaseIdx == gasPhaseIdx)
{ return CO2::gasViscosity(temperature, pressure);
// assume pure CO2 for the gas phase.
Scalar result = CO2::gasViscosity(temperature, pressure);
Valgrind::CheckDefined(result);
return result;
}
else else
DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx); DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
...@@ -452,33 +445,23 @@ public: ...@@ -452,33 +445,23 @@ public:
if (phaseIdx == liquidPhaseIdx) if (phaseIdx == liquidPhaseIdx)
{ {
assert(compIIdx == H2OIdx); assert(compIIdx == H2OIdx);
Scalar result = 0.0; if (compJIdx == CO2Idx)
if(compJIdx == CO2Idx) return Brine_CO2::liquidDiffCoeff(temperature, pressure);
result = Brine_CO2::liquidDiffCoeff(temperature, pressure);
else if (compJIdx < numComponents) //Calcium and urea else if (compJIdx < numComponents) //Calcium and urea
result = 1.587e-9; //[m²/s] educated guess, value for NaCl from J. Phys. D: Appl. Phys. 40 (2007) 2769-2776 return 1.587e-9; //[m²/s] educated guess, value for NaCl from J. Phys. D: Appl. Phys. 40 (2007) 2769-2776
else else
DUNE_THROW(Dune::NotImplemented, "Binary difussion coefficient : Incorrect compIdx"); DUNE_THROW(Dune::NotImplemented, "Binary difussion coefficient : Incorrect compIdx");
Valgrind::CheckDefined(result);
return result;
} }
else else
{ {
assert(phaseIdx == gasPhaseIdx); assert(phaseIdx == gasPhaseIdx);
assert(compIIdx == CO2Idx); assert(compIIdx == CO2Idx);
Scalar result = 0.0; if (compJIdx == H2OIdx)
if(compJIdx == H2OIdx) return Brine_CO2::gasDiffCoeff(temperature, pressure);
result = Brine_CO2::gasDiffCoeff(temperature, pressure);
else if (compJIdx <numComponents) //Calcium and urea will stay in brine, no gaseous calcium or urea! else if (compJIdx <numComponents) //Calcium and urea will stay in brine, no gaseous calcium or urea!
result = 0.0; return 0.0;
else else
DUNE_THROW(Dune::NotImplemented, "Binary difussion coefficient : Incorrect compIdx"); DUNE_THROW(Dune::NotImplemented, "Binary difussion coefficient : Incorrect compIdx");
Valgrind::CheckDefined(result);
return result;
} }
}; };
...@@ -527,11 +510,6 @@ private: ...@@ -527,11 +510,6 @@ private:
Scalar xwH2O, Scalar xwH2O,
Scalar XlSal) Scalar XlSal)
{ {
Valgrind::CheckDefined(T);
Valgrind::CheckDefined(pl);
Valgrind::CheckDefined(XlSal);
Valgrind::CheckDefined(xwCO2);
if(T < 273.15) if(T < 273.15)
{ {
DUNE_THROW(NumericalProblem, DUNE_THROW(NumericalProblem,
...@@ -545,10 +523,10 @@ private: ...@@ -545,10 +523,10 @@ private:
"defined below 250MPa (is" << pl << ")"); "defined below 250MPa (is" << pl << ")");
} }
Scalar rho_brine = Brine::liquidDensity(T, pl); const Scalar rho_brine = Brine::liquidDensity(T, pl);
Scalar rho_pure = H2O::liquidDensity(T, pl); const Scalar rho_pure = H2O::liquidDensity(T, pl);
Scalar rho_lCO2 = liquidDensityWaterCO2_(T, pl, xwH2O, xwCO2); const Scalar rho_lCO2 = liquidDensityWaterCO2_(T, pl, xwH2O, xwCO2);
Scalar contribCO2 = rho_lCO2 - rho_pure; const Scalar contribCO2 = rho_lCO2 - rho_pure;
return rho_brine + contribCO2; return rho_brine + contribCO2;
} }
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <dumux/common/properties.hh> #include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh> #include <dumux/common/parameters.hh>
#include <dumux/common/valgrind.hh>
#include <dumux/common/dumuxmessage.hh> #include <dumux/common/dumuxmessage.hh>
#include <dumux/common/defaultusagemessage.hh> #include <dumux/common/defaultusagemessage.hh>
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include <dumux/common/properties.hh> #include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh> #include <dumux/common/parameters.hh>
#include <dumux/common/valgrind.hh>
#include <dumux/common/dumuxmessage.hh> #include <dumux/common/dumuxmessage.hh>
#include <dumux/common/defaultusagemessage.hh> #include <dumux/common/defaultusagemessage.hh>
...@@ -108,7 +107,7 @@ int main(int argc, char** argv) try ...@@ -108,7 +107,7 @@ int main(int argc, char** argv) try
using GridVariables = GetPropType<TypeTag, Properties::GridVariables>; using GridVariables = GetPropType<TypeTag, Properties::GridVariables>;
auto gridVariables = std::make_shared<GridVariables>(problem, fvGridGeometry); auto gridVariables = std::make_shared<GridVariables>(problem, fvGridGeometry);
gridVariables->init(x); gridVariables->init(x);
// get some time loop parameters // get some time loop parameters
using Scalar = GetPropType<TypeTag, Properties::Scalar>; using Scalar = GetPropType<TypeTag, Properties::Scalar>;
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <dumux/common/properties.hh> #include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh> #include <dumux/common/parameters.hh>
#include <dumux/common/valgrind.hh>
#include <dumux/common/dumuxmessage.hh> #include <dumux/common/dumuxmessage.hh>
#include <dumux/common/defaultusagemessage.hh> #include <dumux/common/defaultusagemessage.hh>
......
...@@ -330,21 +330,14 @@ public: ...@@ -330,21 +330,14 @@ public:
Scalar temperature = fluidState.temperature(phaseIdx); Scalar temperature = fluidState.temperature(phaseIdx);
Scalar pressure = fluidState.pressure(phaseIdx); Scalar pressure = fluidState.pressure(phaseIdx);
// assume brine with viscosity effect of Ca for the liquid phase.
if (phaseIdx == liquidPhaseIdx) if (phaseIdx == liquidPhaseIdx)
{ return Brine::liquidViscosity(temperature, pressure);;
// assume brine with viscosity effect of Ca for the liquid phase.
Scalar result = Brine::liquidViscosity(temperature, pressure);
Valgrind::CheckDefined(result); // assume pure CO2 for the gas phase.
return result;
}
else if (phaseIdx == gasPhaseIdx) else if (phaseIdx == gasPhaseIdx)
{ return CO2::gasViscosity(temperature, pressure);
// assume pure CO2 for the gas phase.
Scalar result = CO2::gasViscosity(temperature, pressure);
Valgrind::CheckDefined(result);
return result;
}
else else
DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx); DUNE_THROW(Dune::InvalidStateException, "Invalid phase index " << phaseIdx);
...@@ -452,33 +445,23 @@ public: ...@@ -452,33 +445,23 @@ public:
if (phaseIdx == liquidPhaseIdx) if (phaseIdx == liquidPhaseIdx)
{ {
assert(compIIdx == H2OIdx); assert(compIIdx == H2OIdx);
Scalar result = 0.0; if (compJIdx == CO2Idx)
if(compJIdx == CO2Idx) return Brine_CO2::liquidDiffCoeff(temperature, pressure);
result = Brine_CO2::liquidDiffCoeff(temperature, pressure);
else if (compJIdx < numComponents) //Calcium and urea else if (compJIdx < numComponents) //Calcium and urea
result = 1.587e-9; //[m²/s] educated guess, value for NaCl from J. Phys. D: Appl. Phys. 40 (2007) 2769-2776 return 1.587e-9; //[m²/s] educated guess, value for NaCl from J. Phys. D: Appl. Phys. 40 (2007) 2769-2776
else else
DUNE_THROW(Dune::NotImplemented, "Binary difussion coefficient : Incorrect compIdx"); DUNE_THROW(Dune::NotImplemented, "Binary difussion coefficient : Incorrect compIdx");
Valgrind::CheckDefined(result);
return result;
} }
else else
{ {
assert(phaseIdx == gasPhaseIdx); assert(phaseIdx == gasPhaseIdx);
assert(compIIdx == CO2Idx); assert(compIIdx == CO2Idx);
Scalar result = 0.0; if (compJIdx == H2OIdx)
if(compJIdx == H2OIdx) return Brine_CO2::gasDiffCoeff(temperature, pressure);
result = Brine_CO2::gasDiffCoeff(temperature, pressure);
else if (compJIdx <numComponents) //Calcium and urea will stay in brine, no gaseous calcium or urea! else if (compJIdx <numComponents) //Calcium and urea will stay in brine, no gaseous calcium or urea!
result = 0.0; return 0.0;
else else
DUNE_THROW(Dune::NotImplemented, "Binary difussion coefficient : Incorrect compIdx"); DUNE_THROW(Dune::NotImplemented, "Binary difussion coefficient : Incorrect compIdx");
Valgrind::CheckDefined(result);
return result;
} }
}; };
...@@ -527,11 +510,6 @@ private: ...@@ -527,11 +510,6 @@ private:
Scalar xwH2O, Scalar xwH2O,
Scalar XlSal) Scalar XlSal)
{ {
Valgrind::CheckDefined(T);
Valgrind::CheckDefined(pl);
Valgrind::CheckDefined(XlSal);
Valgrind::CheckDefined(xwCO2);
if(T < 273.15) if(T < 273.15)
{ {
DUNE_THROW(NumericalProblem, DUNE_THROW(NumericalProblem,
...@@ -545,10 +523,10 @@ private: ...@@ -545,10 +523,10 @@ private:
"defined below 250MPa (is" << pl << ")"); "defined below 250MPa (is" << pl << ")");
} }
Scalar rho_brine = Brine::liquidDensity(T, pl); const Scalar rho_brine = Brine::liquidDensity(T, pl);
Scalar rho_pure = H2O::liquidDensity(T, pl); const Scalar rho_pure = H2O::liquidDensity(T, pl);
Scalar rho_lCO2 = liquidDensityWaterCO2_(T, pl, xwH2O, xwCO2); const Scalar rho_lCO2 = liquidDensityWaterCO2_(T, pl, xwH2O, xwCO2);
Scalar contribCO2 = rho_lCO2 - rho_pure; const Scalar contribCO2 = rho_lCO2 - rho_pure;
return rho_brine + contribCO2; return rho_brine + contribCO2;
} }
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <dumux/common/properties.hh> #include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh> #include <dumux/common/parameters.hh>
#include <dumux/common/valgrind.hh>
#include <dumux/common/dumuxmessage.hh> #include <dumux/common/dumuxmessage.hh>
#include <dumux/common/defaultusagemessage.hh> #include <dumux/common/defaultusagemessage.hh>
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include <dumux/common/properties.hh> #include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh> #include <dumux/common/parameters.hh>
#include <dumux/common/valgrind.hh>
#include <dumux/common/dumuxmessage.hh> #include <dumux/common/dumuxmessage.hh>
#include <dumux/common/defaultusagemessage.hh> #include <dumux/common/defaultusagemessage.hh>
...@@ -131,7 +130,7 @@ int main(int argc, char** argv) try ...@@ -131,7 +130,7 @@ int main(int argc, char** argv) try
// the linear solver // the linear solver
using LinearSolver = AMGBiCGSTABBackend<LinearSolverTraits<FVGridGeometry>>; using LinearSolver = AMGBiCGSTABBackend<LinearSolverTraits<FVGridGeometry>>;
auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper()); auto linearSolver = std::make_shared<LinearSolver>(leafGridView, fvGridGeometry->dofMapper());
// the non-linear solver // the non-linear solver
using NewtonSolver = NewtonSolver<Assembler, LinearSolver>; using NewtonSolver = NewtonSolver<Assembler, LinearSolver>;
NewtonSolver nonLinearSolver(assembler, linearSolver); NewtonSolver nonLinearSolver(assembler, linearSolver);
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include <dumux/common/properties.hh> #include <dumux/common/properties.hh>
#include <dumux/common/parameters.hh> #include <dumux/common/parameters.hh>
#include <dumux/common/valgrind.hh>
#include <dumux/common/dumuxmessage.hh> #include <dumux/common/dumuxmessage.hh>
#include <dumux/common/defaultusagemessage.hh> #include <dumux/common/defaultusagemessage.hh>
......
Markdown is supported
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