ug4
adaptive_regular_mg_refiner.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-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__ADAPTIVE_REGULAR_REFINER_MULTI_GRID__
34 #define __H__UG__ADAPTIVE_REGULAR_REFINER_MULTI_GRID__
35 
38 
39 namespace ug
40 {
41 
44 
46 
59 {
60  public:
63 
64  public:
68 
70 
71  virtual void assign_grid(MultiGrid& mg);
72 
73  protected:
75 
81  void set_grid(MultiGrid* mg);
82 
85 
88 
91 
94 
96 
101  template <class TElem>
102  void get_parents_of_marked_closure_elements(std::vector<GridObject*>& parents,
104 
106  virtual void perform_refinement();
107 
109  virtual bool perform_coarsening();
110 
111  protected:
113 };
114 
116 
117 }// end of namespace
118 
119 #endif
Specialization of IRefiner for adaptive multigrid refinement with closure.
Definition: adaptive_regular_mg_refiner.h:59
virtual ~AdaptiveRegularRefiner_MultiGrid()
Definition: adaptive_regular_mg_refiner.cpp:55
virtual void assign_grid(MultiGrid &mg)
Definition: adaptive_regular_mg_refiner.cpp:60
virtual bool perform_coarsening()
removes all closure elements, calls the base implementation and creates a new closure
Definition: adaptive_regular_mg_refiner.cpp:428
void set_grid(MultiGrid *mg)
performs registration and deregistration at a grid.
Definition: adaptive_regular_mg_refiner.cpp:66
virtual void perform_refinement()
removes all closure elements, calls the base implementation and creates a new closure
Definition: adaptive_regular_mg_refiner.cpp:408
void create_closure_elements_2d()
creates closure elements for 2d geometries
Definition: adaptive_regular_mg_refiner.cpp:108
HangingNodeRefiner_MultiGrid BaseClass
Definition: adaptive_regular_mg_refiner.h:61
void remove_closure_elements()
remove closure elements
Definition: adaptive_regular_mg_refiner.cpp:79
Selector m_closureElems
Definition: adaptive_regular_mg_refiner.h:112
void create_closure_elements()
calls create_closure_elements_2d / 3d, depending on the presence of volume elements.
Definition: adaptive_regular_mg_refiner.cpp:92
AdaptiveRegularRefiner_MultiGrid(SPRefinementProjector projector=SPNULL)
Definition: adaptive_regular_mg_refiner.cpp:41
void create_closure_elements_3d()
creates closure elements for 3d geometries
Definition: adaptive_regular_mg_refiner.cpp:204
void get_parents_of_marked_closure_elements(std::vector< GridObject * > &parents, Selector::status_t mark)
collects parents of all closure elements which share a value with the given mark.
Definition: adaptive_regular_mg_refiner.cpp:385
Specialization of ug::HangingNodeRefiner for ug::MultiGrid.
Definition: hanging_node_refiner_multi_grid.h:68
virtual bool mark(Vertex *v, RefinementMark refMark=RM_REFINE)
Marks an element for refinement. Default implementation is empty.
Definition: refiner_interface.h:103
SPRefinementProjector projector()
Definition: refiner_interface.h:78
byte status_t
Definition: selector_interface.h:128
Definition: multi_grid.h:72
specialization of ISelector for a grid of class Grid.
Definition: selector_grid.h:96
const NullSmartPtr SPNULL
The equivalent to NULL for smart pointers.
Definition: smart_pointer.h:90
the ug namespace