mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #3223 from akva2/ecltransmissibility_vanguard_separate
Separate eclctransmissibility.hh into typetag dependent/independent code
This commit is contained in:
commit
af68511a63
@ -26,6 +26,7 @@ list (APPEND MAIN_SOURCE_FILES
|
||||
ebos/collecttoiorank.cc
|
||||
ebos/eclgenericcpgridvanguard.cc
|
||||
ebos/eclgenericvanguard.cc
|
||||
ebos/ecltransmissibility.cc
|
||||
opm/core/props/phaseUsageFromDeck.cpp
|
||||
opm/core/props/satfunc/RelpermDiagnostics.cpp
|
||||
opm/simulators/timestepping/SimulatorReport.cpp
|
||||
|
@ -27,13 +27,13 @@
|
||||
#ifndef EWOMS_ECL_CP_GRID_VANGUARD_HH
|
||||
#define EWOMS_ECL_CP_GRID_VANGUARD_HH
|
||||
|
||||
#include <opm/models/common/multiphasebaseproperties.hh>
|
||||
|
||||
#include "eclbasevanguard.hh"
|
||||
#include "ecltransmissibility.hh"
|
||||
#include "femcpgridcompat.hh"
|
||||
#include "eclgenericcpgridvanguard.hh"
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace Opm {
|
||||
template <class TypeTag>
|
||||
class EclCpGridVanguard;
|
||||
@ -89,7 +89,9 @@ public:
|
||||
using Grid = GetPropType<TypeTag, Properties::Grid>;
|
||||
using EquilGrid = GetPropType<TypeTag, Properties::EquilGrid>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
|
||||
using TransmissibilityType = EclTransmissibility<Grid, GridView, ElementMapper, Scalar,
|
||||
getPropValue<TypeTag, Properties::EnableEnergy>(),
|
||||
getPropValue<TypeTag, Properties::EnableDiffusion>()>;
|
||||
private:
|
||||
typedef Dune::CartesianIndexMapper<Grid> CartesianIndexMapper;
|
||||
using Element = typename GridView::template Codim<0>::Entity;
|
||||
@ -111,7 +113,7 @@ public:
|
||||
globalTrans_.reset();
|
||||
}
|
||||
|
||||
const EclTransmissibility<TypeTag>& globalTransmissibility() const
|
||||
const TransmissibilityType& globalTransmissibility() const
|
||||
{
|
||||
assert( globalTrans_ != nullptr );
|
||||
return *globalTrans_;
|
||||
@ -152,7 +154,11 @@ protected:
|
||||
|
||||
void allocTrans() override
|
||||
{
|
||||
globalTrans_.reset(new EclTransmissibility<TypeTag>(*this));
|
||||
globalTrans_.reset(new TransmissibilityType(this->eclState(),
|
||||
this->gridView(),
|
||||
this->cartesianIndexMapper(),
|
||||
this->grid(),
|
||||
this->cellCentroids()));
|
||||
globalTrans_->update(false);
|
||||
}
|
||||
|
||||
@ -167,7 +173,7 @@ protected:
|
||||
this->doFilterConnections_(this->schedule());
|
||||
}
|
||||
|
||||
std::unique_ptr<EclTransmissibility<TypeTag> > globalTrans_;
|
||||
std::unique_ptr<TransmissibilityType> globalTrans_;
|
||||
};
|
||||
|
||||
} // namespace Opm
|
||||
|
@ -27,6 +27,8 @@
|
||||
#ifndef EWOMS_ECL_POLYHEDRAL_GRID_VANGUARD_HH
|
||||
#define EWOMS_ECL_POLYHEDRAL_GRID_VANGUARD_HH
|
||||
|
||||
#include <opm/models/common/multiphasebaseproperties.hh>
|
||||
|
||||
#include "eclbasevanguard.hh"
|
||||
#include "ecltransmissibility.hh"
|
||||
|
||||
@ -76,6 +78,7 @@ class EclPolyhedralGridVanguard : public EclBaseVanguard<TypeTag>
|
||||
friend class EclBaseVanguard<TypeTag>;
|
||||
typedef EclBaseVanguard<TypeTag> ParentType;
|
||||
|
||||
using ElementMapper = GetPropType<TypeTag, Properties::ElementMapper>;
|
||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||
|
||||
@ -83,6 +86,9 @@ public:
|
||||
using Grid = GetPropType<TypeTag, Properties::Grid>;
|
||||
using EquilGrid = GetPropType<TypeTag, Properties::EquilGrid>;
|
||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||
using TransmissibilityType = EclTransmissibility<Grid, GridView, ElementMapper, Scalar,
|
||||
getPropValue<TypeTag, Properties::EnableEnergy>(),
|
||||
getPropValue<TypeTag, Properties::EnableDiffusion>()>;
|
||||
|
||||
private:
|
||||
typedef Grid* GridPointer;
|
||||
@ -175,7 +181,7 @@ public:
|
||||
std::unordered_set<std::string> defunctWellNames() const
|
||||
{ return defunctWellNames_; }
|
||||
|
||||
const EclTransmissibility<TypeTag>& globalTransmissibility() const
|
||||
const TransmissibilityType& globalTransmissibility() const
|
||||
{
|
||||
return simulator_.problem().eclTransmissibilities();
|
||||
}
|
||||
|
@ -611,7 +611,7 @@ class EclProblem : public GetPropType<TypeTag, Properties::BaseProblem>
|
||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||
using GlobalEqVector = GetPropType<TypeTag, Properties::GlobalEqVector>;
|
||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||
|
||||
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
|
||||
|
||||
// Grid and world dimension
|
||||
enum { dim = GridView::dimension };
|
||||
@ -815,7 +815,11 @@ public:
|
||||
*/
|
||||
EclProblem(Simulator& simulator)
|
||||
: ParentType(simulator)
|
||||
, transmissibilities_(simulator.vanguard())
|
||||
, transmissibilities_(simulator.vanguard().eclState(),
|
||||
simulator.vanguard().gridView(),
|
||||
simulator.vanguard().cartesianIndexMapper(),
|
||||
simulator.vanguard().grid(),
|
||||
simulator.vanguard().cellCentroids())
|
||||
, thresholdPressures_(simulator)
|
||||
, wellModel_(simulator)
|
||||
, aquiferModel_(simulator)
|
||||
@ -1514,7 +1518,7 @@ public:
|
||||
/*!
|
||||
* \brief Return a reference to the object that handles the "raw" transmissibilities.
|
||||
*/
|
||||
const EclTransmissibility<TypeTag>& eclTransmissibilities() const
|
||||
const typename Vanguard::TransmissibilityType& eclTransmissibilities() const
|
||||
{ return transmissibilities_; }
|
||||
|
||||
/*!
|
||||
@ -3450,7 +3454,7 @@ private:
|
||||
static std::string briefDescription_;
|
||||
|
||||
std::array<std::vector<Scalar>, 2> referencePorosity_;
|
||||
EclTransmissibility<TypeTag> transmissibilities_;
|
||||
typename Vanguard::TransmissibilityType transmissibilities_;
|
||||
|
||||
std::shared_ptr<EclMaterialLawManager> materialLawManager_;
|
||||
std::shared_ptr<EclThermalLawManager> thermalLawManager_;
|
||||
|
1075
ebos/ecltransmissibility.cc
Normal file
1075
ebos/ecltransmissibility.cc
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -528,7 +528,9 @@ private:
|
||||
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GlobalGridView> ElementMapper;
|
||||
ElementMapper globalElemMapper(globalGridView, Dune::mcmgElementLayout());
|
||||
|
||||
const EclTransmissibility<TypeTag>* globalTrans;
|
||||
using TransmissibilityType = typename Vanguard::TransmissibilityType;
|
||||
|
||||
const TransmissibilityType* globalTrans;
|
||||
|
||||
if (!collectToIORank_.isParallel())
|
||||
{
|
||||
@ -622,7 +624,8 @@ private:
|
||||
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GlobalGridView> ElementMapper;
|
||||
ElementMapper globalElemMapper(globalGridView, Dune::mcmgElementLayout());
|
||||
|
||||
const EclTransmissibility<TypeTag>* globalTrans;
|
||||
using TransmissibilityType = typename Vanguard::TransmissibilityType;
|
||||
const TransmissibilityType* globalTrans;
|
||||
if (!collectToIORank_.isParallel()) {
|
||||
// in the sequential case we must use the transmissibilites defined by
|
||||
// the problem. (because in the sequential case, the grid manager does
|
||||
|
Loading…
Reference in New Issue
Block a user