1#ifndef DUNE_FEM_THREADITERATORSTORAGE_HH
2#define DUNE_FEM_THREADITERATORSTORAGE_HH
6#include <dune/common/exceptions.hh>
12#ifdef USE_SMP_PARALLEL
21 template <
class ThreadIterator >
37 struct IteratorFactory
60 inline static ObjectType *createObject (
const KeyType &key )
62 return new ObjectType( key.
gridPart() );
65 inline static void deleteObject ( ObjectType *
object )
72 typedef typename IteratorFactory :: KeyType KeyType;
73 typedef SingletonList< KeyType,
77 std::unique_ptr< ThreadIteratorType, typename IteratorProviderType::Deleter>
iterators_;
Definition: bindguard.hh:11
Definition: domainfilter.hh:55
Thread iterators.
Definition: threaditerator.hh:23
static const PartitionIteratorType pitype
Definition: threaditerator.hh:28
int thread(const EntityType &entity) const
return thread number this entity belongs to
Definition: threaditerator.hh:227
IteratorType end() const
return end iterator for current thread
Definition: threaditerator.hh:211
void update()
update internal list of iterators
Definition: threaditerator.hh:102
void setMasterRatio(const double ratio)
set ratio between master thread and other threads in comp time
Definition: threaditerator.hh:240
DomainFilter< GridPartType > FilterType
Definition: threaditerator.hh:37
GridPartType::template Codim< 0 >::template Partition< pitype >::IteratorType IteratorType
Definition: threaditerator.hh:32
GridPart GridPartType
Definition: threaditerator.hh:30
IteratorType begin() const
return begin iterator for current thread
Definition: threaditerator.hh:201
int index(const EntityType &entity) const
return thread number this entity belongs to
Definition: threaditerator.hh:221
Storage of thread iterators using domain decomposition.
Definition: threaditeratorstorage.hh:23
ThreadIteratorType & iterators() const
Definition: threaditeratorstorage.hh:87
static const PartitionIteratorType pitype
Definition: threaditeratorstorage.hh:34
void setMasterRatio(const double ratio)
set ratio between master thread and other threads in comp time
Definition: threaditeratorstorage.hh:102
int thread(const EntityType &entity) const
return thread number this entity belongs to
Definition: threaditeratorstorage.hh:126
IteratorType end() const
return end iterator for current thread
Definition: threaditeratorstorage.hh:114
int index(const EntityType &entity) const
return thread number this entity belongs to
Definition: threaditeratorstorage.hh:120
const FilterType & filter(const int thread) const
return filter for given thread
Definition: threaditeratorstorage.hh:90
ThreadIteratorType::FilterType FilterType
Definition: threaditeratorstorage.hh:29
ThreadIteratorType::IteratorType IteratorType
Definition: threaditeratorstorage.hh:30
void update()
update internal list of iterators
Definition: threaditeratorstorage.hh:96
std::unique_ptr< ThreadIteratorType, typename IteratorProviderType::Deleter > iterators_
Definition: threaditeratorstorage.hh:77
ThreadIteratorStorageBase(const GridPartType &gridPart)
contructor creating thread iterators
Definition: threaditeratorstorage.hh:81
IteratorType begin() const
return begin iterator for current thread
Definition: threaditeratorstorage.hh:108
IteratorType::Entity EntityType
Definition: threaditeratorstorage.hh:32
ThreadIterator ThreadIteratorType
Definition: threaditeratorstorage.hh:25
ThreadIterator::GridPartType GridPartType
Definition: threaditeratorstorage.hh:26
GridPartType::IndexSetType IndexSetType
Definition: threaditeratorstorage.hh:27
Definition: threaditeratorstorage.hh:40
const GridPartType & gridPart_
Definition: threaditeratorstorage.hh:41
bool operator==(const Key &other) const
Definition: threaditeratorstorage.hh:49
static const PartitionIteratorType ptype
Definition: threaditeratorstorage.hh:43
const GridPartType & gridPart() const
Definition: threaditeratorstorage.hh:54
const IndexSetType & indexSet_
Definition: threaditeratorstorage.hh:42
Key(const GridPartType &gridPart)
Definition: threaditeratorstorage.hh:44
Singleton list for key/object pairs.
Definition: singletonlist.hh:53