Go to the documentation of this file.
6 #ifndef hpFunctionBase2d_hh
7 #define hpFunctionBase2d_hh
35 template<u
int dim,
typename F = Real,
typename Q = Quad<Real> >
43 virtual uint
n()
const {
return dim; }
54 const Real t = 0.0)
const;
58 const Real t = 0.0)
const;
63 const Real t = 0.0)
const;
67 const uint i[2])
const = 0;
69 virtual void compute_(
const Q& elm,
const uint j[3],
71 const uint i[2])
const = 0;
75 const Real2d& p,
const Real t = 0.0)
const = 0;
78 template<u
int dim,
typename F,
typename Q>
83 const Q* quad =
dynamic_cast<const Q*
>(&elm);
84 if (quad)
return compute_(*quad, coeff, val, i);
89 template<u
int dim,
typename F,
typename Q>
91 (
const Element& elm,
const uint* j,
94 const Q* quad =
dynamic_cast<const Q*
>(&elm);
95 if (quad)
return compute_(*quad, j, val, i);
100 template<u
int dim,
typename F,
typename Q>
107 const Q* quad =
dynamic_cast<const Q*
>(&elm);
108 if (quad)
return compute_(*quad, coeff, val, p2, t);
113 template<u
int dim,
typename F,
typename Q>
118 const Q* quad =
dynamic_cast<const Q*
>(&elm);
119 if (quad)
return compute_(*quad, coeff, val, p, t);
124 template<u
int dim,
typename F,
typename Q>
131 const Q* quad =
dynamic_cast<const Q*
>(&elm);
132 if (quad)
return compute_(*quad, coeff, val, p2, t);
139 template<
typename F,
typename Q>
146 virtual uint
n()
const {
return 1; }
156 const Real t = 0.0)
const;
160 const Real t = 0.0)
const;
165 const Real t = 0.0)
const;
169 F& val,
const uint *i)
const;
172 F& val,
const uint* i)
const;
175 F& val,
const Real p,
176 const Real t = 0.0)
const;
180 const Real t = 0.0)
const;
184 const Real t = 0.0)
const;
187 F& val,
const uint i[2])
const = 0;
188 virtual void compute_(
const Q& elm,
const uint j[3],
189 F& val,
const uint i[2])
const = 0;
191 F& val,
const Real2d& p,
const Real t)
const = 0;
194 template<
typename F,
typename Q>
199 (*this)(elm, coeff, val[0], i);
202 template<
typename F,
typename Q>
204 (
const Element& elm,
const uint* j,
207 (*this)(elm, j, val[0], i);
210 template<
typename F,
typename Q>
216 (*this)(elm, coeff, val[0], p2, t);
219 template<
typename F,
typename Q>
224 (*this)(elm, coeff, val[0], p, t);
227 template<
typename F,
typename Q>
233 (*this)(elm, coeff, val[0], p2, t);
238 template<
typename F,
typename Q>
241 F& val,
const uint *i)
const {
243 const Q* quad =
dynamic_cast<const Q*
>(&elm);
245 return compute_(*quad, coeff, val, i);
250 template<
typename F,
typename Q>
252 (
const Element& elm,
const uint* j,
253 F& val,
const uint *i)
const {
255 const Q* quad =
dynamic_cast<const Q*
>(&elm);
256 if (quad)
return compute_(*quad, j, val, i);
261 template<
typename F,
typename Q>
264 F& val,
const Real p,
const Real t)
const {
266 (*this)(elm, coeff, val, p2, t);
269 template<
typename F,
typename Q>
272 F& val,
const Real2d& p,
const Real t)
const {
274 const Q* quad =
dynamic_cast<const Q*
>(&elm);
275 if (quad)
return compute_(*quad, coeff, val, p, t);
280 template<
typename F,
typename Q>
285 (*this)(elm, coeff, val, p2, t);
291 #endif // hpFunctionBase2d_hh
An abstract class for an element of a space.
An abstract class for a function in a FE space.
concepts::Element< typename Q::type > Element
#define conceptsException(exc)
Prepares an exception for throwing.
virtual void compute_(const Q &elm, const concepts::Array< F > &coeff, concepts::Array< F > &val, const uint i[2]) const =0
Base class for element functions for hp elements in 2D.
concepts::Element< typename Q::type > Element
virtual void operator()(const Element &elm, const concepts::Array< F > &coeff, concepts::Array< F > &val, const uint *i) const
virtual uint n() const
Number of components.
2D hp-FEM for H1-conforming elements.
virtual void compute_(const Q &elm, const concepts::Array< F > &coeff, F &val, const Real2d &p, const Real t) const =0
virtual void compute_(const Q &elm, const concepts::Array< F > &coeff, F &val, const uint i[2]) const =0
Abstract class for a 2D FEM element.
virtual uint n() const
Number of components.
virtual void compute_(const Q &elm, const concepts::Array< F > &coeff, concepts::Array< F > &val, const Real2d &p, const Real t=0.0) const =0
Exception class to express a missing feature.
virtual void compute_(const Q &elm, const uint j[3], F &val, const uint i[2]) const =0
virtual void compute_(const Q &elm, const uint j[3], concepts::Array< F > &val, const uint i[2]) const =0
double Real
Type normally used for a floating point number.