ug4
user_data_impl.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2011-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 #ifndef __H__UG__LIB_DISC__SPATIAL_DISC__USER_DATA__USER_DATA_IMPL__
34 #define __H__UG__LIB_DISC__SPATIAL_DISC__USER_DATA__USER_DATA_IMPL__
35 
36 #include "user_data.h"
38 
39 namespace ug{
40 
42 // ICplUserData
44 
45 template <int dim>
47 : m_locPosDim(-1), m_timePoint(0), m_defaultTimePoint(-1), m_si(-1)
48 {
49  m_vNumIP.clear();
50  m_vMayChange.clear();
51  m_locPosDim = -1;
52  m_pvLocIP1d.clear(); m_pvLocIP2d.clear(); m_pvLocIP3d.clear();
53  m_vTime.clear(); m_vTime.push_back(0.0);
54 }
55 
56 template <int dim>
58 {
59  local_ip_series_to_be_cleared();
60  m_vNumIP.clear();
61  m_vMayChange.clear();
62  m_locPosDim = -1;
63  m_pvLocIP1d.clear(); m_pvLocIP2d.clear(); m_pvLocIP3d.clear();
64  m_timePoint = 0;
65  m_vTime.clear(); m_vTime.push_back(0.0);
66  m_si = -1;
67 }
68 
69 template <int dim>
70 template <int ldim>
72  const size_t numIP,
73  const int timePointSpec,
74  bool bMayChange)
75 {
76 // check, that dimension is ok.
77  if(m_locPosDim == -1) m_locPosDim = ldim;
78  else if(m_locPosDim != ldim)
79  UG_THROW("Local IP dimension conflict");
80 
81 // get the "right" time point specification
82  int theTimePoint = (m_defaultTimePoint >= 0)? m_defaultTimePoint : timePointSpec;
83 
84 // get local positions
85  std::vector<const MathVector<ldim>*>& vvIP = get_local_ips(Int2Type<ldim>());
86 
87 // search for ips
88 // we only identify ip series if the local ip positions will not change
89  if(!bMayChange && numIP != 0)
90  for(size_t s = 0; s < vvIP.size(); ++s)
91  {
92  // return series number iff exists and local ips remain constant
93  if(!m_vMayChange[s])
94  if(vvIP[s] == vPos && m_vNumIP[s] == numIP && m_vTimePoint[s] == theTimePoint)
95  return s;
96  }
97 
98 // if series not yet registered, add it
99  vvIP.push_back(vPos);
100  m_vNumIP.push_back(numIP);
101  m_vTimePoint.push_back(theTimePoint);
102  m_vMayChange.push_back(bMayChange);
103 
104 // invoke callback:
105 // This callback is called, whenever the local_ip_series have changed. It
106 // allows derived classes to react on this changes. For example, the data
107 // linker must himself request local_ip_series from the data inputs of
108 // the linker. In addition value fields and derivative fields must be adjusted
109 // in UserData<TData, dim> etc.
110  local_ip_series_added(m_vNumIP.size() - 1);
111 
112 // return new series id
113  return m_vNumIP.size() - 1;
114 }
115 
116 
117 template <int dim>
118 template <int ldim>
119 void ICplUserData<dim>::set_local_ips(const size_t seriesID,
120  const MathVector<ldim>* vPos,
121  const size_t numIP)
122 {
123 // check series id
124  if(seriesID >= num_series())
125  UG_THROW("Trying to set new ips for invalid seriesID "<<seriesID);
126 
127 // check that series is changeable
128  if(!m_vMayChange[seriesID])
129  UG_THROW("Local IP is not changable, but trying to set new ips.");
130 
131 // check, that dimension is ok.
132  if(m_locPosDim == -1) m_locPosDim = ldim;
133  else if(m_locPosDim != ldim)
134  UG_THROW("Local IP dimension conflict");
135 
136 // get local positions
137  std::vector<const MathVector<ldim>*>& vvIP = get_local_ips(Int2Type<ldim>());
138 
139 // check if still at same position and with same numIP. In that case the
140 // positions have not changed. We have nothing to do
141  if(vvIP[seriesID] == vPos && m_vNumIP[seriesID] == numIP) return;
142 
143 // remember new positions and numIP
144  vvIP[seriesID] = vPos;
145  m_vNumIP[seriesID] = numIP;
146 
147 // invoke callback:
148 // This callback is called, whenever the local_ip_series have changed. It
149 // allows derived classes to react on this changes. For example, the data
150 // linker must himself request local_ip_series from the data inputs of
151 // the linker. In addition value fields and derivative fields must be adjusted
152 // in UserData<TData, dim> etc.
153  local_ips_changed(seriesID, numIP);
154 }
155 
156 template <int dim>
157 void ICplUserData<dim>::set_time_point(const size_t seriesID,
158  const int timePointSpec)
159 {
160 // check series id
161  if(seriesID >= num_series())
162  UG_THROW("Trying to set new ips for invalid seriesID "<<seriesID);
163 
164 // check that series is changeable
165  if(!m_vMayChange[seriesID])
166  UG_THROW("Time point specification is not changable, but trying to set a new one.");
167 
168 // set the new time point specification (if it is not prescribed by the object)
169  m_vTimePoint[seriesID] = (m_defaultTimePoint >= 0)? m_defaultTimePoint : timePointSpec;
170 
171 //TODO: Should we call the callback here? (No data sizes are changed!)
172 }
173 
174 template <int dim>
175 template <int ldim>
177 {
178 // check, that dimension is ok.
179  if(m_locPosDim != ldim) UG_THROW("Local IP dimension conflict");
180 
181  UG_ASSERT(s < num_series(), "Wrong series id");
182 
183 // NOTE: local ips may be NULL, if no ip position given, i.e. num_ip(s) == 0
184  return get_local_ips(Int2Type<ldim>())[s];
185 }
186 
187 template <int dim>
188 template <int ldim>
189 const MathVector<ldim>& ICplUserData<dim>::local_ip(size_t s, size_t ip) const
190 {
191 // check, that dimension is ok.
192  if(m_locPosDim != ldim) UG_THROW("Local IP dimension conflict");
193 
194  UG_ASSERT(s < num_series(), "Wrong series id");
195  UG_ASSERT(ip < num_ip(s), "Invalid index.");
196 
197  return get_local_ips(Int2Type<ldim>())[s][ip];
198 }
199 
200 template <int dim>
202 {
203  UG_ASSERT(s < num_series(), "Wrong series id");
204 
205  return m_vTimePoint[s];
206 }
207 
208 template <int dim>
209 size_t ICplUserData<dim>::time_point(size_t s) const
210 {
211  UG_ASSERT(s < num_series(), "Wrong series id:" << s << ">=" << num_series());
212 
213 // size_t time_spec;
214 // if ((time_spec = m_vTimePoint[s]) >= 0)
215  if (m_vTimePoint[s] >= 0)
216  return m_vTimePoint[s];
217  return m_timePoint;
218 }
219 
220 template <int dim>
222 {
223  UG_ASSERT(s < num_series(), "Wrong series id:" << s << ">=" << num_series());
224 
225  int time_spec;
226  if ((time_spec = m_vTimePoint[s]) >= 0)
227  return ((size_t) time_spec) == m_timePoint;
228  return true;
229 }
230 
231 template <int dim>
232 void ICplUserData<dim>::set_global_ips(size_t s, const MathVector<dim>* vPos, size_t numIP)
233 {
234  UG_ASSERT(s < num_series(), "Wrong series id: "<<s<<" (numSeries: "<<num_series()<<")");
235 
236 // check number of ips (must match local ip number)
237  if(numIP != num_ip(s))
238  UG_THROW("UserData::set_global_ips: Num Local IPs is " << num_ip(s)
239  << ", but trying to set Num Global IPs: " << numIP <<
240  " for series "<< s);
241 
242 // remember global positions
243  m_vvGlobPos[s] = vPos;
244 
245 // invoke callback:
246 // this callback is called every time the global position changes. It gives
247 // derived classes the possibility to react on this fact. E.g. the data
248 // linker must forward the global positions to its own imports.
249  global_ips_changed(s, vPos, numIP);
250 }
251 
252 template <int dim>
253 inline void ICplUserData<dim>::check_s(size_t s) const
254 {
255  UG_ASSERT(s < num_series(), "Wrong series id");
256  UG_ASSERT(s < m_vvGlobPos.size(), "Invalid index.");
257 }
258 
259 template <int dim>
260 inline void ICplUserData<dim>::check_s_ip(size_t s, size_t ip) const
261 {
262  check_s(s);
263  UG_ASSERT(ip < num_ip(s), "Invalid index.");
264  UG_ASSERT(m_vvGlobPos[s] != NULL, "Global IP not set.");
265 }
266 
268 // UserData
270 
271 template <typename TData, int dim, typename TRet>
274 {
275  typedef std::pair<DataImport<TData,dim>*, CallbackFct> Pair;
276  // m_vCallback.push_back(Pair(obj,func));
277  m_vCallback.push_back(Pair(obj, boost::bind(func, obj)));
278 }
279 
280 template <typename TData, int dim, typename TRet>
283 {
284  typedef typename std::vector<std::pair<DataImport<TData,dim>*, CallbackFct> > VecType;
285  typedef typename VecType::iterator iterator;
286  iterator iter = m_vCallback.begin();
287  while(iter != m_vCallback.end())
288  {
289  if((*iter).first == obj) iter = m_vCallback.erase(iter);
290  else ++iter;
291  }
292 }
293 
294 template <typename TData, int dim, typename TRet>
296 call_storage_callback() const
297 {
298  typedef typename std::vector<std::pair<DataImport<TData,dim>*, CallbackFct> > VecType;
299  typedef typename VecType::const_iterator iterator;
300  for(iterator iter = m_vCallback.begin(); iter != m_vCallback.end(); ++iter)
301  {
302  // (((*iter).first)->*((*iter).second))();
303  ((*iter).second)();
304  }
305 }
306 
307 template <typename TData, int dim, typename TRet>
308 inline void CplUserData<TData,dim,TRet>::check_series(size_t s) const
309 {
310  UG_ASSERT(s < num_series(), "Wrong series id"<<s);
311  UG_ASSERT(s < m_vvValue.size(), "Invalid index "<<s);
312 }
313 
314 template <typename TData, int dim, typename TRet>
315 inline void CplUserData<TData,dim,TRet>::check_series_ip(size_t s, size_t ip) const
316 {
317  check_series(s);
318  UG_ASSERT(ip < num_ip(s), "Invalid index "<<ip);
319  UG_ASSERT(ip < m_vvValue[s].size(), "Invalid index "<<ip);
320 }
321 
322 template <typename TData, int dim, typename TRet>
324 {
325  const size_t s = seriesID;
326 
327 // check, that only increasing the data, this is important to guarantee,
328 // that the allocated memory pointer remain valid. They are used outside of
329 // the class as well to allow fast access to the data.
330  if(s < m_vvValue.size())
331  UG_THROW("Decrease is not implemented. Series: "<<s<<
332  ", currNumSeries: "<<m_vvValue.size());
333 
334 // increase number of series if needed
335  m_vvValue.resize(s+1);
336  m_vvBoolFlag.resize(s+1);
337 
338 // allocate new storage
339  m_vvValue[s].resize(num_ip(s));
340  m_vvBoolFlag[s].resize(num_ip(s), true);
341  value_storage_changed(s);
342  call_storage_callback();
343 
344 // call base class callback
345  base_type::local_ip_series_added(seriesID);
346 }
347 
348 template <typename TData, int dim, typename TRet>
350 {
351 // free the memory
352 // clear all series
353  m_vvValue.clear();
354  m_vvBoolFlag.clear();
355 
356 // call base class callback (if implementation given)
357 // base_type::local_ip_series_to_be_cleared();
358 }
359 
360 template <typename TData, int dim, typename TRet>
361 void CplUserData<TData,dim,TRet>::local_ips_changed(const size_t seriesID, const size_t newNumIP)
362 {
363 // resize only when more data is needed than actually allocated
364  if(newNumIP >= m_vvValue[seriesID].size())
365  {
366  // resize
367  m_vvValue[seriesID].resize(newNumIP);
368  m_vvBoolFlag[seriesID].resize(newNumIP, true);
369 
370  // invoke callback
371  value_storage_changed(seriesID);
372  call_storage_callback();
373  }
374 
375 // call base class callback (if implementation given)
376 // base_type::local_ips_changed(seriesID);
377 }
378 
380 // DependentUserData
382 
383 template <typename TData, int dim>
385 {
386  this->m_fctGrp.set_function_pattern(fctPatt);
387  extract_fct_grp();
388 }
389 
390 template <typename TData, int dim>
392 {
393  set_functions(std::string(symbFct));
394 }
395 
396 template <typename TData, int dim>
397 void DependentUserData<TData,dim>::set_functions(const std::string& symbFct)
398 {
399  set_functions(TokenizeTrimString(symbFct));
400 }
401 
402 template <typename TData, int dim>
403 void DependentUserData<TData,dim>::set_functions(const std::vector<std::string>& symbFct)
404 {
405  m_SymbFct = symbFct;
406  extract_fct_grp();
407 }
408 
409 template <typename TData, int dim>
411 {
412  // if associated infos missing return
413  ConstSmartPtr<FunctionPattern> spFctPatt = this->m_fctGrp.function_pattern();
414  if(spFctPatt.invalid()) return;
415 
416  // if no function passed, clear functions
417  if(m_SymbFct.size() == 1 && m_SymbFct[0].empty()) m_SymbFct.clear();
418 
419  // if functions passed with separator, but not all tokens filled, throw error
420  for(size_t i = 0; i < m_SymbFct.size(); ++i)
421  {
422  if(m_SymbFct.empty())
423  UG_THROW("Error while setting functions in a DependentUserData: passed "
424  "function string lacks a "
425  "function specification at position "<<i<<"(of "
426  <<m_SymbFct.size()-1<<")");
427  }
428 
429  if(m_SymbFct.empty()){
430  this->m_fctGrp.clear();
431  return;
432  }
433 
434  // create function group of this elem disc
435  try{
436  this->m_fctGrp.clear();
437  this->m_fctGrp.add(m_SymbFct);
438  }UG_CATCH_THROW("DependentUserData: Cannot find some symbolic function "
439  "name.");
440 
441  // create a mapping between all functions and the function group of this
442  // element disc.
443  try{
444  CreateFunctionIndexMapping(this->m_map, this->m_fctGrp, spFctPatt);
445  }UG_CATCH_THROW("DependentUserData: Cannot create Function Index Mapping.");
446 
447  this->check_setup();
448 }
449 
450 template <typename TData, int dim>
452 {
453 // check size
454  const FunctionIndexMapping& map = this->map();
455  UG_ASSERT(map.num_fct() == this->num_fct(), "Number function mismatch.");
456 
457 // cache numFct and their numDoFs
458  m_vvNumDoFPerFct.resize(map.num_fct());
459  for(size_t fct = 0; fct < m_vvNumDoFPerFct.size(); ++fct)
460  m_vvNumDoFPerFct[fct] = ind.num_dof(map[fct]);
461 
462  resize_deriv_array();
463 }
464 
465 template <typename TData, int dim>
467 {
468 // resize num fct
469  for(size_t s = 0; s < m_vvvvDeriv.size(); ++s)
470  resize_deriv_array(s);
471 }
472 
473 template <typename TData, int dim>
475 {
476 // resize ips
477  m_vvvvDeriv[s].resize(num_ip(s));
478 
479  for(size_t ip = 0; ip < m_vvvvDeriv[s].size(); ++ip)
480  {
481  // resize num fct
482  m_vvvvDeriv[s][ip].resize(m_vvNumDoFPerFct.size());
483 
484  // resize dofs
485  for(size_t fct = 0; fct < m_vvNumDoFPerFct.size(); ++fct)
486  m_vvvvDeriv[s][ip][fct].resize(m_vvNumDoFPerFct[fct]);
487  }
488 }
489 
490 template <typename TData, int dim>
491 void DependentUserData<TData,dim>::set_zero(std::vector<std::vector<TData> > vvvDeriv[], const size_t nip)
492 {
493  for(size_t ip = 0; ip < nip; ++ip)
494  for(size_t fct = 0; fct < vvvDeriv[ip].size(); ++fct)
495  for(size_t sh = 0; sh < vvvDeriv[ip][fct].size(); ++sh)
496  {
497  vvvDeriv[ip][fct][sh] = 0.0;
498  }
499 }
500 
501 template <typename TData, int dim>
502 inline void DependentUserData<TData,dim>::check_s_ip(size_t s, size_t ip) const
503 {
504  UG_ASSERT(s < this->num_series(), "Wrong series id"<<s);
505  UG_ASSERT(s < m_vvvvDeriv.size(), "Invalid index "<<s);
506  UG_ASSERT(ip < this->num_ip(s), "Invalid index "<<ip);
507  UG_ASSERT(ip < m_vvvvDeriv[s].size(), "Invalid index "<<ip);
508 }
509 
510 template <typename TData, int dim>
511 inline void DependentUserData<TData,dim>::check_s_ip_fct(size_t s, size_t ip, size_t fct) const
512 {
513  check_s_ip(s,ip);
514  UG_ASSERT(fct < m_vvvvDeriv[s][ip].size(), "Invalid index.");
515 }
516 
517 template <typename TData, int dim>
518 inline void DependentUserData<TData,dim>::check_s_ip_fct_dof(size_t s, size_t ip, size_t fct, size_t dof) const
519 {
520  check_s_ip_fct(s,ip,fct);
521  UG_ASSERT(dof < m_vvvvDeriv[s][ip][fct].size(), "Invalid index.");
522 }
523 
524 template <typename TData, int dim>
526 {
527 // adjust data arrays
528  m_vvvvDeriv.resize(seriesID+1);
529 
530 // forward change signal to base class
531  base_type::local_ip_series_added(seriesID);
532 }
533 
534 template <typename TData, int dim>
536 {
537 // adjust data arrays
538  m_vvvvDeriv.clear();
539 
540 // forward change signal to base class
541  base_type::local_ip_series_to_be_cleared();
542 }
543 
544 template <typename TData, int dim>
545 void DependentUserData<TData,dim>::local_ips_changed(const size_t seriesID, const size_t newNumIP)
546 {
547  UG_ASSERT(seriesID < m_vvvvDeriv.size(), "wrong series id.");
548 
549 // resize only when more data is needed than actually allocated
550  if(newNumIP >= m_vvvvDeriv[seriesID].size())
551  resize_deriv_array(seriesID);
552 
553 // call base class callback (if implementation given)
554  base_type::local_ips_changed(seriesID, newNumIP);
555 }
556 
557 } // end namespace ug
558 
559 #endif /* __H__UG__LIB_DISC__SPATIAL_DISC__USER_DATA__USER_DATA_IMPL__ */
parameterString s
Definition: smart_pointer.h:296
bool invalid() const
returns true if the pointer is invalid, false if not.
Definition: smart_pointer.h:420
void check_series(size_t s) const
checks in debug mode the correct index
Definition: user_data_impl.h:308
void register_storage_callback(DataImport< TData, dim > *obj, void(DataImport< TData, dim >::*func)())
register external callback, invoked when data storage changed
Definition: user_data_impl.h:273
void call_storage_callback() const
calls are registered external storage callbacks
Definition: user_data_impl.h:296
void check_series_ip(size_t s, size_t ip) const
checks in debug mode the correct index
Definition: user_data_impl.h:315
virtual void local_ip_series_added(const size_t seriesID)
resizes the data field, when local ip changed signaled
Definition: user_data_impl.h:323
virtual void local_ip_series_to_be_cleared()
free the data field memory and set series to zero
Definition: user_data_impl.h:349
void unregister_storage_callback(DataImport< TData, dim > *obj)
register all callbacks registered by class
Definition: user_data_impl.h:282
boost::function< void()> CallbackFct
registered callbacks
Definition: user_data.h:581
virtual void local_ips_changed(const size_t seriesID, const size_t newNumIP)
implement callback, called when local IPs changed
Definition: user_data_impl.h:361
Data import.
Definition: data_import.h:180
void resize_deriv_array()
resizes the derivative arrays for current number of ips.
Definition: user_data_impl.h:466
virtual void local_ip_series_to_be_cleared()
implement callback, invoked when local ips are cleared
Definition: user_data_impl.h:535
void extract_fct_grp()
extracts the function group
Definition: user_data_impl.h:410
virtual void local_ip_series_added(const size_t seriesID)
resizes the derivative field when local ip change is signaled
Definition: user_data_impl.h:525
void check_s_ip_fct(size_t s, size_t ip, size_t fct) const
checks in debug mode the correct usage of indices
Definition: user_data_impl.h:511
static void set_zero(std::vector< std::vector< TData > > vvvDeriv[], const size_t nip)
sets all derivative values to zero
Definition: user_data_impl.h:491
virtual void set_function_pattern(ConstSmartPtr< FunctionPattern > fctPatt)
sets the associated function pattern
Definition: user_data_impl.h:384
virtual void update_dof_sizes(const LocalIndices &ind)
resize lin defect arrays
Definition: user_data_impl.h:451
void check_s_ip_fct_dof(size_t s, size_t ip, size_t fct, size_t dof) const
checks in debug mode the correct usage of indices
Definition: user_data_impl.h:518
void check_s_ip(size_t s, size_t ip) const
checks in debug mode the correct usage of indices
Definition: user_data_impl.h:502
virtual void local_ips_changed(const size_t seriesID, const size_t newNumIP)
implement callback, called when local IPs changed
Definition: user_data_impl.h:545
void set_functions(const char *symbFct)
Definition: user_data_impl.h:391
describes a mapping between two local index sets
Definition: function_group.h:186
size_t num_fct() const
returns the number of indices that are mapped
Definition: function_group.h:195
std::vector< const MathVector< 2 > * > m_pvLocIP2d
Definition: user_data.h:460
bool at_current_time(size_t s) const
returns true iff the time point specification is equal to the current one, or not specified
Definition: user_data_impl.h:221
ICplUserData()
default constructor
Definition: user_data_impl.h:46
void check_s(size_t s) const
checks in debug mode the correct usage of indices
Definition: user_data_impl.h:253
const MathVector< ldim > * local_ips(size_t s) const
returns local ips
Definition: user_data_impl.h:176
void clear()
clear all data
Definition: user_data_impl.h:57
void set_local_ips(const size_t seriesId, const MathVector< ldim > *vPos, const size_t numIP)
sets new local ip positions for a local ip series
Definition: user_data_impl.h:119
void set_time_point(size_t timePoint)
sets the current time point
Definition: user_data.h:279
size_t time_point()
returns the current time point
Definition: user_data.h:282
std::vector< const MathVector< 1 > * > m_pvLocIP1d
local ips of dimension 1d-3d
Definition: user_data.h:459
std::vector< const MathVector< 3 > * > m_pvLocIP3d
Definition: user_data.h:461
void check_s_ip(size_t s, size_t ip) const
checks in debug mode the correct usage of indices
Definition: user_data_impl.h:260
std::vector< size_t > m_vNumIP
number of evaluation points (-1 indicates no ips set)
Definition: user_data.h:453
std::vector< number > m_vTime
time for evaluation
Definition: user_data.h:470
size_t register_local_ip_series(const MathVector< ldim > *vPos, const size_t numIP, const int timePointSpec, bool bMayChange=true)
set local positions, returns series id
Definition: user_data_impl.h:71
int m_locPosDim
dimension of local position (-1 indicates no dim set)
Definition: user_data.h:456
void set_global_ips(size_t s, const MathVector< dim > *vPos, size_t numIP)
set global positions
Definition: user_data_impl.h:232
int time_point_specification(size_t s) const
returns the time point specification (note: it may be -1, i.e. not specified)
Definition: user_data_impl.h:201
const MathVector< ldim > & local_ip(size_t s, size_t ip) const
returns local ip
Definition: user_data_impl.h:189
std::vector< bool > m_vMayChange
flags if local ips may change
Definition: user_data.h:450
Definition: local_algebra.h:50
size_t num_dof(size_t fct) const
number of dofs for accessible function
Definition: local_algebra.h:117
a mathematical Vector with N entries.
Definition: math_vector.h:97
#define UG_ASSERT(expr, msg)
Definition: assert.h:70
#define UG_CATCH_THROW(msg)
Definition: error.h:64
#define UG_THROW(msg)
Definition: error.h:57
the ug namespace
void TokenizeTrimString(const string &str, vector< string > &vToken, const char delimiter)
Definition: string_util.cpp:83
void CreateFunctionIndexMapping(FunctionIndexMapping &map, const FunctionGroup &grpFromSmall, const FunctionGroup &grpToLarge)
Definition: groups_util.cpp:44
function func(x, y, z, t, si)
bool resize(size_t newRows, size_t newCols)
Definition: metaprogramming_util.h:42