ug4
elem_disc_interface.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 #ifndef __H__UG__LIB_DISC__SPATIAL_DISC__ELEM_DISC__ELEM_DISC_INTERFACE__
34 #define __H__UG__LIB_DISC__SPATIAL_DISC__ELEM_DISC__ELEM_DISC_INTERFACE__
35 
36 // extern headers
37 #include <vector>
38 #include <string>
39 
40 // intern headers
47 #include "common/util/provider.h"
48 #include "lib_disc/domain_util.h"
49 #include "lib_disc/domain_traits.h"
50 #include "elem_modifier.h"
54 
55 namespace ug{
56 
59 {
60  EDT_NONE = 0,
61  EDT_ELEM = 1 << 0,
62  EDT_SIDE = 1 << 1,
63  EDT_BND = 1 << 2,
65 };
66 
67 
70 {
71  virtual ~VectorProxyBase() {};
72  virtual number evaluate(const DoFIndex& di) const = 0;
73 };
74 
75 template <typename TVector>
77 {
78  VectorProxy(const TVector& v) : m_v(v) {}
79 
80  virtual number evaluate(const DoFIndex& di) const {return DoFRef(m_v, di);}
81 
82  const TVector& m_v;
83 
84 };
85 
95 /*
96 template <typename TDomain>
97 class IElemDiscBaseData
98 {
99 public:
101  typedef TDomain domain_type;
102 
104  static const int dim = TDomain::dim;
105 };
106 */
108 template <typename TLeaf, typename TDomain>
110 {
111 public:
114 
117 
119  typedef TLeaf leaf_type;
120 
121  TLeaf& asLeaf()
122  { return static_cast<TLeaf&>(*this); }
123 
125  typedef TDomain domain_type;
126 
128  static const int dim = TDomain::dim;
129 
131  // assembling functions
133 public:
135  virtual void prep_assemble_loop() {}
136 
138  virtual void post_assemble_loop() {}
139 
141  virtual void prep_timestep(number future_time, number time, VectorProxyBase* u);
142 
144  virtual void prep_timestep_elem(const number time, const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
145 
147  virtual void prep_elem_loop(const ReferenceObjectID roid, const int si);
148 
150  virtual void prep_elem(const LocalVector& u, GridObject* elem, const ReferenceObjectID roid, const MathVector<dim> vCornerCoords[]);
151 
153  virtual void fsh_elem_loop();
154 
156  virtual void fsh_timestep(number time, VectorProxyBase* u);
157 
159  virtual void fsh_timestep_elem(const number time, const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
160 
162  virtual void add_jac_A_elem(LocalMatrix& J, const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
163 
165  virtual void add_jac_M_elem(LocalMatrix& J, const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
166 
168  virtual void add_def_A_elem(LocalVector& d, const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
169 
171  virtual void add_def_A_expl_elem(LocalVector& d, const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
172 
174  virtual void add_def_M_elem(LocalVector& d, const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
175 
177  virtual void add_rhs_elem(LocalVector& rhs, GridObject* elem, const MathVector<dim> vCornerCoords[]);
178 
179 
182  void do_prep_timestep(number future_time, const number time, VectorProxyBase* u, size_t algebra_id);
183  void do_prep_timestep_elem(const number time, LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
184  void do_prep_elem_loop(const ReferenceObjectID roid, const int si);
185  void do_prep_elem(LocalVector& u, GridObject* elem, const ReferenceObjectID roid, const MathVector<dim> vCornerCoords[]);
186  void do_fsh_elem_loop();
187  void do_fsh_timestep(const number time, VectorProxyBase* u, size_t algebra_id);
188  void do_fsh_timestep_elem(const number time, LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
189  void do_add_jac_A_elem(LocalMatrix& J, LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
190  void do_add_jac_M_elem(LocalMatrix& J, LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
191  void do_add_def_A_elem(LocalVector& d, LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
192  void do_add_def_A_expl_elem(LocalVector& d, LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
193  void do_add_def_M_elem(LocalVector& d, LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
194  void do_add_rhs_elem(LocalVector& rhs, GridObject* elem, const MathVector<dim> vCornerCoords[]);
195 
196 
197 
198 
199 protected:
200  // register the functions
201  template <typename TAssFunc> void set_prep_timestep_fct(size_t algebra_id, TAssFunc func);
202  template <typename TAssFunc> void set_prep_timestep_elem_fct(ReferenceObjectID id, TAssFunc func);
203  template <typename TAssFunc> void set_fsh_timestep_fct(size_t algebra_id, TAssFunc func);
204  template <typename TAssFunc> void set_fsh_timestep_elem_fct(ReferenceObjectID id, TAssFunc func);
205 
206  template <typename TAssFunc> void set_prep_elem_loop_fct(ReferenceObjectID id, TAssFunc func);
207  template <typename TAssFunc> void set_prep_elem_fct(ReferenceObjectID id, TAssFunc func);
208  template <typename TAssFunc> void set_fsh_elem_loop_fct(ReferenceObjectID id, TAssFunc func);
209 
210  template <typename TAssFunc> void set_add_jac_A_elem_fct(ReferenceObjectID id, TAssFunc func);
211  template <typename TAssFunc> void set_add_jac_M_elem_fct(ReferenceObjectID id, TAssFunc func);
212  template <typename TAssFunc> void set_add_def_A_elem_fct(ReferenceObjectID id, TAssFunc func);
213  template <typename TAssFunc> void set_add_def_A_expl_elem_fct(ReferenceObjectID id, TAssFunc func);
214  template <typename TAssFunc> void set_add_def_M_elem_fct(ReferenceObjectID id, TAssFunc func);
215  template <typename TAssFunc> void set_add_rhs_elem_fct(ReferenceObjectID id, TAssFunc func);
216 
217 
218 
219  // unregister functions
220  void remove_prep_timestep_fct(size_t algebra_id);
222  void remove_fsh_timestep_fct(size_t algebra_id);
224 
228 
235 
236 protected:
238  void set_default_add_fct();
239 
242 
244  void clear_add_fct();
245 
246 private:
247 // abbreviation for own type
249 
250 // types of timestep function pointers
252  typedef void (T::*PrepareTimestepElemFct)(number, const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
254  typedef void (T::*FinishTimestepElemFct)(number, const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
255 
256 // types of loop function pointers
257  typedef void (T::*PrepareElemLoopFct)(ReferenceObjectID roid, int si);
258  typedef void (T::*PrepareElemFct)(const LocalVector& u, GridObject* elem, const ReferenceObjectID roid, const MathVector<dim> vCornerCoords[]);
259  typedef void (T::*FinishElemLoopFct)();
260 
261 // types of Jacobian assemble functions
262  typedef void (T::*ElemJAFct)(LocalMatrix& J, const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
263  typedef void (T::*ElemJMFct)(LocalMatrix& J, const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
264 
265 // types of Defect assemble functions
266  typedef void (T::*ElemdAFct)(LocalVector& d, const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
267  typedef void (T::*ElemdMFct)(LocalVector& d, const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
268 
269 // types of right hand side assemble functions
270  typedef void (T::*ElemRHSFct)(LocalVector& rhs, GridObject* elem, const MathVector<dim> vCornerCoords[]);
271 
272 
273 private:
274 // timestep function pointers
279 
280 // loop function pointers
284 
285 // Jacobian function pointers
288 
289 // Defect function pointers
293 
294 // Rhs function pointers
296 
297 public:
299 
305  void set_roid(ReferenceObjectID id, int discType);
306 
308  void check_roid(ReferenceObjectID roid, int discType);
309 
310 protected:
313 };
314 
315 
316 
317 
319 template <typename TLeaf, typename TDomain>
321 {
322 public:
325  { set_default_add_fct(); }
326 
329 
331  typedef TLeaf leaf_type;
332 
333  TLeaf& asLeaf()
334  { return static_cast<TLeaf&>(*this); }
335 
337  typedef TDomain domain_type;
338 
340  static const int dim = TDomain::dim;
341 
342  void do_prep_err_est_elem_loop(const ReferenceObjectID roid, const int si);
343  void do_prep_err_est_elem(LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
344  void do_compute_err_est_A_elem(LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[], const number& scale);
345  void do_compute_err_est_M_elem(LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[], const number& scale);
346  void do_compute_err_est_rhs_elem(GridObject* elem, const MathVector<dim> vCornerCoords[], const number& scale);
348 
349 public:
351  virtual void prep_err_est_elem_loop(const ReferenceObjectID roid, const int si);
352 
354  virtual void prep_err_est_elem(const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
355 
357  virtual void compute_err_est_A_elem(const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[], const number& scale);
358 
360  virtual void compute_err_est_M_elem(const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[], const number& scale);
361 
363  virtual void compute_err_est_rhs_elem(GridObject* elem, const MathVector<dim> vCornerCoords[], const number& scale);
364 
366  virtual void fsh_err_est_elem_loop();
367 
368 protected:
369  template <typename TAssFunc> void set_prep_err_est_elem_loop(ReferenceObjectID id, TAssFunc func);
370  template <typename TAssFunc> void set_prep_err_est_elem(ReferenceObjectID id, TAssFunc func);
371  template <typename TAssFunc> void set_compute_err_est_A_elem(ReferenceObjectID id, TAssFunc func);
372  template <typename TAssFunc> void set_compute_err_est_M_elem(ReferenceObjectID id, TAssFunc func);
373  template <typename TAssFunc> void set_compute_err_est_rhs_elem(ReferenceObjectID id, TAssFunc func);
374  template <typename TAssFunc> void set_fsh_err_est_elem_loop(ReferenceObjectID id, TAssFunc func);
375 
382 
385 
387  void clear_add_fct();
388 
390  void set_default_add_fct();
391 
392 
393 
394 private:
395  // abbreviation for own type
397 
398  // types of the error estimator assembler
399  typedef void (T::*PrepareErrEstElemLoopFct)(ReferenceObjectID roid, int si);
400  typedef void (T::*PrepareErrEstElemFct)(const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[]);
401  typedef void (T::*ElemComputeErrEstAFct)(const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[], const number&);
402  typedef void (T::*ElemComputeErrEstMFct)(const LocalVector& u, GridObject* elem, const MathVector<dim> vCornerCoords[], const number&);
403  typedef void (T::*ElemComputeErrEstRhsFct)(GridObject* elem, const MathVector<dim> vCornerCoords[], const number&);
404  typedef void (T::*FinishErrEstElemLoopFct)();
405 
406  // Error estimator functions
413 
414 
415  // //////////////////////////
416  // Error estimator
417  // //////////////////////////
418 public:
420 
429 
431  bool err_est_enabled() const {return m_bDoErrEst;}
432 
435 
436 private:
439 
440 protected:
443 
444 public:
446 
452  void set_roid(ReferenceObjectID id, int discType);
453 
455  void check_roid(ReferenceObjectID roid, int discType);
456 
457 protected:
460 };
461 
463 
470 template <typename TDomain>
472 
473 {
474  public:
476  typedef TDomain domain_type;
477 
479  typedef typename TDomain::position_type position_type;
480 
482  static const int dim = TDomain::dim;
483 
484  public:
486  IElemDiscBase(const char* functions = "", const char* subsets = "");
487 
489  IElemDiscBase(const std::vector<std::string>& vFct, const std::vector<std::string>& vSubset);
490 
492  virtual ~IElemDiscBase(){}
493 
494  public:
496 
500 
503 
506 
509 
511  ConstSmartPtr<TDomain> domain() const{return m_spApproxSpace->domain();}
512 
514  typename TDomain::subset_handler_type& subset_handler()
515  {
516  UG_ASSERT(m_spApproxSpace.valid(), "ApproxSpace not set.");
517  return *m_spApproxSpace->domain()->subset_handler();
518  }
519 
521  const typename TDomain::subset_handler_type& subset_handler() const
522  {
523  UG_ASSERT(m_spApproxSpace.valid(), "ApproxSpace not set.");
524  return *m_spApproxSpace->domain()->subset_handler();
525  }
526 /*
527  void add_elem_modifier(SmartPtr<IElemDiscModifier<TDomain> > elemModifier )
528  {
529  m_spElemModifier.push_back(elemModifier);
530  elemModifier->set_elem_disc(this);
531  }
532  std::vector<SmartPtr<IElemDiscModifier<TDomain> > >& get_elem_modifier(){ return m_spElemModifier;}
533  */
534 
535  protected:
537  virtual void approximation_space_changed() {}
538 
541 
543  // std::vector<SmartPtr<IElemDiscModifier<TDomain> > > m_spElemModifier;
544 
546  // Functions and Subsets
548  public:
550  void set_functions(const std::string& functions);
551 
553  void set_functions(const std::vector<std::string>& functions);
554 
556  void set_subsets(const std::string& subsets);
557 
559  void set_subsets(const std::vector<std::string>& subsets);
560 
562  size_t num_fct() const {return m_vFct.size();}
563 
565  const std::vector<std::string>& symb_fcts() const {return m_vFct;}
566 
568  size_t num_subsets() const {return m_vSubset.size();}
569 
571  const std::vector<std::string>& symb_subsets() const {return m_vSubset;}
572 
575 
577  const FunctionGroup& function_group() const {return m_fctGrp;}
578 
580  const FunctionIndexMapping& map() const {return m_fctIndexMap;}
581 
583  void check_setup(bool bNonRegularGrid);
584 
585  protected:
587  std::vector<std::string> m_vFct;
588 
590  std::vector<std::string> m_vSubset;
591 
594 
597 
600 
603 
606 
608  // UserData and Coupling
610  public:
613 
615  size_t num_imports() const {return m_vIImport.size();}
616 
619  {
620  UG_ASSERT(i < num_imports(), "Invalid index");
621  return *m_vIImport[i];
622  }
623 
625  void clear_imports() {m_vIImport.clear();}
626 
627  protected:
629  std::vector<IDataImport<dim>*> m_vIImport;
630 
632  // time handling
634  public:
636 
643  void set_time_dependent(LocalVectorTimeSeries& locTimeSeries,
644  const std::vector<number>& vScaleMass,
645  const std::vector<number>& vScaleStiff);
646 
648  void set_time_independent();
649 
652 
654  void set_stationary(bool bStationaryForced = true) {m_bStationaryForced = bStationaryForced;}
656 
658 
666  virtual bool requests_local_time_series() {return false;}
667 
669 
671  void set_time_point(const size_t timePoint) {m_timePoint = timePoint;}
672 
674  size_t time_point() const {return m_timePoint;}
675 
677  number time() const
678  {
680  else return 0.0;
681  }
682 
684 
694  {return m_pLocalVectorTimeSeries;}
695 
698  const std::vector<number>& mass_scales() const {return m_vScaleMass;}
699  const std::vector<number>& stiff_scales() const {return m_vScaleStiff;}
700 
701  number mass_scale(const size_t timePoint) const {return m_vScaleMass[timePoint];}
702  number stiff_scale(const size_t timePoint) const {return m_vScaleStiff[timePoint];}
703 
707 
708  protected:
710  size_t m_timePoint;
711 
714 
717  std::vector<number> m_vScaleMass;
718  std::vector<number> m_vScaleStiff;
720 
723 
724 
725 
727  // general info
729  public:
731  virtual int type() const {return EDT_ELEM | EDT_SIDE;}
732 
734 
744  virtual void prepare_setting(const std::vector<LFEID>& vLfeID, bool bNonRegularGrid) = 0;
745 
747 
752  virtual bool use_hanging() const {return false;}
753 };
754 
755 
756 template <typename TDomain>
757 class IElemError :
758  public IElemDiscBase<TDomain>,
759  public IElemEstimatorFuncs<IElemDisc<TDomain>, TDomain>
760 {
761 public:
762  typedef TDomain domain_type;
763  static const int dim = TDomain::dim;
764 
765  friend class IElemEstimatorFuncs<IElemDisc<TDomain>, TDomain>;
767 
768  IElemError(const char* functions, const char* subsets)
769  : IElemDiscBase<TDomain>(functions, subsets), estimator_base_type() {}
770 
771  IElemError(const std::vector<std::string>& vFct, const std::vector<std::string>& vSubset)
772  : IElemDiscBase<TDomain>(vFct, vSubset), estimator_base_type() {}
773 
774 
775 protected:
776 
780 
784 
786  //void set_default_add_fct();
788 
789 };
790 
791 
796 template <typename TDomain>
797 class IElemDisc :
798  public IElemAssembleFuncs<IElemDisc<TDomain>, TDomain>,
799  public IElemError<TDomain>
800 {
801 public:
802  typedef TDomain domain_type;
803  static const int dim = TDomain::dim;
804 
809 
810  friend class IElemEstimatorFuncs<IElemDisc<TDomain>, TDomain>;
811  friend class IElemAssembleFuncs<IElemDisc<TDomain>, TDomain>;
812 
813 
814  IElemDisc(const char* functions, const char* subsets)
815  : assemble_base_type(), IElemError<TDomain>(functions, subsets) {}
816 
817  IElemDisc(const std::vector<std::string>& vFct, const std::vector<std::string>& vSubset)
818  : assemble_base_type(), IElemError<TDomain>(vFct, vSubset) {}
819 
820 protected:
821 
824  {
827  }
828 
831  {
834  }
835 
838  {
841  }
842 
843 
844 public:
846  {
847  m_spElemModifier.push_back(elemModifier);
848  elemModifier->set_elem_disc(this);
849  }
850 
851  std::vector<SmartPtr<IElemDiscModifier<TDomain> > >& get_elem_modifier()
852  { return m_spElemModifier;}
853 
854 protected:
856  std::vector<SmartPtr<IElemDiscModifier<TDomain> > > m_spElemModifier;
857 
858 
859 };
860 
861 
862 
864 
865 } // end namespace ug
866 
868 
869 #endif /* __H__UG__LIB_DISC__SPATIAL_DISC__ELEM_DISC__ELEM_DISC_INTERFACE__ */
Definition: smart_pointer.h:296
Definition: smart_pointer.h:108
base class for approximation spaces without type of algebra or dof distribution
Definition: approximation_space.h:279
Definition: function_group.h:52
describes a mapping between two local index sets
Definition: function_group.h:186
The base class for all geometric objects, such as vertices, edges, faces, volumes,...
Definition: grid_base_objects.h:157
Base class for data import.
Definition: data_import.h:72
This class encapsulates all functions related to error estimation.
Definition: elem_disc_interface.h:110
void(T::* ElemJAFct)(LocalMatrix &J, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
current Geometric Object
Definition: elem_disc_interface.h:262
void do_prep_elem_loop(const ReferenceObjectID roid, const int si)
current Geometric Object
Definition: elem_disc_interface.cpp:533
void set_prep_timestep_elem_fct(ReferenceObjectID id, TAssFunc func)
current Geometric Object
Definition: elem_disc_interface_impl.h:60
void do_prep_elem(LocalVector &u, GridObject *elem, const ReferenceObjectID roid, const MathVector< dim > vCornerCoords[])
current Geometric Object
Definition: elem_disc_interface.cpp:496
virtual void fsh_timestep(number time, VectorProxyBase *u)
finish the time step
Definition: elem_disc_interface.cpp:776
void do_add_jac_M_elem(LocalMatrix &J, LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
current Geometric Object
Definition: elem_disc_interface.cpp:582
void set_prep_elem_loop_fct(ReferenceObjectID id, TAssFunc func)
current Geometric Object
Definition: elem_disc_interface_impl.h:84
virtual void prep_elem_loop(const ReferenceObjectID roid, const int si)
virtual prepares the loop over all elements of one type
Definition: elem_disc_interface.cpp:790
void(T::* FinishTimestepElemFct)(number, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
current Geometric Object
Definition: elem_disc_interface.h:254
virtual void add_jac_A_elem(LocalMatrix &J, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
Assembling of Jacobian (Stiffness part)
Definition: elem_disc_interface.cpp:804
void do_add_def_A_elem(LocalVector &d, LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
current Geometric Object
Definition: elem_disc_interface.cpp:600
void remove_add_jac_M_elem_fct(ReferenceObjectID id)
current Geometric Object
Definition: elem_disc_interface_impl.h:125
virtual void prep_timestep(number future_time, number time, VectorProxyBase *u)
prepare the time step
Definition: elem_disc_interface.cpp:755
ElemJMFct m_vElemJMFct[NUM_REFERENCE_OBJECTS]
current Geometric Object
Definition: elem_disc_interface.h:287
ReferenceObjectID m_roid
current Geometric Object
Definition: elem_disc_interface.h:312
FinishTimestepElemFct m_vFinishTimestepElemFct[NUM_REFERENCE_OBJECTS]
current Geometric Object
Definition: elem_disc_interface.h:278
void(T::* ElemRHSFct)(LocalVector &rhs, GridObject *elem, const MathVector< dim > vCornerCoords[])
current Geometric Object
Definition: elem_disc_interface.h:270
TLeaf leaf_type
Barton Nackman trick (TODO: needed?)
Definition: elem_disc_interface.h:119
void remove_prep_timestep_fct(size_t algebra_id)
current Geometric Object
Definition: elem_disc_interface_impl.h:53
void(T::* PrepareElemFct)(const LocalVector &u, GridObject *elem, const ReferenceObjectID roid, const MathVector< dim > vCornerCoords[])
current Geometric Object
Definition: elem_disc_interface.h:258
IElemAssembleFuncs< TLeaf, TDomain > T
current Geometric Object
Definition: elem_disc_interface.h:248
void do_prep_timestep(number future_time, const number time, VectorProxyBase *u, size_t algebra_id)
Definition: elem_disc_interface.cpp:473
virtual void add_def_A_expl_elem(LocalVector &d, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
defect for explicit terms
Definition: elem_disc_interface.cpp:825
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 do_fsh_timestep_elem(const number time, LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
current Geometric Object
Definition: elem_disc_interface.cpp:519
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 do_add_def_A_expl_elem(LocalVector &d, LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
current Geometric Object
Definition: elem_disc_interface.cpp:615
virtual void prep_assemble_loop()
virtual prepares the loop over all elements of one type
Definition: elem_disc_interface.h:135
void set_roid(ReferenceObjectID id, int discType)
sets the geometric object type
Definition: elem_disc_interface.cpp:422
void remove_prep_elem_loop_fct(ReferenceObjectID id)
current Geometric Object
Definition: elem_disc_interface_impl.h:89
virtual void add_def_M_elem(LocalVector &d, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
virtual Assembling of Defect (Mass part)
Definition: elem_disc_interface.cpp:832
void(T::* PrepareTimestepFct)(number, number, VectorProxyBase *)
current Geometric Object
Definition: elem_disc_interface.h:251
void set_default_add_fct()
sets all assemble functions to the corresponding virtual ones
Definition: elem_disc_interface.cpp:182
TDomain domain_type
Domain type.
Definition: elem_disc_interface.h:125
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
virtual void post_assemble_loop()
virtual prepares the loop over all elements of one type
Definition: elem_disc_interface.h:138
void do_add_jac_A_elem(LocalMatrix &J, LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
current Geometric Object
Definition: elem_disc_interface.cpp:567
void do_fsh_elem_loop()
current Geometric Object
Definition: elem_disc_interface.cpp:554
virtual void add_rhs_elem(LocalVector &rhs, GridObject *elem, const MathVector< dim > vCornerCoords[])
virtual Assembling of Right-Hand Side
Definition: elem_disc_interface.cpp:839
PrepareElemFct m_vPrepareElemFct[NUM_REFERENCE_OBJECTS]
current Geometric Object
Definition: elem_disc_interface.h:282
ElemdAFct m_vElemdAFct[NUM_REFERENCE_OBJECTS]
current Geometric Object
Definition: elem_disc_interface.h:290
PrepareTimestepElemFct m_vPrepareTimestepElemFct[NUM_REFERENCE_OBJECTS]
current Geometric Object
Definition: elem_disc_interface.h:276
void(T::* FinishTimestepFct)(number, VectorProxyBase *)
current Geometric Object
Definition: elem_disc_interface.h:253
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
virtual void fsh_elem_loop()
virtual postprocesses the loop over all elements of one type
Definition: elem_disc_interface.cpp:797
void(T::* PrepareElemLoopFct)(ReferenceObjectID roid, int si)
current Geometric Object
Definition: elem_disc_interface.h:257
void do_fsh_timestep(const number time, VectorProxyBase *u, size_t algebra_id)
current Geometric Object
Definition: elem_disc_interface.cpp:510
void do_add_def_M_elem(LocalVector &d, LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
current Geometric Object
Definition: elem_disc_interface.cpp:630
virtual ~IElemAssembleFuncs()
Virtual destructor.
Definition: elem_disc_interface.h:116
void remove_add_jac_A_elem_fct(ReferenceObjectID id)
current Geometric Object
Definition: elem_disc_interface_impl.h:113
PrepareTimestepFct m_vPrepareTimestepFct[bridge::NUM_ALGEBRA_TYPES]
current Geometric Object
Definition: elem_disc_interface.h:275
void set_add_def_A_elem_fct(ReferenceObjectID id, TAssFunc func)
current Geometric Object
Definition: elem_disc_interface_impl.h:132
virtual void prep_timestep_elem(const number time, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
prepare the time step element-wise
Definition: elem_disc_interface.cpp:762
virtual void prep_elem(const LocalVector &u, GridObject *elem, const ReferenceObjectID roid, const MathVector< dim > vCornerCoords[])
virtual prepare one elements for assembling
Definition: elem_disc_interface.cpp:769
void set_add_def_A_expl_elem_fct(ReferenceObjectID id, TAssFunc func)
current Geometric Object
Definition: elem_disc_interface_impl.h:144
virtual void add_jac_M_elem(LocalMatrix &J, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
Assembling of Jacobian (Mass part)
Definition: elem_disc_interface.cpp:811
FinishElemLoopFct m_vFinishElemLoopFct[NUM_REFERENCE_OBJECTS]
current Geometric Object
Definition: elem_disc_interface.h:283
ElemdMFct m_vElemdMFct[NUM_REFERENCE_OBJECTS]
current Geometric Object
Definition: elem_disc_interface.h:292
void remove_add_def_A_expl_elem_fct(ReferenceObjectID id)
current Geometric Object
Definition: elem_disc_interface_impl.h:149
FinishTimestepFct m_vFinishTimestepFct[bridge::NUM_ALGEBRA_TYPES]
current Geometric Object
Definition: elem_disc_interface.h:277
virtual void add_def_A_elem(LocalVector &d, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
virtual Assembling of Defect (Stiffness part)
Definition: elem_disc_interface.cpp:818
void remove_prep_timestep_elem_fct(ReferenceObjectID id)
current Geometric Object
Definition: elem_disc_interface_impl.h:65
void(T::* ElemdAFct)(LocalVector &d, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
current Geometric Object
Definition: elem_disc_interface.h:266
void do_prep_timestep_elem(const number time, LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
current Geometric Object
Definition: elem_disc_interface.cpp:482
void do_add_rhs_elem(LocalVector &rhs, GridObject *elem, const MathVector< dim > vCornerCoords[])
current Geometric Object
Definition: elem_disc_interface.cpp:648
void set_add_jac_A_elem_fct(ReferenceObjectID id, TAssFunc func)
current Geometric Object
Definition: elem_disc_interface_impl.h:108
ElemRHSFct m_vElemRHSFct[NUM_REFERENCE_OBJECTS]
current Geometric Object
Definition: elem_disc_interface.h:295
void check_roid(ReferenceObjectID roid, int discType)
check, if all inputs have been set
Definition: elem_disc_interface.cpp:391
void(T::* FinishElemLoopFct)()
current Geometric Object
Definition: elem_disc_interface.h:259
static const int dim
World dimension.
Definition: elem_disc_interface.h:128
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
IElemAssembleFuncs()
constructor
Definition: elem_disc_interface.h:113
void(T::* ElemJMFct)(LocalMatrix &J, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
current Geometric Object
Definition: elem_disc_interface.h:263
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(T::* ElemdMFct)(LocalVector &d, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
current Geometric Object
Definition: elem_disc_interface.h:267
TLeaf & asLeaf()
Definition: elem_disc_interface.h:121
void remove_add_def_A_elem_fct(ReferenceObjectID id)
current Geometric Object
Definition: elem_disc_interface_impl.h:137
virtual void fsh_timestep_elem(const number time, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
virtual finish the time step element-wise
Definition: elem_disc_interface.cpp:783
void clear_add_fct()
sets all assemble functions to NULL (for all ReferenceObjectID's)
Definition: elem_disc_interface.cpp:150
PrepareElemLoopFct m_vPrepareElemLoopFct[NUM_REFERENCE_OBJECTS]
current Geometric Object
Definition: elem_disc_interface.h:281
ElemdAFct m_vElemdAExplFct[NUM_REFERENCE_OBJECTS]
current Geometric Object
Definition: elem_disc_interface.h:291
void(T::* PrepareTimestepElemFct)(number, const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
current Geometric Object
Definition: elem_disc_interface.h:252
void set_fsh_timestep_elem_fct(ReferenceObjectID id, TAssFunc func)
current Geometric Object
Definition: elem_disc_interface_impl.h:192
ElemJAFct m_vElemJAFct[NUM_REFERENCE_OBJECTS]
current Geometric Object
Definition: elem_disc_interface.h:286
base class for all element-wise discretizations
Definition: elem_disc_interface.h:473
const FunctionGroup & function_group() const
returns the current function group
Definition: elem_disc_interface.h:577
void set_approximation_space(SmartPtr< ApproximationSpace< TDomain > > approxSpace)
sets the approximation space
Definition: elem_disc_interface.cpp:68
std::vector< number > m_vScaleMass
Definition: elem_disc_interface.h:717
SmartPtr< ApproximationSpace< TDomain > > approx_space()
returns approximation space
Definition: elem_disc_interface.h:502
number time() const
returns currently set timepoint
Definition: elem_disc_interface.h:677
void set_stationary(bool bStationaryForced=true)
sets that the assembling is always stationary (even in instationary case)
Definition: elem_disc_interface.h:654
TDomain::subset_handler_type & subset_handler()
returns the subset handler
Definition: elem_disc_interface.h:514
SmartPtr< TDomain > domain()
returns the domain
Definition: elem_disc_interface.h:508
ConstSmartPtr< TDomain > domain() const
returns the domain
Definition: elem_disc_interface.h:511
IDataImport< dim > & get_import(size_t i)
returns an import
Definition: elem_disc_interface.h:618
const FunctionIndexMapping & map() const
returns the current function index mapping
Definition: elem_disc_interface.h:580
void set_time_independent()
sets that the assembling is time independent
Definition: elem_disc_interface.cpp:447
void check_setup(bool bNonRegularGrid)
checks the setup of the elem disc
Definition: elem_disc_interface.cpp:327
size_t num_imports() const
returns number of imports
Definition: elem_disc_interface.h:615
bool is_time_dependent() const
returns if assembling is time-dependent
Definition: elem_disc_interface.h:651
virtual int type() const
returns the type of elem disc
Definition: elem_disc_interface.h:731
ConstSmartPtr< FunctionPattern > m_spFctPattern
current function pattern
Definition: elem_disc_interface.h:593
void set_subsets(const std::string &subsets)
sets subset(s) by name list, divided by ','
Definition: elem_disc_interface.cpp:268
IElemDiscBase(const char *functions="", const char *subsets="")
Constructor.
Definition: elem_disc_interface.cpp:39
size_t num_fct() const
number of functions this discretization handles
Definition: elem_disc_interface.h:562
ConstSmartPtr< ApproximationSpace< TDomain > > approx_space() const
returns approximation space
Definition: elem_disc_interface.h:505
LocalVectorTimeSeries * m_pLocalVectorTimeSeries
list of local vectors for all solutions of the time series
Definition: elem_disc_interface.h:713
virtual void approximation_space_changed()
callback invoked, when approximation space is changed
Definition: elem_disc_interface.h:537
virtual bool requests_local_time_series()
returns if local time series needed by assembling
Definition: elem_disc_interface.h:666
virtual bool use_hanging() const
returns if discretization acts on hanging nodes if present
Definition: elem_disc_interface.h:752
void set_time_point(const size_t timePoint)
sets the current time point
Definition: elem_disc_interface.h:671
TDomain::position_type position_type
Position type.
Definition: elem_disc_interface.h:479
const LocalVectorTimeSeries * local_time_solutions() const
returns the local time solutions
Definition: elem_disc_interface.h:693
virtual ~IElemDiscBase()
Virtual destructor.
Definition: elem_disc_interface.h:492
const std::vector< number > & mass_scales() const
Definition: elem_disc_interface.h:698
TDomain domain_type
Domain type.
Definition: elem_disc_interface.h:476
FunctionIndexMapping m_fctIndexMap
current function index mapping
Definition: elem_disc_interface.h:599
const std::vector< number > & stiff_scales() const
Definition: elem_disc_interface.h:699
void set_function_pattern(ConstSmartPtr< FunctionPattern > fctPatt)
sets current function pattern
Definition: elem_disc_interface.cpp:297
number stiff_scale(const size_t timePoint) const
Definition: elem_disc_interface.h:702
bool m_bStationaryForced
flag if stationary assembling is to be used even in instationary assembling
Definition: elem_disc_interface.h:722
void set_functions(const std::string &functions)
Approximation Space.
Definition: elem_disc_interface.cpp:237
number mass_scale() const
Definition: elem_disc_interface.h:704
const std::vector< std::string > & symb_subsets() const
returns the symbolic subsets
Definition: elem_disc_interface.h:571
std::vector< std::string > m_vSubset
vector holding name of all symbolic subsets
Definition: elem_disc_interface.h:590
size_t m_timePoint
time point
Definition: elem_disc_interface.h:710
ConstSmartPtr< FunctionPattern > function_pattern() const
returns the current function pattern
Definition: elem_disc_interface.h:574
void clear_imports()
removes all imports
Definition: elem_disc_interface.h:625
FunctionGroup m_fctGrp
current function group
Definition: elem_disc_interface.h:596
void set_stationary()
Definition: elem_disc_interface.h:655
number mass_scale(const size_t timePoint) const
Definition: elem_disc_interface.h:701
virtual void prepare_setting(const std::vector< LFEID > &vLfeID, bool bNonRegularGrid)=0
requests assembling for trial spaces and grid type
std::vector< number > m_vScaleStiff
Definition: elem_disc_interface.h:718
SmartPtr< ApproximationSpace< TDomain > > m_spApproxSpace
Approximation Space.
Definition: elem_disc_interface.h:540
const std::vector< std::string > & symb_fcts() const
returns the symbolic functions
Definition: elem_disc_interface.h:565
size_t num_subsets() const
number of subsets this discretization handles
Definition: elem_disc_interface.h:568
size_t time_point() const
returns the currently considered time point of the time-disc scheme
Definition: elem_disc_interface.h:674
const TDomain::subset_handler_type & subset_handler() const
returns the subset handler
Definition: elem_disc_interface.h:521
bool local_time_series_needed()
Definition: elem_disc_interface.h:668
void register_import(IDataImport< dim > &Imp)
registers a data import
Definition: elem_disc_interface.cpp:353
std::vector< std::string > m_vFct
vector holding name of all symbolic functions
Definition: elem_disc_interface.h:587
static const int dim
World dimension.
Definition: elem_disc_interface.h:482
void set_time_dependent(LocalVectorTimeSeries &locTimeSeries, const std::vector< number > &vScaleMass, const std::vector< number > &vScaleStiff)
sets if assembling should be time-dependent and the local time series
Definition: elem_disc_interface.cpp:437
void update_function_index_mapping()
updates the function index mapping
Definition: elem_disc_interface.cpp:304
number stiff_scale() const
Definition: elem_disc_interface.h:705
std::vector< IDataImport< dim > * > m_vIImport
data imports
Definition: elem_disc_interface.h:629
Definition: elem_disc_interface.h:800
IElemDisc(const char *functions, const char *subsets)
Definition: elem_disc_interface.h:814
std::vector< SmartPtr< IElemDiscModifier< TDomain > > > & get_elem_modifier()
Definition: elem_disc_interface.h:851
IElemAssembleFuncs< IElemDisc< TDomain >, TDomain > assemble_base_type
Definition: elem_disc_interface.h:808
std::vector< SmartPtr< IElemDiscModifier< TDomain > > > m_spElemModifier
Approximation Space.
Definition: elem_disc_interface.h:856
void set_default_add_fct()
sets all assemble functions to the corresponding virtual ones
Definition: elem_disc_interface.h:837
void clear_add_fct(ReferenceObjectID id)
sets all assemble functions to NULL for a given ReferenceObjectID
Definition: elem_disc_interface.h:823
static const int dim
Definition: elem_disc_interface.h:803
IElemDisc(const std::vector< std::string > &vFct, const std::vector< std::string > &vSubset)
Definition: elem_disc_interface.h:817
IElemEstimatorFuncs< IElemDisc< TDomain >, TDomain > estimator_base_type
Definition: elem_disc_interface.h:807
void clear_add_fct()
sets all assemble functions to NULL (for all ReferenceObjectID's)
Definition: elem_disc_interface.h:830
void add_elem_modifier(SmartPtr< IElemDiscModifier< TDomain > > elemModifier)
Definition: elem_disc_interface.h:845
IElemError< TDomain > base_type
real base class
Definition: elem_disc_interface.h:806
TDomain domain_type
Definition: elem_disc_interface.h:802
Definition: elem_modifier.h:46
Definition: elem_disc_interface.h:760
static const int dim
Definition: elem_disc_interface.h:763
IElemError(const char *functions, const char *subsets)
Definition: elem_disc_interface.h:768
void clear_add_fct()
sets all assemble functions to NULL (for all ReferenceObjectID's)
Definition: elem_disc_interface.h:782
IElemError(const std::vector< std::string > &vFct, const std::vector< std::string > &vSubset)
Definition: elem_disc_interface.h:771
IElemEstimatorFuncs< IElemDisc< TDomain >, TDomain > estimator_base_type
Definition: elem_disc_interface.h:766
void clear_add_fct(ReferenceObjectID id)
sets all assemble functions to NULL for a given ReferenceObjectID
Definition: elem_disc_interface.h:778
TDomain domain_type
Definition: elem_disc_interface.h:762
This class encapsulates all functions related to error estimation.
Definition: elem_disc_interface.h:321
TDomain domain_type
Domain type.
Definition: elem_disc_interface.h:337
SmartPtr< IErrEstData< TDomain > > m_spErrEstData
error estimation object associated to the element discretization
Definition: elem_disc_interface.h:442
void(T::* PrepareErrEstElemFct)(const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
Definition: elem_disc_interface.h:400
void set_compute_err_est_A_elem(ReferenceObjectID id, TAssFunc func)
Definition: elem_disc_interface_impl.h:228
virtual void prep_err_est_elem_loop(const ReferenceObjectID roid, const int si)
virtual prepares the loop over all elements of one type for the computation of the error estimator
Definition: elem_disc_interface.cpp:846
void(T::* ElemComputeErrEstMFct)(const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const number &)
Definition: elem_disc_interface.h:402
IElemEstimatorFuncs< TLeaf, TDomain > T
Definition: elem_disc_interface.h:396
void set_error_estimator(SmartPtr< IErrEstData< TDomain > > ee)
sets the pointer to an error estimator data object (or NULL)
Definition: elem_disc_interface.h:428
virtual void fsh_err_est_elem_loop()
virtual postprocesses the loop over all elements of one type in the computation of the error estimato...
Definition: elem_disc_interface.cpp:881
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 do_compute_err_est_M_elem(LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale)
Definition: elem_disc_interface.cpp:710
void set_fsh_err_est_elem_loop(ReferenceObjectID id, TAssFunc func)
Definition: elem_disc_interface_impl.h:264
void set_default_add_fct()
sets all assemble functions to the corresponding virtual ones
Definition: elem_disc_interface.cpp:212
static const int dim
World dimension.
Definition: elem_disc_interface.h:340
virtual void compute_err_est_rhs_elem(GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale)
virtual compute the error estimator (rhs part) contribution for one element
Definition: elem_disc_interface.cpp:874
void do_prep_err_est_elem(LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
Definition: elem_disc_interface.cpp:682
ElemComputeErrEstMFct m_vElemComputeErrEstMFct[NUM_REFERENCE_OBJECTS]
Definition: elem_disc_interface.h:410
bool err_est_enabled() const
find out whether or not a posteriori error estimation is to be performed for this disc
Definition: elem_disc_interface.h:431
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(T::* FinishErrEstElemLoopFct)()
Definition: elem_disc_interface.h:404
PrepareErrEstElemFct m_vPrepareErrEstElemFct[NUM_REFERENCE_OBJECTS]
Definition: elem_disc_interface.h:408
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 do_compute_err_est_A_elem(LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale)
Definition: elem_disc_interface.cpp:696
void remove_compute_err_est_rhs_elem(ReferenceObjectID id)
Definition: elem_disc_interface_impl.h:257
ElemComputeErrEstRhsFct m_vElemComputeErrEstRhsFct[NUM_REFERENCE_OBJECTS]
Definition: elem_disc_interface.h:411
void check_roid(ReferenceObjectID roid, int discType)
check, if all inputs have been set
Definition: elem_disc_interface.cpp:368
IElemEstimatorFuncs()
constructor
Definition: elem_disc_interface.h:324
void set_roid(ReferenceObjectID id, int discType)
sets the geometric object type
Definition: elem_disc_interface.cpp:376
void remove_fsh_err_est_elem_loop(ReferenceObjectID id)
Definition: elem_disc_interface_impl.h:269
FinishErrEstElemLoopFct m_vFinishErrEstElemLoopFct[NUM_REFERENCE_OBJECTS]
Definition: elem_disc_interface.h:412
void set_compute_err_est_M_elem(ReferenceObjectID id, TAssFunc func)
Definition: elem_disc_interface_impl.h:240
virtual void compute_err_est_A_elem(const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale)
virtual compute the error estimator (stiffness part) contribution for one element
Definition: elem_disc_interface.cpp:860
void(T::* ElemComputeErrEstRhsFct)(GridObject *elem, const MathVector< dim > vCornerCoords[], const number &)
Definition: elem_disc_interface.h:403
ReferenceObjectID m_roid
current Geometric Object
Definition: elem_disc_interface.h:459
void do_compute_err_est_rhs_elem(GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale)
Definition: elem_disc_interface.cpp:724
virtual SmartPtr< IErrEstData< TDomain > > err_est_data()
returns the pointer to the error estimator data object (or NULL)
Definition: elem_disc_interface.h:434
void do_prep_err_est_elem_loop(const ReferenceObjectID roid, const int si)
Definition: elem_disc_interface.cpp:662
TLeaf leaf_type
Barton Nackman trick (TODO: needed?)
Definition: elem_disc_interface.h:331
void(T::* PrepareErrEstElemLoopFct)(ReferenceObjectID roid, int si)
Definition: elem_disc_interface.h:399
void remove_prep_err_est_elem(ReferenceObjectID id)
Definition: elem_disc_interface_impl.h:221
void(T::* ElemComputeErrEstAFct)(const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const number &)
Definition: elem_disc_interface.h:401
virtual void compute_err_est_M_elem(const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[], const number &scale)
virtual compute the error estimator (mass part) contribution for one element
Definition: elem_disc_interface.cpp:867
void clear_add_fct()
sets all assemble functions to NULL (for all ReferenceObjectID's)
Definition: elem_disc_interface.cpp:164
PrepareErrEstElemLoopFct m_vPrepareErrEstElemLoopFct[NUM_REFERENCE_OBJECTS]
Definition: elem_disc_interface.h:407
void do_fsh_err_est_elem_loop()
Definition: elem_disc_interface.cpp:736
ElemComputeErrEstAFct m_vElemComputeErrEstAFct[NUM_REFERENCE_OBJECTS]
Definition: elem_disc_interface.h:409
virtual void prep_err_est_elem(const LocalVector &u, GridObject *elem, const MathVector< dim > vCornerCoords[])
virtual prepares the loop over all elements of one type for the computation of the error estimator
Definition: elem_disc_interface.cpp:853
bool m_bDoErrEst
flag indicating whether or not a posteriori error estimation is to be performed for this disc
Definition: elem_disc_interface.h:438
TLeaf & asLeaf()
Definition: elem_disc_interface.h:333
virtual ~IElemEstimatorFuncs()
Virtual destructor.
Definition: elem_disc_interface.h:328
Base class for error estimator data.
Definition: err_est_data.h:71
Definition: local_algebra.h:422
Definition: local_algebra.h:198
time series of local vectors
Definition: solution_time_series.h:167
number time(size_t i) const
returns time point i
Definition: solution_time_series.h:176
Definition: multi_index.h:50
static const size_t NUM_ALGEBRA_TYPES
Definition: util_algebra_dependent.h:101
static const int dim
const NullSmartPtr SPNULL
The equivalent to NULL for smart pointers.
Definition: smart_pointer.h:90
#define UG_ASSERT(expr, msg)
Definition: assert.h:70
double number
Definition: types.h:124
the ug namespace
ReferenceObjectID
these ids are used to identify the shape of a geometric object.
Definition: grid_base_objects.h:74
@ NUM_REFERENCE_OBJECTS
Definition: grid_base_objects.h:85
number & DoFRef(TMatrix &mat, const DoFIndex &iInd, const DoFIndex &jInd)
Definition: multi_index.h:276
ElemDiscType
Types of elem disc.
Definition: elem_disc_interface.h:59
@ EDT_ELEM
Definition: elem_disc_interface.h:61
@ EDT_SIDE
Definition: elem_disc_interface.h:62
@ EDT_BND
Definition: elem_disc_interface.h:63
@ EDT_NONE
Definition: elem_disc_interface.h:60
@ EDT_ALL
Definition: elem_disc_interface.h:64
function func(x, y, z, t, si)
Proxy struct for generic passing of any vector type.
Definition: elem_disc_interface.h:70
virtual number evaluate(const DoFIndex &di) const =0
virtual ~VectorProxyBase()
Definition: elem_disc_interface.h:71
Definition: elem_disc_interface.h:77
const TVector & m_v
Definition: elem_disc_interface.h:82
virtual number evaluate(const DoFIndex &di) const
Definition: elem_disc_interface.h:80
VectorProxy(const TVector &v)
Definition: elem_disc_interface.h:78