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; }
45 virtual void operator() (
const Element& elm,
48 virtual void operator() (
const Element& elm,
51 virtual void operator() (
const Element& elm,
54 const Real t = 0.0)
const;
55 virtual void operator() (
const Element& elm,
58 const Real t = 0.0)
const;
59 virtual void operator() (
const Element& elm,
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>
79 void ElementFunction<dim,F,Q>::operator()
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>
90 void ElementFunction<dim,F,Q>::operator()
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>
101 void ElementFunction<dim,F,Q>::operator()
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>
114 void ElementFunction<dim,F,Q>::operator()
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>
125 void ElementFunction<dim,F,Q>::operator()
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; }
147 virtual void operator() (
const Element& elm,
150 virtual void operator() (
const Element& elm,
153 virtual void operator() (
const Element& elm,
156 const Real t = 0.0)
const;
157 virtual void operator() (
const Element& elm,
160 const Real t = 0.0)
const;
161 virtual void operator() (
const Element& elm,
165 const Real t = 0.0)
const;
167 virtual void operator() (
const Element& elm,
169 F& val,
const uint *i)
const;
170 virtual void operator() (
const Element& elm,
172 F& val,
const uint* i)
const;
173 virtual void operator() (
const Element& elm,
175 F& val,
const Real p,
176 const Real t = 0.0)
const;
177 virtual void operator() (
const Element& elm,
179 F& val,
const Real2d& p,
180 const Real t = 0.0)
const;
181 virtual void operator() (
const Element& elm,
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>
195 void ElementFunction<1,F,Q>::operator()
199 (*this)(elm, coeff, val[0], i);
202 template<
typename F,
typename Q>
203 void ElementFunction<1,F,Q>::operator()
204 (
const Element& elm,
const uint* j,
207 (*this)(elm, j, val[0], i);
210 template<
typename F,
typename Q>
211 void ElementFunction<1,F,Q>::operator()
216 (*this)(elm, coeff, val[0], p2, t);
219 template<
typename F,
typename Q>
220 void ElementFunction<1,F,Q>::operator()
224 (*this)(elm, coeff, val[0], p, t);
227 template<
typename F,
typename Q>
228 void ElementFunction<1,F,Q>::operator()
233 (*this)(elm, coeff, val[0], p2, t);
238 template<
typename F,
typename Q>
239 void ElementFunction<1,F,Q>::operator()
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>
251 void ElementFunction<1,F,Q>::operator()
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>
262 void ElementFunction<1,F,Q>::operator()
264 F& val,
const Real p,
const Real t)
const {
266 (*this)(elm, coeff, val, p2, t);
269 template<
typename F,
typename Q>
270 void ElementFunction<1,F,Q>::operator()
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>
281 void ElementFunction<1,F,Q>::operator()
285 (*this)(elm, coeff, val, p2, t);
#define conceptsException(exc)
virtual uint n() const
Number of components.
virtual uint n() const
Number of components.
GenericElement< KarniadakisMixin< F > > Element
template aliases for backwards compatibility