mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
remove template parameters for enableEnergy/Diffusion in transmissibility
- the diffusion one is basically done on runtime anyways - the energy one gives some small code elimination gains however, it complicates the writing of downstream templates.
This commit is contained in:
@@ -30,8 +30,6 @@
|
||||
|
||||
#include <opm/grid/common/CartesianIndexMapper.hpp>
|
||||
|
||||
#include <opm/material/common/ConditionalStorage.hpp>
|
||||
|
||||
#include <dune/common/fvector.hh>
|
||||
#include <dune/common/fmatrix.hh>
|
||||
|
||||
@@ -47,8 +45,7 @@ class EclipseState;
|
||||
struct NNCdata;
|
||||
class TransMult;
|
||||
|
||||
template<class Grid, class GridView, class ElementMapper,
|
||||
class Scalar, bool enableEnergy, bool enableDiffusion>
|
||||
template<class Grid, class GridView, class ElementMapper, class Scalar>
|
||||
class EclTransmissibility {
|
||||
// Grid and world dimension
|
||||
enum { dimWorld = GridView::dimensionworld };
|
||||
@@ -61,7 +58,9 @@ public:
|
||||
const GridView& gridView,
|
||||
const Dune::CartesianIndexMapper<Grid>& cartMapper,
|
||||
const Grid& grid,
|
||||
const std::vector<double>& centroids);
|
||||
const std::vector<double>& centroids,
|
||||
bool enableEnergy,
|
||||
bool enableDiffusivity);
|
||||
|
||||
/*!
|
||||
* \brief Return the permeability for an element.
|
||||
@@ -241,10 +240,10 @@ protected:
|
||||
Scalar transmissibilityThreshold_;
|
||||
std::map<std::pair<unsigned, unsigned>, Scalar> transBoundary_;
|
||||
std::map<std::pair<unsigned, unsigned>, Scalar> thermalHalfTransBoundary_;
|
||||
Opm::ConditionalStorage<enableEnergy,
|
||||
std::unordered_map<std::uint64_t, Scalar> > thermalHalfTrans_;
|
||||
Opm::ConditionalStorage<enableDiffusion,
|
||||
std::unordered_map<std::uint64_t, Scalar> > diffusivity_;
|
||||
bool enableEnergy_;
|
||||
bool enableDiffusivity_;
|
||||
std::unordered_map<std::uint64_t, Scalar> thermalHalfTrans_;
|
||||
std::unordered_map<std::uint64_t, Scalar> diffusivity_;
|
||||
};
|
||||
|
||||
} // namespace Opm
|
||||
|
||||
Reference in New Issue
Block a user