Bridge++  Ver. 1.1.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
math_Sign_Zolotarev.h
Go to the documentation of this file.
1 
14 #ifndef MATH_SIGN_ZOLOTAREV_INCLUDED
15 #define MATH_SIGN_ZOLOTAREV_INCLUDED
16 
17 #include <cmath>
18 #include <cassert>
19 
20 #include "defs.h"
21 #include "commonParameters.h"
22 
23 #include "bridgeIO.h"
24 using Bridge::vout;
25 
27 
38 {
39  protected:
41 
42  private:
43  int m_Np;
44  double m_bmax;
45  std::valarray<double> m_cl;
46  std::valarray<double> m_bl;
47 
48  public:
49  Math_Sign_Zolotarev(int Np, double bmax)
50  : m_vl(CommonParameters::Vlevel()),
51  m_Np(Np), m_bmax(bmax)
52  {
54  }
55 
56  void get_sign_parameters(std::valarray<double>& cl, std::valarray<double>& bl);
57 
58  double sign(double x);
59 
60  private:
61 
62  void set_sign_parameters();
63 
64  void poly_Zolotarev(double bmax, double& UK);
65 
66  void Jacobi_elliptic(double uu, double emmc,
67  double& sn, double& cn, double& dn);
68 };
69 #endif