Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-06-02 08:48:22

0001 #ifndef GAUSSLEGENDRE_INTEGRATOR_1D_H_
0002 #define GAUSSLEGENDRE_INTEGRATOR_1D_H_
0003 
0004 /**
0005  * @file GaussLegendreIntegrator1D.h
0006  * @author Bryan BERTHOU (SPhN / CEA Saclay)
0007  * @author Michel Guidal and Pawel Sznajder (IPNO)
0008  * @author Cédric Mezrag (ANL / PHY)
0009  * @author Nabil Chouika (SPhN / CEA Saclay)
0010  * @date 21 December 2015
0011  * @version 1.0
0012  */
0013 
0014 //#include <string>
0015 #include "QuadratureIntegrator1D.h"
0016 
0017 namespace NumA {
0018 
0019 /**
0020  * @class GaussLegendreIntegrator1D
0021  *
0022  * @brief Gauss-Legendre quadrature.
0023  *
0024  * See Integrator1D documentation for an example.
0025  */
0026 
0027 class GaussLegendreIntegrator1D: public QuadratureIntegrator1D {
0028 public:
0029     /**
0030      * Constructor.
0031      * @param N Order of the quadrature (number of nodes).
0032      */
0033     GaussLegendreIntegrator1D(unsigned int N = 50); // TODO how many steps by default ?
0034     /**
0035      * Default destructor.
0036      */
0037     virtual ~GaussLegendreIntegrator1D();
0038 
0039     virtual void setN(unsigned int n);
0040 
0041     virtual GaussLegendreIntegrator1D* clone() const;
0042 
0043 protected:
0044     /**
0045      * Copy constructor.
0046      * Called by clone().
0047      * @param other GaussLegendreIntegrator1D object to copy.
0048      */
0049     GaussLegendreIntegrator1D(const GaussLegendreIntegrator1D &other);
0050     void setNodesAndWeights(); ///< Computes the nodes and weights of the Gauss-Legendre quadrature. Called when N is set.
0051 };
0052 
0053 } /* namespace NumA */
0054 
0055 #endif /* GAUSSLEGENDRE_INTEGRATOR_1D_H_ */