ug4
elem_disc_interface_impl.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2010-2015: G-CSC, Goethe University Frankfurt
3  * Author: Andreas Vogel
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 
34 #ifndef __H__UG__LIB_DISC__SPATIAL_DISC__ELEM_DISC__ELEM_DISC_INTERFACE_IMPL__
35 #define __H__UG__LIB_DISC__SPATIAL_DISC__ELEM_DISC__ELEM_DISC_INTERFACE_IMPL__
36 
37 #include "elem_disc_interface.h"
39 
40 namespace ug{
41 
43 // setting of elem ass functions
45 
46 template <typename TLeaf, typename TDomain>
47 template<typename TAssFunc>
49 {
50  m_vPrepareTimestepFct[algebra_id] = static_cast<PrepareTimestepFct>(func);
51 };
52 template <typename TLeaf, typename TDomain>
54 {
55  m_vPrepareTimestepFct[algebra_id] = NULL;
56 };
57 
58 template <typename TLeaf, typename TDomain>
59 template<typename TAssFunc>
61 {
62  m_vPrepareTimestepElemFct[id] = static_cast<PrepareTimestepElemFct>(func);
63 };
64 template <typename TLeaf, typename TDomain>
66 {
67  m_vPrepareTimestepElemFct[id] = NULL;
68 };
69 
70 template <typename TLeaf, typename TDomain>
71 template<typename TAssFunc>
73 {
74  m_vPrepareElemFct[id] = static_cast<PrepareElemFct>(func);
75 };
76 template <typename TLeaf, typename TDomain>
78 {
79  m_vPrepareElemFct[id] = NULL;
80 };
81 
82 template <typename TLeaf, typename TDomain>
83 template<typename TAssFunc>
85 {
86  m_vPrepareElemLoopFct[id] = static_cast<PrepareElemLoopFct>(func);
87 };
88 template <typename TLeaf, typename TDomain>
90 {
91  m_vPrepareElemLoopFct[id] = NULL;
92 };
93 
94 template <typename TLeaf, typename TDomain>
95 template<typename TAssFunc>
97 {
98  m_vFinishElemLoopFct[id] = static_cast<FinishElemLoopFct>(func);
99 };
100 template <typename TLeaf, typename TDomain>
102 {
103  m_vFinishElemLoopFct[id] = NULL;
104 };
105 
106 template <typename TLeaf, typename TDomain>
107 template<typename TAssFunc>
109 {
110  m_vElemJAFct[id] = static_cast<ElemJAFct>(func);
111 };
112 template <typename TLeaf, typename TDomain>
114 {
115  m_vElemJAFct[id] = NULL;
116 };
117 
118 template <typename TLeaf, typename TDomain>
119 template<typename TAssFunc>
121 {
122  m_vElemJMFct[id] = static_cast<ElemJMFct>(func);
123 };
124 template <typename TLeaf, typename TDomain>
126 {
127  m_vElemJMFct[id] = NULL;
128 };
129 
130 template <typename TLeaf, typename TDomain>
131 template<typename TAssFunc>
133 {
134  m_vElemdAFct[id] = static_cast<ElemdAFct>(func);
135 };
136 template <typename TLeaf, typename TDomain>
138 {
139  m_vElemdAFct[id] = NULL;
140 };
141 
142 template <typename TLeaf, typename TDomain>
143 template<typename TAssFunc>
145 {
146  m_vElemdAExplFct[id] = static_cast<ElemdAFct>(func);
147 };
148 template <typename TLeaf, typename TDomain>
150 {
151  m_vElemdAExplFct[id] = NULL;
152 };
153 
154 template <typename TLeaf, typename TDomain>
155 template<typename TAssFunc>
157 {
158  m_vElemdMFct[id] = static_cast<ElemdMFct>(func);
159 };
160 template <typename TLeaf, typename TDomain>
162 {
163  m_vElemdMFct[id] = NULL;
164 };
165 
166 template <typename TLeaf, typename TDomain>
167 template<typename TAssFunc>
169 {
170  m_vElemRHSFct[id] = static_cast<ElemRHSFct>(func);
171 };
172 template <typename TLeaf, typename TDomain>
174 {
175  m_vElemRHSFct[id] = NULL;
176 };
177 
178 template <typename TLeaf, typename TDomain>
179 template<typename TAssFunc>
181 {
182  m_vFinishTimestepFct[algebra_id] = static_cast<FinishTimestepFct>(func);
183 };
184 template <typename TLeaf, typename TDomain>
186 {
187  m_vFinishTimestepFct[algebra_id] = NULL;
188 };
189 
190 template <typename TLeaf, typename TDomain>
191 template<typename TAssFunc>
193 {
194  m_vFinishTimestepElemFct[id] = static_cast<FinishTimestepElemFct>(func);
195 };
196 template <typename TLeaf, typename TDomain>
198 {
199  m_vFinishTimestepElemFct[id] = NULL;
200 };
201 
202 template <typename TLeaf, typename TDomain>
203 template<typename TAssFunc>
205 {
206  m_vPrepareErrEstElemLoopFct[id] = static_cast<PrepareErrEstElemLoopFct>(func);
207 };
208 template <typename TLeaf, typename TDomain>
210 {
211  m_vPrepareErrEstElemLoopFct[id] = NULL;
212 };
213 
214 template <typename TLeaf, typename TDomain>
215 template<typename TAssFunc>
217 {
218  m_vPrepareErrEstElemFct[id] = static_cast<PrepareErrEstElemFct>(func);
219 };
220 template <typename TLeaf, typename TDomain>
222 {
223  m_vPrepareErrEstElemFct[id] = NULL;
224 };
225 
226 template <typename TLeaf, typename TDomain>
227 template<typename TAssFunc>
229 {
230  m_vElemComputeErrEstAFct[id] = static_cast<ElemComputeErrEstAFct>(func);
231 };
232 template <typename TLeaf, typename TDomain>
234 {
235  m_vElemComputeErrEstAFct[id] = NULL;
236 };
237 
238 template <typename TLeaf, typename TDomain>
239 template<typename TAssFunc>
241 {
242  m_vElemComputeErrEstMFct[id] = static_cast<ElemComputeErrEstMFct>(func);
243 };
244 template <typename TLeaf, typename TDomain>
246 {
247  m_vElemComputeErrEstMFct[id] = NULL;
248 };
249 
250 template <typename TLeaf, typename TDomain>
251 template<typename TAssFunc>
253 {
254  m_vElemComputeErrEstRhsFct[id] = static_cast<ElemComputeErrEstRhsFct>(func);
255 };
256 template <typename TLeaf, typename TDomain>
258 {
259  m_vElemComputeErrEstRhsFct[id] = NULL;
260 };
261 
262 template <typename TLeaf, typename TDomain>
263 template<typename TAssFunc>
265 {
266  m_vFinishErrEstElemLoopFct[id] = static_cast<FinishErrEstElemLoopFct>(func);
267 };
268 template <typename TLeaf, typename TDomain>
270 {
271  m_vFinishErrEstElemLoopFct[id] = NULL;
272 };
273 
274 }
275 
276 #endif /* __H__UG__LIB_DISC__SPATIAL_DISC__ELEM_DISC__ELEM_DISC_INTERFACE_IMPL__ */
void set_prep_timestep_elem_fct(ReferenceObjectID id, TAssFunc func)
current Geometric Object
Definition: elem_disc_interface_impl.h:60
void set_prep_elem_loop_fct(ReferenceObjectID id, TAssFunc func)
current Geometric Object
Definition: elem_disc_interface_impl.h:84
void remove_add_jac_M_elem_fct(ReferenceObjectID id)
current Geometric Object
Definition: elem_disc_interface_impl.h:125
void remove_prep_timestep_fct(size_t algebra_id)
current Geometric Object
Definition: elem_disc_interface_impl.h:53
void remove_fsh_elem_loop_fct(ReferenceObjectID id)
current Geometric Object
Definition: elem_disc_interface_impl.h:101
void set_add_jac_M_elem_fct(ReferenceObjectID id, TAssFunc func)
current Geometric Object
Definition: elem_disc_interface_impl.h:120
void remove_fsh_timestep_elem_fct(ReferenceObjectID id)
current Geometric Object
Definition: elem_disc_interface_impl.h:197
void set_fsh_elem_loop_fct(ReferenceObjectID id, TAssFunc func)
current Geometric Object
Definition: elem_disc_interface_impl.h:96
void remove_prep_elem_loop_fct(ReferenceObjectID id)
current Geometric Object
Definition: elem_disc_interface_impl.h:89
void set_fsh_timestep_fct(size_t algebra_id, TAssFunc func)
current Geometric Object
Definition: elem_disc_interface_impl.h:180
void remove_fsh_timestep_fct(size_t algebra_id)
current Geometric Object
Definition: elem_disc_interface_impl.h:185
void set_prep_timestep_fct(size_t algebra_id, TAssFunc func)
current Geometric Object
Definition: elem_disc_interface_impl.h:48
void remove_add_def_M_elem_fct(ReferenceObjectID id)
current Geometric Object
Definition: elem_disc_interface_impl.h:161
void remove_add_rhs_elem_fct(ReferenceObjectID id)
current Geometric Object
Definition: elem_disc_interface_impl.h:173
void remove_add_jac_A_elem_fct(ReferenceObjectID id)
current Geometric Object
Definition: elem_disc_interface_impl.h:113
void set_add_def_A_elem_fct(ReferenceObjectID id, TAssFunc func)
current Geometric Object
Definition: elem_disc_interface_impl.h:132
void set_add_def_A_expl_elem_fct(ReferenceObjectID id, TAssFunc func)
current Geometric Object
Definition: elem_disc_interface_impl.h:144
void remove_add_def_A_expl_elem_fct(ReferenceObjectID id)
current Geometric Object
Definition: elem_disc_interface_impl.h:149
void remove_prep_timestep_elem_fct(ReferenceObjectID id)
current Geometric Object
Definition: elem_disc_interface_impl.h:65
void set_add_jac_A_elem_fct(ReferenceObjectID id, TAssFunc func)
current Geometric Object
Definition: elem_disc_interface_impl.h:108
void set_add_def_M_elem_fct(ReferenceObjectID id, TAssFunc func)
current Geometric Object
Definition: elem_disc_interface_impl.h:156
void set_add_rhs_elem_fct(ReferenceObjectID id, TAssFunc func)
current Geometric Object
Definition: elem_disc_interface_impl.h:168
void set_prep_elem_fct(ReferenceObjectID id, TAssFunc func)
current Geometric Object
Definition: elem_disc_interface_impl.h:72
void remove_prep_elem_fct(ReferenceObjectID id)
current Geometric Object
Definition: elem_disc_interface_impl.h:77
void remove_add_def_A_elem_fct(ReferenceObjectID id)
current Geometric Object
Definition: elem_disc_interface_impl.h:137
void set_fsh_timestep_elem_fct(ReferenceObjectID id, TAssFunc func)
current Geometric Object
Definition: elem_disc_interface_impl.h:192
void set_compute_err_est_A_elem(ReferenceObjectID id, TAssFunc func)
Definition: elem_disc_interface_impl.h:228
void set_prep_err_est_elem(ReferenceObjectID id, TAssFunc func)
Definition: elem_disc_interface_impl.h:216
void remove_compute_err_est_A_elem(ReferenceObjectID id)
Definition: elem_disc_interface_impl.h:233
void set_fsh_err_est_elem_loop(ReferenceObjectID id, TAssFunc func)
Definition: elem_disc_interface_impl.h:264
void set_prep_err_est_elem_loop(ReferenceObjectID id, TAssFunc func)
Definition: elem_disc_interface_impl.h:204
void remove_compute_err_est_M_elem(ReferenceObjectID id)
Definition: elem_disc_interface_impl.h:245
void remove_prep_err_est_elem_loop(ReferenceObjectID id)
Definition: elem_disc_interface_impl.h:209
void set_compute_err_est_rhs_elem(ReferenceObjectID id, TAssFunc func)
Definition: elem_disc_interface_impl.h:252
void remove_compute_err_est_rhs_elem(ReferenceObjectID id)
Definition: elem_disc_interface_impl.h:257
void remove_fsh_err_est_elem_loop(ReferenceObjectID id)
Definition: elem_disc_interface_impl.h:269
void set_compute_err_est_M_elem(ReferenceObjectID id, TAssFunc func)
Definition: elem_disc_interface_impl.h:240
void remove_prep_err_est_elem(ReferenceObjectID id)
Definition: elem_disc_interface_impl.h:221
the ug namespace
ReferenceObjectID
these ids are used to identify the shape of a geometric object.
Definition: grid_base_objects.h:74
function func(x, y, z, t, si)