GeoModel - GeoModelCore
Theta.h
1 //==========================================================================//
2 // Imported from the QAT library (qat.pitt.edu) by the copyright holder //
3 // Joe Boudreau. Software licensed under the terms and conditions of the //
4 // GNU Lesser Public License v3. //
5 //==========================================================================//
6 //---------------------Theta------------------------------------------------//
7 // //
8 // Class Theta, also known as the heavyside step function. The derivative //
9 // is zero. Everywhere, except at the origin. However QatGenericFuctions //
10 // cannot handle the delta-function, so in this implementation the //
11 // derivative is zero, everywhere. //
12 //--------------------------------------------------------------------------//
13 #ifndef Theta_h
14 #define Theta_h 1
15 #include "GeoGenericFunctions/AbsFunction.h"
16 namespace GeoGenfun {
17 
18  class Theta : public AbsFunction {
19 
20  FUNCTION_OBJECT_DEF(Theta)
21 
22  public:
23 
24  // Constructor
25  Theta();
26 
27  // Destructor
28  virtual ~Theta();
29 
30  // Copy constructor
31  Theta(const Theta &right);
32 
33  // Retreive function value
34  virtual double operator ()(double argument) const override;
35  virtual double operator ()(const Argument & a) const override {return operator() (a[0]);}
36 
37  // Derivative.
38  virtual Derivative partial (unsigned int) const override;
39 
40  // Does this function have an analytic derivative?
41  virtual bool hasAnalyticDerivative() const override {return true;}
42 
43 
44  private:
45 
46  // It is illegal to assign a Theta
47  const Theta & operator=(const Theta &right);
48 
49  };
50 } // namespace GeoGenfun
51 
52 #endif
Definition: Abs.h:15