dune-fem 2.8.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Dune::Fem::ThreadIterator< GridPart, ptype > Class Template Reference

Thread iterators. More...

#include <dune/fem/misc/threads/threaditerator.hh>

Inheritance diagram for Dune::Fem::ThreadIterator< GridPart, ptype >:
Inheritance graph

Public Types

typedef GridPart GridPartType
 
typedef GridPartType::GridType GridType
 
typedef GridPartType::template Codim< 0 >::template Partition< pitype >::IteratorType IteratorType
 
typedef GridPartType::template Codim< 0 >::EntityType EntityType
 
typedef GridPartType::IndexSetType IndexSetType
 
typedef DofManager< GridTypeDofManagerType
 
typedef DomainFilter< GridPartTypeFilterType
 

Public Member Functions

 ThreadIterator (const GridPartType &gridPart, const ParameterReader &parameter=Parameter::container())
 contructor creating thread iterators
 
const FilterTypefilter (const unsigned int thread) const
 return filter for given thread
 
void update ()
 update internal list of iterators
 
IteratorType begin () const
 return begin iterator for current thread
 
IteratorType begin (int thread) const
 
IteratorType end () const
 return end iterator for current thread
 
IteratorType end (int thread) const
 
int index (const EntityType &entity) const
 return thread number this entity belongs to
 
int threadParallel (const EntityType &entity) const
 
int thread (const EntityType &entity) const
 return thread number this entity belongs to
 
void setMasterRatio (const double ratio)
 set ratio between master thread and other threads in comp time
 

Static Public Attributes

static const PartitionIteratorType pitype = ptype
 

Protected Member Functions

template<class Iterator >
size_t countElements (const Iterator &begin, const Iterator &end) const
 
void checkConsistency (const size_t totalElements)
 

Protected Attributes

const GridPartTypegridPart_
 
const DofManagerTypedofManager_
 
const IndexSetTypeindexSet_
 
int sequence_
 
int numThreads_
 
std::vector< IteratorTypeiterators_
 
DynamicArray< int > threadNum_
 
std::vector< std::vector< int > > threadId_
 
std::vector< std::unique_ptr< FilterType > > filters_
 
const bool communicationThread_
 
const bool verbose_
 

Detailed Description

template<class GridPart, PartitionIteratorType ptype = InteriorBorder_Partition>
class Dune::Fem::ThreadIterator< GridPart, ptype >

Thread iterators.

Member Typedef Documentation

◆ DofManagerType

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
typedef DofManager< GridType > Dune::Fem::ThreadIterator< GridPart, ptype >::DofManagerType

◆ EntityType

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
typedef GridPartType::template Codim<0>::EntityType Dune::Fem::ThreadIterator< GridPart, ptype >::EntityType

◆ FilterType

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
typedef DomainFilter<GridPartType> Dune::Fem::ThreadIterator< GridPart, ptype >::FilterType

◆ GridPartType

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
typedef GridPart Dune::Fem::ThreadIterator< GridPart, ptype >::GridPartType

◆ GridType

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
typedef GridPartType::GridType Dune::Fem::ThreadIterator< GridPart, ptype >::GridType

◆ IndexSetType

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
typedef GridPartType::IndexSetType Dune::Fem::ThreadIterator< GridPart, ptype >::IndexSetType

◆ IteratorType

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
typedef GridPartType::template Codim<0>::template Partition<pitype>::IteratorType Dune::Fem::ThreadIterator< GridPart, ptype >::IteratorType

Constructor & Destructor Documentation

◆ ThreadIterator()

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
Dune::Fem::ThreadIterator< GridPart, ptype >::ThreadIterator ( const GridPartType gridPart,
const ParameterReader parameter = Parameter::container() 
)
inlineexplicit

contructor creating thread iterators

Member Function Documentation

◆ begin() [1/2]

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
IteratorType Dune::Fem::ThreadIterator< GridPart, ptype >::begin ( ) const
inline

return begin iterator for current thread

◆ begin() [2/2]

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
IteratorType Dune::Fem::ThreadIterator< GridPart, ptype >::begin ( int  thread) const
inline

◆ checkConsistency()

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
void Dune::Fem::ThreadIterator< GridPart, ptype >::checkConsistency ( const size_t  totalElements)
inlineprotected

◆ countElements()

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
template<class Iterator >
size_t Dune::Fem::ThreadIterator< GridPart, ptype >::countElements ( const Iterator &  begin,
const Iterator &  end 
) const
inlineprotected

◆ end() [1/2]

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
IteratorType Dune::Fem::ThreadIterator< GridPart, ptype >::end ( ) const
inline

return end iterator for current thread

◆ end() [2/2]

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
IteratorType Dune::Fem::ThreadIterator< GridPart, ptype >::end ( int  thread) const
inline

◆ filter()

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
const FilterType & Dune::Fem::ThreadIterator< GridPart, ptype >::filter ( const unsigned int  thread) const
inline

return filter for given thread

◆ index()

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
int Dune::Fem::ThreadIterator< GridPart, ptype >::index ( const EntityType entity) const
inline

return thread number this entity belongs to

◆ setMasterRatio()

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
void Dune::Fem::ThreadIterator< GridPart, ptype >::setMasterRatio ( const double  ratio)
inline

set ratio between master thread and other threads in comp time

◆ thread()

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
int Dune::Fem::ThreadIterator< GridPart, ptype >::thread ( const EntityType entity) const
inline

return thread number this entity belongs to

◆ threadParallel()

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
int Dune::Fem::ThreadIterator< GridPart, ptype >::threadParallel ( const EntityType entity) const
inline

◆ update()

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
void Dune::Fem::ThreadIterator< GridPart, ptype >::update ( )
inline

update internal list of iterators

Member Data Documentation

◆ communicationThread_

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
const bool Dune::Fem::ThreadIterator< GridPart, ptype >::communicationThread_
protected

◆ dofManager_

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
const DofManagerType& Dune::Fem::ThreadIterator< GridPart, ptype >::dofManager_
protected

◆ filters_

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
std::vector< std::unique_ptr< FilterType > > Dune::Fem::ThreadIterator< GridPart, ptype >::filters_
protected

◆ gridPart_

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
const GridPartType& Dune::Fem::ThreadIterator< GridPart, ptype >::gridPart_
protected

◆ indexSet_

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
const IndexSetType& Dune::Fem::ThreadIterator< GridPart, ptype >::indexSet_
protected

◆ iterators_

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
std::vector< IteratorType > Dune::Fem::ThreadIterator< GridPart, ptype >::iterators_
protected

◆ numThreads_

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
int Dune::Fem::ThreadIterator< GridPart, ptype >::numThreads_
protected

◆ pitype

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
const PartitionIteratorType Dune::Fem::ThreadIterator< GridPart, ptype >::pitype = ptype
static

◆ sequence_

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
int Dune::Fem::ThreadIterator< GridPart, ptype >::sequence_
protected

◆ threadId_

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
std::vector< std::vector< int > > Dune::Fem::ThreadIterator< GridPart, ptype >::threadId_
protected

◆ threadNum_

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
DynamicArray< int > Dune::Fem::ThreadIterator< GridPart, ptype >::threadNum_
protected

◆ verbose_

template<class GridPart , PartitionIteratorType ptype = InteriorBorder_Partition>
const bool Dune::Fem::ThreadIterator< GridPart, ptype >::verbose_
protected

The documentation for this class was generated from the following file: