EqSolver.h
Go to the documentation of this file.
1 #ifndef ALGTOOLS_EQSOLVER_H
2 #define ALGTOOLS_EQSOLVER_H 1
3 // Include files
4 // from CLHEP
5 #include "CLHEP/GenericFunctions/GenericFunctions.hh"
6 #include "CLHEP/GenericFunctions/Argument.hh"
7 #include "CLHEP/GenericFunctions/AbsFunction.hh"
8 // from Gaudi
9 #include "GaudiAlg/GaudiTool.h"
10 //from GSL
11 #include "gsl/gsl_multiroots.h"
12 
13 // local
14 #include "GaudiGSL/IEqSolver.h"
15 
23 class EqSolver : public extends1<GaudiTool, IEqSolver> {
24 public:
25  typedef std::vector<Equations> Jacobi ;
26 public:
27 
33  StatusCode solver( const Equations& funcs ,
34  Arg& arg ) const override;
35 
37  StatusCode initialize () override;
38  StatusCode finalize () override;
39 
40  ~EqSolver( ) override;
41 
43  {
44  public:
48  EqSolverMisc ( const Equations& funcs ,
49  Arg& arg ) ;
50  // destructor
51  ~EqSolverMisc ();
52  public:
53  inline const Arg& argument () const { return m_argum ; }
54  inline Arg& argument () { return m_argum ; }
55  inline const Equations* equations () const { return m_eqs ; }
56  inline const Jacobi& jacobi () const { return m_jac ; }
57  private:
58  // default constructor is disabled
59  EqSolverMisc () = delete;
60  // copy constructor is disabled
61  EqSolverMisc ( const EqSolverMisc& ) = delete;
62  // assignment operator is disabled
63  EqSolverMisc& operator=( const EqSolverMisc& ) = delete;
64  private:
65  Arg m_argum ;
66  const Equations* m_eqs ;
67  Jacobi m_jac ;
68  };
69 
70 
77  EqSolver( const std::string& type,
78  const std::string& name,
79  const IInterface* parent);
80 
81 private:
82 
84  EqSolver();
86  EqSolver ( const EqSolver& );
88  EqSolver& operator=( const EqSolver& );
89 
90 private:
91 
92  std::string m_algType ;
93  double m_max_iter ;
94  double m_norm_residual ;
95  const gsl_multiroot_fdfsolver_type* m_type ;
96 
97 };
98 
99 // ============================================================================
100 // The END
101 // ============================================================================
102 #endif // ALGTOOLS_EQSOLVER_H
103 // ============================================================================
std::vector< Equations > Jacobi
Definition: EqSolver.h:25
const Equations * m_eqs
Definition: EqSolver.h:66
EqSolver()
default constructor is private
const Jacobi & jacobi() const
Definition: EqSolver.h:56
StatusCode solver(const Equations &funcs, Arg &arg) const override
Solving nonlinear system with N equations in N unknowns of the function "GenFunc".
Definition: EqSolver.cpp:188
std::string m_algType
Definition: EqSolver.h:92
The simplest concrete implementation of IEqSolver interface.
Definition: EqSolver.h:23
StatusCode initialize() override
Overriding initialize.
Definition: EqSolver.cpp:270
const Arg & argument() const
Definition: EqSolver.h:53
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
double m_norm_residual
Definition: EqSolver.h:94
const Equations * equations() const
Definition: EqSolver.h:55
Definition of the basic interface.
Definition: IInterface.h:234
EqSolver & operator=(const EqSolver &)
assignment operator is
double m_max_iter
Definition: EqSolver.h:93
Base class used to extend a class implementing other interfaces.
Definition: extends.h:10
StatusCode finalize() override
Definition: EqSolver.cpp:325
const gsl_multiroot_fdfsolver_type * m_type
Definition: EqSolver.h:95
EqSolverMisc & operator=(const EqSolverMisc &)=delete
~EqSolver() override
Destructor.
Definition: EqSolver.cpp:338
string type
Definition: gaudirun.py:151