Commit a08a85de authored by kraus's avatar kraus
Browse files

change data type of distCorr from std::vector to tenzor; working on matched...

change data type of distCorr from std::vector to tenzor; working on matched gauss distribution; adding gsl error handler
parent 0fec5a96
This diff is collapsed.
......@@ -355,7 +355,7 @@ private:
Vector_t cutoffR_m;
Vector_t cutoffP_m;
Vector_t mBinomial_m;
std::vector<double> distCorr_m;
SymTenzor<double, 6> correlationMatrix_m;
// Laser profile.
std::string laserProfileFileName_m;
......@@ -442,4 +442,4 @@ inline Inform &operator<<(Inform &os, const Distribution &d) {
return d.printInfo(os);
}
#endif // OPAL_Distribution_HH
\ No newline at end of file
#endif // OPAL_Distribution_HH
......@@ -35,9 +35,10 @@ Inform *gmsg;
#include "Fields/Fieldmap.hh"
#include "FixedAlgebra/FTps.h"
#include "BasicActions/Option.h"
#include "Utilities/OpalOptions.h"
#include "Utilities/Options.h"
#include "BasicActions/Option.h"
#include "Utilities/OpalOptions.h"
#include "Utilities/Options.h"
#include "Utilities/OpalException.h"
#include "config.h"
......@@ -45,6 +46,8 @@ Inform *gmsg;
#include <ParallelDescriptor.H>
#endif
#include <gsl/gsl_errno.h>
// DTA
#define NC 5
#define MY_MASK 0755
......@@ -58,6 +61,11 @@ void printStringVector(const std::vector<std::string> &strings) {
if(nc != 0) std::cout << std::endl;
std::cout << std::endl;
}
void errorHandlerGSL(const char *reason,
const char *file,
int line,
int gsl_errno);
// /DTA
// Global data.
......@@ -89,6 +97,8 @@ int main(int argc, char *argv[]) {
H5SetVerbosityLevel(0); //65535);
gsl_set_error_handler(&errorHandlerGSL);
static IpplTimings::TimerRef mainTimer = IpplTimings::getTimer("mainTimer");
IpplTimings::startTimer(mainTimer);
......@@ -97,19 +107,6 @@ int main(int argc, char *argv[]) {
if(Ippl::myNode() == 0) remove("errormsg.txt");
/*
hmsg << mySpace << std::string(" _______ _______ _______ _ ")<< endl;
hmsg << mySpace << std::string(" ( ___ )( ____ )( ___ )( ")<< endl;
hmsg << mySpace << std::string(" | ( ) || ( )|| ( ) || (")<< endl;
hmsg << mySpace << std::string(" | | | || (____)|| (___) || |")<< endl;
hmsg << mySpace << std::string(" | | | || _____)| ___ || |")<< endl;
hmsg << mySpace << std::string(" | | | || ( | ( ) || |")<< endl;
// hmsg << mySpace << std::string(" | (___) || ) | ) ( || (____/\")<< endl;
//
hmsg << mySpace << std::string(" (_______)|// |// /\|(_______// ")<< endl;
*/
hmsg << mySpace << " ____ _____ ___ " << endl;
hmsg << mySpace << " / __ \\| __ \\ /\\ | | " << endl;
hmsg << mySpace << " | | | | |__) / \\ | |" << endl;
......@@ -232,7 +229,7 @@ int main(int argc, char *argv[]) {
//// /DTA
IpplTimings::stopTimer(mainTimer);
if (Options::info) {
......@@ -292,3 +289,10 @@ int main(int argc, char *argv[]) {
abort();
}
}
void errorHandlerGSL(const char *reason,
const char *file,
int,
int) {
throw OpalException(file, reason);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment