Class documentation of Concepts

Loading...
Searching...
No Matches
frmE_conjugate.hh
Go to the documentation of this file.
1
8#ifndef FORMULA_FRME_CONJUGATE_HH_
9#define FORMULA_FRME_CONJUGATE_HH_
10
11#include "basics/debug.hh"
12#include "basics/output.hh"
15#include "exceptions.hh"
16
17#define ConjElemFormDestr_D 0
18#define ConjElemFormClone_D 0
19
20namespace concepts {
21
22
23 // *********************************************************** FrmE_Product **
24
32 template<typename F,
33 typename G = typename Realtype<F>::type>
34 class FrmE_Conjugate : public ElementFormula<F,G> {
35 public:
36 FrmE_Conjugate(const ElementFormulaContainer<F,G> frm) : frm_(frm) {
37 if (frm.empty()) throw(PointerToEmptyElementFormula());
38 }
39
40 virtual ~FrmE_Conjugate() {
41 DEBUGL(ConjElemFormDestr_D, "Delete " << *this)
42 }
43 virtual F operator() (const ElementWithCell<G>& elm,
44 const Real p, const Real t = 0.0) const
45 {
46 return std::conj(frm_(elm, p, t));
47 }
48 virtual F operator() (const ElementWithCell<G>& elm,
49 const Real2d& p, const Real t = 0.0) const
50 {
51 return std::conj(frm_(elm, p, t));
52 }
53 virtual F operator() (const ElementWithCell<G>& elm,
54 const Real3d& p, const Real t = 0.0) const
55 {
56 return std::conj(frm_(elm, p, t));
57 }
58 virtual FrmE_Conjugate<F,G>* clone() const {
59 DEBUGL(ConjElemFormClone_D, *this);
60 return new FrmE_Conjugate<F,G>(frm_);
61 }
62 protected:
63 virtual std::ostream& info(std::ostream& os) const {
64 return os << concepts::typeOf(*this) << "(" << frm_ << ")";
65 }
66 private:
69 };
70
71} // namespace concepts
72
73namespace std {
74
75 // ************************************************************ std::conj **
76
77 template<class F>
80 {
81 return FrmE_Conjugate(frm);
82 }
83
84} // namespace std
85
86#endif /* FORMULA_FRME_CONJUGATE_HH_ */
bool empty() const
Returns true if no formula is stored.
virtual std::ostream & info(std::ostream &os) const
Returns information in an output stream.
virtual FrmE_Conjugate< F, G > * clone() const
Virtual copy constructor.
virtual F operator()(const ElementWithCell< G > &elm, const Real p, const Real t=0.0) const
#define DEBUGL(doit, msg)
Definition debug.hh:40
std::string typeOf(const T &t)
Definition output.hh:43
double Real
Definition typedefs.hh:39
Set< F > makeSet(uint n, const F &first,...)
Definition set.hh:320