diff --git a/examples/compute_tof.cpp b/examples/compute_tof.cpp index 4fe5faf3..761ff2e4 100644 --- a/examples/compute_tof.cpp +++ b/examples/compute_tof.cpp @@ -30,7 +30,7 @@ #include #include #include -#include +#include #include #include diff --git a/opm/core/grid/PinchProcessor.hpp b/opm/core/grid/PinchProcessor.hpp index b70e5bf1..25d5252c 100755 --- a/opm/core/grid/PinchProcessor.hpp +++ b/opm/core/grid/PinchProcessor.hpp @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/opm/core/props/BlackoilPropertiesBasic.cpp b/opm/core/props/BlackoilPropertiesBasic.cpp index 2a923a26..962c9b42 100644 --- a/opm/core/props/BlackoilPropertiesBasic.cpp +++ b/opm/core/props/BlackoilPropertiesBasic.cpp @@ -19,7 +19,7 @@ #include "config.h" #include -#include +#include #include #include diff --git a/opm/core/props/IncompPropertiesBasic.cpp b/opm/core/props/IncompPropertiesBasic.cpp index a4ad287f..ba1bc30c 100644 --- a/opm/core/props/IncompPropertiesBasic.cpp +++ b/opm/core/props/IncompPropertiesBasic.cpp @@ -21,7 +21,7 @@ #include "config.h" #include -#include +#include #include #include diff --git a/opm/core/props/IncompPropertiesFromDeck.cpp b/opm/core/props/IncompPropertiesFromDeck.cpp index 73819cac..969aeb2c 100644 --- a/opm/core/props/IncompPropertiesFromDeck.cpp +++ b/opm/core/props/IncompPropertiesFromDeck.cpp @@ -21,7 +21,7 @@ #include "config.h" #include #include -#include +#include #include #include diff --git a/opm/core/props/IncompPropertiesSinglePhase.cpp b/opm/core/props/IncompPropertiesSinglePhase.cpp index 0d41c9fb..dff06785 100644 --- a/opm/core/props/IncompPropertiesSinglePhase.cpp +++ b/opm/core/props/IncompPropertiesSinglePhase.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include diff --git a/opm/core/props/pvt/PvtPropertiesBasic.cpp b/opm/core/props/pvt/PvtPropertiesBasic.cpp index 40eb75ff..6df79e03 100644 --- a/opm/core/props/pvt/PvtPropertiesBasic.cpp +++ b/opm/core/props/pvt/PvtPropertiesBasic.cpp @@ -21,7 +21,7 @@ #include "config.h" #include -#include +#include #include diff --git a/opm/core/props/pvt/PvtPropertiesIncompFromDeck.cpp b/opm/core/props/pvt/PvtPropertiesIncompFromDeck.cpp index 668ba70c..cea7da2d 100644 --- a/opm/core/props/pvt/PvtPropertiesIncompFromDeck.cpp +++ b/opm/core/props/pvt/PvtPropertiesIncompFromDeck.cpp @@ -21,7 +21,7 @@ #include "config.h" #include #include -#include +#include #include #include #include diff --git a/opm/core/props/rock/RockCompressibility.cpp b/opm/core/props/rock/RockCompressibility.cpp index b4f48ad5..bb067904 100644 --- a/opm/core/props/rock/RockCompressibility.cpp +++ b/opm/core/props/rock/RockCompressibility.cpp @@ -20,7 +20,7 @@ #include "config.h" #include #include -#include +#include #include #include #include diff --git a/opm/core/props/satfunc/RelpermDiagnostics_impl.hpp b/opm/core/props/satfunc/RelpermDiagnostics_impl.hpp index 2f72a2fc..10c04657 100644 --- a/opm/core/props/satfunc/RelpermDiagnostics_impl.hpp +++ b/opm/core/props/satfunc/RelpermDiagnostics_impl.hpp @@ -66,7 +66,7 @@ namespace Opm { const std::string cellIdx = "(" + std::to_string(ijk[0]) + ", " + std::to_string(ijk[1]) + ", " + std::to_string(ijk[2]) + ")"; - scaledEpsInfo_[c].extractScaled(epsGridProperties, cartIdx); + scaledEpsInfo_[c].extractScaled(deck, eclState, epsGridProperties, cartIdx); // SGU <= 1.0 - SWL if (scaledEpsInfo_[c].Sgu > (1.0 - scaledEpsInfo_[c].Swl)) { diff --git a/opm/core/simulator/AdaptiveSimulatorTimer.cpp b/opm/core/simulator/AdaptiveSimulatorTimer.cpp index c730c80a..927b0641 100644 --- a/opm/core/simulator/AdaptiveSimulatorTimer.cpp +++ b/opm/core/simulator/AdaptiveSimulatorTimer.cpp @@ -24,7 +24,7 @@ #include #include -#include +#include #include namespace Opm diff --git a/opm/core/simulator/SimulatorTimer.cpp b/opm/core/simulator/SimulatorTimer.cpp index df314042..f94baf87 100644 --- a/opm/core/simulator/SimulatorTimer.cpp +++ b/opm/core/simulator/SimulatorTimer.cpp @@ -20,7 +20,7 @@ #include "config.h" #include #include -#include +#include #include #include diff --git a/opm/core/simulator/TimeStepControl.cpp b/opm/core/simulator/TimeStepControl.cpp index a6787191..df25e4c4 100644 --- a/opm/core/simulator/TimeStepControl.cpp +++ b/opm/core/simulator/TimeStepControl.cpp @@ -28,7 +28,7 @@ #include #include -#include +#include #include namespace Opm diff --git a/opm/core/simulator/initStateEquil.hpp b/opm/core/simulator/initStateEquil.hpp index 861c86a3..0894a2af 100644 --- a/opm/core/simulator/initStateEquil.hpp +++ b/opm/core/simulator/initStateEquil.hpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/opm/core/simulator/initState_impl.hpp b/opm/core/simulator/initState_impl.hpp index 910262a2..a7b3c710 100644 --- a/opm/core/simulator/initState_impl.hpp +++ b/opm/core/simulator/initState_impl.hpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/opm/core/utility/Units.hpp b/opm/core/utility/Units.hpp deleted file mode 100644 index d302d69d..00000000 --- a/opm/core/utility/Units.hpp +++ /dev/null @@ -1,233 +0,0 @@ -//=========================================================================== -// -// File: Units.hpp -// -// Created: Thu Jul 2 09:19:08 2009 -// -// Author(s): Halvor M Nilsen -// -// $Date$ -// -// $Revision$ -// -//=========================================================================== - -/* - Copyright 2009, 2010, 2011, 2012 SINTEF ICT, Applied Mathematics. - Copyright 2009, 2010, 2011, 2012 Statoil ASA. - - This file is part of the Open Porous Media project (OPM). - - OPM is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - OPM is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with OPM. If not, see . -*/ - -#ifndef OPM_UNITS_HEADER -#define OPM_UNITS_HEADER - - - -/** - * \file - * Constants and routines to assist in handling units of measurement. These are - * geared towards handling common units in reservoir descriptions. - */ - -namespace Opm -{ - namespace prefix - /// Conversion prefix for units. - { - constexpr const double micro = 1.0e-6; /**< Unit prefix [\f$\mu\f$] */ - constexpr const double milli = 1.0e-3; /**< Unit prefix [m] */ - constexpr const double centi = 1.0e-2; /**< Non-standard unit prefix [c] */ - constexpr const double deci = 1.0e-1; /**< Non-standard unit prefix [d] */ - constexpr const double kilo = 1.0e3; /**< Unit prefix [k] */ - constexpr const double mega = 1.0e6; /**< Unit prefix [M] */ - constexpr const double giga = 1.0e9; /**< Unit prefix [G] */ - } // namespace prefix - - namespace unit - /// Definition of various units. - /// All the units are defined in terms of international standard - /// units (SI). Example of use: We define a variable \c k which - /// gives a permeability. We want to set \c k to \f$1\,mD\f$. - /// \code - /// using namespace Opm::unit - /// double k = 0.001*darcy; - /// \endcode - /// We can also use one of the prefixes defined in Opm::prefix - /// \code - /// using namespace Opm::unit - /// using namespace Opm::prefix - /// double k = 1.0*milli*darcy; - /// \endcode - { - ///\name Common powers - /// @{ - constexpr double square(double v) { return v * v; } - constexpr double cubic (double v) { return v * v * v; } - /// @} - - // -------------------------------------------------------------- - // Basic (fundamental) units and conversions - // -------------------------------------------------------------- - - /// \name Length - /// @{ - constexpr const double meter = 1; - constexpr const double inch = 2.54 * prefix::centi*meter; - constexpr const double feet = 12 * inch; - /// @} - - /// \name Time - /// @{ - constexpr const double second = 1; - constexpr const double minute = 60 * second; - constexpr const double hour = 60 * minute; - constexpr const double day = 24 * hour; - constexpr const double year = 365 * day; - /// @} - - /// \name Volume - /// @{ - constexpr const double gallon = 231 * cubic(inch); - constexpr const double stb = 42 * gallon; - constexpr const double liter = 1 * cubic(prefix::deci*meter); - /// @} - - /// \name Mass - /// @{ - constexpr const double kilogram = 1; - // http://en.wikipedia.org/wiki/Pound_(mass)#Avoirdupois_pound - constexpr const double pound = 0.45359237 * kilogram; - /// @} - - // -------------------------------------------------------------- - // Standardised constants - // -------------------------------------------------------------- - - /// \name Standardised constant - /// @{ - constexpr const double gravity = 9.80665 * meter/square(second); - /// @} - - // -------------------------------------------------------------- - // Derived units and conversions - // -------------------------------------------------------------- - - /// \name Force - /// @{ - constexpr const double Newton = kilogram*meter / square(second); // == 1 - constexpr const double lbf = pound * gravity; // Pound-force - /// @} - - /// \name Pressure - /// @{ - constexpr const double Pascal = Newton / square(meter); // == 1 - constexpr const double barsa = 100000 * Pascal; - constexpr const double atm = 101325 * Pascal; - constexpr const double psia = lbf / square(inch); - /// @} - - /// \name Viscosity - /// @{ - constexpr const double Pas = Pascal * second; // == 1 - constexpr const double Poise = prefix::deci*Pas; - /// @} - - namespace perm_details { - constexpr const double p_grad = atm / (prefix::centi*meter); - constexpr const double area = square(prefix::centi*meter); - constexpr const double flux = cubic (prefix::centi*meter) / second; - constexpr const double velocity = flux / area; - constexpr const double visc = prefix::centi*Poise; - constexpr const double darcy = (velocity * visc) / p_grad; - // == 1e-7 [m^2] / 101325 - // == 9.869232667160130e-13 [m^2] - } - /// \name Permeability - /// @{ - /// - /// A porous medium with a permeability of 1 darcy permits a flow (flux) - /// of \f$1\,\mathit{cm}^3/s\f$ of a fluid with viscosity - /// \f$1\,\mathit{cP}\f$ (\f$1\,mPa\cdot s\f$) under a pressure gradient - /// of \f$1\,\mathit{atm}/\mathit{cm}\f$ acting across an area of - /// \f$1\,\mathit{cm}^2\f$. - /// - constexpr const double darcy = perm_details::darcy; - /// @} - - /** - * Unit conversion routines. - */ - namespace convert { - /** - * Convert from external units of measurements to equivalent - * internal units of measurements. Note: The internal units of - * measurements are *ALWAYS*, and exclusively, SI. - * - * Example: Convert a double @c kx, containing a permeability value - * in units of milli-darcy (mD) to the equivalent value in SI units - * (i.e., \f$m^2\f$). - * \code - * using namespace Opm::unit; - * using namespace Opm::prefix; - * convert::from(kx, milli*darcy); - * \endcode - * - * @param[in] q Physical quantity. - * @param[in] unit Physical unit of measurement. - * @return Value of @c q in equivalent SI units of measurements. - */ - constexpr double from(const double q, const double unit) - { - return q * unit; - } - - /** - * Convert from internal units of measurements to equivalent - * external units of measurements. Note: The internal units of - * measurements are *ALWAYS*, and exclusively, SI. - * - * Example: Convert a std::vector p, containing - * pressure values in the SI unit Pascal (i.e., unit::Pascal) to the - * equivalent values in Psi (unit::psia). - * \code - * using namespace Opm::unit; - * std::transform(p.begin(), p.end(), p.begin(), - * boost::bind(convert::to, _1, psia)); - * \endcode - * - * @param[in] q Physical quantity, measured in SI units. - * @param[in] unit Physical unit of measurement. - * @return Value of @c q in unit unit. - */ - constexpr double to(const double q, const double unit) - { - return q / unit; - } - } // namespace convert - - -#ifndef HAS_ATTRIBUTE_UNUSED - namespace detail { - // Some units are sometimes unused, and generate a (potentially) large number of warnings - // Adding them here silences these warnings, and should have no side-effects - constexpr double __attribute__((unused)) unused_units = stb + liter + barsa + psia + darcy; - } // namespace detail -#endif - - } // namespace unit -} // namespace Opm -#endif // OPM_UNITS_HEADER diff --git a/opm/core/utility/miscUtilities.cpp b/opm/core/utility/miscUtilities.cpp index 4f29c859..dfb973b2 100644 --- a/opm/core/utility/miscUtilities.cpp +++ b/opm/core/utility/miscUtilities.cpp @@ -19,7 +19,7 @@ #include "config.h" #include -#include +#include #include #include #include diff --git a/opm/core/utility/miscUtilitiesBlackoil.cpp b/opm/core/utility/miscUtilitiesBlackoil.cpp index 44289575..5d484722 100644 --- a/opm/core/utility/miscUtilitiesBlackoil.cpp +++ b/opm/core/utility/miscUtilitiesBlackoil.cpp @@ -29,7 +29,7 @@ #include #include #include -#include +#include #include #include diff --git a/opm/core/wells/WellsManager_impl.hpp b/opm/core/wells/WellsManager_impl.hpp index e7fe979d..99cf17e8 100644 --- a/opm/core/wells/WellsManager_impl.hpp +++ b/opm/core/wells/WellsManager_impl.hpp @@ -1,4 +1,4 @@ -#include +#include #include #include diff --git a/tests/test_equil.cpp b/tests/test_equil.cpp index caedd0af..bd50d3d3 100644 --- a/tests/test_equil.cpp +++ b/tests/test_equil.cpp @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include diff --git a/tests/test_norne_pvt.cpp b/tests/test_norne_pvt.cpp index 4fb5b6e8..1a186434 100644 --- a/tests/test_norne_pvt.cpp +++ b/tests/test_norne_pvt.cpp @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include #include diff --git a/tests/test_satfunc.cpp b/tests/test_satfunc.cpp index 898acf12..9fb641a7 100644 --- a/tests/test_satfunc.cpp +++ b/tests/test_satfunc.cpp @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include diff --git a/tests/test_timer.cpp b/tests/test_timer.cpp index 3512ddd6..05b10f59 100644 --- a/tests/test_timer.cpp +++ b/tests/test_timer.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include diff --git a/tests/test_units.cpp b/tests/test_units.cpp index 37adbaae..ead79977 100644 --- a/tests/test_units.cpp +++ b/tests/test_units.cpp @@ -53,7 +53,7 @@ #include -#include +#include using namespace Opm::prefix; using namespace Opm::unit; diff --git a/tutorials/tutorial2.cpp b/tutorials/tutorial2.cpp index 6ab81813..84984f63 100644 --- a/tutorials/tutorial2.cpp +++ b/tutorials/tutorial2.cpp @@ -46,7 +46,7 @@ #include #include #include -#include +#include #include #include @@ -85,7 +85,7 @@ try /// \details /// We define a fluid viscosity equal to 1 cP and density equal /// to 1000 kg/m^3. - /// The header contains support + /// The header contains support /// for common units and prefixes, in the namespaces Opm::unit /// and Opm::prefix. /// \snippet tutorial2.cpp fluid diff --git a/tutorials/tutorial3.cpp b/tutorials/tutorial3.cpp index 5bdb1958..e8961584 100644 --- a/tutorials/tutorial3.cpp +++ b/tutorials/tutorial3.cpp @@ -45,7 +45,7 @@ #include #include -#include +#include #include /// \page tutorial3 Multiphase flow diff --git a/tutorials/tutorial4.cpp b/tutorials/tutorial4.cpp index d1212a02..d9e5f0bc 100644 --- a/tutorials/tutorial4.cpp +++ b/tutorials/tutorial4.cpp @@ -45,7 +45,7 @@ #include #include -#include +#include #include #include