formula.hh

Go to the documentation of this file.
1 
6 #ifndef classformula_hh
7 #define classformula_hh
8 
9 #include "piecewiseFormula.hh"
10 
11 
12 namespace concepts {
13 
14  // *************************************************************** Formula **
15 
33  template<typename F>
34  class Formula : public PiecewiseFormulaBase<F> {
35  public:
36  typedef F value_type;
37  typedef typename Realtype<F>::type G;
38 
45  virtual F operator() (const Real p, const Real t = 0.0) const = 0;
46  virtual F operator() (const Real2d& p, const Real t = 0.0) const = 0;
47  virtual F operator() (const Real3d& p, const Real t = 0.0) const = 0;
53  virtual F operator() (const Connector& cntr, const Real p,
54  const Real t = 0.0) const
55  { return operator()(p, t); }
56  virtual F operator() (const Connector& cntr, const Real2d& p,
57  const Real t = 0.0) const
58  { return operator()(p, t); }
59  virtual F operator() (const Connector& cntr, const Real3d& p,
60  const Real t = 0.0) const
61  { return operator()(p, t); }
64  virtual Formula* clone() const = 0;
65  };
66 
67 } // namespace concepts
68 
69 #endif // formula_hh
70 
virtual F operator()(const Real p, const Real t=0.0) const =0
Application operator.
virtual Formula * clone() const =0
Interface for a formula.
Definition: lform.hh:18
Realtype< F >::type G
Definition: formula.hh:37
An abstract class for elements of the topology.
Definition: connector.hh:85
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