| # Gaudi Framework, version v22r2 |

Home |  | Generated: Tue May 10 2011

# EqSolver.h

Go to the documentation of this file.

    00001 // $Id: EqSolver.h,v 1.3 2006/11/30 10:40:53 mato Exp $
    00002 // ============================================================================
    00003 #ifndef ALGTOOLS_EQSOLVER_H
    00004 #define ALGTOOLS_EQSOLVER_H 1
    00005 // Include files
    00006 // from CLHEP
    00007 #include "CLHEP/GenericFunctions/GenericFunctions.hh"
    00008 #include "CLHEP/GenericFunctions/Argument.hh"
    00009 #include "CLHEP/GenericFunctions/AbsFunction.hh"
    00010 // from Gaudi
    00011 #include "GaudiAlg/GaudiTool.h"
    00012 //from GSL
    00013 #include "gsl/gsl_multiroots.h"
    00014
    00015 // local
    00016 #include "GaudiGSL/IEqSolver.h"
    00017
    00019 template <class TOOL> class ToolFactory;
    00020
    00028 class EqSolver : public extends1<GaudiTool, IEqSolver> {
    00029   // friend factory for instantiation
    00030   friend class ToolFactory<EqSolver> ;
    00031 public:
    00032   typedef std::vector<Equations>   Jacobi ;
    00033 public:
    00034
    00040   virtual StatusCode solver( const Equations& funcs ,
    00041                              Arg&             arg   ) const;
    00042
    00044   virtual StatusCode initialize ();
    00045   virtual StatusCode finalize   ();
    00046
    00047   virtual ~EqSolver( );
    00048
    00049   class  EqSolverMisc
    00050   {
    00051   public:
    00055     EqSolverMisc ( const Equations& funcs ,
    00056                    Arg&             arg   ) ;
    00057     // destructor
    00058     ~EqSolverMisc ();
    00059   public:
    00060     inline const Arg&       argument  () const { return m_argum   ; }
    00061     inline       Arg&       argument  ()       { return m_argum   ; }
    00062     inline const Equations* equations () const { return m_eqs     ; }
    00063     inline const Jacobi&    jacobi    () const { return m_jac     ; }
    00064   private:
    00065     // default constructor is disabled
    00066     EqSolverMisc () ;
    00067     // copy constructor is disabled
    00068     EqSolverMisc           ( const EqSolverMisc& );
    00069     // assignment operator is disabled
    00070     EqSolverMisc& operator=( const EqSolverMisc& );
    00071   private:
    00072     Arg              m_argum ;
    00073     const Equations* m_eqs   ;
    00074     Jacobi           m_jac   ;
    00075   };
    00076
    00077
    00084   EqSolver( const std::string& type,
    00085             const std::string& name,
    00086             const IInterface* parent);
    00087
    00088 private:
    00089
    00091   EqSolver();
    00093   EqSolver           ( const EqSolver& );
    00095   EqSolver& operator=( const EqSolver& );
    00096
    00097 private:
    00098
    00099   std::string m_algType         ;
    00100   double      m_max_iter        ;
    00101   double      m_norm_residual   ;
    00102   const gsl_multiroot_fdfsolver_type* m_type ;
    00103
    00104 };
    00105
    00106 // ============================================================================
    00107 // The END
    00108 // ============================================================================
    00109 #endif // ALGTOOLS_EQSOLVER_H
    00110 // ============================================================================

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines