elementFormula.hh

Go to the documentation of this file.
1 
6 #ifndef elementformula_hh
7 #define elementformula_hh
8 
9 #include "basics/cloneable.hh"
10 #include "basics/outputOperator.hh"
11 #include "basics/typedefs.hh"
13 #include "toolbox/sharedPointer.hh"
14 
15 namespace concepts {
16 
17  // forward declaration
18  template<typename F>
20 
21 
22  // ******************************************************** ElementFormula **
23 
34  template<typename F, typename G = typename Realtype<F>::type>
35  class ElementFormula : public Cloneable, public virtual OutputOperator {
36  public:
37  typedef F value_type;
38 
44  virtual F operator() (const ElementWithCell<G>& elm, const Real p,
45  const Real t = 0.0) const = 0;
51  virtual F operator() (const ElementWithCell<G>& elm, const Real2d& p,
52  const Real t = 0.0) const = 0;
58  virtual F operator() (const ElementWithCell<G>& elm, const Real3d& p,
59  const Real t = 0.0) const = 0;
61  virtual ElementFormula<F,G>* clone() const = 0;
62 
63  virtual ~ElementFormula() { }
64 
65 #if 0
66  bool operator==(const ElementFormula& other) {
67  return id == other.id;
68  }
69  private:
70  int id;
71  static int CUR_ID;
72 #endif
73  };
74 
75 } // namespace concepts
76 
77 #endif // elementformula_hh
78 
Element with cell.
Cloneable interface.
Definition: cloneable.hh:16
Interface for a formula defined element by element.
bool operator==(const Point< F, dim > &x, const Point< F, dim > &y)
virtual ElementFormula< F, G > * clone() const =0
Virtual copy constructor.
virtual F operator()(const ElementWithCell< G > &elm, const Real p, const Real t=0.0) const =0
Evaluates the formula.
Class providing an output operator.
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich