Skip to content

Commit

Permalink
Merge pull request #304 from andlaus/remove_FluidSystems_namespace
Browse files Browse the repository at this point in the history
remove the Opm::FluidSystems namespace
  • Loading branch information
bska authored Jul 27, 2018
2 parents 3edf76f + 2d5ca10 commit a445894
Show file tree
Hide file tree
Showing 18 changed files with 82 additions and 103 deletions.
2 changes: 1 addition & 1 deletion opm/material/components/CO2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace Opm {
* Under reservoir conditions, CO2 is typically in supercritical
* state. These properties can be provided in tabulated form, which is
* necessary for this component. The template is used by the
* fluidsystem \c FluidSystems::BrineCO2. If thermodynamic precision
* fluidsystem \c BrineCO2FluidSystem. If thermodynamic precision
* is not a top priority, the much simpler component \c Opm::SimpleCO2 can be
* used instead
*/
Expand Down
40 changes: 19 additions & 21 deletions opm/material/fluidsystems/BlackOilFluidSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
/*!
* \file
* \copydoc Opm::FluidSystems::BlackOil
* \copydoc Opm::BlackOilFluidSystem
*/
#ifndef OPM_BLACK_OIL_FLUID_SYSTEM_HPP
#define OPM_BLACK_OIL_FLUID_SYSTEM_HPP
Expand Down Expand Up @@ -82,18 +82,16 @@ auto getRv_(typename std::enable_if<HasMember_Rv<FluidState>::value, const Fluid

}

namespace FluidSystems {

/*!
* \brief A fluid system which uses the black-oil model assumptions to calculate
* termodynamically meaningful quantities.
*
* \tparam Scalar The type used for scalar floating point values
*/
template <class Scalar>
class BlackOil : public BaseFluidSystem<Scalar, BlackOil<Scalar> >
class BlackOilFluidSystem : public BaseFluidSystem<Scalar, BlackOilFluidSystem<Scalar> >
{
typedef BlackOil ThisType;
typedef BlackOilFluidSystem ThisType;

public:
typedef Opm::GasPvtMultiplexer<Scalar> GasPvt;
Expand Down Expand Up @@ -1269,7 +1267,7 @@ class BlackOil : public BaseFluidSystem<Scalar, BlackOil<Scalar> >
};

template <class Scalar>
const int BlackOil<Scalar>::phaseToSolventCompIdx_[3] =
const int BlackOilFluidSystem<Scalar>::phaseToSolventCompIdx_[3] =
{
waterCompIdx, // water phase
oilCompIdx, // oil phase
Expand All @@ -1278,60 +1276,60 @@ const int BlackOil<Scalar>::phaseToSolventCompIdx_[3] =


template <class Scalar>
const int BlackOil<Scalar>::phaseToSoluteCompIdx_[3] =
const int BlackOilFluidSystem<Scalar>::phaseToSoluteCompIdx_[3] =
{
-1, // water phase
gasCompIdx, // oil phase
oilCompIdx // gas phase
};

template <class Scalar>
unsigned char BlackOil<Scalar>::numActivePhases_;
unsigned char BlackOilFluidSystem<Scalar>::numActivePhases_;

template <class Scalar>
bool BlackOil<Scalar>::phaseIsActive_[numPhases];
bool BlackOilFluidSystem<Scalar>::phaseIsActive_[numPhases];

template <class Scalar>
Scalar
BlackOil<Scalar>::surfaceTemperature; // [K]
BlackOilFluidSystem<Scalar>::surfaceTemperature; // [K]

template <class Scalar>
Scalar
BlackOil<Scalar>::surfacePressure; // [Pa]
BlackOilFluidSystem<Scalar>::surfacePressure; // [Pa]

template <class Scalar>
Scalar
BlackOil<Scalar>::reservoirTemperature_;
BlackOilFluidSystem<Scalar>::reservoirTemperature_;

template <class Scalar>
bool BlackOil<Scalar>::enableDissolvedGas_;
bool BlackOilFluidSystem<Scalar>::enableDissolvedGas_;

template <class Scalar>
bool BlackOil<Scalar>::enableVaporizedOil_;
bool BlackOilFluidSystem<Scalar>::enableVaporizedOil_;

template <class Scalar>
std::shared_ptr<OilPvtMultiplexer<Scalar> >
BlackOil<Scalar>::oilPvt_;
BlackOilFluidSystem<Scalar>::oilPvt_;

template <class Scalar>
std::shared_ptr<Opm::GasPvtMultiplexer<Scalar> >
BlackOil<Scalar>::gasPvt_;
BlackOilFluidSystem<Scalar>::gasPvt_;

template <class Scalar>
std::shared_ptr<WaterPvtMultiplexer<Scalar> >
BlackOil<Scalar>::waterPvt_;
BlackOilFluidSystem<Scalar>::waterPvt_;

template <class Scalar>
std::vector<std::array<Scalar, 3> >
BlackOil<Scalar>::referenceDensity_;
BlackOilFluidSystem<Scalar>::referenceDensity_;

template <class Scalar>
std::vector<std::array<Scalar, 3> >
BlackOil<Scalar>::molarMass_;
BlackOilFluidSystem<Scalar>::molarMass_;

template <class Scalar>
bool BlackOil<Scalar>::isInitialized_ = false;
bool BlackOilFluidSystem<Scalar>::isInitialized_ = false;

}} // namespace Opm, FluidSystems
} // namespace Opm

#endif
8 changes: 3 additions & 5 deletions opm/material/fluidsystems/BrineCO2FluidSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
/*!
* \file
*
* \copydoc Opm::FluidSystems::BrineCO2
* \copydoc Opm::BrineCO2FluidSystem
*/
#ifndef OPM_BRINE_CO2_SYSTEM_HPP
#define OPM_BRINE_CO2_SYSTEM_HPP
Expand All @@ -48,7 +48,6 @@
#include <iostream>

namespace Opm {
namespace FluidSystems {

/*!
* \brief A two-phase fluid system with water and CO2.
Expand All @@ -58,8 +57,8 @@ namespace FluidSystems {
* sampling to be supplied as template argument.
*/
template <class Scalar, class CO2Tables>
class BrineCO2
: public BaseFluidSystem<Scalar, BrineCO2<Scalar, CO2Tables> >
class BrineCO2FluidSystem
: public BaseFluidSystem<Scalar, BrineCO2FluidSystem<Scalar, CO2Tables> >
{
typedef Opm::H2O<Scalar> H2O_IAPWS;
typedef Opm::Brine<Scalar, H2O_IAPWS> Brine_IAPWS;
Expand Down Expand Up @@ -602,7 +601,6 @@ class BrineCO2
}
};

} // namespace FluidSystems
} // namespace Opm

#endif
11 changes: 4 additions & 7 deletions opm/material/fluidsystems/H2OAirFluidSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
/*!
* \file
* \copydoc Opm::FluidSystems::H2OAir
* \copydoc Opm::H2OAirFluidSystem
*/
#ifndef OPM_H2O_AIR_SYSTEM_HPP
#define OPM_H2O_AIR_SYSTEM_HPP
Expand All @@ -43,7 +43,6 @@
#include <cassert>

namespace Opm {
namespace FluidSystems {

/*!
* \ingroup Fluidsystems
Expand All @@ -57,10 +56,10 @@ namespace FluidSystems {
template <class Scalar,
//class H2Otype = Opm::SimpleH2O<Scalar>,
class H2Otype = Opm::TabulatedComponent<Scalar, Opm::H2O<Scalar> >>
class H2OAir
: public BaseFluidSystem<Scalar, H2OAir<Scalar, H2Otype> >
class H2OAirFluidSystem
: public BaseFluidSystem<Scalar, H2OAirFluidSystem<Scalar, H2Otype> >
{
typedef H2OAir<Scalar,H2Otype> ThisType;
typedef H2OAirFluidSystem<Scalar,H2Otype> ThisType;
typedef BaseFluidSystem <Scalar, ThisType> Base;
typedef Opm::IdealGas<Scalar> IdealGas;

Expand Down Expand Up @@ -461,8 +460,6 @@ class H2OAir
}
};

} // namespace FluidSystems

} // namespace Opm

#endif
10 changes: 4 additions & 6 deletions opm/material/fluidsystems/H2OAirMesityleneFluidSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
/*!
* \file
* \copydoc Opm::FluidSystems::H2OAirMesitylene
* \copydoc Opm::H2OAirMesityleneFluidSystem
*/
#ifndef OPM_H2O_AIR_MESITYLENE_FLUID_SYSTEM_HPP
#define OPM_H2O_AIR_MESITYLENE_FLUID_SYSTEM_HPP
Expand All @@ -45,18 +45,17 @@
#include <iostream>

namespace Opm {
namespace FluidSystems {

/*!
* \ingroup Fluidsystems
* \brief A fluid system with water, gas and NAPL as phases and
* water, air and mesitylene (DNAPL) as components.
*/
template <class Scalar>
class H2OAirMesitylene
: public BaseFluidSystem<Scalar, H2OAirMesitylene<Scalar> >
class H2OAirMesityleneFluidSystem
: public BaseFluidSystem<Scalar, H2OAirMesityleneFluidSystem<Scalar> >
{
typedef H2OAirMesitylene<Scalar> ThisType;
typedef H2OAirMesityleneFluidSystem<Scalar> ThisType;
typedef BaseFluidSystem<Scalar, ThisType> Base;

typedef Opm::H2O<Scalar> IapwsH2O;
Expand Down Expand Up @@ -469,7 +468,6 @@ class H2OAirMesitylene
return 0.0143964;
}
};
} // namespace FluidSystems
} // namespace Opm

#endif
11 changes: 5 additions & 6 deletions opm/material/fluidsystems/H2OAirXyleneFluidSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
/*!
* \file
* \copydoc Opm::FluidSystems::H2OAirXylene
* \copydoc Opm::H2OAirXyleneFluidSystem
*/
#ifndef OPM_H2O_AIR_XYLENE_FLUID_SYSTEM_HPP
#define OPM_H2O_AIR_XYLENE_FLUID_SYSTEM_HPP
Expand All @@ -41,18 +41,17 @@
#include "NullParameterCache.hpp"

namespace Opm {
namespace FluidSystems {

/*!
* \ingroup Fluidsystems
* \brief A fluid system with water, gas and NAPL as phases and
* water, air and NAPL (contaminant) as components.
*/
template <class Scalar>
class H2OAirXylene
: public BaseFluidSystem<Scalar, H2OAirXylene<Scalar> >
class H2OAirXyleneFluidSystem
: public BaseFluidSystem<Scalar, H2OAirXyleneFluidSystem<Scalar> >
{
typedef H2OAirXylene<Scalar> ThisType;
typedef H2OAirXyleneFluidSystem<Scalar> ThisType;
typedef BaseFluidSystem<Scalar, ThisType> Base;

public:
Expand Down Expand Up @@ -417,7 +416,7 @@ class H2OAirXylene
static LhsEval NAPLPhaseDensity_(const LhsEval& T, const LhsEval& pn)
{ return NAPL::liquidDensity(T, pn); }
};
} // namespace FluidSystems

} // namespace Opm

#endif
11 changes: 4 additions & 7 deletions opm/material/fluidsystems/H2ON2FluidSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
/*!
* \file
* \copydoc Opm::FluidSystems::H2ON2
* \copydoc Opm::H2ON2FluidSystem
*/
#ifndef OPM_H2O_N2_FLUID_SYSTEM_HPP
#define OPM_H2O_N2_FLUID_SYSTEM_HPP
Expand All @@ -44,18 +44,17 @@
#include <cassert>

namespace Opm {
namespace FluidSystems {

/*!
* \ingroup Fluidsystems
*
* \brief A two-phase fluid system with water and nitrogen as components.
*/
template <class Scalar>
class H2ON2
: public BaseFluidSystem<Scalar, H2ON2<Scalar> >
class H2ON2FluidSystem
: public BaseFluidSystem<Scalar, H2ON2FluidSystem<Scalar> >
{
typedef H2ON2<Scalar> ThisType;
typedef H2ON2FluidSystem<Scalar> ThisType;
typedef BaseFluidSystem<Scalar, ThisType> Base;

// convenience typedefs
Expand Down Expand Up @@ -486,8 +485,6 @@ class H2ON2
}
};

} // namespace FluidSystems

} // namespace Opm

#endif
11 changes: 4 additions & 7 deletions opm/material/fluidsystems/H2ON2LiquidPhaseFluidSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
/*!
* \file
* \copydoc Opm::FluidSystems::H2ON2LiquidPhase
* \copydoc Opm::H2ON2LiquidPhaseFluidSystem
*/
#ifndef OPM_H2O_N2_LIQUIDPHASE_FLUID_SYSTEM_HPP
#define OPM_H2O_N2_LIQUIDPHASE_FLUID_SYSTEM_HPP
Expand All @@ -44,7 +44,6 @@
#include <cassert>

namespace Opm {
namespace FluidSystems {

/*!
* \ingroup Fluidsystems
Expand All @@ -53,10 +52,10 @@ namespace FluidSystems {
* components.
*/
template <class Scalar>
class H2ON2LiquidPhase
: public BaseFluidSystem<Scalar, H2ON2LiquidPhase<Scalar> >
class H2ON2LiquidPhaseFluidSystem
: public BaseFluidSystem<Scalar, H2ON2LiquidPhaseFluidSystem<Scalar> >
{
typedef H2ON2LiquidPhase<Scalar> ThisType;
typedef H2ON2LiquidPhaseFluidSystem<Scalar> ThisType;
typedef BaseFluidSystem<Scalar, ThisType> Base;

// convenience typedefs
Expand Down Expand Up @@ -369,8 +368,6 @@ class H2ON2LiquidPhase
}
};

} // namespace FluidSystems

} // namespace Opm

#endif
11 changes: 5 additions & 6 deletions opm/material/fluidsystems/SinglePhaseFluidSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*/
/*!
* \file
* \copydoc Opm::FluidSystems::SinglePhase
* \copydoc Opm::SinglePhaseFluidSystem
*/
#ifndef OPM_SINGLE_PHASE_FLUIDSYSTEM_HPP
#define OPM_SINGLE_PHASE_FLUIDSYSTEM_HPP
Expand All @@ -43,7 +43,6 @@
#include <cassert>

namespace Opm {
namespace FluidSystems {

/*!
* \ingroup Fluidsystems
Expand All @@ -55,10 +54,10 @@ namespace FluidSystems {
* Opm::GasPhase<Component> may be used.
*/
template <class Scalar, class Fluid>
class SinglePhase
: public BaseFluidSystem<Scalar, SinglePhase<Scalar, Fluid> >
class SinglePhaseFluidSystem
: public BaseFluidSystem<Scalar, SinglePhaseFluidSystem<Scalar, Fluid> >
{
typedef SinglePhase<Scalar, Fluid> ThisType;
typedef SinglePhaseFluidSystem<Scalar, Fluid> ThisType;
typedef BaseFluidSystem<Scalar, ThisType> Base;

public:
Expand Down Expand Up @@ -269,6 +268,6 @@ class SinglePhase
}
};

}} // namespace Opm, FluidSystems
} // namespace Opm

#endif
Loading

0 comments on commit a445894

Please sign in to comment.