[refactor] Move cell centroid lookup magic to vanguard for reuse.

In addition to transmissibilities We will need this for the tracers,
too, and should prevent code duplication.
This commit is contained in:
Markus Blatt
2021-09-30 11:50:22 +02:00
parent 2168b8c296
commit 457d270bdf
7 changed files with 83 additions and 39 deletions

View File

@@ -38,6 +38,7 @@
#include <tuple>
#include <vector>
#include <unordered_map>
#include <functional>
namespace Opm {
@@ -58,7 +59,7 @@ public:
const GridView& gridView,
const Dune::CartesianIndexMapper<Grid>& cartMapper,
const Grid& grid,
const std::vector<double>& centroids,
std::function<std::array<double,dimWorld>(int)> centroids,
bool enableEnergy,
bool enableDiffusivity);
@@ -236,7 +237,7 @@ protected:
const GridView& gridView_;
const Dune::CartesianIndexMapper<Grid>& cartMapper_;
const Grid& grid_;
const std::vector<double>& centroids_;
std::function<std::array<double,dimWorld>(int)> centroids_;
Scalar transmissibilityThreshold_;
std::map<std::pair<unsigned, unsigned>, Scalar> transBoundary_;
std::map<std::pair<unsigned, unsigned>, Scalar> thermalHalfTransBoundary_;