ug4
subset_handler_interface.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2015: G-CSC, Goethe University Frankfurt
3  * Author: Sebastian Reiter
4  *
5  * This file is part of UG4.
6  *
7  * UG4 is free software: you can redistribute it and/or modify it under the
8  * terms of the GNU Lesser General Public License version 3 (as published by the
9  * Free Software Foundation) with the following additional attribution
10  * requirements (according to LGPL/GPL v3 §7):
11  *
12  * (1) The following notice must be displayed in the Appropriate Legal Notices
13  * of covered and combined works: "Based on UG4 (www.ug4.org/license)".
14  *
15  * (2) The following notice must be displayed at a prominent place in the
16  * terminal output of covered works: "Based on UG4 (www.ug4.org/license)".
17  *
18  * (3) The following bibliography is recommended for citation and must be
19  * preserved in all covered files:
20  * "Reiter, S., Vogel, A., Heppner, I., Rupp, M., and Wittum, G. A massively
21  * parallel geometric multigrid solver on hierarchically distributed grids.
22  * Computing and visualization in science 16, 4 (2013), 151-164"
23  * "Vogel, A., Reiter, S., Rupp, M., Nägel, A., and Wittum, G. UG4 -- a novel
24  * flexible software system for simulating pde based models on high performance
25  * computers. Computing and visualization in science 16, 4 (2013), 165-179"
26  *
27  * This program is distributed in the hope that it will be useful,
28  * but WITHOUT ANY WARRANTY; without even the implied warranty of
29  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30  * GNU Lesser General Public License for more details.
31  */
32 
33 #ifndef __H__LIBGRID__SUBSET_HANDLER_INTERFACE__
34 #define __H__LIBGRID__SUBSET_HANDLER_INTERFACE__
35 
36 #include <list>
37 #include <string>
38 #include <vector>
39 #include <map>
40 #include "lib_grid/grid/grid.h"
42 #include "common/util/variant.h"
43 
44 namespace ug
45 {
47 // predeclarations
48 class ISubsetHandler;
49 
54 // SubsetHandlerElements
56 
60 {
61  SHE_NONE = 0,
63  SHE_EDGE = 1<<1,
64  SHE_FACE = 1<<2,
65  SHE_VOLUME = 1 << 3,
67 };
68 
70 // SubsetState
72 
80 {
81  SS_NONE = 0,
82  SS_USER_STATE = 1 << 16
83 };
84 
86 // SubsetInfo
88 
96 struct SubsetInfo
97 {
98  SubsetInfo();
99  std::string name;
103 
104  typedef std::map<std::string, Variant> PropertyMap;
106 
108 
110 
111  void set_property(const char* name, Variant prop);
112  void set_property(const std::string& name, Variant prop);
116 
119  Variant get_property(const char* name, Variant defaultValue = Variant()) const;
120  Variant get_property(const std::string& name, Variant defaultValue = Variant()) const;
122 };
123 
124 /*
126 // specialization of attachment_traits for Vertex
127 template<>
128 class attachment_traits<Vertex*, ISubsetHandler>
129 {
130  public:
131  typedef Vertex*& ElemRef;
132  typedef Vertex* ElemPtr;
133  typedef const Vertex* ConstElemPtr;
134  typedef ISubsetHandler* ElemHandlerPtr;
135  typedef const ISubsetHandler* ConstElemHandlerPtr;
136 
137  static inline void invalidate_entry(ElemHandlerPtr pHandler, ElemRef elem) {elem = NULL;}
138  static inline bool entry_is_invalid(ElemHandlerPtr pHandler, ElemRef elem) {return elem != NULL;}
139  static inline uint get_data_index(ElemHandlerPtr pHandler, ConstElemPtr elem);
140  static inline void set_data_index(ElemHandlerPtr pHandler, ElemPtr elem, uint index);
141 };
142 
143 // specialization of attachment_traits for Edge
144 template<>
145 class attachment_traits<Edge*, ISubsetHandler>
146 {
147  public:
148  typedef Edge*& ElemRef;
149  typedef Edge* ElemPtr;
150  typedef const Edge* ConstElemPtr;
151  typedef ISubsetHandler* ElemHandlerPtr;
152  typedef const ISubsetHandler* ConstElemHandlerPtr;
153 
154  static inline void invalidate_entry(ElemHandlerPtr pHandler, ElemRef elem) {elem = NULL;}
155  static inline bool entry_is_invalid(ElemHandlerPtr pHandler, ElemRef elem) {return elem != NULL;}
156  static inline uint get_data_index(ElemHandlerPtr pHandler, ConstElemPtr elem);
157  static inline void set_data_index(ElemHandlerPtr pHandler, ElemPtr elem, uint index);
158 };
159 
160 // specialization of attachment_traits for Face
161 template<>
162 class attachment_traits<Face*, ISubsetHandler>
163 {
164  public:
165  typedef Face*& ElemRef;
166  typedef Face* ElemPtr;
167  typedef const Face* ConstElemPtr;
168  typedef ISubsetHandler* ElemHandlerPtr;
169  typedef const ISubsetHandler* ConstElemHandlerPtr;
170 
171  static inline void invalidate_entry(ElemHandlerPtr pHandler, ElemRef elem) {elem = NULL;}
172  static inline bool entry_is_invalid(ElemHandlerPtr pHandler, ElemRef elem) {return elem != NULL;}
173  static inline uint get_data_index(ElemHandlerPtr pHandler, ConstElemPtr elem);
174  static inline void set_data_index(ElemHandlerPtr pHandler, ElemPtr elem, uint index);
175 };
176 
177 // specialization of attachment_traits for Volume
178 template<>
179 class attachment_traits<Volume*, ISubsetHandler>
180 {
181  public:
182  typedef Volume*& ElemRef;
183  typedef Volume* ElemPtr;
184  typedef const Volume* ConstElemPtr;
185  typedef ISubsetHandler* ElemHandlerPtr;
186  typedef const ISubsetHandler* ConstElemHandlerPtr;
187 
188  static inline void invalidate_entry(ElemHandlerPtr pHandler, ElemRef elem) {elem = NULL;}
189  static inline bool entry_is_invalid(ElemHandlerPtr pHandler, ElemRef elem) {return elem != NULL;}
190  static inline uint get_data_index(ElemHandlerPtr pHandler, ConstElemPtr elem);
191  static inline void set_data_index(ElemHandlerPtr pHandler, ElemPtr elem, uint index);
192 };
193 */
194 
196 // ISubsetHandler
223 {/*
224  friend class attachment_traits<Vertex*, ISubsetHandler>;
225  friend class attachment_traits<Edge*, ISubsetHandler>;
226  friend class attachment_traits<Face*, ISubsetHandler>;
227  friend class attachment_traits<Volume*, ISubsetHandler>;*/
228 
229  public:/*
230  typedef AttachmentPipe<Vertex*, ISubsetHandler> VertexAttachmentPipe;
231  typedef AttachmentPipe<Edge*, ISubsetHandler> EdgeAttachmentPipe;
232  typedef AttachmentPipe<Face*, ISubsetHandler> FaceAttachmentPipe;
233  typedef AttachmentPipe<Volume*, ISubsetHandler> VolumeAttachmentPipe;*/
234 
236  template <class TElem>
237  struct traits{
240  };
241 
242  public:
244 
246  ISubsetHandler(uint supportedElements = SHE_ALL);
247 
249 
251  ISubsetHandler(Grid& grid, uint supportedElements = SHE_ALL);
252 
255  virtual ~ISubsetHandler();
256 
258 
265  ISubsetHandler& operator = (const ISubsetHandler& sh);
266 
268 
269  Grid* grid() const;
270 
272 
273  bool elements_are_supported(uint shElements) const;
274 
276 
278  void set_supported_elements(uint shElements);
279 
281 
282  void enable_element_support(uint shElements);
283 
285 
286  void disable_element_support(uint shElements);
287 
291  void set_default_subset_index(int subsetIndex);
292  inline int get_default_subset_index() {return m_defaultSubsetIndex;}
293 
298  void enable_subset_inheritance(bool bEnable);
299  inline bool subset_inheritance_enabled() {return m_bSubsetInheritanceEnabled;}
300 
306  void enable_strict_inheritance(bool bEnable);
307  inline bool strict_inheritance_enabled() {return m_bStrictInheritanceEnabled;}
308 
310 
311  inline void subset_required(int index);
312 
314  inline void subset_required(int index) const;
315 
317  inline int num_subsets() const {return (int)m_subsetInfos.size();}
318 
320  const char* get_subset_name(int subsetIndex) const;
321 
323  void set_subset_name(const char* name, int subsetIndex);
324 
326 
327  void set_subset_info(int subsetIndex, const SubsetInfo& subsetInfo);
328 
330  SubsetInfo& subset_info(int subsetIndex);
331 
333  const SubsetInfo& subset_info(int subsetIndex) const;
334 
336  void set_default_subset_info(const SubsetInfo& defSI);
337 
339  // clear methods
340  void clear();
341  void clear_subset(int subsetIndex);
342  void clear_subsets();
343 
344 
346  void insert_subset(int subsetIndex);
348  void erase_subset(int subsetIndex);
350  void swap_subsets(int subsetIndex1, int subsetIndex2);
352  void move_subset(int indexFrom, int indexTo);
354  void join_subsets(int targetSub, int sub1, int sub2, bool eraseUnusedSubs);
355 
356  template <class TIterator>
357  void assign_subset(TIterator iterBegin, TIterator iterEnd, int subsetIndex);
358 
359  int get_subset_index(GridObject* elem) const;
360  inline int get_subset_index(Vertex* elem) const;
361  inline int get_subset_index(Edge* elem) const;
362  inline int get_subset_index(Face* elem) const;
363  inline int get_subset_index(Volume* elem) const;
364 
366 
369  int get_subset_index(const char* name) const;
370 
371  // grid callbacks
372  //virtual void registered_at_grid(Grid* grid);
373  //virtual void unregistered_from_grid(Grid* grid);
374  virtual void grid_to_be_destroyed(Grid* grid);
375  virtual void elements_to_be_cleared(Grid* grid);
376 
377  // element callbacks
378  virtual void vertex_created(Grid* grid, Vertex* vrt,
379  GridObject* pParent = NULL,
380  bool replacesParent = false);
381 
382  virtual void edge_created(Grid* grid, Edge* e,
383  GridObject* pParent = NULL,
384  bool replacesParent = false);
385 
386  virtual void face_created(Grid* grid, Face* f,
387  GridObject* pParent = NULL,
388  bool replacesParent = false);
389 
390  virtual void volume_created(Grid* grid, Volume* vol,
391  GridObject* pParent = NULL,
392  bool replacesParent = false);
393 
394  virtual void vertex_to_be_erased(Grid* grid, Vertex* vrt,
395  Vertex* replacedBy = NULL);
396 
397  virtual void edge_to_be_erased(Grid* grid, Edge* e,
398  Edge* replacedBy = NULL);
399 
400  virtual void face_to_be_erased(Grid* grid, Face* f,
401  Face* replacedBy = NULL);
402 
403  virtual void volume_to_be_erased(Grid* grid, Volume* vol,
404  Volume* replacedBy = NULL);
405 
406  virtual void vertices_to_be_merged(Grid* grid, Vertex* target,
407  Vertex* elem1, Vertex* elem2);
408 
409  virtual void edges_to_be_merged(Grid* grid, Edge* target,
410  Edge* elem1, Edge* elem2);
411 
412  virtual void faces_to_be_merged(Grid* grid, Face* target,
413  Face* elem1, Face* elem2);
414 
415  virtual void volumes_to_be_merged(Grid* grid, Volume* target,
416  Volume* elem1, Volume* elem2);
417 
418  // Virtual methods for derived classes
423  virtual void assign_subset(Vertex* elem, int subsetIndex) = 0;
424 
429  virtual void assign_subset(Edge* elem, int subsetIndex) = 0;
430 
435  virtual void assign_subset(Face* elem, int subsetIndex) = 0;
436 
441  virtual void assign_subset(Volume* elem, int subsetIndex) = 0;
442 
445  virtual void assign_subset(GridObject* elem, int subsetIndex);
446 
448 
450  //virtual size_t collect_subset_elements(std::vector<Vertex*>& vrtsOut,
451  // int subsetIndex) const = 0;
452 
454 
456  //virtual size_t collect_subset_elements(std::vector<Edge*>& edgesOut,
457  // int subsetIndex) const = 0;
458 
460 
462  //virtual size_t collect_subset_elements(std::vector<Face*>& facesOut,
463  // int subsetIndex) const = 0;
464 
466 
468  //virtual size_t collect_subset_elements(std::vector<Volume*>& volsOut,
469  // int subsetIndex) const = 0;
470 
472  virtual bool contains_vertices(int subsetIndex) const = 0;
473 
475  virtual bool contains_edges(int subsetIndex) const = 0;
476 
478  virtual bool contains_faces(int subsetIndex) const = 0;
479 
481  virtual bool contains_volumes(int subsetIndex) const = 0;
482 
484 
485  virtual GridObjectCollection
486  get_grid_objects_in_subset(int subsetInd) const = 0;
487 
489  // attachments
490 
492 
495  //void enable_subset_attachments(bool bEnable);
496 
498  /*inline bool subset_attachments_are_enabled() {return m_bSubsetAttachmentsEnabled;};
499 
500  inline uint get_attachment_data_index(const Vertex* v) const {return m_aaDataIndVRT[v];}
501  inline uint get_attachment_data_index(const Edge* e) const {return m_aaDataIndEDGE[e];}
502  inline uint get_attachment_data_index(const Face* f) const {return m_aaDataIndFACE[f];}
503  inline uint get_attachment_data_index(const Volume* v) const {return m_aaDataIndVOL[v];}
504 */
506 
507  /*template <class TGeomObjClass>
508  inline void attach_to(IAttachment& attachment, int subsetIndex);
509 */
511 
512  /*template <class TGeomObjClass, class TAttachment>
513  void attach_to_dv(TAttachment& attachment, int subsetIndex,
514  const typename TAttachment::ValueType& defaultValue);
515 */
516  // detach
518  /*template <class TGeomObjClass>
519  void detach_from(IAttachment& attachment, int subsetIndex);
520 */
522  // attachments helper
523  // attach with attachments default pass-on behaviour
524  /*inline void attach_to_vertices(IAttachment& attachment, int subsetIndex) {attach_to<Vertex>(attachment, subsetIndex);}
525  inline void attach_to_edges(IAttachment& attachment, int subsetIndex) {attach_to<Edge>(attachment, subsetIndex);}
526  inline void attach_to_faces(IAttachment& attachment, int subsetIndex) {attach_to<Face>(attachment, subsetIndex);}
527  inline void attach_to_volumes(IAttachment& attachment, int subsetIndex) {attach_to<Volume>(attachment, subsetIndex);}
528 */
529  // attach with default value and attachments default pass-on behaviour
530  /*template <class TAttachment>
531  inline void attach_to_vertices_dv(TAttachment& attachment, int subsetIndex, const typename TAttachment::ValueType& defaultValue) {attach_to_dv<Vertex>(attachment, subsetIndex, defaultValue);}
532  template <class TAttachment>
533  inline void attach_to_edges_dv(TAttachment& attachment, int subsetIndex, const typename TAttachment::ValueType& defaultValue) {attach_to_dv<Edge>(attachment, subsetIndex, defaultValue);}
534  template <class TAttachment>
535  inline void attach_to_faces_dv(TAttachment& attachment, int subsetIndex, const typename TAttachment::ValueType& defaultValue) {attach_to_dv<Face>(attachment, subsetIndex, defaultValue);}
536  template <class TAttachment>
537  inline void attach_to_volumes_dv(TAttachment& attachment, int subsetIndex, const typename TAttachment::ValueType& defaultValue) {attach_to_dv<Volume>(attachment, subsetIndex, defaultValue);}
538 */
539  // detach
540  /*inline void detach_from_vertices(IAttachment& attachment, int subsetIndex) {detach_from<Vertex>(attachment, subsetIndex);}
541  inline void detach_from_edges(IAttachment& attachment, int subsetIndex) {detach_from<Edge>(attachment, subsetIndex);}
542  inline void detach_from_faces(IAttachment& attachment, int subsetIndex) {detach_from<Face>(attachment, subsetIndex);}
543  inline void detach_from_volumes(IAttachment& attachment, int subsetIndex) {detach_from<Volume>(attachment, subsetIndex);}
544 */
546 
551  /*template <class TGeomObj, class TAttachment>
552  inline typename TAttachment::ContainerType*
553  get_attachment_data_container(TAttachment& attachment, int subsetIndex);
554 */
555  protected:
560 
565 
566  protected:
568 
570  void assign_subset_handler(const ISubsetHandler& sh);
571 
573 
579  void set_grid(Grid* grid);
580 
582 
585  void reset_subset_indices(uint shElements = SHE_ALL);
586 
588  void create_required_subsets(int index);
589 
590  inline void subset_assigned(Vertex* v, int subsetIndex);
591  inline void subset_assigned(Edge* e, int subsetIndex);
592  inline void subset_assigned(Face* f, int subsetIndex);
593  inline void subset_assigned(Volume* v, int subsetIndex);
594 
599  inline void alter_subset_index(Vertex* v, int subsetIndex) {m_aaSubsetIndexVRT[v] = subsetIndex;}
604  inline void alter_subset_index(Edge* e, int subsetIndex) {m_aaSubsetIndexEDGE[e] = subsetIndex;}
609  inline void alter_subset_index(Face* f, int subsetIndex) {m_aaSubsetIndexFACE[f] = subsetIndex;}
614  inline void alter_subset_index(Volume* v, int subsetIndex) {m_aaSubsetIndexVOL[v] = subsetIndex;}
615 
616  virtual void erase_subset_lists() = 0;
617 
618  virtual void clear_subset_lists(int index) = 0;
619 
620  virtual void change_subset_indices(int indOld, int indNew) = 0;
621 
622 
624  virtual void add_required_subset_lists(int maxIndex) = 0;
625 
627  virtual void erase_subset_lists(int index) = 0;
628 
630  virtual void swap_subset_lists(int ind1, int ind2) = 0;
631 
633  virtual void move_subset_lists(int indexFrom, int indexTo) = 0;
634 
636  virtual void join_subset_lists(int target, int src1, int src2) = 0;
637 
639  template <class TElem>
640  void elems_to_be_merged(Grid* grid, TElem* target,
641  TElem* elem1, TElem* elem2);
642 
644  // attachments
645  /*inline void set_attachment_data_index(Vertex* v, uint index) {m_aaDataIndVRT[v] = index;}
646  inline void set_attachment_data_index(Edge* e, uint index) {m_aaDataIndEDGE[e] = index;}
647  inline void set_attachment_data_index(Face* f, uint index) {m_aaDataIndFACE[f] = index;}
648  inline void set_attachment_data_index(Volume* v, uint index) {m_aaDataIndVOL[v] = index;}
649 
650  void resize_attachment_pipes(size_t newSize);
651  void clear_attachment_pipes(int subsetIndex);
652  void clear_attachment_pipes();
653 
654  template <class TGeomObj>
655  inline AttachmentPipe<TGeomObj*, ISubsetHandler>&
656  get_attachment_pipe(int subsetIndex);
657 */
659  // virtual methods for attachments
661 
666  //virtual void register_subset_elements_at_pipe() = 0;
667 
669 
672  //inline void register_at_pipe(Vertex* elem) {m_vertexAttachmentPipes[get_subset_index(elem)]->register_element(elem);}
673 
675 
678  //inline void register_at_pipe(Edge* elem) {m_edgeAttachmentPipes[get_subset_index(elem)]->register_element(elem);}
679 
681 
684  //inline void register_at_pipe(Face* elem) {m_faceAttachmentPipes[get_subset_index(elem)]->register_element(elem);}
685 
687 
690  //inline void register_at_pipe(Volume* elem) {m_volumeAttachmentPipes[get_subset_index(elem)]->register_element(elem);}
691 
692  public:
694 
695  /*template <class TGeomObj, class TAttachment>
696  class AttachmentAccessor : public ug::AttachmentAccessor<TGeomObj*, TAttachment, ISubsetHandler>
697  {
698  protected:
699  typedef ug::AttachmentAccessor<TGeomObj*, TAttachment, ISubsetHandler> BaseClass;
700 
701  public:
702  AttachmentAccessor() {}
703  AttachmentAccessor(const AttachmentAccessor& aa) : BaseClass(aa) {}
704  AttachmentAccessor(ISubsetHandler& sh, TAttachment& a, int subsetIndex) : BaseClass(sh.get_attachment_pipe<TGeomObj>(subsetIndex), a) {}
705 
706  inline void access(ISubsetHandler& sh, TAttachment& a, int subsetIndex)
707  {BaseClass::access(sh.get_attachment_pipe<TGeomObj>(subsetIndex), a);}
708  };*/
709 
710 
712 
716 /*
717  template <class TAttachmet, class TGeomBaseObj>
718  class MultiSubsetAttachmentAccessor
719  {
720  //TODO: implement this!
721  };
722 */
723  private:
725 
726  protected:
728  //typedef Attachment<uint> ADataIndex;
729  typedef std::vector<SubsetInfo> SubsetInfoVec;
730  /*typedef std::vector<VertexAttachmentPipe*> VertexAttachmentPipeVec;
731  typedef std::vector<EdgeAttachmentPipe*> EdgeAttachmentPipeVec;
732  typedef std::vector<FaceAttachmentPipe*> FaceAttachmentPipeVec;
733  typedef std::vector<VolumeAttachmentPipe*> VolumeAttachmentPipeVec;*/
734 
735  protected:
737  /*VertexAttachmentPipeVec m_vertexAttachmentPipes;
738  EdgeAttachmentPipeVec m_edgeAttachmentPipes;
739  FaceAttachmentPipeVec m_faceAttachmentPipes;
740  VolumeAttachmentPipeVec m_volumeAttachmentPipes;*/
741 
745 
747  //ADataIndex m_aDataIndex;
748 
752  //bool m_bSubsetAttachmentsEnabled;
753 
758 /*
759  Grid::VertexAttachmentAccessor<ADataIndex> m_aaDataIndVRT;
760  Grid::EdgeAttachmentAccessor<ADataIndex> m_aaDataIndEDGE;
761  Grid::FaceAttachmentAccessor<ADataIndex> m_aaDataIndFACE;
762  Grid::VolumeAttachmentAccessor<ADataIndex> m_aaDataIndVOL;*/
763 };
764 
767 }// end of namespace
768 
770 // include implementation
772 
773 #endif
location name
Definition: checkpoint_util.lua:128
A linked list of elements living in an attachment.
Definition: attached_list.h:182
Base-class for edges.
Definition: grid_base_objects.h:397
Faces are 2-dimensional objects.
Definition: grid_base_objects.h:510
Definition: grid.h:211
Definition: grid.h:221
Manages the elements of a grid and their interconnection.
Definition: grid.h:132
a helper class that holds a collection of possibly unconnected geometric-objects.
Definition: grid_object_collection.h:96
The base class for all geometric objects, such as vertices, edges, faces, volumes,...
Definition: grid_base_objects.h:157
Definition: grid_observer.h:80
Definition: subset_handler_interface.h:223
virtual void assign_subset(Volume *elem, int subsetIndex)=0
ASubsetIndex m_aSubsetIndex
Definition: subset_handler_interface.h:746
Grid * m_pGrid
Definition: subset_handler_interface.h:736
virtual bool contains_volumes(int subsetIndex) const =0
returns true if the subset contains volumes
virtual bool contains_vertices(int subsetIndex) const =0
collects all vertices that are in the given subset.
std::vector< SubsetInfo > SubsetInfoVec
Definition: subset_handler_interface.h:729
virtual void assign_subset(Vertex *elem, int subsetIndex)=0
bool m_bSubsetInheritanceEnabled
Definition: subset_handler_interface.h:750
Grid::traits< Edge >::SectionContainer EdgeSectionContainer
Definition: subset_handler_interface.h:562
Grid::traits< Edge >::AttachedElementList AttachedEdgeList
Definition: subset_handler_interface.h:557
Grid::FaceAttachmentAccessor< ASubsetIndex > m_aaSubsetIndexFACE
Definition: subset_handler_interface.h:756
SubsetInfoVec m_subsetInfos
Definition: subset_handler_interface.h:742
virtual void erase_subset_lists()=0
virtual bool contains_faces(int subsetIndex) const =0
returns true if the subset contains faces
virtual void assign_subset(Face *elem, int subsetIndex)=0
virtual bool contains_edges(int subsetIndex) const =0
returns true if the subset contains edges
void alter_subset_index(Volume *v, int subsetIndex)
Definition: subset_handler_interface.h:614
AInt ASubsetIndex
Definition: subset_handler_interface.h:724
Grid::traits< Vertex >::SectionContainer VertexSectionContainer
Definition: subset_handler_interface.h:561
virtual void clear_subset_lists(int index)=0
bool m_bStrictInheritanceEnabled
Definition: subset_handler_interface.h:751
void alter_subset_index(Vertex *v, int subsetIndex)
Definition: subset_handler_interface.h:599
int m_defaultSubsetIndex
Definition: subset_handler_interface.h:749
ISubsetHandler(const ISubsetHandler &sh)
this method is called by ISubsetHandler when attachment_support has been enabled.
Definition: subset_handler_interface.h:724
Grid::traits< Vertex >::AttachedElementList AttachedVertexList
enable subset-attachment support
Definition: subset_handler_interface.h:556
virtual void join_subset_lists(int target, int src1, int src2)=0
join the subset-lists but do not touch the subset-indices.
virtual void erase_subset_lists(int index)=0
erase the subset-lists but do not touch the subset-indices.
bool strict_inheritance_enabled()
Definition: subset_handler_interface.h:307
Grid::VolumeAttachmentAccessor< ASubsetIndex > m_aaSubsetIndexVOL
Definition: subset_handler_interface.h:757
virtual void change_subset_indices(int indOld, int indNew)=0
virtual void assign_subset(Edge *elem, int subsetIndex)=0
uint m_supportedElements
Definition: subset_handler_interface.h:744
Grid::traits< Face >::AttachedElementList AttachedFaceList
Definition: subset_handler_interface.h:558
int get_default_subset_index()
Definition: subset_handler_interface.h:292
SubsetInfo m_defaultSubsetInfo
Definition: subset_handler_interface.h:743
virtual void move_subset_lists(int indexFrom, int indexTo)=0
move the subset-lists but do not touch the subset-indices.
virtual GridObjectCollection get_grid_objects_in_subset(int subsetInd) const =0
Returns the geometric object collection for the given subset.
int num_subsets() const
returns the number of subset-infos (return value is int, since SubsetIndices are of type int)
Definition: subset_handler_interface.h:317
bool subset_inheritance_enabled()
Definition: subset_handler_interface.h:299
Grid::EdgeAttachmentAccessor< ASubsetIndex > m_aaSubsetIndexEDGE
Definition: subset_handler_interface.h:755
Grid::traits< Volume >::AttachedElementList AttachedVolumeList
Definition: subset_handler_interface.h:559
Grid::traits< Face >::SectionContainer FaceSectionContainer
Definition: subset_handler_interface.h:563
void alter_subset_index(Face *f, int subsetIndex)
Definition: subset_handler_interface.h:609
Grid::traits< Volume >::SectionContainer VolumeSectionContainer
Definition: subset_handler_interface.h:564
virtual void swap_subset_lists(int ind1, int ind2)=0
swap the subset-lists but do not touch the subset-indices.
virtual void add_required_subset_lists(int maxIndex)=0
add a subset if required - so that the subset with maxIndex exists.
Grid::VertexAttachmentAccessor< ASubsetIndex > m_aaSubsetIndexVRT
Definition: subset_handler_interface.h:754
void alter_subset_index(Edge *e, int subsetIndex)
Definition: subset_handler_interface.h:604
A variant can represent variables of different types.
Definition: variant.h:87
Base-class for all vertex-types.
Definition: grid_base_objects.h:231
Volumes are 3-dimensional objects.
Definition: grid_base_objects.h:754
Definition: grid_base_object_traits.h:68
SubsetState
The SubsetState is not yet really used inside of libGrid.
Definition: subset_handler_interface.h:80
SubsetHandlerElements
Use these constants to specify which elements shall be supported by a SubsetHandler.
Definition: subset_handler_interface.h:60
@ SHE_NONE
Definition: subset_handler_interface.h:61
@ SHE_VOLUME
Definition: subset_handler_interface.h:65
@ SHE_ALL
Definition: subset_handler_interface.h:66
@ SHE_EDGE
Definition: subset_handler_interface.h:63
@ SHE_VERTEX
Definition: subset_handler_interface.h:62
@ SHE_FACE
Definition: subset_handler_interface.h:64
#define UG_API
Definition: ug_config.h:65
unsigned int uint
Definition: types.h:114
size_t target(SM_edge< typename T::value_type > const &e, ug::BidirectionalMatrix< T > const &m)
Definition: bidirectional_boost.h:100
the ug namespace
@ SS_NONE
Definition: subset_handler_interface.h:81
@ SS_USER_STATE
Definition: subset_handler_interface.h:82
The traits class holds some important types for each element-type.
Definition: subset_handler_interface.h:237
geometry_traits< TElem >::iterator iterator
Definition: subset_handler_interface.h:238
geometry_traits< TElem >::const_iterator const_iterator
Definition: subset_handler_interface.h:239
a struct that holds information associated with subsets.
Definition: subset_handler_interface.h:97
PropertyMap m_propertyMap
custom properties can be stored in this map.
Definition: subset_handler_interface.h:107
std::map< std::string, Variant > PropertyMap
Definition: subset_handler_interface.h:104
Variant get_property(const char *name, Variant defaultValue=Variant()) const
retrieve the property with the given name
Definition: subset_handler_interface.cpp:62
vector4 color
Definition: subset_handler_interface.h:101
std::string name
Definition: subset_handler_interface.h:99
void set_property(const char *name, Variant prop)
associate a property with the given name
Definition: subset_handler_interface.cpp:50
uint subsetState
an or-combination of SubsetState flags.
Definition: subset_handler_interface.h:102
SubsetInfo()
Definition: subset_handler_interface.cpp:42
int materialIndex
mostly ignored.
Definition: subset_handler_interface.h:100