mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-11 22:15:35 -06:00
makding StandardWells a template based on SolutionState and WellState
may need to be adjusted later.
This commit is contained in:
parent
fd99a9e6e9
commit
3bcfc905bd
@ -26,6 +26,7 @@
|
||||
# originally generated with the command:
|
||||
# find opm -name '*.c*' -printf '\t%p\n' | sort
|
||||
list (APPEND MAIN_SOURCE_FILES
|
||||
|
||||
opm/autodiff/BlackoilPropsAdInterface.cpp
|
||||
opm/autodiff/ExtractParallelGridInformationToISTL.cpp
|
||||
opm/autodiff/NewtonIterationBlackoilCPR.cpp
|
||||
@ -47,7 +48,6 @@ list (APPEND MAIN_SOURCE_FILES
|
||||
opm/autodiff/VFPProdProperties.cpp
|
||||
opm/autodiff/VFPInjProperties.cpp
|
||||
opm/autodiff/WellMultiSegment.cpp
|
||||
opm/autodiff/StandardWells.cpp
|
||||
opm/autodiff/BlackoilSolventState.cpp
|
||||
opm/autodiff/ThreadHandle.hpp
|
||||
opm/polymer/PolymerState.cpp
|
||||
@ -68,6 +68,7 @@ list (APPEND MAIN_SOURCE_FILES
|
||||
)
|
||||
|
||||
|
||||
|
||||
# originally generated with the command:
|
||||
# find tests -name '*.cpp' -a ! -wholename '*/not-unit/*' -printf '\t%p\n' | sort
|
||||
list (APPEND TEST_SOURCE_FILES
|
||||
@ -130,6 +131,7 @@ list (APPEND PROGRAM_SOURCE_FILES
|
||||
# originally generated with the command:
|
||||
# find opm -name '*.h*' -a ! -name '*-pch.hpp' -printf '\t%p\n' | sort
|
||||
list (APPEND PUBLIC_HEADER_FILES
|
||||
<<<<<<< HEAD
|
||||
opm/autodiff/AdditionalObjectDeleter.hpp
|
||||
opm/autodiff/AutoDiffBlock.hpp
|
||||
opm/autodiff/AutoDiffHelpers.hpp
|
||||
@ -195,6 +197,7 @@ list (APPEND PUBLIC_HEADER_FILES
|
||||
opm/autodiff/WellStateMultiSegment.hpp
|
||||
opm/autodiff/WellMultiSegment.hpp
|
||||
opm/autodiff/StandardWells.hpp
|
||||
opm/autodiff/StandardWells_impl.hpp
|
||||
opm/polymer/CompressibleTpfaPolymer.hpp
|
||||
opm/polymer/GravityColumnSolverPolymer.hpp
|
||||
opm/polymer/GravityColumnSolverPolymer_impl.hpp
|
||||
|
@ -276,7 +276,7 @@ namespace Opm {
|
||||
const BlackoilPropsAdInterface& fluid_;
|
||||
const DerivedGeology& geo_;
|
||||
const RockCompressibility* rock_comp_props_;
|
||||
StandardWells std_wells_;
|
||||
StandardWells<SolutionState, WellState> std_wells_;
|
||||
VFPProperties vfp_properties_;
|
||||
const NewtonIterationBlackoilInterface& linsolver_;
|
||||
// For each canonical phase -> true if active
|
||||
@ -329,8 +329,8 @@ namespace Opm {
|
||||
}
|
||||
|
||||
/// return the StandardWells object
|
||||
StandardWells& stdWells() { return std_wells_; }
|
||||
const StandardWells& stdWells() const { return std_wells_; }
|
||||
StandardWells<SolutionState, WellState>& stdWells() { return std_wells_; }
|
||||
const StandardWells<SolutionState, WellState>& stdWells() const { return std_wells_; }
|
||||
|
||||
/// return the Well struct in the StandardWells
|
||||
const Wells& wells() const { return std_wells_.wells(); }
|
||||
|
@ -40,6 +40,7 @@ namespace Opm {
|
||||
typedef ADB::V Vector;
|
||||
|
||||
/// Class for handling the standard well model.
|
||||
template <class SolutionState, class WellState>
|
||||
class StandardWells {
|
||||
protected:
|
||||
struct WellOps {
|
||||
@ -81,4 +82,7 @@ namespace Opm {
|
||||
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
#include "StandardWells_impl.hpp"
|
||||
|
||||
#endif
|
||||
|
@ -27,7 +27,8 @@ namespace Opm
|
||||
{
|
||||
|
||||
|
||||
StandardWells::
|
||||
template <class SolutionState, class WellState>
|
||||
StandardWells<SolutionState, WellState>::
|
||||
WellOps::WellOps(const Wells* wells)
|
||||
: w2p(),
|
||||
p2w(),
|
||||
@ -65,7 +66,9 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
StandardWells::StandardWells(const Wells* wells_arg)
|
||||
template <class SolutionState, class WellState>
|
||||
StandardWells<SolutionState, WellState>::
|
||||
StandardWells(const Wells* wells_arg)
|
||||
: wells_(wells_arg)
|
||||
, wops_(wells_arg)
|
||||
, well_perforation_densities_(Vector())
|
||||
@ -77,7 +80,10 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
const Wells& StandardWells::wells() const
|
||||
template <class SolutionState, class WellState>
|
||||
const Wells&
|
||||
StandardWells<SolutionState, WellState>::
|
||||
wells() const
|
||||
{
|
||||
assert(wells_ != 0);
|
||||
return *(wells_);
|
||||
@ -87,7 +93,10 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
bool StandardWells::wellsActive() const
|
||||
template <class SolutionState, class WellState>
|
||||
bool
|
||||
StandardWells<SolutionState, WellState>::
|
||||
wellsActive() const
|
||||
{
|
||||
return wells_active_;
|
||||
}
|
||||
@ -96,7 +105,10 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
void StandardWells::setWellsActive(const bool wells_active)
|
||||
template <class SolutionState, class WellState>
|
||||
void
|
||||
StandardWells<SolutionState, WellState>::
|
||||
setWellsActive(const bool wells_active)
|
||||
{
|
||||
wells_active_ = wells_active;
|
||||
}
|
||||
@ -105,7 +117,10 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
bool StandardWells::localWellsActive() const
|
||||
template <class SolutionState, class WellState>
|
||||
bool
|
||||
StandardWells<SolutionState, WellState>::
|
||||
localWellsActive() const
|
||||
{
|
||||
return wells_ ? (wells_->number_of_wells > 0 ) : false;
|
||||
}
|
||||
@ -114,8 +129,10 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
const StandardWells::WellOps&
|
||||
StandardWells::wellOps() const
|
||||
template <class SolutionState, class WellState>
|
||||
const typename StandardWells<SolutionState, WellState>::WellOps&
|
||||
StandardWells<SolutionState, WellState>::
|
||||
wellOps() const
|
||||
{
|
||||
return wops_;
|
||||
}
|
||||
@ -124,7 +141,10 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
Vector& StandardWells::wellPerforationDensities()
|
||||
template <class SolutionState, class WellState>
|
||||
Vector&
|
||||
StandardWells<SolutionState, WellState>::
|
||||
wellPerforationDensities()
|
||||
{
|
||||
return well_perforation_densities_;
|
||||
}
|
||||
@ -133,7 +153,10 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
const Vector& StandardWells::wellPerforationDensities() const
|
||||
template <class SolutionState, class WellState>
|
||||
const Vector&
|
||||
StandardWells<SolutionState, WellState>::
|
||||
wellPerforationDensities() const
|
||||
{
|
||||
return well_perforation_densities_;
|
||||
}
|
||||
@ -142,7 +165,10 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
Vector& StandardWells::wellPerforationPressureDiffs()
|
||||
template <class SolutionState, class WellState>
|
||||
Vector&
|
||||
StandardWells<SolutionState, WellState>::
|
||||
wellPerforationPressureDiffs()
|
||||
{
|
||||
return well_perforation_pressure_diffs_;
|
||||
}
|
||||
@ -151,7 +177,10 @@ namespace Opm
|
||||
|
||||
|
||||
|
||||
const Vector& StandardWells::wellPerforationPressureDiffs() const
|
||||
template <class SolutionState, class WellState>
|
||||
const Vector&
|
||||
StandardWells<SolutionState, WellState>::
|
||||
wellPerforationPressureDiffs() const
|
||||
{
|
||||
return well_perforation_pressure_diffs_;
|
||||
}
|
Loading…
Reference in New Issue
Block a user