Skip to content
Snippets Groups Projects
Commit 802b249e authored by nadolski's avatar nadolski
Browse files

Compatibility for MAC OS Mavericks

parent fe922b94
No related branches found
No related tags found
No related merge requests found
......@@ -19,7 +19,7 @@
#******files********
# relative directory of the files in the script
# in_dir /Users/nadolski/codes/tracy/TracyIII/tracy/tools/
in_dir /Users/nadolski/codes/tracy/maille/soleil/
in_dir /Users/nadolski/Documents/Travail/codes/tracy/maille/soleil/
# lattice file wihout .lat extension
# lat_file soleil_HU36_checkcode
# lat_file solamor2_reglage_focalisation_chcvqt_thicksextu_LQPintermediaire_QFF
......@@ -50,9 +50,9 @@ in_dir /Users/nadolski/codes/tracy/maille/soleil/
# MultipoleFlag must be true if ThinsextFlag is true
ThinsextFlag false
# files for looking for the multipole of corrector (Machine current based)
fic_hcorr /Users/nadolski/Documents/codes/tracy/maille/soleil/corh.txt
fic_vcorr /Users/nadolski/Documents/codes/tracy/maille/soleil/corv.txt
fic_skew /Users/nadolski/Documents/codes/tracy/maille/soleil/corqt.txt
fic_hcorr /Users/nadolski/Documents/Documents/Travail/codes/tracy/maille/soleil/corh.txt
fic_vcorr /Users/nadolski/Documents/Documents/Travail/codes/tracy/maille/soleil/corv.txt
fic_skew /Users/nadolski/Documents/Documents/Travail/codes/tracy/maille/soleil/corqt.txt
###
### FITTING FACTORY
......
......@@ -9,7 +9,7 @@
*/
// missing in lstdc++
template double std::__cmath_power<double>(double, unsigned);
// LSN template double std::__cmath_power<double>(double, unsigned);
double log(const int k) { return log((double)k); }
......
......@@ -28,7 +28,11 @@ void spline(const double x[], const T y[], int const n, double const yp1,
{
int i, k;
double sig;
T p, u[n], qn, un;
// LSN
// T p, u[n], qn, un;
T p, qn, un;
T *u = new T[n];
if (yp1 > 0.99e30)
y2[1] = u[1] = 0.0;
......@@ -54,6 +58,9 @@ void spline(const double x[], const T y[], int const n, double const yp1,
y2[n] = (un - qn * u[n - 1]) / (qn * y2[n - 1] + 1.0);
for (k = n - 1; k >= 1; k--)
y2[k] = y2[k] * y2[k + 1] + u[k];
// LSN
delete u;
}
/***********************************************************************************************
......@@ -107,12 +114,18 @@ void splin2(const double x1a[], const double x2a[], double **ya, double **y2a,
const int m, const int n, const T &x1, const T &x2, T &y)
{
int j;
T ytmp[m + 1], yytmp[m + 1]; // Perform m evaluations of the row splines constructed by
// LSN
//T ytmp[m + 1], yytmp[m + 1]; // Perform m evaluations of the row splines constructed by
T *ytmp = new T[m + 1];
T *yytmp = new T[m + 1]; // Perform m evaluations of the row splines constructed by
for (j = 1; j <= m; j++) //splie2, using the one-dimensional spline evaluator
splint(x2a, ya[j], y2a[j], n, x2, yytmp[j]); //splint.
spline(x1a, yytmp, m, 1.0e30, 1.0e30, ytmp); // Construct the one-dimensional column spline and evaluate it.
splint(x1a, yytmp, ytmp, m, x1, y);
delete ytmp;
delete yytmp;
}
/**************************************************************************************************
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment