Import Geant4 10.7.0.beta source tree
This commit is contained in:
@@ -23,112 +23,101 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// G4Integrator
|
||||
//
|
||||
// Class description:
|
||||
//
|
||||
// Template class collecting integrator methods for generic funtions.
|
||||
|
||||
// History:
|
||||
//
|
||||
// 04.09.99 V.Grichine, first implementation based on G4SimpleIntegration class
|
||||
// H.P.Wellisch, G.Cosmo, and E.Cherniaev advises
|
||||
// 08.09.99 V.Grichine, methods involving orthogonal polynomials
|
||||
//
|
||||
|
||||
|
||||
// Author: V.Grichine, 04.09.1999 - First implementation based on
|
||||
// G4SimpleIntegration class with H.P.Wellisch, G.Cosmo, and
|
||||
// E.TCherniaev advises
|
||||
// --------------------------------------------------------------------
|
||||
#ifndef G4INTEGRATOR_HH
|
||||
#define G4INTEGRATOR_HH 1
|
||||
|
||||
#include "G4Types.hh"
|
||||
#include <cmath>
|
||||
#include <CLHEP/Units/PhysicalConstants.h>
|
||||
#include <cmath>
|
||||
|
||||
template <class T, class F>
|
||||
class G4Integrator
|
||||
{
|
||||
public: // with description
|
||||
public:
|
||||
G4Integrator() { ; }
|
||||
~G4Integrator() { ; }
|
||||
|
||||
G4Integrator(){;}
|
||||
~G4Integrator(){;}
|
||||
|
||||
G4double Simpson( T& typeT, F f, G4double a, G4double b, G4int n ) ;
|
||||
G4double Simpson( T* ptrT, F f, G4double a, G4double b, G4int n ) ;
|
||||
G4double Simpson( G4double (*f)(G4double),
|
||||
G4double a, G4double b, G4int n ) ;
|
||||
G4double Simpson(T& typeT, F f, G4double a, G4double b, G4int n);
|
||||
G4double Simpson(T* ptrT, F f, G4double a, G4double b, G4int n);
|
||||
G4double Simpson(G4double (*f)(G4double), G4double a, G4double b, G4int n);
|
||||
// Simpson integration method
|
||||
|
||||
G4double AdaptiveGauss( T& typeT, F f, G4double a, G4double b, G4double e ) ;
|
||||
G4double AdaptiveGauss( T* ptrT, F f, G4double a, G4double b, G4double e ) ;
|
||||
G4double AdaptiveGauss( G4double (*f)(G4double),
|
||||
G4double a, G4double b, G4double e ) ;
|
||||
G4double AdaptiveGauss(T& typeT, F f, G4double a, G4double b, G4double e);
|
||||
G4double AdaptiveGauss(T* ptrT, F f, G4double a, G4double b, G4double e);
|
||||
G4double AdaptiveGauss(G4double (*f)(G4double), G4double a, G4double b,
|
||||
G4double e);
|
||||
// Adaptive Gauss method
|
||||
|
||||
|
||||
// Integration methods involving orthogohol polynomials
|
||||
|
||||
G4double Legendre( T& typeT, F f, G4double a, G4double b, G4int n) ;
|
||||
G4double Legendre( T* ptrT, F f, G4double a, G4double b, G4int n) ;
|
||||
G4double Legendre( G4double (*f)(G4double), G4double a, G4double b, G4int n) ;
|
||||
G4double Legendre(T& typeT, F f, G4double a, G4double b, G4int n);
|
||||
G4double Legendre(T* ptrT, F f, G4double a, G4double b, G4int n);
|
||||
G4double Legendre(G4double (*f)(G4double), G4double a, G4double b, G4int n);
|
||||
//
|
||||
// Methods involving Legendre polynomials
|
||||
// Methods involving Legendre polynomials
|
||||
|
||||
G4double Legendre10( T& typeT, F f,G4double a, G4double b) ;
|
||||
G4double Legendre10( T* ptrT, F f,G4double a, G4double b) ;
|
||||
G4double Legendre10( G4double (*f)(G4double), G4double a, G4double b) ;
|
||||
G4double Legendre10(T& typeT, F f, G4double a, G4double b);
|
||||
G4double Legendre10(T* ptrT, F f, G4double a, G4double b);
|
||||
G4double Legendre10(G4double (*f)(G4double), G4double a, G4double b);
|
||||
//
|
||||
// Legendre10 is very fast and accurate enough
|
||||
|
||||
G4double Legendre96( T& typeT, F f,G4double a, G4double b) ;
|
||||
G4double Legendre96( T* ptrT, F f,G4double a, G4double b) ;
|
||||
G4double Legendre96( G4double (*f)(G4double), G4double a, G4double b) ;
|
||||
G4double Legendre96(T& typeT, F f, G4double a, G4double b);
|
||||
G4double Legendre96(T* ptrT, F f, G4double a, G4double b);
|
||||
G4double Legendre96(G4double (*f)(G4double), G4double a, G4double b);
|
||||
//
|
||||
// Legendre96 is very accurate and fast enough
|
||||
|
||||
G4double Chebyshev( T& typeT, F f, G4double a, G4double b, G4int n) ;
|
||||
G4double Chebyshev( T* ptrT, F f, G4double a, G4double b, G4int n) ;
|
||||
G4double Chebyshev( G4double (*f)(G4double), G4double a, G4double b, G4int n) ;
|
||||
G4double Chebyshev(T& typeT, F f, G4double a, G4double b, G4int n);
|
||||
G4double Chebyshev(T* ptrT, F f, G4double a, G4double b, G4int n);
|
||||
G4double Chebyshev(G4double (*f)(G4double), G4double a, G4double b, G4int n);
|
||||
//
|
||||
// Methods involving Chebyshev polynomials
|
||||
|
||||
G4double Laguerre( T& typeT, F f, G4double alpha, G4int n) ;
|
||||
G4double Laguerre( T* ptrT, F f, G4double alpha, G4int n) ;
|
||||
G4double Laguerre( G4double (*f)(G4double), G4double alpha, G4int n) ;
|
||||
// Methods involving Chebyshev polynomials
|
||||
|
||||
G4double Laguerre(T& typeT, F f, G4double alpha, G4int n);
|
||||
G4double Laguerre(T* ptrT, F f, G4double alpha, G4int n);
|
||||
G4double Laguerre(G4double (*f)(G4double), G4double alpha, G4int n);
|
||||
//
|
||||
// Method involving Laguerre polynomials
|
||||
|
||||
G4double Hermite( T& typeT, F f, G4int n) ;
|
||||
G4double Hermite( T* ptrT, F f, G4int n) ;
|
||||
G4double Hermite( G4double (*f)(G4double), G4int n) ;
|
||||
G4double Hermite(T& typeT, F f, G4int n);
|
||||
G4double Hermite(T* ptrT, F f, G4int n);
|
||||
G4double Hermite(G4double (*f)(G4double), G4int n);
|
||||
//
|
||||
// Method involving Hermite polynomials
|
||||
|
||||
G4double Jacobi( T& typeT, F f, G4double alpha, G4double beta, G4int n) ;
|
||||
G4double Jacobi( T* ptrT, F f, G4double alpha, G4double beta, G4int n) ;
|
||||
G4double Jacobi( G4double (*f)(G4double), G4double alpha,
|
||||
G4double beta, G4int n) ;
|
||||
G4double Jacobi(T& typeT, F f, G4double alpha, G4double beta, G4int n);
|
||||
G4double Jacobi(T* ptrT, F f, G4double alpha, G4double beta, G4int n);
|
||||
G4double Jacobi(G4double (*f)(G4double), G4double alpha, G4double beta,
|
||||
G4int n);
|
||||
// Method involving Jacobi polynomials
|
||||
|
||||
|
||||
protected:
|
||||
// Auxiliary functions for adaptive Gauss method
|
||||
|
||||
// Auxiliary function for adaptive Gauss method
|
||||
G4double Gauss(T& typeT, F f, G4double a, G4double b);
|
||||
G4double Gauss(T* ptrT, F f, G4double a, G4double b);
|
||||
G4double Gauss(G4double (*f)(G4double), G4double a, G4double b);
|
||||
|
||||
G4double Gauss( T& typeT, F f, G4double a, G4double b ) ;
|
||||
G4double Gauss( T* ptrT, F f, G4double a, G4double b ) ;
|
||||
G4double Gauss( G4double (*f)(G4double), G4double a, G4double b) ;
|
||||
void AdaptGauss(T& typeT, F f, G4double a, G4double b, G4double e,
|
||||
G4double& sum, G4int& n);
|
||||
void AdaptGauss(T* typeT, F f, G4double a, G4double b, G4double e,
|
||||
G4double& sum, G4int& n);
|
||||
void AdaptGauss(G4double (*f)(G4double), G4double a, G4double b, G4double e,
|
||||
G4double& sum, G4int& n);
|
||||
|
||||
void AdaptGauss( T& typeT, F f, G4double a, G4double b,
|
||||
G4double e, G4double& sum, G4int& n) ;
|
||||
void AdaptGauss( T* typeT, F f, G4double a, G4double b,
|
||||
G4double e, G4double& sum, G4int& n ) ;
|
||||
void AdaptGauss( G4double (*f)(G4double), G4double a, G4double b,
|
||||
G4double e, G4double& sum, G4int& n ) ;
|
||||
|
||||
G4double GammaLogarithm(G4double xx) ;
|
||||
|
||||
|
||||
} ;
|
||||
G4double GammaLogarithm(G4double xx);
|
||||
};
|
||||
|
||||
#include "G4Integrator.icc"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user