formulas2D.hh

Go to the documentation of this file.
1 
7 #ifndef formulas2D_hh
8 #define formulas2D_hh
9 
10 #include "formula.hh"
11 
12 namespace concepts {
13 
14 
15  // *********************************************************** Exp_i_n_phi **
16 
22  class Exp_i_n_phi : public Formula<Cmplx> {
23  public:
25  Exp_i_n_phi(const int n = 0) : n_(n) {}
26 
27  virtual Cmplx operator() (const Real p, const Real t = 0.0) const;
28  virtual Cmplx operator() (const Real2d& p, const Real t = 0.0) const;
29  virtual Cmplx operator() (const Real3d& p, const Real t = 0.0) const;
30 
31  // virtual constructor
32  virtual Exp_i_n_phi* clone() const {
33  return new Exp_i_n_phi(n_);
34  }
35  protected:
36  virtual std::ostream& info(std::ostream& os) const;
37  private:
39  const int n_;
40  };
41 
42  // ************************************************************* Cos_n_phi **
43 
49  class Cos_n_phi : public Formula<Real> {
50  public:
52  Cos_n_phi(const int n = 0) : n_(n) {}
53 
54  virtual Real operator() (const Real p, const Real t = 0.0) const;
55  virtual Real operator() (const Real2d& p, const Real t = 0.0) const;
56  virtual Real operator() (const Real3d& p, const Real t = 0.0) const;
57 
58  // virtual constructor
59  virtual Cos_n_phi* clone() const {
60  return new Cos_n_phi(n_);
61  }
62  protected:
63  virtual std::ostream& info(std::ostream& os) const;
64  private:
66  const int n_;
67  };
68 
69  // ************************************************************* Sin_n_phi **
70 
76  class Sin_n_phi : public Formula<Real> {
77  public:
79  Sin_n_phi(const int n = 1);
80 
81  virtual Real operator() (const Real p, const Real t = 0.0) const;
82  virtual Real operator() (const Real2d& p, const Real t = 0.0) const;
83  virtual Real operator() (const Real3d& p, const Real t = 0.0) const;
84 
85  // virtual constructor
86  virtual Sin_n_phi* clone() const {
87  return new Sin_n_phi(n_);
88  }
89  protected:
90  virtual std::ostream& info(std::ostream& os) const;
91  private:
93  const int n_;
94  };
95 
96  // ************************************************************* Exp_i_n_x **
97 
103  class Exp_i_n_x : public Formula<Cmplx> {
104  public:
106  Exp_i_n_x(const int n = 0, const Real L = 1.0);
107 
108  virtual Cmplx operator() (const Real p, const Real t = 0.0) const;
109  virtual Cmplx operator() (const Real2d& p, const Real t = 0.0) const;
110  virtual Cmplx operator() (const Real3d& p, const Real t = 0.0) const;
111 
112  // virtual constructor
113  virtual Exp_i_n_x* clone() const {
114  return new Exp_i_n_x(n_, L_);
115  }
116  protected:
117  virtual std::ostream& info(std::ostream& os) const;
118  private:
120  const int n_;
122  const Real L_;
123  };
124 
125  // *************************************************************** Cos_n_x **
126 
132  class Cos_n_x : public Formula<Real> {
133  public:
135  Cos_n_x(const int n = 0, const Real L = 1.0);
136 
137  virtual Real operator() (const Real p, const Real t = 0.0) const;
138  virtual Real operator() (const Real2d& p, const Real t = 0.0) const;
139  virtual Real operator() (const Real3d& p, const Real t = 0.0) const;
140 
141  // virtual constructor
142  virtual Cos_n_x* clone() const {
143  return new Cos_n_x(n_, L_);
144  }
145  protected:
146  virtual std::ostream& info(std::ostream& os) const;
147  private:
149  const int n_;
151  const Real L_;
152  };
153 
154  // *************************************************************** Sin_n_x **
155 
162  class Sin_n_x : public Formula<Real> {
163  public:
165  Sin_n_x(const int n = 1, const Real L = 1.0);
166 
167  virtual Real operator() (const Real p, const Real t = 0.0) const;
168  virtual Real operator() (const Real2d& p, const Real t = 0.0) const;
169  virtual Real operator() (const Real3d& p, const Real t = 0.0) const;
170 
171  // virtual constructor
172  virtual Sin_n_x* clone() const {
173  return new Sin_n_x(n_, L_);
174  }
175  protected:
176  virtual std::ostream& info(std::ostream& os) const;
177  private:
179  const int n_;
181  const Real L_;
182  };
183 
184  // ************************************************************* Exp_i_n_y **
185 
191  class Exp_i_n_y : public Formula<Cmplx> {
192  public:
194  Exp_i_n_y(const int n = 0, const Real L = 1.0);
195 
196  virtual Cmplx operator() (const Real p, const Real t = 0.0) const;
197  virtual Cmplx operator() (const Real2d& p, const Real t = 0.0) const;
198  virtual Cmplx operator() (const Real3d& p, const Real t = 0.0) const;
199 
200  // virtual constructor
201  virtual Exp_i_n_y* clone() const {
202  return new Exp_i_n_y(n_, L_);
203  }
204  protected:
205  virtual std::ostream& info(std::ostream& os) const;
206  private:
208  const int n_;
210  const Real L_;
211  };
212 
213  // *************************************************************** Cos_n_y **
214 
220  class Cos_n_y : public Formula<Real> {
221  public:
223  Cos_n_y(const int n = 0, const Real L = 1.0);
224 
225  virtual Real operator() (const Real p, const Real t = 0.0) const;
226  virtual Real operator() (const Real2d& p, const Real t = 0.0) const;
227  virtual Real operator() (const Real3d& p, const Real t = 0.0) const;
228 
229  // virtual constructor
230  virtual Cos_n_y* clone() const {
231  return new Cos_n_y(n_, L_);
232  }
233  protected:
234  virtual std::ostream& info(std::ostream& os) const;
235  private:
237  const int n_;
239  const Real L_;
240  };
241 
242  // *************************************************************** Sin_n_y **
243 
250  class Sin_n_y : public Formula<Real> {
251  public:
253  Sin_n_y(const int n = 1, const Real L = 1.0);
254 
255  virtual Real operator() (const Real p, const Real t = 0.0) const;
256  virtual Real operator() (const Real2d& p, const Real t = 0.0) const;
257  virtual Real operator() (const Real3d& p, const Real t = 0.0) const;
258 
259  // virtual constructor
260  virtual Sin_n_y* clone() const {
261  return new Sin_n_y(n_, L_);
262  }
263  protected:
264  virtual std::ostream& info(std::ostream& os) const;
265  private:
267  const int n_;
269  const Real L_;
270  };
271 
272 
273 } // namespace concepts
274 
275 #endif // formulas2D_hh
Class for evaluating for points in cartesian coordinates.
Definition: formulas2D.hh:49
Exp_i_n_y(const int n=0, const Real L=1.0)
Constructor.
virtual Exp_i_n_x * clone() const
Definition: formulas2D.hh:113
virtual std::ostream & info(std::ostream &os) const
virtual Cmplx operator()(const Real p, const Real t=0.0) const
Application operator.
Class for evaluating for points in cartesian coordinates.
Definition: formulas2D.hh:132
Class for evaluating for points in cartesian coordinates.
Definition: formulas2D.hh:76
virtual Sin_n_y * clone() const
Definition: formulas2D.hh:260
const int n_
exponent of the function
Definition: formulas2D.hh:237
const int n_
exponent of the function
Definition: formulas2D.hh:93
Sin_n_y(const int n=1, const Real L=1.0)
Constructor.
virtual std::ostream & info(std::ostream &os) const
virtual Real operator()(const Real p, const Real t=0.0) const
Application operator.
virtual std::ostream & info(std::ostream &os) const
const Real L_
length of the interval
Definition: formulas2D.hh:122
const int n_
exponent of the function
Definition: formulas2D.hh:39
virtual Cmplx operator()(const Real p, const Real t=0.0) const
Application operator.
const Real L_
length of the interval
Definition: formulas2D.hh:181
virtual Cmplx operator()(const Real p, const Real t=0.0) const
Application operator.
virtual std::ostream & info(std::ostream &os) const
Interface for a formula.
Definition: lform.hh:18
const int n_
exponent of the function
Definition: formulas2D.hh:179
virtual std::ostream & info(std::ostream &os) const
const Real L_
length of the interval
Definition: formulas2D.hh:151
Class for evaluating for points in cartesian coordinates.
Definition: formulas2D.hh:22
Cos_n_y(const int n=0, const Real L=1.0)
Constructor.
const int n_
exponent of the function
Definition: formulas2D.hh:149
Class for evaluating for points in cartesian coordinates.
Definition: formulas2D.hh:103
Cos_n_phi(const int n=0)
Constructor.
Definition: formulas2D.hh:52
const int n_
exponent of the function
Definition: formulas2D.hh:120
const int n_
exponent of the function
Definition: formulas2D.hh:208
Class for evaluating for points in cartesian coordinates.
Definition: formulas2D.hh:250
Class for evaluating for points in cartesian coordinates.
Definition: formulas2D.hh:220
Exp_i_n_phi(const int n=0)
Constructor.
Definition: formulas2D.hh:25
Sin_n_phi(const int n=1)
Constructor.
virtual std::ostream & info(std::ostream &os) const
Sin_n_x(const int n=1, const Real L=1.0)
Constructor.
virtual Cos_n_x * clone() const
Definition: formulas2D.hh:142
const int n_
exponent of the function
Definition: formulas2D.hh:267
virtual Exp_i_n_phi * clone() const
Definition: formulas2D.hh:32
virtual Exp_i_n_y * clone() const
Definition: formulas2D.hh:201
const Real L_
length of the interval
Definition: formulas2D.hh:239
std::complex< Real > Cmplx
Type for a complex number. It also depends on the setting of Real.
Definition: typedefs.hh:39
virtual std::ostream & info(std::ostream &os) const
Class for evaluating for points in cartesian coordinates.
Definition: formulas2D.hh:162
Cos_n_x(const int n=0, const Real L=1.0)
Constructor.
virtual Cos_n_phi * clone() const
Definition: formulas2D.hh:59
virtual Real operator()(const Real p, const Real t=0.0) const
Application operator.
Class for evaluating for points in cartesian coordinates.
Definition: formulas2D.hh:191
const int n_
exponent of the function
Definition: formulas2D.hh:66
virtual Real operator()(const Real p, const Real t=0.0) const
Application operator.
virtual std::ostream & info(std::ostream &os) const
Exp_i_n_x(const int n=0, const Real L=1.0)
Constructor.
virtual Real operator()(const Real p, const Real t=0.0) const
Application operator.
virtual Real operator()(const Real p, const Real t=0.0) const
Application operator.
virtual std::ostream & info(std::ostream &os) const
virtual Sin_n_phi * clone() const
Definition: formulas2D.hh:86
const Real L_
length of the interval
Definition: formulas2D.hh:269
virtual Cos_n_y * clone() const
Definition: formulas2D.hh:230
double Real
Type normally used for a floating point number.
Definition: typedefs.hh:36
virtual Sin_n_x * clone() const
Definition: formulas2D.hh:172
virtual Real operator()(const Real p, const Real t=0.0) const
Application operator.
Basic namespace for Concepts-2.
Definition: pml_formula.h:16
const Real L_
length of the interval
Definition: formulas2D.hh:210
Page URL: http://wiki.math.ethz.ch/bin/view/Concepts/WebHome
21 August 2020
© 2020 Eidgenössische Technische Hochschule Zürich