Chi-Tech
GolubFischer.h
Go to the documentation of this file.
1#ifndef _golubfischer_h
2#define _golubfischer_h
3
4/* This module is the encapsulation of the algorithm
5 * depicted in:
6 *
7 * [1] Golub G.H. "How to generate unknown orthogonal
8 * polynomials out of known orthogonal polynomials",
9 * Numerical Analysis Project, Stanford University,
10 * November 1991.
11 *
12 * Comptuting roots of the polynomial is an adaption of
13 * Newton's method described in:
14 *
15 * [2] Barrera-Figueroa V., et al. "Multiple root finder
16 * algorithm for Legendre and Chebyshev polynomials
17 * via NewtonÂ’s method", Annales Mathematicae et
18 * Informaticae, volume 33, pages 3-13, 2006.
19 *
20 * Finally the weights of the resulting Gauss quadrature
21 * is obtained as described in:
22 *
23 * [3] Sloan D.P., "A New Multigroup Monte Carlo
24 * Scattering Algorithm Suitable for Neutral
25 * and Charged-Particle Boltzmann and
26 * Fokker-Planck Calculations", SAND83-7094,
27 * PhD Dissertation, May 1983.
28 */
29
30#include <iostream>
31#include <vector>
32#include <iomanip>
33#include <cmath>
34
35typedef std::vector<std::pair<double,double>> AnglePairs;
36typedef std::vector<double> Tvecdbl;
37
38//###################################################################
39namespace chi_math
40{
41 /**Implementation of the GolubFischer Modified ChebyShev Algorithm (MCA) to find
42 * moment-preserving angles from a set of moments computed for the expansion of
43 * an angular function in Legendre polynomials.
44 *
45 * Supply an even amount of moments to the method GetDiscreteScatAngles and it
46 * will populate its member xn_wn which is a vector of pairs, abscissae and
47 * weights. It also return a reference to xn_wn.
48 *
49 * alpha and beta are the recusrion coefficients of the orthogonal polynomials
50 * described in [1].
51 *
52 * \author John Grissom (with guidance from Jan)*/
54 {
55 public:
59 public:
61 private:
62 void MCA(Tvecdbl& in_mell, Tvecdbl& a, Tvecdbl& b, Tvecdbl& c);
63 void RootsOrtho(int& N, Tvecdbl& in_alpha, Tvecdbl& in_beta);
64 double dOrtho(int ell, double x, Tvecdbl& in_alpha, Tvecdbl& in_beta);
65 double Ortho(int ell, double x, Tvecdbl& in_alpha, Tvecdbl& in_beta);
66 };
67}
68
69#endif
std::vector< double > Tvecdbl
Definition: GolubFischer.h:36
std::vector< std::pair< double, double > > AnglePairs
Definition: GolubFischer.h:35
void RootsOrtho(int &N, Tvecdbl &in_alpha, Tvecdbl &in_beta)
void MCA(Tvecdbl &in_mell, Tvecdbl &a, Tvecdbl &b, Tvecdbl &c)
Definition: GolubFischer.cc:64
double dOrtho(int ell, double x, Tvecdbl &in_alpha, Tvecdbl &in_beta)
AnglePairs & GetDiscreteScatAngles(Tvecdbl &mell)
Definition: GolubFischer.cc:10
double Ortho(int ell, double x, Tvecdbl &in_alpha, Tvecdbl &in_beta)