mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Using ReservoirState and WellState consistently.
This means that for extended models the functions in BlackoilModelBase will be compiled with the types used by those models and not BlackoilState and WellStateFullyImplicitBlackoil (which are specified by BlackoilModel).
This commit is contained in:
@@ -162,8 +162,8 @@ namespace Opm {
|
|||||||
/// \param[in] reservoir_state reservoir state variables
|
/// \param[in] reservoir_state reservoir state variables
|
||||||
/// \param[in, out] well_state well state variables
|
/// \param[in, out] well_state well state variables
|
||||||
/// \param[in] initial_assembly pass true if this is the first call to assemble() in this timestep
|
/// \param[in] initial_assembly pass true if this is the first call to assemble() in this timestep
|
||||||
void assemble(const BlackoilState& reservoir_state,
|
void assemble(const ReservoirState& reservoir_state,
|
||||||
WellStateFullyImplicitBlackoil& well_state,
|
WellState& well_state,
|
||||||
const bool initial_assembly);
|
const bool initial_assembly);
|
||||||
|
|
||||||
/// \brief Compute the residual norms of the mass balance for each phase,
|
/// \brief Compute the residual norms of the mass balance for each phase,
|
||||||
@@ -187,8 +187,8 @@ namespace Opm {
|
|||||||
/// \param[in, out] reservoir_state reservoir state variables
|
/// \param[in, out] reservoir_state reservoir state variables
|
||||||
/// \param[in, out] well_state well state variables
|
/// \param[in, out] well_state well state variables
|
||||||
void updateState(const V& dx,
|
void updateState(const V& dx,
|
||||||
BlackoilState& reservoir_state,
|
ReservoirState& reservoir_state,
|
||||||
WellStateFullyImplicitBlackoil& well_state);
|
WellState& well_state);
|
||||||
|
|
||||||
/// Return true if output to cout is wanted.
|
/// Return true if output to cout is wanted.
|
||||||
bool terminalOutputEnabled() const;
|
bool terminalOutputEnabled() const;
|
||||||
@@ -269,34 +269,34 @@ namespace Opm {
|
|||||||
const Wells& wells () const { assert( bool(wells_ != 0) ); return *wells_; }
|
const Wells& wells () const { assert( bool(wells_ != 0) ); return *wells_; }
|
||||||
|
|
||||||
SolutionState
|
SolutionState
|
||||||
constantState(const BlackoilState& x,
|
constantState(const ReservoirState& x,
|
||||||
const WellStateFullyImplicitBlackoil& xw) const;
|
const WellState& xw) const;
|
||||||
|
|
||||||
void
|
void
|
||||||
makeConstantState(SolutionState& state) const;
|
makeConstantState(SolutionState& state) const;
|
||||||
|
|
||||||
SolutionState
|
SolutionState
|
||||||
variableState(const BlackoilState& x,
|
variableState(const ReservoirState& x,
|
||||||
const WellStateFullyImplicitBlackoil& xw) const;
|
const WellState& xw) const;
|
||||||
|
|
||||||
void
|
void
|
||||||
computeAccum(const SolutionState& state,
|
computeAccum(const SolutionState& state,
|
||||||
const int aix );
|
const int aix );
|
||||||
|
|
||||||
void computeWellConnectionPressures(const SolutionState& state,
|
void computeWellConnectionPressures(const SolutionState& state,
|
||||||
const WellStateFullyImplicitBlackoil& xw);
|
const WellState& xw);
|
||||||
|
|
||||||
void
|
void
|
||||||
addWellControlEq(const SolutionState& state,
|
addWellControlEq(const SolutionState& state,
|
||||||
const WellStateFullyImplicitBlackoil& xw,
|
const WellState& xw,
|
||||||
const V& aliveWells);
|
const V& aliveWells);
|
||||||
|
|
||||||
void
|
void
|
||||||
addWellEq(const SolutionState& state,
|
addWellEq(const SolutionState& state,
|
||||||
WellStateFullyImplicitBlackoil& xw,
|
WellState& xw,
|
||||||
V& aliveWells);
|
V& aliveWells);
|
||||||
|
|
||||||
void updateWellControls(WellStateFullyImplicitBlackoil& xw) const;
|
void updateWellControls(WellState& xw) const;
|
||||||
|
|
||||||
std::vector<ADB>
|
std::vector<ADB>
|
||||||
computePressures(const SolutionState& state) const;
|
computePressures(const SolutionState& state) const;
|
||||||
@@ -386,13 +386,13 @@ namespace Opm {
|
|||||||
phaseCondition() const {return phaseCondition_;}
|
phaseCondition() const {return phaseCondition_;}
|
||||||
|
|
||||||
void
|
void
|
||||||
classifyCondition(const BlackoilState& state);
|
classifyCondition(const ReservoirState& state);
|
||||||
|
|
||||||
|
|
||||||
/// update the primal variable for Sg, Rv or Rs. The Gas phase must
|
/// update the primal variable for Sg, Rv or Rs. The Gas phase must
|
||||||
/// be active to call this method.
|
/// be active to call this method.
|
||||||
void
|
void
|
||||||
updatePrimalVariableFromState(const BlackoilState& state);
|
updatePrimalVariableFromState(const ReservoirState& state);
|
||||||
|
|
||||||
/// Update the phaseCondition_ member based on the primalVariable_ member.
|
/// Update the phaseCondition_ member based on the primalVariable_ member.
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -32,13 +32,11 @@
|
|||||||
#include <opm/autodiff/BlackoilPropsAdInterface.hpp>
|
#include <opm/autodiff/BlackoilPropsAdInterface.hpp>
|
||||||
#include <opm/autodiff/GeoProps.hpp>
|
#include <opm/autodiff/GeoProps.hpp>
|
||||||
#include <opm/autodiff/WellDensitySegmented.hpp>
|
#include <opm/autodiff/WellDensitySegmented.hpp>
|
||||||
#include <opm/autodiff/WellStateFullyImplicitBlackoil.hpp>
|
|
||||||
|
|
||||||
#include <opm/core/grid.h>
|
#include <opm/core/grid.h>
|
||||||
#include <opm/core/linalg/LinearSolverInterface.hpp>
|
#include <opm/core/linalg/LinearSolverInterface.hpp>
|
||||||
#include <opm/core/linalg/ParallelIstlInformation.hpp>
|
#include <opm/core/linalg/ParallelIstlInformation.hpp>
|
||||||
#include <opm/core/props/rock/RockCompressibility.hpp>
|
#include <opm/core/props/rock/RockCompressibility.hpp>
|
||||||
#include <opm/core/simulator/BlackoilState.hpp>
|
|
||||||
#include <opm/core/utility/ErrorMacros.hpp>
|
#include <opm/core/utility/ErrorMacros.hpp>
|
||||||
#include <opm/core/utility/Exceptions.hpp>
|
#include <opm/core/utility/Exceptions.hpp>
|
||||||
#include <opm/core/utility/Units.hpp>
|
#include <opm/core/utility/Units.hpp>
|
||||||
@@ -332,8 +330,8 @@ namespace detail {
|
|||||||
|
|
||||||
template <class Grid, class Implementation>
|
template <class Grid, class Implementation>
|
||||||
typename BlackoilModelBase<Grid, Implementation>::SolutionState
|
typename BlackoilModelBase<Grid, Implementation>::SolutionState
|
||||||
BlackoilModelBase<Grid, Implementation>::constantState(const BlackoilState& x,
|
BlackoilModelBase<Grid, Implementation>::constantState(const ReservoirState& x,
|
||||||
const WellStateFullyImplicitBlackoil& xw) const
|
const WellState& xw) const
|
||||||
{
|
{
|
||||||
auto state = variableState(x, xw);
|
auto state = variableState(x, xw);
|
||||||
makeConstantState(state);
|
makeConstantState(state);
|
||||||
@@ -375,8 +373,8 @@ namespace detail {
|
|||||||
|
|
||||||
template <class Grid, class Implementation>
|
template <class Grid, class Implementation>
|
||||||
typename BlackoilModelBase<Grid, Implementation>::SolutionState
|
typename BlackoilModelBase<Grid, Implementation>::SolutionState
|
||||||
BlackoilModelBase<Grid, Implementation>::variableState(const BlackoilState& x,
|
BlackoilModelBase<Grid, Implementation>::variableState(const ReservoirState& x,
|
||||||
const WellStateFullyImplicitBlackoil& xw) const
|
const WellState& xw) const
|
||||||
{
|
{
|
||||||
using namespace Opm::AutoDiffGrid;
|
using namespace Opm::AutoDiffGrid;
|
||||||
const int nc = numCells(grid_);
|
const int nc = numCells(grid_);
|
||||||
@@ -580,7 +578,7 @@ namespace detail {
|
|||||||
|
|
||||||
template <class Grid, class Implementation>
|
template <class Grid, class Implementation>
|
||||||
void BlackoilModelBase<Grid, Implementation>::computeWellConnectionPressures(const SolutionState& state,
|
void BlackoilModelBase<Grid, Implementation>::computeWellConnectionPressures(const SolutionState& state,
|
||||||
const WellStateFullyImplicitBlackoil& xw)
|
const WellState& xw)
|
||||||
{
|
{
|
||||||
if( ! wellsActive() ) return ;
|
if( ! wellsActive() ) return ;
|
||||||
|
|
||||||
@@ -674,8 +672,8 @@ namespace detail {
|
|||||||
template <class Grid, class Implementation>
|
template <class Grid, class Implementation>
|
||||||
void
|
void
|
||||||
BlackoilModelBase<Grid, Implementation>::
|
BlackoilModelBase<Grid, Implementation>::
|
||||||
assemble(const BlackoilState& reservoir_state,
|
assemble(const ReservoirState& reservoir_state,
|
||||||
WellStateFullyImplicitBlackoil& well_state,
|
WellState& well_state,
|
||||||
const bool initial_assembly)
|
const bool initial_assembly)
|
||||||
{
|
{
|
||||||
using namespace Opm::AutoDiffGrid;
|
using namespace Opm::AutoDiffGrid;
|
||||||
@@ -766,7 +764,7 @@ namespace detail {
|
|||||||
|
|
||||||
template <class Grid, class Implementation>
|
template <class Grid, class Implementation>
|
||||||
void BlackoilModelBase<Grid, Implementation>::addWellEq(const SolutionState& state,
|
void BlackoilModelBase<Grid, Implementation>::addWellEq(const SolutionState& state,
|
||||||
WellStateFullyImplicitBlackoil& xw,
|
WellState& xw,
|
||||||
V& aliveWells)
|
V& aliveWells)
|
||||||
{
|
{
|
||||||
if( ! wellsActive() ) return ;
|
if( ! wellsActive() ) return ;
|
||||||
@@ -1007,7 +1005,7 @@ namespace detail {
|
|||||||
|
|
||||||
|
|
||||||
template <class Grid, class Implementation>
|
template <class Grid, class Implementation>
|
||||||
void BlackoilModelBase<Grid, Implementation>::updateWellControls(WellStateFullyImplicitBlackoil& xw) const
|
void BlackoilModelBase<Grid, Implementation>::updateWellControls(WellState& xw) const
|
||||||
{
|
{
|
||||||
if( ! wellsActive() ) return ;
|
if( ! wellsActive() ) return ;
|
||||||
|
|
||||||
@@ -1084,7 +1082,7 @@ namespace detail {
|
|||||||
|
|
||||||
template <class Grid, class Implementation>
|
template <class Grid, class Implementation>
|
||||||
void BlackoilModelBase<Grid, Implementation>::addWellControlEq(const SolutionState& state,
|
void BlackoilModelBase<Grid, Implementation>::addWellControlEq(const SolutionState& state,
|
||||||
const WellStateFullyImplicitBlackoil& xw,
|
const WellState& xw,
|
||||||
const V& aliveWells)
|
const V& aliveWells)
|
||||||
{
|
{
|
||||||
if( ! wellsActive() ) return;
|
if( ! wellsActive() ) return;
|
||||||
@@ -1223,8 +1221,8 @@ namespace detail {
|
|||||||
|
|
||||||
template <class Grid, class Implementation>
|
template <class Grid, class Implementation>
|
||||||
void BlackoilModelBase<Grid, Implementation>::updateState(const V& dx,
|
void BlackoilModelBase<Grid, Implementation>::updateState(const V& dx,
|
||||||
BlackoilState& reservoir_state,
|
ReservoirState& reservoir_state,
|
||||||
WellStateFullyImplicitBlackoil& well_state)
|
WellState& well_state)
|
||||||
{
|
{
|
||||||
using namespace Opm::AutoDiffGrid;
|
using namespace Opm::AutoDiffGrid;
|
||||||
const int np = fluid_.numPhases();
|
const int np = fluid_.numPhases();
|
||||||
@@ -2133,7 +2131,7 @@ namespace detail {
|
|||||||
|
|
||||||
template <class Grid, class Implementation>
|
template <class Grid, class Implementation>
|
||||||
void
|
void
|
||||||
BlackoilModelBase<Grid, Implementation>::classifyCondition(const BlackoilState& state)
|
BlackoilModelBase<Grid, Implementation>::classifyCondition(const ReservoirState& state)
|
||||||
{
|
{
|
||||||
using namespace Opm::AutoDiffGrid;
|
using namespace Opm::AutoDiffGrid;
|
||||||
const int nc = numCells(grid_);
|
const int nc = numCells(grid_);
|
||||||
@@ -2171,7 +2169,7 @@ namespace detail {
|
|||||||
|
|
||||||
template <class Grid, class Implementation>
|
template <class Grid, class Implementation>
|
||||||
void
|
void
|
||||||
BlackoilModelBase<Grid, Implementation>::updatePrimalVariableFromState(const BlackoilState& state)
|
BlackoilModelBase<Grid, Implementation>::updatePrimalVariableFromState(const ReservoirState& state)
|
||||||
{
|
{
|
||||||
using namespace Opm::AutoDiffGrid;
|
using namespace Opm::AutoDiffGrid;
|
||||||
const int nc = numCells(grid_);
|
const int nc = numCells(grid_);
|
||||||
|
|||||||
Reference in New Issue
Block a user