ug4
fractured_media_refiner.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-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__UG__fractured_media_refiner__
34 #define __H__UG__fractured_media_refiner__
35 
36 #include <queue>
37 #include "hanging_node_refiner_t.h"
38 
39 namespace ug
40 {
41 
51 template <class TGrid, class TAPosition>
53 {
55 
56  public:
57  using BaseClass::mark;
58 
59  public:
61  FracturedMediaRefiner(TGrid& g,
62  SPRefinementProjector projector = SPNULL);
63 
64  virtual ~FracturedMediaRefiner();
65 
67  void set_aspect_ratio_threshold(number threshold);
68 
70  void set_position_attachment(TAPosition& aPos);
71 
73 
76  virtual bool mark(Face* f, RefinementMark refMark = RM_REFINE);
77 
78  protected:
80  virtual void collect_objects_for_refine();
81 
82  private:
84  std::queue<Face*> m_queDegeneratedFaces;
86 };
87 
88 }// end of namespace
89 
90 #endif
Faces are 2-dimensional objects.
Definition: grid_base_objects.h:510
Definition: fractured_media_refiner.h:53
void set_aspect_ratio_threshold(number threshold)
if the aspect ratio is smaller then the given threshold, the element is considered a fracture element...
Definition: fractured_media_refiner.cpp:67
THangingNodeRefiner< TGrid > BaseClass
Definition: fractured_media_refiner.h:54
number m_aspectRatioThreshold
Definition: fractured_media_refiner.h:85
FracturedMediaRefiner(SPRefinementProjector projector=SPNULL)
Definition: fractured_media_refiner.cpp:44
virtual ~FracturedMediaRefiner()
Definition: fractured_media_refiner.cpp:60
number aspect_ratio(Face *f)
Definition: fractured_media_refiner.cpp:104
Grid::VertexAttachmentAccessor< TAPosition > m_aaPos
Definition: fractured_media_refiner.h:83
virtual bool mark(Face *f, RefinementMark refMark=RM_REFINE)
Marks a face for refinement.
Definition: fractured_media_refiner.cpp:85
virtual void collect_objects_for_refine()
Definition: fractured_media_refiner.cpp:133
std::queue< Face * > m_queDegeneratedFaces
Definition: fractured_media_refiner.h:84
void set_position_attachment(TAPosition &aPos)
Definition: fractured_media_refiner.cpp:75
Gives access to a hanging node refiner, depending on the grid-type.
Definition: hanging_node_refiner_t.h:44
RefinementMark
refinement-marks allow to specify how an element shall be processed during refinement.
Definition: refiner_interface.h:48
@ RM_REFINE
DEPRECATED. Use RM_FULL instead.
Definition: refiner_interface.h:55
const NullSmartPtr SPNULL
The equivalent to NULL for smart pointers.
Definition: smart_pointer.h:90
double number
Definition: types.h:124
the ug namespace