Bridge++  Ver. 1.1.x
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
force_F_Rational.h
Go to the documentation of this file.
1 
14 #ifndef FORCE_F_RATIONAL_INCLUDED
15 #define FORCE_F_RATIONAL_INCLUDED
16 
17 #include "force.h"
18 #include "fopr_Rational.h"
19 #include "math_Rational.h"
20 #include "field_F.h"
21 
22 #include "bridgeIO.h"
23 using Bridge::vout;
24 
26 
35 //- parameters class
37 {
38  public:
40 };
41 //- end
42 
43 class Force_F_Rational : public Force
44 {
45  private:
46  int m_Np; // number of poles in rational approx.
47  int m_n_exp, m_d_exp; // numerator and denominator of the exponent
48  double m_x_min, m_x_max; // valid range of approximate sign function
49  int m_Niter; // max iteration of shiftsolver
50  double m_Stop_cond; // stopping condition of shift solver
51 
53 
56 
57  // rational approx. coefficients
58  double m_a0;
59  std::valarray<double> m_bl;
60  std::valarray<double> m_cl;
61 
62  public:
63 
64  Force_F_Rational(Fopr *fopr, Force *force)
65  : Force(), m_fopr(fopr), m_force(force) {}
66 
68 
69  void set_parameters(const Parameters& params);
70 
71  // void set_parameters (const Parameters_Fopr_Rational& params);
72  void set_parameters(int Np, int n_exp, int d_exp, double x_min, double x_max,
73  int Niter, double Stop_cond);
74 
75  void set_config(Field *U)
76  {
77  m_U = (Field_G *)U;
78  m_fopr->set_config(U);
79  m_force->set_config(U);
80  }
81 
82  Field force_core(const Field&);
83  Field force_udiv(const Field&);
84 
85  // Field force_core1(const Field_F&, const Field_F&);
86 
87  private:
88  void init_parameters();
89 };
90 #endif