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/collecttoiorank.cc
|
||||||
ebos/eclgenericcpgridvanguard.cc
|
ebos/eclgenericcpgridvanguard.cc
|
||||||
ebos/eclgenericvanguard.cc
|
ebos/eclgenericvanguard.cc
|
||||||
|
ebos/ecltransmissibility.cc
|
||||||
opm/core/props/phaseUsageFromDeck.cpp
|
opm/core/props/phaseUsageFromDeck.cpp
|
||||||
opm/core/props/satfunc/RelpermDiagnostics.cpp
|
opm/core/props/satfunc/RelpermDiagnostics.cpp
|
||||||
opm/simulators/timestepping/SimulatorReport.cpp
|
opm/simulators/timestepping/SimulatorReport.cpp
|
||||||
|
@ -27,13 +27,13 @@
|
|||||||
#ifndef EWOMS_ECL_CP_GRID_VANGUARD_HH
|
#ifndef EWOMS_ECL_CP_GRID_VANGUARD_HH
|
||||||
#define EWOMS_ECL_CP_GRID_VANGUARD_HH
|
#define EWOMS_ECL_CP_GRID_VANGUARD_HH
|
||||||
|
|
||||||
|
#include <opm/models/common/multiphasebaseproperties.hh>
|
||||||
|
|
||||||
#include "eclbasevanguard.hh"
|
#include "eclbasevanguard.hh"
|
||||||
#include "ecltransmissibility.hh"
|
#include "ecltransmissibility.hh"
|
||||||
#include "femcpgridcompat.hh"
|
#include "femcpgridcompat.hh"
|
||||||
#include "eclgenericcpgridvanguard.hh"
|
#include "eclgenericcpgridvanguard.hh"
|
||||||
|
|
||||||
#include <functional>
|
|
||||||
|
|
||||||
namespace Opm {
|
namespace Opm {
|
||||||
template <class TypeTag>
|
template <class TypeTag>
|
||||||
class EclCpGridVanguard;
|
class EclCpGridVanguard;
|
||||||
@ -89,7 +89,9 @@ public:
|
|||||||
using Grid = GetPropType<TypeTag, Properties::Grid>;
|
using Grid = GetPropType<TypeTag, Properties::Grid>;
|
||||||
using EquilGrid = GetPropType<TypeTag, Properties::EquilGrid>;
|
using EquilGrid = GetPropType<TypeTag, Properties::EquilGrid>;
|
||||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||||
|
using TransmissibilityType = EclTransmissibility<Grid, GridView, ElementMapper, Scalar,
|
||||||
|
getPropValue<TypeTag, Properties::EnableEnergy>(),
|
||||||
|
getPropValue<TypeTag, Properties::EnableDiffusion>()>;
|
||||||
private:
|
private:
|
||||||
typedef Dune::CartesianIndexMapper<Grid> CartesianIndexMapper;
|
typedef Dune::CartesianIndexMapper<Grid> CartesianIndexMapper;
|
||||||
using Element = typename GridView::template Codim<0>::Entity;
|
using Element = typename GridView::template Codim<0>::Entity;
|
||||||
@ -111,7 +113,7 @@ public:
|
|||||||
globalTrans_.reset();
|
globalTrans_.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
const EclTransmissibility<TypeTag>& globalTransmissibility() const
|
const TransmissibilityType& globalTransmissibility() const
|
||||||
{
|
{
|
||||||
assert( globalTrans_ != nullptr );
|
assert( globalTrans_ != nullptr );
|
||||||
return *globalTrans_;
|
return *globalTrans_;
|
||||||
@ -152,7 +154,11 @@ protected:
|
|||||||
|
|
||||||
void allocTrans() override
|
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);
|
globalTrans_->update(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -167,7 +173,7 @@ protected:
|
|||||||
this->doFilterConnections_(this->schedule());
|
this->doFilterConnections_(this->schedule());
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<EclTransmissibility<TypeTag> > globalTrans_;
|
std::unique_ptr<TransmissibilityType> globalTrans_;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Opm
|
} // namespace Opm
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
#ifndef EWOMS_ECL_POLYHEDRAL_GRID_VANGUARD_HH
|
#ifndef EWOMS_ECL_POLYHEDRAL_GRID_VANGUARD_HH
|
||||||
#define EWOMS_ECL_POLYHEDRAL_GRID_VANGUARD_HH
|
#define EWOMS_ECL_POLYHEDRAL_GRID_VANGUARD_HH
|
||||||
|
|
||||||
|
#include <opm/models/common/multiphasebaseproperties.hh>
|
||||||
|
|
||||||
#include "eclbasevanguard.hh"
|
#include "eclbasevanguard.hh"
|
||||||
#include "ecltransmissibility.hh"
|
#include "ecltransmissibility.hh"
|
||||||
|
|
||||||
@ -76,6 +78,7 @@ class EclPolyhedralGridVanguard : public EclBaseVanguard<TypeTag>
|
|||||||
friend class EclBaseVanguard<TypeTag>;
|
friend class EclBaseVanguard<TypeTag>;
|
||||||
typedef EclBaseVanguard<TypeTag> ParentType;
|
typedef EclBaseVanguard<TypeTag> ParentType;
|
||||||
|
|
||||||
|
using ElementMapper = GetPropType<TypeTag, Properties::ElementMapper>;
|
||||||
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
using Scalar = GetPropType<TypeTag, Properties::Scalar>;
|
||||||
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
using Simulator = GetPropType<TypeTag, Properties::Simulator>;
|
||||||
|
|
||||||
@ -83,6 +86,9 @@ public:
|
|||||||
using Grid = GetPropType<TypeTag, Properties::Grid>;
|
using Grid = GetPropType<TypeTag, Properties::Grid>;
|
||||||
using EquilGrid = GetPropType<TypeTag, Properties::EquilGrid>;
|
using EquilGrid = GetPropType<TypeTag, Properties::EquilGrid>;
|
||||||
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
using GridView = GetPropType<TypeTag, Properties::GridView>;
|
||||||
|
using TransmissibilityType = EclTransmissibility<Grid, GridView, ElementMapper, Scalar,
|
||||||
|
getPropValue<TypeTag, Properties::EnableEnergy>(),
|
||||||
|
getPropValue<TypeTag, Properties::EnableDiffusion>()>;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef Grid* GridPointer;
|
typedef Grid* GridPointer;
|
||||||
@ -175,7 +181,7 @@ public:
|
|||||||
std::unordered_set<std::string> defunctWellNames() const
|
std::unordered_set<std::string> defunctWellNames() const
|
||||||
{ return defunctWellNames_; }
|
{ return defunctWellNames_; }
|
||||||
|
|
||||||
const EclTransmissibility<TypeTag>& globalTransmissibility() const
|
const TransmissibilityType& globalTransmissibility() const
|
||||||
{
|
{
|
||||||
return simulator_.problem().eclTransmissibilities();
|
return simulator_.problem().eclTransmissibilities();
|
||||||
}
|
}
|
||||||
|
@ -611,7 +611,7 @@ class EclProblem : public GetPropType<TypeTag, Properties::BaseProblem>
|
|||||||
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
using FluidSystem = GetPropType<TypeTag, Properties::FluidSystem>;
|
||||||
using GlobalEqVector = GetPropType<TypeTag, Properties::GlobalEqVector>;
|
using GlobalEqVector = GetPropType<TypeTag, Properties::GlobalEqVector>;
|
||||||
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
using EqVector = GetPropType<TypeTag, Properties::EqVector>;
|
||||||
|
using Vanguard = GetPropType<TypeTag, Properties::Vanguard>;
|
||||||
|
|
||||||
// Grid and world dimension
|
// Grid and world dimension
|
||||||
enum { dim = GridView::dimension };
|
enum { dim = GridView::dimension };
|
||||||
@ -815,7 +815,11 @@ public:
|
|||||||
*/
|
*/
|
||||||
EclProblem(Simulator& simulator)
|
EclProblem(Simulator& simulator)
|
||||||
: ParentType(simulator)
|
: ParentType(simulator)
|
||||||
, transmissibilities_(simulator.vanguard())
|
, transmissibilities_(simulator.vanguard().eclState(),
|
||||||
|
simulator.vanguard().gridView(),
|
||||||
|
simulator.vanguard().cartesianIndexMapper(),
|
||||||
|
simulator.vanguard().grid(),
|
||||||
|
simulator.vanguard().cellCentroids())
|
||||||
, thresholdPressures_(simulator)
|
, thresholdPressures_(simulator)
|
||||||
, wellModel_(simulator)
|
, wellModel_(simulator)
|
||||||
, aquiferModel_(simulator)
|
, aquiferModel_(simulator)
|
||||||
@ -1514,7 +1518,7 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* \brief Return a reference to the object that handles the "raw" transmissibilities.
|
* \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_; }
|
{ return transmissibilities_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -3450,7 +3454,7 @@ private:
|
|||||||
static std::string briefDescription_;
|
static std::string briefDescription_;
|
||||||
|
|
||||||
std::array<std::vector<Scalar>, 2> referencePorosity_;
|
std::array<std::vector<Scalar>, 2> referencePorosity_;
|
||||||
EclTransmissibility<TypeTag> transmissibilities_;
|
typename Vanguard::TransmissibilityType transmissibilities_;
|
||||||
|
|
||||||
std::shared_ptr<EclMaterialLawManager> materialLawManager_;
|
std::shared_ptr<EclMaterialLawManager> materialLawManager_;
|
||||||
std::shared_ptr<EclThermalLawManager> thermalLawManager_;
|
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;
|
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GlobalGridView> ElementMapper;
|
||||||
ElementMapper globalElemMapper(globalGridView, Dune::mcmgElementLayout());
|
ElementMapper globalElemMapper(globalGridView, Dune::mcmgElementLayout());
|
||||||
|
|
||||||
const EclTransmissibility<TypeTag>* globalTrans;
|
using TransmissibilityType = typename Vanguard::TransmissibilityType;
|
||||||
|
|
||||||
|
const TransmissibilityType* globalTrans;
|
||||||
|
|
||||||
if (!collectToIORank_.isParallel())
|
if (!collectToIORank_.isParallel())
|
||||||
{
|
{
|
||||||
@ -622,7 +624,8 @@ private:
|
|||||||
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GlobalGridView> ElementMapper;
|
typedef Dune::MultipleCodimMultipleGeomTypeMapper<GlobalGridView> ElementMapper;
|
||||||
ElementMapper globalElemMapper(globalGridView, Dune::mcmgElementLayout());
|
ElementMapper globalElemMapper(globalGridView, Dune::mcmgElementLayout());
|
||||||
|
|
||||||
const EclTransmissibility<TypeTag>* globalTrans;
|
using TransmissibilityType = typename Vanguard::TransmissibilityType;
|
||||||
|
const TransmissibilityType* globalTrans;
|
||||||
if (!collectToIORank_.isParallel()) {
|
if (!collectToIORank_.isParallel()) {
|
||||||
// in the sequential case we must use the transmissibilites defined by
|
// in the sequential case we must use the transmissibilites defined by
|
||||||
// the problem. (because in the sequential case, the grid manager does
|
// the problem. (because in the sequential case, the grid manager does
|
||||||
|
Loading…
Reference in New Issue
Block a user