24#ifndef OPM_COUNTGLOBALCELLS_HEADER_INCLUDED
25#define OPM_COUNTGLOBALCELLS_HEADER_INCLUDED
27#include <opm/simulators/utils/BlackoilPhases.hpp>
29#include <dune/grid/common/gridview.hh>
46 template <
class Gr
idView>
47 std::size_t countLocalInteriorCellsGridView(
const GridView& gridView)
49 if (gridView.comm().size() == 1) {
50 return gridView.size(0);
66 std::size_t countLocalInteriorCells(
const Grid& grid)
68 return countLocalInteriorCellsGridView(grid.leafGridView());
82 std::size_t countGlobalCells(
const Grid& grid)
84 if ( grid.comm().size() == 1)
88 const std::size_t count = countLocalInteriorCellsGridView(grid.leafGridView());
89 return grid.comm().sum(count);
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242