Class documentation of Concepts

Loading...
Searching...
No Matches
function.hh
Go to the documentation of this file.
1
7#ifndef hpFunction2dedge_hh
8#define hpFunction2dedge_hh
9
10#include "hp2D/formula.hh"
11#include "hp2D/functionBase.hh"
12#include "quad.hh"
13
14namespace hp2Dedge {
15
16 using concepts::Real;
17 using concepts::Real2d;
18
19 // ***************************************************************** Value **
20
26 template<typename F = Real, typename G = Real,
27 typename H = typename concepts::Realtype<F>::type>
28 class Value : public hp2D::ElementFunction<2, F, Quad<H> > {
29 public:
30 Value();
32 virtual Value<F,G,H>* clone() const {
33 if (f_.get()) return new Value(*f_.get());
34 return new Value();
35 }
36 protected:
37 virtual std::ostream& info(std::ostream& os) const;
38 private:
40 std::unique_ptr<const concepts::ElementFormula<G,H> > f_;
41 virtual void compute_(const Quad<H>& elm, const concepts::Array<F>& coeff,
42 concepts::Array<F>& val, const uint i[2]) const;
43 virtual void compute_(const Quad<H>& elm, const uint j[3],
44 concepts::Array<F>& val, const uint i[2]) const;
45 virtual void compute_(const Quad<H>& elm, const concepts::Array<F>& coeff,
47 const Real2d& p, const Real t = 0.0) const;
48 };
49
50 // ******************************************************************* Rot **
51
58 template<typename F = Real, typename G = Real>
59 class Rot : public hp2D::ElementFunction<1, F, Quad<G> > {
60 public:
61 virtual Rot<F,G>* clone() const { return new Rot(); }
62 protected:
63 virtual std::ostream& info(std::ostream& os) const;
64 private:
65 virtual void compute_(const Quad<>& elm, const concepts::Array<F>& coeff,
66 F& val, const uint i[2]) const;
67 virtual void compute_(const Quad<>& elm, const uint j[3],
68 F& val, const uint i[2]) const;
69 virtual void compute_(const Quad<>& elm, const concepts::Array<F>& coeff,
70 F& val,
71 const Real2d& p, const Real t = 0.0) const;
72 };
73
74} // namespace hp2Dedge
75
76
77#endif // hpRealunction2dedge_hh
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
double Real
Definition typedefs.hh:39