22 #include "quadrature/quad.h"
23 #include "function/function.h"
24 #include "function/solution.h"
25 #include "mesh/refmap.h"
26 #include "mesh/traverse.h"
33 static const char* ERR_UNDEFINED_NEIGHBORING_ELEMENTS =
34 "Neighboring elements are not defined and so are not function traces on their interface. "
35 "Did you forget setting H2D_ANY_INNER_EDGE in add_matrix/vector_form?";
48 Func(
int num_gip,
int num_comps);
60 virtual T&
get_val_central(
int k)
const {
throw Hermes::Exceptions::Exception(ERR_UNDEFINED_NEIGHBORING_ELEMENTS);
return *
new T; }
62 virtual T&
get_val_neighbor(
int k)
const {
throw Hermes::Exceptions::Exception(ERR_UNDEFINED_NEIGHBORING_ELEMENTS);
return *
new T; }
64 virtual T&
get_dx_central(
int k)
const {
throw Hermes::Exceptions::Exception(ERR_UNDEFINED_NEIGHBORING_ELEMENTS);
return *
new T; }
66 virtual T&
get_dx_neighbor(
int k)
const {
throw Hermes::Exceptions::Exception(ERR_UNDEFINED_NEIGHBORING_ELEMENTS);
return *
new T; }
68 virtual T&
get_dy_central(
int k)
const {
throw Hermes::Exceptions::Exception(ERR_UNDEFINED_NEIGHBORING_ELEMENTS);
return *
new T; }
70 virtual T&
get_dy_neighbor(
int k)
const {
throw Hermes::Exceptions::Exception(ERR_UNDEFINED_NEIGHBORING_ELEMENTS);
return *
new T; }
72 virtual T&
get_laplace_central(
int k) {
throw Hermes::Exceptions::Exception(ERR_UNDEFINED_NEIGHBORING_ELEMENTS);
return *
new T; }
74 virtual T&
get_laplace_neighbor(
int k) {
throw Hermes::Exceptions::Exception(ERR_UNDEFINED_NEIGHBORING_ELEMENTS);
return *
new T; }
77 virtual void free_ord();
80 virtual void free_fn();
90 void add(T* attribute, T* other_attribute);
92 int get_num_gip()
const;
100 void subtract(T* attribute, T* other_attribute);
112 template<
typename Scalar>
friend class Adapt;
118 friend class ErrorEstimatorFormKelly;
143 virtual T& get_val_central(
int k)
const;
145 virtual T& get_val_neighbor(
int k)
const;
147 virtual T& get_dx_central(
int k)
const;
149 virtual T& get_dx_neighbor(
int k)
const;
151 virtual T& get_dy_central(
int k)
const;
153 virtual T& get_dy_neighbor(
int k)
const;
155 virtual T& get_laplace_central(
int k);
157 virtual T& get_laplace_neighbor(
int k);
181 virtual void free_fn();
183 virtual void free_ord();
185 bool reverse_neighbor_side;
191 template<
typename Scalar>
friend class Adapt;
215 virtual int get_neighbor_marker()
const {
throw Hermes::Exceptions::Exception(ERR_UNDEFINED_NEIGHBORING_ELEMENTS);
return -1; }
217 virtual int get_neighbor_id()
const {
throw Hermes::Exceptions::Exception(ERR_UNDEFINED_NEIGHBORING_ELEMENTS);
return -1; }
219 virtual T
get_neighbor_diam()
const {
throw Hermes::Exceptions::Exception(ERR_UNDEFINED_NEIGHBORING_ELEMENTS);
return T(); }
226 virtual void free_ord() {};
244 friend class ErrorEstimatorFormKelly;
245 template<
typename Scalar>
friend class Adapt;
261 int get_neighbor_marker()
const;
262 int get_neighbor_id()
const;
263 T get_neighbor_diam()
const;
271 virtual void free_ord();
277 template<
typename Scalar>
friend class Adapt;
292 template<
typename Scalar>
295 template<
typename Scalar>