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