mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
use a .cpp instead of an _impl.hpp file for SaturationPropsFromDeck
this avoids having to include the "Evaluation.hpp" file as the first thing in the morning.
This commit is contained in:
@@ -16,17 +16,13 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with OPM. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef OPM_SATURATIONPROPSFROMDECK_IMPL_HEADER_INCLUDED
|
||||
#define OPM_SATURATIONPROPSFROMDECK_IMPL_HEADER_INCLUDED
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <opm/core/utility/UniformTableLinear.hpp>
|
||||
#include <opm/core/utility/NonuniformTableLinear.hpp>
|
||||
#include <opm/core/props/phaseUsageFromDeck.hpp>
|
||||
#include <opm/core/simulator/ExplicitArraysFluidState.hpp>
|
||||
#include <opm/core/grid.h>
|
||||
#include <opm/core/grid/GridHelpers.hpp>
|
||||
#include <opm/core/simulator/ExplicitArraysFluidState.hpp>
|
||||
#include <opm/core/simulator/ExplicitArraysSatDerivativesFluidState.hpp>
|
||||
|
||||
#include <opm/parser/eclipse/Utility/EndscaleWrapper.hpp>
|
||||
#include <opm/parser/eclipse/Utility/ScalecrsWrapper.hpp>
|
||||
@@ -34,6 +30,8 @@
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
|
||||
#include "SaturationPropsFromDeck.hpp"
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
|
||||
@@ -42,13 +40,11 @@ namespace Opm
|
||||
|
||||
|
||||
/// Default constructor.
|
||||
inline
|
||||
SaturationPropsFromDeck::SaturationPropsFromDeck()
|
||||
{
|
||||
}
|
||||
|
||||
/// Initialize from deck.
|
||||
inline
|
||||
void SaturationPropsFromDeck::init(Opm::DeckConstPtr deck,
|
||||
Opm::EclipseStateConstPtr eclipseState,
|
||||
std::shared_ptr<MaterialLawManager> materialLawManager,
|
||||
@@ -60,7 +56,6 @@ namespace Opm
|
||||
}
|
||||
|
||||
/// Initialize from deck.
|
||||
inline
|
||||
void SaturationPropsFromDeck::init(const PhaseUsage &phaseUsage,
|
||||
std::shared_ptr<MaterialLawManager> materialLawManager)
|
||||
{
|
||||
@@ -68,21 +63,7 @@ namespace Opm
|
||||
materialLawManager_ = materialLawManager;
|
||||
}
|
||||
|
||||
/// Initialize from deck.
|
||||
template<class T>
|
||||
void SaturationPropsFromDeck::init(Opm::DeckConstPtr deck,
|
||||
Opm::EclipseStateConstPtr eclipseState,
|
||||
std::shared_ptr<MaterialLawManager> materialLawManager,
|
||||
int number_of_cells,
|
||||
const int* global_cell,
|
||||
const T& begin_cell_centroids,
|
||||
int dimensions)
|
||||
{
|
||||
init(Opm::phaseUsageFromDeck(deck), materialLawManager);
|
||||
}
|
||||
|
||||
/// \return P, the number of phases.
|
||||
inline
|
||||
int SaturationPropsFromDeck::numPhases() const
|
||||
{
|
||||
return phaseUsage_.num_phases;
|
||||
@@ -101,7 +82,6 @@ namespace Opm
|
||||
/// The P^2 derivative matrix is
|
||||
/// m_{ij} = \frac{dkr_i}{ds^j},
|
||||
/// and is output in Fortran order (m_00 m_10 m_20 m01 ...)
|
||||
inline
|
||||
void SaturationPropsFromDeck::relperm(const int n,
|
||||
const double* s,
|
||||
const int* cells,
|
||||
@@ -161,7 +141,6 @@ namespace Opm
|
||||
/// The P^2 derivative matrix is
|
||||
/// m_{ij} = \frac{dpc_i}{ds^j},
|
||||
/// and is output in Fortran order (m_00 m_10 m_20 m01 ...)
|
||||
inline
|
||||
void SaturationPropsFromDeck::capPress(const int n,
|
||||
const double* s,
|
||||
const int* cells,
|
||||
@@ -216,7 +195,6 @@ namespace Opm
|
||||
/// \param[in] cells Array of n cell indices.
|
||||
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
||||
/// \param[out] smax Array of nP maximum s values, array must be valid before calling.
|
||||
inline
|
||||
void SaturationPropsFromDeck::satRange(const int n,
|
||||
const int* cells,
|
||||
double* smin,
|
||||
@@ -245,7 +223,6 @@ namespace Opm
|
||||
/// Update saturation state for the hysteresis tracking
|
||||
/// \param[in] n Number of data points.
|
||||
/// \param[in] s Array of nP saturation values.
|
||||
inline
|
||||
void SaturationPropsFromDeck::updateSatHyst(const int n,
|
||||
const int* cells,
|
||||
const double* s)
|
||||
@@ -268,7 +245,6 @@ namespace Opm
|
||||
/// \param[in] cell Cell index.
|
||||
/// \param[in] pcow P_oil - P_water.
|
||||
/// \param[in/out] swat Water saturation. / Possibly modified Water saturation.
|
||||
inline
|
||||
void SaturationPropsFromDeck::swatInitScaling(const int cell,
|
||||
const double pcow,
|
||||
double& swat)
|
||||
@@ -276,5 +252,3 @@ namespace Opm
|
||||
swat = materialLawManager_->applySwatinit(cell, pcow, swat);
|
||||
}
|
||||
} // namespace Opm
|
||||
|
||||
#endif // OPM_SATURATIONPROPSFROMDECK_IMPL_HEADER_INCLUDED
|
||||
@@ -23,12 +23,12 @@
|
||||
#include <opm/core/props/satfunc/SaturationPropsInterface.hpp>
|
||||
#include <opm/core/utility/parameters/ParameterGroup.hpp>
|
||||
#include <opm/core/props/BlackoilPhases.hpp>
|
||||
#include <opm/core/props/phaseUsageFromDeck.hpp>
|
||||
#include <opm/core/grid.h>
|
||||
|
||||
#include <opm/parser/eclipse/Deck/Deck.hpp>
|
||||
#include <opm/parser/eclipse/EclipseState/EclipseState.hpp>
|
||||
|
||||
#include <opm/core/simulator/ExplicitArraysFluidState.hpp>
|
||||
#include <opm/core/simulator/ExplicitArraysSatDerivativesFluidState.hpp>
|
||||
#include <opm/material/fluidmatrixinteractions/EclMaterialLawManager.hpp>
|
||||
|
||||
#include <vector>
|
||||
@@ -50,12 +50,12 @@ namespace Opm
|
||||
typedef MaterialLawManager::MaterialLawParams MaterialLawParams;
|
||||
|
||||
/// Default constructor.
|
||||
inline SaturationPropsFromDeck();
|
||||
SaturationPropsFromDeck();
|
||||
|
||||
/// Initialize from a MaterialLawManager object and a compressed to cartesian cell index map.
|
||||
/// \param[in] materialLawManager An initialized MaterialLawManager object
|
||||
inline void init(const PhaseUsage &phaseUsage,
|
||||
std::shared_ptr<MaterialLawManager> materialLawManager);
|
||||
void init(const PhaseUsage &phaseUsage,
|
||||
std::shared_ptr<MaterialLawManager> materialLawManager);
|
||||
|
||||
|
||||
/// Initialize from deck and grid.
|
||||
@@ -63,10 +63,10 @@ namespace Opm
|
||||
/// \param[in] grid Grid to which property object applies, needed for the
|
||||
/// mapping from cell indices (typically from a processed grid)
|
||||
/// to logical cartesian indices consistent with the deck.
|
||||
inline void init(Opm::DeckConstPtr deck,
|
||||
Opm::EclipseStateConstPtr eclipseState,
|
||||
std::shared_ptr<MaterialLawManager> materialLawManager,
|
||||
const UnstructuredGrid& grid);
|
||||
void init(Opm::DeckConstPtr deck,
|
||||
Opm::EclipseStateConstPtr eclipseState,
|
||||
std::shared_ptr<MaterialLawManager> materialLawManager,
|
||||
const UnstructuredGrid& grid);
|
||||
|
||||
/// Initialize from deck and grid.
|
||||
/// \param[in] deck Deck input parser
|
||||
@@ -80,16 +80,19 @@ namespace Opm
|
||||
/// \param[in] begin_cell_centroids Pointer to the first cell_centroid of the grid.
|
||||
/// \param[in] dimensions The dimensions of the grid.
|
||||
template<class T>
|
||||
inline void init(Opm::DeckConstPtr deck,
|
||||
Opm::EclipseStateConstPtr eclipseState,
|
||||
std::shared_ptr<MaterialLawManager> materialLawManager,
|
||||
int number_of_cells,
|
||||
const int* global_cell,
|
||||
const T& begin_cell_centroids,
|
||||
int dimensions);
|
||||
void init(Opm::DeckConstPtr deck,
|
||||
Opm::EclipseStateConstPtr eclipseState,
|
||||
std::shared_ptr<MaterialLawManager> materialLawManager,
|
||||
int number_of_cells,
|
||||
const int* global_cell,
|
||||
const T& begin_cell_centroids,
|
||||
int dimensions)
|
||||
{
|
||||
init(Opm::phaseUsageFromDeck(deck), materialLawManager);
|
||||
}
|
||||
|
||||
/// \return P, the number of phases.
|
||||
inline int numPhases() const;
|
||||
int numPhases() const;
|
||||
|
||||
/// Relative permeability.
|
||||
/// \param[in] n Number of data points.
|
||||
@@ -100,11 +103,11 @@ namespace Opm
|
||||
/// The P^2 derivative matrix is
|
||||
/// m_{ij} = \frac{dkr_i}{ds^j},
|
||||
/// and is output in Fortran order (m_00 m_10 m_20 m01 ...)
|
||||
inline void relperm(const int n,
|
||||
const double* s,
|
||||
const int* cells,
|
||||
double* kr,
|
||||
double* dkrds) const;
|
||||
void relperm(const int n,
|
||||
const double* s,
|
||||
const int* cells,
|
||||
double* kr,
|
||||
double* dkrds) const;
|
||||
|
||||
/// Capillary pressure.
|
||||
/// \param[in] n Number of data points.
|
||||
@@ -115,35 +118,35 @@ namespace Opm
|
||||
/// The P^2 derivative matrix is
|
||||
/// m_{ij} = \frac{dpc_i}{ds^j},
|
||||
/// and is output in Fortran order (m_00 m_10 m_20 m01 ...)
|
||||
inline void capPress(const int n,
|
||||
const double* s,
|
||||
const int* cells,
|
||||
double* pc,
|
||||
double* dpcds) const;
|
||||
void capPress(const int n,
|
||||
const double* s,
|
||||
const int* cells,
|
||||
double* pc,
|
||||
double* dpcds) const;
|
||||
|
||||
/// Obtain the range of allowable saturation values.
|
||||
/// \param[in] n Number of data points.
|
||||
/// \param[out] smin Array of nP minimum s values, array must be valid before calling.
|
||||
/// \param[out] smax Array of nP maximum s values, array must be valid before calling.
|
||||
inline void satRange(const int n,
|
||||
const int* cells,
|
||||
double* smin,
|
||||
double* smax) const;
|
||||
void satRange(const int n,
|
||||
const int* cells,
|
||||
double* smin,
|
||||
double* smax) const;
|
||||
|
||||
/// Update saturation state for the hysteresis tracking
|
||||
/// \param[in] n Number of data points.
|
||||
/// \param[in] s Array of nP saturation values.
|
||||
inline void updateSatHyst(const int n,
|
||||
const int* cells,
|
||||
const double* s);
|
||||
void updateSatHyst(const int n,
|
||||
const int* cells,
|
||||
const double* s);
|
||||
|
||||
/// Update capillary pressure scaling according to pressure diff. and initial water saturation.
|
||||
/// \param[in] cell Cell index.
|
||||
/// \param[in] pcow P_oil - P_water.
|
||||
/// \param[in/out] swat Water saturation. / Possibly modified Water saturation.
|
||||
inline void swatInitScaling(const int cell,
|
||||
const double pcow,
|
||||
double & swat);
|
||||
void swatInitScaling(const int cell,
|
||||
const double pcow,
|
||||
double & swat);
|
||||
|
||||
private:
|
||||
std::shared_ptr<MaterialLawManager> materialLawManager_;
|
||||
@@ -154,8 +157,4 @@ namespace Opm
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
|
||||
#include <opm/core/props/satfunc/SaturationPropsFromDeck_impl.hpp>
|
||||
|
||||
|
||||
#endif // OPM_SATURATIONPROPSFROMDECK_HEADER_INCLUDED
|
||||
|
||||
@@ -20,7 +20,9 @@
|
||||
#ifndef OPM_EXPLICIT_ARRAYS_FLUID_STATE_HEADER_INCLUDED
|
||||
#define OPM_EXPLICIT_ARRAYS_FLUID_STATE_HEADER_INCLUDED
|
||||
|
||||
#include <opm/core/simulator/BlackoilState.hpp>
|
||||
#include <opm/core/props/BlackoilPhases.hpp>
|
||||
|
||||
#include <array>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
|
||||
@@ -23,6 +23,10 @@
|
||||
#include <opm/material/localad/Evaluation.hpp>
|
||||
#include <opm/material/localad/Math.hpp>
|
||||
|
||||
#include <opm/core/props/BlackoilPhases.hpp>
|
||||
|
||||
#include <array>
|
||||
|
||||
namespace Opm
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user