Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed: remove conditional HAVE_ECL_INPUT and HAVE_OPM_COMMON #352

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ add_custom_target(opm-material_prepare)

opm_add_test(test_blackoilfluidstate)
opm_add_test(test_ConditionalStorage)
opm_add_test(test_eclblackoilfluidsystem CONDITION HAVE_ECL_INPUT)
opm_add_test(test_eclblackoilpvt CONDITION HAVE_ECL_INPUT)
opm_add_test(test_eclmateriallawmanager CONDITION HAVE_ECL_INPUT)
opm_add_test(test_eclblackoilfluidsystem)
opm_add_test(test_eclblackoilpvt)
opm_add_test(test_eclmateriallawmanager)
opm_add_test(test_fluidmatrixinteractions)
opm_add_test(test_pengrobinson)
opm_add_test(test_densead)
Expand Down
1 change: 0 additions & 1 deletion opm-material-prereqs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ set (opm-material_CONFIG_VAR
HAVE_TYPE_TRAITS
HAVE_VALGRIND
HAVE_FINAL
HAVE_ECL_INPUT
)

# dependencies
Expand Down
10 changes: 0 additions & 10 deletions opm/material/common/Exceptions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
#ifndef OPM_MATERIAL_EXCEPTIONS_HPP
#define OPM_MATERIAL_EXCEPTIONS_HPP

#if HAVE_OPM_COMMON
#include <opm/common/Exceptions.hpp>
#endif

#include <dune/common/exceptions.hh>

Expand All @@ -38,19 +36,11 @@
// the opm-material specific exception classes
namespace Opm {
class NumericalIssue
#if HAVE_OPM_COMMON
: public Opm::NumericalProblem
#else
: public std::runtime_error
#endif
{
public:
explicit NumericalIssue(const std::string &message)
#if HAVE_OPM_COMMON
: Opm::NumericalProblem(message)
#else
: std::runtime_error(message)
#endif
{}
};
}
Expand Down
4 changes: 0 additions & 4 deletions opm/material/fluidmatrixinteractions/EclEpsConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,11 @@
#ifndef OPM_ECL_EPS_CONFIG_HPP
#define OPM_ECL_EPS_CONFIG_HPP

#if HAVE_ECL_INPUT
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#endif

#include <opm/material/common/Exceptions.hpp>
#include <opm/material/common/Unused.hpp>
Expand Down Expand Up @@ -155,7 +153,6 @@ class EclEpsConfig
bool enableLeverettScaling() const
{ return enableLeverettScaling_; }

#if HAVE_ECL_INPUT
/*!
* \brief Reads all relevant material parameters form a cell of a parsed ECL deck.
*
Expand Down Expand Up @@ -238,7 +235,6 @@ class EclEpsConfig
enableKrnScaling_ = props.hasDeckDoubleGridProperty("KRG");
}
}
#endif

private:
// enable scaling of the input saturations (i.e., rescale the x-Axis)
Expand Down
10 changes: 0 additions & 10 deletions opm/material/fluidmatrixinteractions/EclEpsScalingPoints.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@

#include "EclEpsConfig.hpp"

#if HAVE_ECL_INPUT
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
Expand All @@ -42,7 +41,6 @@
#include <opm/parser/eclipse/EclipseState/Tables/SwfnTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/SwofTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
#endif

#include <opm/material/common/Means.hpp>

Expand All @@ -66,7 +64,6 @@ class EclEpsGridProperties
typedef std::vector<double> DoubleData;

public:
#if HAVE_ECL_INPUT
void initFromDeck(const Opm::Deck& /* deck */,
const Opm::EclipseState& eclState,
bool useImbibition)
Expand Down Expand Up @@ -108,7 +105,6 @@ class EclEpsGridProperties
if (ecl3dProps.hasDeckDoubleGridProperty("PERMZ"))
permz = &ecl3dProps.getDoubleGridProperty("PERMZ").getData();
}
#endif

const IntData* satnum;

Expand All @@ -131,7 +127,6 @@ class EclEpsGridProperties
const DoubleData* permz;

private:
#if HAVE_ECL_INPUT
// this method makes sure that a grid property is not created if it is not explicitly
// mentioned in the deck. (saves memory.)
void retrieveGridPropertyData_(const DoubleData **data,
Expand All @@ -142,7 +137,6 @@ class EclEpsGridProperties
if (eclState.get3DProperties().hasDeckDoubleGridProperty(properyName))
(*data) = &eclState.get3DProperties().getDoubleGridProperty(properyName).getData();
}
#endif
};

/*!
Expand Down Expand Up @@ -214,7 +208,6 @@ struct EclEpsScalingPointsInfo
<< " maxKrog: " << maxKrog << "\n";
}

#if HAVE_ECL_INPUT
/*!
* \brief Extract the values of the unscaled scaling parameters.
*
Expand Down Expand Up @@ -418,10 +411,8 @@ struct EclEpsScalingPointsInfo
}
}
}
#endif

private:
#if HAVE_ECL_INPUT
void extractUnscaledSgof_(const Opm::SgofTable& sgofTable)
{
// minimum gas and oil-in-gas-oil saturation
Expand Down Expand Up @@ -646,7 +637,6 @@ struct EclEpsScalingPointsInfo
maxKrow = sof2Table.getKroColumn().back();
maxKrog = maxKrow;
}
#endif // HAVE_ECL_INPUT

void extractGridPropertyValue_(Scalar& targetValue,
const std::vector<double>* propData,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@
#include "EclEpsConfig.hpp"
#include "EclEpsScalingPoints.hpp"

#if HAVE_ECL_INPUT
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#endif

#include <string>
#include <memory>
Expand Down
4 changes: 0 additions & 4 deletions opm/material/fluidmatrixinteractions/EclHysteresisConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@
#ifndef OPM_ECL_HYSTERESIS_CONFIG_HPP
#define OPM_ECL_HYSTERESIS_CONFIG_HPP

#if HAVE_ECL_INPUT
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
#endif

#include <opm/material/common/Exceptions.hpp>

Expand Down Expand Up @@ -107,7 +105,6 @@ class EclHysteresisConfig
int krHysteresisModel() const
{ return krHysteresisModel_; }

#if HAVE_ECL_INPUT
/*!
* \brief Reads all relevant material parameters form a cell of a parsed ECL deck.
*
Expand Down Expand Up @@ -170,7 +167,6 @@ class EclHysteresisConfig
throw std::runtime_error("Capillary pressure hysteresis is not supported yet");
}
}
#endif

private:
// enable hysteresis at all
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@
#include "EclHysteresisConfig.hpp"
#include "EclEpsScalingPoints.hpp"

#if HAVE_ECL_INPUT
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#endif

#include <string>
#include <memory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
* \file
* \copydoc Opm::EclMaterialLawManager
*/
#if ! HAVE_ECL_INPUT
#error "Eclipse input support in opm-common is required to use the ECL material manager!"
#endif

#ifndef OPM_ECL_MATERIAL_LAW_MANAGER_HPP
#define OPM_ECL_MATERIAL_LAW_MANAGER_HPP

Expand All @@ -42,9 +38,7 @@
#include <opm/material/fluidmatrixinteractions/MaterialTraits.hpp>
#include <opm/material/fluidstates/SimpleModularFluidState.hpp>

#if HAVE_OPM_COMMON
#include <opm/common/OpmLog/OpmLog.hpp>
#endif

#include <opm/material/common/Exceptions.hpp>

Expand Down
2 changes: 0 additions & 2 deletions opm/material/fluidsystems/BlackOilFluidSystem.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ class BlackOilFluidSystem : public BaseFluidSystem<Scalar, BlackOilFluidSystem<S
/****************************************
* Initialization
****************************************/
#if HAVE_ECL_INPUT
/*!
* \brief Initialize the fluid system using an ECL deck object
*/
Expand Down Expand Up @@ -230,7 +229,6 @@ class BlackOilFluidSystem : public BaseFluidSystem<Scalar, BlackOilFluidSystem<S

initEnd();
}
#endif // HAVE_ECL_INPUT

/*!
* \brief Begin the initialization of the black oil fluid system.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@
#include <opm/material/common/Tabulated1DFunction.hpp>
#include <opm/material/common/Spline.hpp>

#if HAVE_ECL_INPUT
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#endif

namespace Opm {
/*!
Expand All @@ -52,7 +50,6 @@ class ConstantCompressibilityOilPvt
typedef std::vector<std::pair<Scalar, Scalar> > SamplingPoints;

public:
#if HAVE_ECL_INPUT
/*!
* \brief Sets the pressure-dependent oil viscosity and density
* using the Eclipse PVCDO keyword.
Expand Down Expand Up @@ -92,7 +89,6 @@ class ConstantCompressibilityOilPvt

initEnd();
}
#endif

void setNumRegions(size_t numRegions)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,11 @@

#include <opm/material/common/Tabulated1DFunction.hpp>

#if HAVE_ECL_INPUT
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
#include <opm/parser/eclipse/Deck/DeckItem.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#endif

#include <vector>

Expand All @@ -51,7 +49,6 @@ class ConstantCompressibilityWaterPvt
typedef std::vector<std::pair<Scalar, Scalar> > SamplingPoints;

public:
#if HAVE_ECL_INPUT
/*!
* \brief Sets the pressure-dependent water viscosity and density
* using a table stemming from the Eclipse PVTW keyword.
Expand Down Expand Up @@ -87,7 +84,6 @@ class ConstantCompressibilityWaterPvt

initEnd();
}
#endif

void setNumRegions(size_t numRegions)
{
Expand Down
4 changes: 0 additions & 4 deletions opm/material/fluidsystems/blackoilpvt/DeadOilPvt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@
#include <opm/material/common/Tabulated1DFunction.hpp>
#include <opm/material/common/Spline.hpp>

#if HAVE_ECL_INPUT
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/PvdoTable.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
#endif

namespace Opm {
/*!
Expand All @@ -49,7 +47,6 @@ class DeadOilPvt
typedef std::vector<std::pair<Scalar, Scalar> > SamplingPoints;

public:
#if HAVE_ECL_INPUT
/*!
* \brief Initialize the oil parameters via the data specified by the PVDO ECL keyword.
*/
Expand Down Expand Up @@ -87,7 +84,6 @@ class DeadOilPvt

initEnd();
}
#endif // HAVE_ECL_INPUT

void setNumRegions(size_t numRegions)
{
Expand Down
4 changes: 0 additions & 4 deletions opm/material/fluidsystems/blackoilpvt/DryGasPvt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,12 @@

#include <opm/material/common/Tabulated1DFunction.hpp>

#if HAVE_ECL_INPUT
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/TableManager.hpp>
#include <opm/parser/eclipse/EclipseState/Tables/PvdgTable.hpp>
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
#endif

#include <vector>

Expand All @@ -54,7 +52,6 @@ class DryGasPvt
typedef std::vector<std::pair<Scalar, Scalar> > SamplingPoints;

public:
#if HAVE_ECL_INPUT
/*!
* \brief Initialize the parameters for dry gas using an ECL deck.
*
Expand Down Expand Up @@ -104,7 +101,6 @@ class DryGasPvt

initEnd();
}
#endif

void setNumRegions(size_t numRegions)
{
Expand Down
4 changes: 0 additions & 4 deletions opm/material/fluidsystems/blackoilpvt/GasPvtMultiplexer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,10 @@
#include "WetGasPvt.hpp"
#include "GasPvtThermal.hpp"

#if HAVE_ECL_INPUT
#include <opm/parser/eclipse/Deck/Deck.hpp>
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
#include <opm/parser/eclipse/Deck/DeckKeyword.hpp>
#include <opm/parser/eclipse/Deck/DeckRecord.hpp>
#endif

namespace Opm {
#define OPM_GAS_PVT_MULTIPLEXER_CALL(codeToCall) \
Expand Down Expand Up @@ -109,7 +107,6 @@ class GasPvtMultiplexer
}
}

#if HAVE_ECL_INPUT
/*!
* \brief Initialize the parameters for gas using an ECL deck.
*
Expand All @@ -130,7 +127,6 @@ class GasPvtMultiplexer

OPM_GAS_PVT_MULTIPLEXER_CALL(pvtImpl.initFromDeck(deck, eclState));
}
#endif // HAVE_ECL_INPUT

void setApproach(GasPvtApproach gasPvtAppr)
{
Expand Down
Loading