4 #ifndef DUNE_PDELAB_ORDERING_LOCALORDERINGBASE_HH
5 #define DUNE_PDELAB_ORDERING_LOCALORDERINGBASE_HH
19 template<
typename GV,
typename DI,
typename CI>
46 template<
typename size_type>
47 friend struct ::Dune::PDELab::impl::update_ordering_data;
49 typedef std::vector<LocalOrderingBase*> ChildVector;
50 typedef typename ChildVector::iterator ChildIterator;
51 typedef typename ChildVector::const_iterator ConstChildIterator;
63 typedef impl::GridFunctionSpaceOrderingData<typename Traits::SizeType>
GFSData;
74 assert(mi.size() == 1 &&
"MultiIndex length must match GridFunctionSpace tree depth");
75 ci.push_back(mi.back());
84 ci.push_back(child_index);
86 else if (child_index > 0)
95 assert(
_gt_used[geometry_type_index]);
104 template<
typename ItIn,
typename ItOut>
109 for (ItIn in = begin; in != end; ++in, ++out)
111 assert(in->size() == 1 &&
"MultiIndex length must match GridFunctionSpace tree depth");
112 out->push_back(in->treeIndex().back());
117 for (ItIn in = begin; in != end; ++in, ++out)
118 out->push_back(in->treeIndex().back());
122 for (ItIn in = begin; in != end; ++in, ++out)
135 for (ItIn in = begin; in != end; ++in, ++out)
152 template<
typename CIOutIterator,
typename DIOutIterator = DummyDOFIndexIterator>
156 CIOutIterator ci_out,
const CIOutIterator ci_end,
157 DIOutIterator di_out = DIOutIterator())
const
161 const size_type geometry_type_index = Traits::DOFIndexAccessor::GeometryIndex::geometryType(ei);
162 const size_type entity_index = Traits::DOFIndexAccessor::GeometryIndex::entityIndex(ei);
173 for (size_type i = 0; i <
size; ++i, ++ci_out, ++di_out)
175 ci_out->push_back(i);
176 di_out->treeIndex().push_back(i);
184 for (; ci_out != ci_end; ++ci_out)
186 ci_out->push_back(child_index);
189 else if (child_index > 0)
192 for (; ci_out != ci_end; ++ci_out)
198 for (; ci_out != ci_end; ++ci_out)
213 Traits::DOFIndexAccessor::GeometryIndex::geometryType(index),
214 Traits::DOFIndexAccessor::GeometryIndex::entityIndex(index)
258 assert(
_gt_used[geometry_type_index]);
265 template<
typename Node>
288 return _gt_used[GlobalGeometryTypeIndex::index(gt)];
343 for (ConstChildIterator it =
_children.begin(),
376 #endif // DUNE_PDELAB_ORDERING_LOCALORDERINGBASE_HH
Traits::SizeType size(const typename Traits::SizeType geometry_type_index, const typename Traits::SizeType entity_index) const
Definition: localorderingbase.hh:218
Traits::SizeType offset(const typename Traits::SizeType geometry_type_index, const typename Traits::SizeType entity_index, const typename Traits::SizeType child_index) const
Definition: localorderingbase.hh:255
LocalOrderingBase & childOrdering(typename Traits::SizeType i)
Definition: localorderingbase.hh:315
std::size_t _max_local_size
Definition: localorderingbase.hh:355
bool _container_blocked
Definition: localorderingbase.hh:354
std::size_t SizeType
Definition: ordering/utility.hh:162
LocalOrderingBase(Node &node, bool container_blocked, GFSData *gfs_data)
Definition: localorderingbase.hh:266
DI::size_type SizeType
Definition: ordering/utility.hh:201
Traits::SizeType maxLocalSize() const
Definition: localorderingbase.hh:301
static std::size_t geometryType(const DOFIndex &dof_index)
Definition: ordering/utility.hh:129
Definition: ordering/utility.hh:243
std::vector< typename Traits::SizeType > _gt_dof_offsets
Definition: localorderingbase.hh:364
bool _fixed_size
Definition: localorderingbase.hh:352
std::vector< bool > _gt_used
Definition: localorderingbase.hh:361
CI ContainerIndex
Definition: ordering/utility.hh:160
std::vector< typename Traits::SizeType > _entity_dof_offsets
Definition: localorderingbase.hh:365
impl::GridFunctionSpaceOrderingData< typename Traits::SizeType > GFSData
Definition: localorderingbase.hh:63
void mergePartitionSets(It begin, It end)
Adds the partitions from all PartitionInfoProviders in the range [begin,end).
Definition: partitioninfoprovider.hh:77
Traits::SizeType size(const typename Traits::DOFIndex::EntityIndex &index) const
Definition: localorderingbase.hh:210
Traits::CodimFlag _codim_used
Definition: localorderingbase.hh:360
void setup_fixed_size_possible()
Initial setup of the flag indicating whether a fixed size ordering is possible.
Definition: localorderingbase.hh:340
DI::View::TreeIndex TreeIndexView
Definition: ordering/utility.hh:199
Definition: gridviewordering.hh:59
const LocalOrderingBase & childOrdering(typename Traits::SizeType i) const
Definition: localorderingbase.hh:320
Traits::SizeType extract_entity_indices(const typename Traits::DOFIndex::EntityIndex &ei, typename Traits::SizeType child_index, CIOutIterator ci_out, const CIOutIterator ci_end, DIOutIterator di_out=DIOutIterator()) const
Definition: localorderingbase.hh:154
static const bool has_dynamic_ordering_children
Definition: localorderingbase.hh:55
std::bitset< max_dim > CodimFlag
Definition: ordering/utility.hh:194
void disable_container_blocking()
Definition: localorderingbase.hh:325
Definition: gridviewordering.hh:309
const std::size_t _child_count
Definition: localorderingbase.hh:357
Definition: gridviewordering.hh:22
bool contains(typename Traits::SizeType codim) const
Definition: localorderingbase.hh:296
Definition: ordering/utility.hh:208
Definition: adaptivity.hh:27
void map_lfs_indices(const ItIn begin, const ItIn end, ItOut out) const
Definition: localorderingbase.hh:105
GFSData * _gfs_data
Definition: localorderingbase.hh:367
friend struct collect_used_geometry_types_from_cell
Definition: localorderingbase.hh:38
Definition: gridviewordering.hh:420
Traits::SizeType size(const typename Traits::SizeType geometry_type_index, const typename Traits::SizeType entity_index, const typename Traits::SizeType child_index) const
Definition: localorderingbase.hh:233
Mixin class for providing information about contained grid partitions.
Definition: partitioninfoprovider.hh:22
std::vector< LocalOrderingBase * > _children
Definition: localorderingbase.hh:358
static const bool consume_tree_index
Definition: localorderingbase.hh:57
Definition: gridviewordering.hh:154
Definition: gridviewordering.hh:211
bool contains_geometry_type(typename Traits::SizeType gt_index) const
Definition: localorderingbase.hh:291
Definition: localorderingbase.hh:20
LocalOrderingTraits< GV, DI, CI > Traits
Definition: localorderingbase.hh:59
bool _fixed_size_possible
Definition: localorderingbase.hh:353
std::vector< typename Traits::SizeType > _gt_entity_offsets
Definition: localorderingbase.hh:363
void map_local_index(const typename Traits::SizeType geometry_type_index, const typename Traits::SizeType entity_index, typename Traits::TreeIndexView mi, typename Traits::ContainerIndex &ci) const
Definition: localorderingbase.hh:67
friend struct extract_per_entity_sizes_from_cell
Definition: localorderingbase.hh:41
bool fixedSize() const
Definition: localorderingbase.hh:281
bool contains(const GeometryType >) const
Definition: localorderingbase.hh:286
static std::size_t entityIndex(const DOFIndex &dof_index)
Definition: ordering/utility.hh:135