19#ifndef OPM_ELEMENT_CHUNKS_HEADER
20#define OPM_ELEMENT_CHUNKS_HEADER
63template <
class Gr
idView,
class PartitionSet>
67 using Iter =
decltype(std::begin(elements(std::declval<const GridView&>(), PartitionSet())));
68 using Storage = std::vector<Iter>;
69 using StorageIter =
decltype(Storage().cbegin());
73 const PartitionSet included_partition,
74 const std::size_t num_chunks)
82 Chunk(
const Iter& i1,
const Iter& i2) :
pi_(i1, i2) {}
84 auto end()
const {
return pi_.second; }
85 std::pair<Iter, Iter>
pi_;
93 const StorageIter it = *
this;
94 return Chunk{*it, *(it+1)};
111 return grid_chunk_iterators_.size() - 1;
117 return Chunk{grid_chunk_iterators_[i], grid_chunk_iterators_[i + 1]};
120 Storage grid_chunk_iterators_;
Definition: ElementChunks.hpp:65
auto end() const
Definition: ElementChunks.hpp:102
Chunk operator[](std::size_t i) const
Definition: ElementChunks.hpp:115
auto size() const
Definition: ElementChunks.hpp:109
auto begin() const
Definition: ElementChunks.hpp:98
ElementChunks(const GridView &gv, const PartitionSet included_partition, const std::size_t num_chunks)
Definition: ElementChunks.hpp:72
Holds the implementation of the CpGrid as a pimple.
Definition: CellQuadrature.hpp:26
auto createChunkIterators(const Range &r, const std::size_t num_elem, const std::size_t num_chunks)
Definition: createThreadIterators.hpp:48
Definition: ElementChunks.hpp:89
Chunk operator*() const
Definition: ElementChunks.hpp:91
ChunkIterator(const StorageIter &itit)
Definition: ElementChunks.hpp:90
Definition: ElementChunks.hpp:81
auto end() const
Definition: ElementChunks.hpp:84
std::pair< Iter, Iter > pi_
Definition: ElementChunks.hpp:85
auto begin() const
Definition: ElementChunks.hpp:83
Chunk(const Iter &i1, const Iter &i2)
Definition: ElementChunks.hpp:82