sourceFunction.hh

Go to the documentation of this file.
1 #ifndef _sourceFunction_hh
2 #define _sourceFunction_hh
3 
4 #include "formula.hh"
6 #include "hp2D.hh"
7 #include <math.h>
8 //#include "auxiliaryFunctions.hh"
9 
10 #define PI 3.14159265
11 
12 using concepts::Real;
13 using concepts::Real2d;
14 using concepts::Real3d;
15 using concepts::Cmplx;
16 using concepts::besselJnu;
17 using concepts::besselYnu;
18 
19 namespace concepts{
20 
21 
22 
23 
30 class SourceFunctionF0_x : public ElementFormula<Cmplx>{
31  public:
32  SourceFunctionF0_x( Real lambda, Real kn, Real R1, Real coef=1.0 ):
33  lam_(lambda), kn_(kn), R1_(R1), C_(coef){};
39  virtual Cmplx operator() (const ElementWithCell<Real>& elm, const Real p,
40  const Real t = 0.0) const;
41  virtual Cmplx operator() (const ElementWithCell<Real>& elm, const Real2d& p,
42  const Real t = 0.0) const;
43  virtual Cmplx operator() (const ElementWithCell<Real>& elm, const Real3d& p,
44  const Real t = 0.0) const;
46  virtual SourceFunctionF0_x* clone() const;
47 
48 
49  virtual ~SourceFunctionF0_x() {} ;
50 
51  private:
56 };
57 
58 
65 class SourceFunctionF0_y : public ElementFormula<Cmplx>{
66  public:
67  SourceFunctionF0_y( Real lambda, Real kn, Real R1, Real coef=1.0 ):
68  lam_(lambda), kn_(kn), R1_(R1), C_(coef) {};
74  virtual Cmplx operator() (const ElementWithCell<Real>& elm, const Real p,
75  const Real t = 0.0) const;
76  virtual Cmplx operator() (const ElementWithCell<Real>& elm, const Real2d& p,
77  const Real t = 0.0) const;
78  virtual Cmplx operator() (const ElementWithCell<Real>& elm, const Real3d& p,
79  const Real t = 0.0) const;
81  virtual SourceFunctionF0_y* clone() const;
82 
83 
84  virtual ~SourceFunctionF0_y() {} ;
85 
86  private:
91 };
92 
93 
94 }
95 
96 
97 #endif //_sourceFunction_hh
Design of the limit order source function in direction as .
virtual SourceFunctionF0_x * clone() const
Virtual copy constructor.
Point< Real, 2 > Real2d
SourceFunctionF0_x(Real lambda, Real kn, Real R1, Real coef=1.0)
Design of the limit order source function in direction as .
Point< Real, 3 > Real3d
virtual SourceFunctionF0_y * clone() const
Virtual copy constructor.
Interface for a formula defined element by element.
std::complex< Real > Cmplx
Type for a complex number. It also depends on the setting of Real.
Definition: typedefs.hh:39
virtual Cmplx operator()(const ElementWithCell< Real > &elm, const Real p, const Real t=0.0) const
Evaluates the formula.
SourceFunctionF0_y(Real lambda, Real kn, Real R1, Real coef=1.0)
virtual Cmplx operator()(const ElementWithCell< Real > &elm, const Real p, const Real t=0.0) const
Evaluates the formula.
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