sphericalFormula.hh

Go to the documentation of this file.
1 
7 #ifndef sphericalformula_hh
8 #define sphericalformula_hh
9 
10 #include "parsedFormula.hh"
11 
12 namespace concepts {
13 
14 template<class F = Real>
15  class SphericalFormula {};
16 
17 
18  // ****************************************************** SphericalFormula **
19 
32  template<>
33  class SphericalFormula<Real> : public ParsedFormula<Real> {
34  public:
36  SphericalFormula(const std::string formula) : ParsedFormula<Real>(formula) {}
39  virtual ~SphericalFormula();
40  virtual SphericalFormula<Real>* clone() const;
41 
42  virtual Real operator() (const Real p, const Real t = 0.0) const;
43  virtual Real operator() (const Real2d& p, const Real t = 0.0) const;
44  virtual Real operator() (const Real3d& p, const Real t = 0.0) const;
45  protected:
46  virtual std::ostream& info(std::ostream& os) const;
47  };
48 
49 
50 
51  // ****************************************************** SphericalFormula in 2 components **
52 
60  template<>
61  class SphericalFormula<Real2d> : public ParsedFormula<Real2d>{
62  public:
64  SphericalFormula(const std::string formula1, const std::string formula2) : ParsedFormula<Real2d>(formula1,formula2) {}
65  virtual ~SphericalFormula();
66  virtual SphericalFormula<Real2d>* clone() const;
67 
68  virtual Real2d operator() (const Real p, const Real t = 0.0) const;
69  virtual Real2d operator() (const Real2d& p, const Real t = 0.0) const;
70  virtual Real2d operator() (const Real3d& p, const Real t = 0.0) const;
71  protected:
72  virtual std::ostream& info(std::ostream& os) const;
73 
74  };
75 
76 
77 
78 
79 
80 
81 
82 
83 
84 } // namespace concepts
85 
86 #endif // sphericalformula_hh
virtual std::ostream & info(std::ostream &os) const
SphericalFormula(const std::string formula)
Constructor.
virtual SphericalFormula< Real2d > * clone() const
virtual SphericalFormula< Real > * clone() const
SphericalFormula(const std::string formula1, const std::string formula2)
Constructor.
Class representing SphericalFormulas in two in 2 components.
Formula in spherical polar coordinates.
virtual std::ostream & info(std::ostream &os) const
SphericalFormula(const SphericalFormula &frm)
Copy Constructor.
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