Fixed compilation of BMWlibs with gcc 3.x
This commit is contained in:
@ -22,6 +22,7 @@ NEW integration of a few external musrfit plug-ins into the standard build proce
|
|||||||
NEW default estimates for 'data' and 'background' entries in RUN blocks
|
NEW default estimates for 'data' and 'background' entries in RUN blocks
|
||||||
NEW directory with some msr- and data-files for quick testing of new musrfit installations
|
NEW directory with some msr- and data-files for quick testing of new musrfit installations
|
||||||
NEW option to musrt0: the key 'T' will set the t0 cursor to the maximum of the histogram
|
NEW option to musrt0: the key 'T' will set the t0 cursor to the maximum of the histogram
|
||||||
|
FIXED compilation of BMWlibs with gcc 3.x
|
||||||
FIXED hanging musrt0's should be eliminated now (MUSR-153)
|
FIXED hanging musrt0's should be eliminated now (MUSR-153)
|
||||||
FIXED wrong WARNING message for use_fit_ranges
|
FIXED wrong WARNING message for use_fit_ranges
|
||||||
FIXED bug in event handling leading to crash for non-muSR when switching between view and difference view
|
FIXED bug in event handling leading to crash for non-muSR when switching between view and difference view
|
||||||
|
@ -81,7 +81,7 @@ PLUGIN_LIBRARY_VERSION=1:0:0
|
|||||||
LEM_LIBRARY_VERSION=1:5:0
|
LEM_LIBRARY_VERSION=1:5:0
|
||||||
PSIBIN_LIBRARY_VERSION=0:1:0
|
PSIBIN_LIBRARY_VERSION=0:1:0
|
||||||
MUD_LIBRARY_VERSION=0:0:0
|
MUD_LIBRARY_VERSION=0:0:0
|
||||||
MUSR_LIBRARY_VERSION=0:6:0
|
MUSR_LIBRARY_VERSION=0:7:0
|
||||||
# | | |
|
# | | |
|
||||||
# +------+ | +---+
|
# +------+ | +---+
|
||||||
# | | |
|
# | | |
|
||||||
|
@ -34,7 +34,11 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "TBofZCalc.h"
|
#include "TBofZCalc.h"
|
||||||
|
|
||||||
|
#ifdef HAVE_GOMP
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
//#include <iostream>
|
//#include <iostream>
|
||||||
//#include <algorithm>
|
//#include <algorithm>
|
||||||
|
@ -37,7 +37,11 @@
|
|||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
#ifdef HAVE_GOMP
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
@ -38,7 +38,11 @@
|
|||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
|
#ifdef HAVE_GOMP
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
37
src/external/TFitPofB-lib/classes/TPofBCalc.cpp
vendored
37
src/external/TFitPofB-lib/classes/TPofBCalc.cpp
vendored
@ -40,7 +40,9 @@
|
|||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
#ifdef HAVE_GOMP
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* USED FOR DEBUGGING-----------------------------------
|
/* USED FOR DEBUGGING-----------------------------------
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
@ -464,6 +466,41 @@ void TPofBCalc::Calculate(const TBulkVortexFieldCalc *vortexLattice, const vecto
|
|||||||
}
|
}
|
||||||
// of << endl;
|
// of << endl;
|
||||||
}
|
}
|
||||||
|
// of.close();
|
||||||
|
} else if (para.size() == 8 && para[6] == 3.0 && para[5] != 0.0 && vortexLattice->IsTriangular()) {
|
||||||
|
// add antiferromagnetic fields in the vortex cores
|
||||||
|
double field, Rsq1, Rsq2, Rsq3, Rsq4, Rsq5, Rsq6, one_xiSq(-1.0/(para[7]*para[7]));
|
||||||
|
// ofstream of("AFfields.dat");
|
||||||
|
for (unsigned int j(0); j < numberOfSteps_2; ++j) {
|
||||||
|
for (unsigned int i(0); i < numberOfSteps_2; ++i) {
|
||||||
|
Rsq1 = static_cast<double>(3*i*i + j*j)/static_cast<double>(numberOfStepsSq);
|
||||||
|
Rsq2 = static_cast<double>(3*(numberOfSteps_2 - i)*(numberOfSteps_2 - i) \
|
||||||
|
+ (numberOfSteps_2 - j)*(numberOfSteps_2 - j))/static_cast<double>(numberOfStepsSq);
|
||||||
|
Rsq3 = static_cast<double>(3*(numberOfSteps - i)*(numberOfSteps - i) \
|
||||||
|
+ j*j)/static_cast<double>(numberOfStepsSq);
|
||||||
|
Rsq4 = static_cast<double>(3*(numberOfSteps_2 - i)*(numberOfSteps_2 - i) \
|
||||||
|
+ (numberOfSteps_2 + j)*(numberOfSteps_2 + j))/static_cast<double>(numberOfStepsSq);
|
||||||
|
Rsq5 = static_cast<double>(3*i*i \
|
||||||
|
+ (numberOfSteps - j)*(numberOfSteps - j))/static_cast<double>(numberOfStepsSq);
|
||||||
|
Rsq6 = static_cast<double>(3*(numberOfSteps_2 + i)*(numberOfSteps_2 + i) \
|
||||||
|
+ (numberOfSteps_2 - j)*(numberOfSteps_2 - j))/static_cast<double>(numberOfStepsSq);
|
||||||
|
|
||||||
|
field = vortexFields[i + numberOfSteps*j] \
|
||||||
|
+ para[5]*(exp(Rsq1*one_xiSq) + exp(Rsq2*one_xiSq) + exp(Rsq3*one_xiSq) \
|
||||||
|
+exp(Rsq4*one_xiSq) + exp(Rsq5*one_xiSq) + exp(Rsq6*one_xiSq));
|
||||||
|
|
||||||
|
// of << para[5]*(exp(Rsq1*one_xiSq) - exp(Rsq2*one_xiSq) + exp(Rsq3*one_xiSq) \
|
||||||
|
// -exp(Rsq4*one_xiSq) + exp(Rsq5*one_xiSq) - exp(Rsq6*one_xiSq)) << " ";
|
||||||
|
|
||||||
|
fill_index = static_cast<unsigned int>(ceil(fabs((field/fDB))));
|
||||||
|
if (fill_index < fPBSize) {
|
||||||
|
fPB[fill_index] += 1.0;
|
||||||
|
} else {
|
||||||
|
cout << "Field over the limit..." << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// of << endl;
|
||||||
|
}
|
||||||
// of.close();
|
// of.close();
|
||||||
} else {
|
} else {
|
||||||
for (unsigned int j(0); j < numberOfSteps_2; ++j) {
|
for (unsigned int j(0); j < numberOfSteps_2; ++j) {
|
||||||
|
@ -46,7 +46,9 @@
|
|||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
|
||||||
|
#ifdef HAVE_GOMP
|
||||||
#include <omp.h>
|
#include <omp.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <TString.h>
|
#include <TString.h>
|
||||||
#include <TObjArray.h>
|
#include <TObjArray.h>
|
||||||
|
12
src/external/TFitPofB-lib/classes/TVortex.cpp
vendored
12
src/external/TFitPofB-lib/classes/TVortex.cpp
vendored
@ -166,8 +166,8 @@ TBulkTriVortexLondon::TBulkTriVortexLondon() : fCalcNeeded(true), fFirstCall(tru
|
|||||||
fParForPofB.push_back(0.0); // Bkg-Field
|
fParForPofB.push_back(0.0); // Bkg-Field
|
||||||
fParForPofB.push_back(0.005); // Bkg-width
|
fParForPofB.push_back(0.005); // Bkg-width
|
||||||
fParForPofB.push_back(0.0); // Bkg-weight
|
fParForPofB.push_back(0.0); // Bkg-weight
|
||||||
fParForPofB.push_back(0.0); // vortex-weighting
|
fParForPofB.push_back(0.0); // vortex-weighting || antiferromagnetic field
|
||||||
fParForPofB.push_back(0.0); // vortex-weighting: 0.0 homogeneous, 1.0 Gaussian, 2.0 Lorentzian
|
fParForPofB.push_back(0.0); // vortex-weighting: 0.0 homogeneous, 1.0 Gaussian, 2.0 Lorentzian || 3.0 antiferromagnetic vortex-cores
|
||||||
|
|
||||||
fVortex = new TBulkTriVortexLondonFieldCalc(fWisdom, fGridSteps);
|
fVortex = new TBulkTriVortexLondonFieldCalc(fWisdom, fGridSteps);
|
||||||
|
|
||||||
@ -249,7 +249,7 @@ TBulkSqVortexLondon::TBulkSqVortexLondon() : fCalcNeeded(true), fFirstCall(true)
|
|||||||
|
|
||||||
double TBulkTriVortexLondon::operator()(double t, const vector<double> &par) const {
|
double TBulkTriVortexLondon::operator()(double t, const vector<double> &par) const {
|
||||||
|
|
||||||
assert(par.size() == 4 || par.size() == 5 || par.size() == 7); // normal, +BkgWeight, +VortexWeighting
|
assert(par.size() == 4 || par.size() == 5 || par.size() == 7 || par.size() == 8); // normal, +BkgWeight, +VortexWeighting, +AFfield
|
||||||
|
|
||||||
if(t<0.0)
|
if(t<0.0)
|
||||||
return cos(par[0]*0.017453293);
|
return cos(par[0]*0.017453293);
|
||||||
@ -305,6 +305,12 @@ double TBulkTriVortexLondon::operator()(double t, const vector<double> &par) con
|
|||||||
fParForPofB[5] = par[5];
|
fParForPofB[5] = par[5];
|
||||||
assert((par[6] == 0.0) || (par[6] == 1.0) || (par[6] == 2.0));
|
assert((par[6] == 0.0) || (par[6] == 1.0) || (par[6] == 2.0));
|
||||||
fParForPofB[6] = par[6];
|
fParForPofB[6] = par[6];
|
||||||
|
} else if (par.size() == 8) {
|
||||||
|
fParForPofB[5] = par[5];
|
||||||
|
assert(par[6] == 3.0);
|
||||||
|
fParForPofB[6] = par[6];
|
||||||
|
fParForPofB.resize(8);
|
||||||
|
fParForPofB[7] = par[7]; // AF-width in vortex-lattice-units
|
||||||
}
|
}
|
||||||
|
|
||||||
fVortex->SetParameters(fParForVortex);
|
fVortex->SetParameters(fParForVortex);
|
||||||
|
Reference in New Issue
Block a user