dune-grid 2.9.0
Public Member Functions | Static Public Member Functions | Related Functions | List of all members
Dune::PartitionSet< partitions > Struct Template Reference

A set of PartitionType values. More...

#include <dune/grid/common/partitionset.hh>

Public Member Functions

template<unsigned int p>
struct PartitionSet< partitions|p > constexpr operator+ (const PartitionSet< p > &) const
 Returns a new PartitionSet that also contains the partitions in set. More...
 
template<unsigned int p>
struct PartitionSet< partitions &~p > constexpr operator- (const PartitionSet< p > &) const
 Returns a new PartitionSet that does not contain the partitions in set. More...
 
template<unsigned int p2>
constexpr bool operator== (PartitionSet< p2 >) const
 Tests whether two PartitionsSet are equal. More...
 
template<unsigned int p2>
constexpr bool operator!= (PartitionSet< p2 >) const
 Tests whether two PartitionsSet are not equal. More...
 

Static Public Member Functions

static constexpr PartitionIteratorType partitionIterator ()
 Returns the PartitionIteratorType that can be used to iterate over the partitions in the set. More...
 
static constexpr bool contains (PartitionType pt)
 Tests whether the given PartitionType is contained in this set. More...
 
template<unsigned int contained_partitions>
static constexpr bool contains (PartitionSet< contained_partitions >)
 Tests whether the given PartitionSet is contained in this set. More...
 

Related Functions

(Note that these are not member functions.)

template<PartitionType p>
PartitionSet<(1<< p)> partitionSet ()
 Creates a PartitionSet for the given PartitionType. More...
 
template<PartitionIteratorType pitype>
constexpr PartitionSet< derive_partition_set< pitype >::value > partitionSet ()
 creates a PartitionSet for the given PartitionIteratorType More...
 

Detailed Description

template<unsigned int partitions>
struct Dune::PartitionSet< partitions >

A set of PartitionType values.

PartitionSet contains a set of PartitionType values fixed at compile time. The contents of the set is encoded in the template parameter partitions, but the exact semantics are an implementation detail. PartitionSets can be combined by adding them up. They also support removing partitions by subtracting them.

Template Parameters
partitionsImplementation-defined representation of the partition set.

Member Function Documentation

◆ contains() [1/2]

template<unsigned int partitions>
template<unsigned int contained_partitions>
static constexpr bool Dune::PartitionSet< partitions >::contains ( PartitionSet< contained_partitions >  )
inlinestaticconstexpr

Tests whether the given PartitionSet is contained in this set.

◆ contains() [2/2]

template<unsigned int partitions>
static constexpr bool Dune::PartitionSet< partitions >::contains ( PartitionType  pt)
inlinestaticconstexpr

Tests whether the given PartitionType is contained in this set.

◆ operator!=()

template<unsigned int partitions>
template<unsigned int p2>
constexpr bool Dune::PartitionSet< partitions >::operator!= ( PartitionSet< p2 >  ) const
inlineconstexpr

Tests whether two PartitionsSet are not equal.

◆ operator+()

template<unsigned int partitions>
template<unsigned int p>
struct PartitionSet< partitions|p > constexpr Dune::PartitionSet< partitions >::operator+ ( const PartitionSet< p > &  ) const
inline

Returns a new PartitionSet that also contains the partitions in set.

◆ operator-()

template<unsigned int partitions>
template<unsigned int p>
struct PartitionSet< partitions &~p > constexpr Dune::PartitionSet< partitions >::operator- ( const PartitionSet< p > &  ) const
inline

Returns a new PartitionSet that does not contain the partitions in set.

◆ operator==()

template<unsigned int partitions>
template<unsigned int p2>
constexpr bool Dune::PartitionSet< partitions >::operator== ( PartitionSet< p2 >  ) const
inlineconstexpr

Tests whether two PartitionsSet are equal.

◆ partitionIterator()

template<unsigned int partitions>
static constexpr PartitionIteratorType Dune::PartitionSet< partitions >::partitionIterator ( )
inlinestaticconstexpr

Returns the PartitionIteratorType that can be used to iterate over the partitions in the set.

Exceptions
raisesa static assertion if the partitions do not correspond to a valid PartitionIteratorType.

Friends And Related Function Documentation

◆ partitionSet()

template<PartitionIteratorType pitype>
constexpr PartitionSet< derive_partition_set< pitype >::value > partitionSet ( )
related

creates a PartitionSet for the given PartitionIteratorType


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