#include "headcpp.h" #include "math.h" #include "tbl.h" #include "matrice.h" #include "leg.h" void legendre (int n, double& poly, double& pder, double& polym1, double& pderm1, double& polym2, double& pderm2, double x) { if (n==0) { poly = 1 ; pder = 0 ; } else if (n==1) { polym1 = 1 ; pderm1 = 0 ; poly = x ; pder = 1 ; } else { polym1 = 1 ; pderm1 = 0 ; poly = x ; pder = 1 ; for (int i=1 ; iitemax)) loop = false ; } if (ite > itemax) { cout << "Too many iterations..." << endl ; abort() ; } coloc[n-j-1] = x ; double auxi = cs*cd-ss*sd ; ss = cs*sd+ss*cd ; cs = auxi ; } if (n%2==1) coloc[(n-1)/2] = 0 ; // Copy of the symetric ones : for (int i=0 ; i