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 extends<GaudiTool,
24  IEqSolver> {
25 public:
27 public:
28 
34  StatusCode solver( const Equations& funcs ,
35  Arg& arg ) const override;
36 
38  StatusCode initialize () override;
39  StatusCode finalize () override;
40 
41  ~EqSolver( ) override;
42 
44  {
45  public:
49  EqSolverMisc ( const Equations& funcs ,
50  Arg& arg ) ;
51  // destructor
52  ~EqSolverMisc ();
53  public:
54  inline const Arg& argument () const { return m_argum ; }
55  inline Arg& argument () { return m_argum ; }
56  inline const Equations* equations () const { return m_eqs ; }
57  inline const Jacobi& jacobi () const { return m_jac ; }
58  private:
59  // default constructor is disabled
60  EqSolverMisc () = delete;
61  // copy constructor is disabled
62  EqSolverMisc ( const EqSolverMisc& ) = delete;
63  // assignment operator is disabled
64  EqSolverMisc& operator=( const EqSolverMisc& ) = delete;
65  private:
66  Arg m_argum ;
67  const Equations* m_eqs ;
68  Jacobi m_jac ;
69  };
70 
71 
78  EqSolver( const std::string& type,
79  const std::string& name,
80  const IInterface* parent);
81 
82 private:
83 
85  EqSolver();
87  EqSolver ( const EqSolver& );
89  EqSolver& operator=( const EqSolver& );
90 
91 private:
92 
94  double m_max_iter ;
95  double m_norm_residual ;
96  const gsl_multiroot_fdfsolver_type* m_type ;
97 
98 };
99 
100 // ============================================================================
101 // The END
102 // ============================================================================
103 #endif // ALGTOOLS_EQSOLVER_H
104 // ============================================================================
std::vector< Equations > Jacobi
Definition: EqSolver.h:26
Header file for class GaudiAlgorithm.
const Equations * m_eqs
Definition: EqSolver.h:67
EqSolver()
default constructor is private
const Jacobi & jacobi() const
Definition: EqSolver.h:57
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
STL class.
std::string m_algType
Definition: EqSolver.h:93
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:54
This class is used for returning status codes from appropriate routines.
Definition: StatusCode.h:26
double m_norm_residual
Definition: EqSolver.h:95
const Equations * equations() const
Definition: EqSolver.h:56
Definition of the basic interface.
Definition: IInterface.h:234
EqSolver & operator=(const EqSolver &)
assignment operator is
double m_max_iter
Definition: EqSolver.h:94
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:96
const std::string & type() const override
Retrieve type (concrete class) of the sub-algtool.
Definition: AlgTool.cpp:72
EqSolverMisc & operator=(const EqSolverMisc &)=delete
~EqSolver() override
Destructor.
Definition: EqSolver.cpp:338
const std::string & name() const override
Retrieve full identifying name of the concrete tool object.
Definition: AlgTool.cpp:65
const IInterface * parent() const override
Retrieve parent of the sub-algtool.
Definition: AlgTool.cpp:79