Removed std:: and using namespace std
This commit is contained in:
+13
-13
@@ -8,7 +8,7 @@
|
||||
|
||||
#include "tests.h"
|
||||
void runTests() {
|
||||
std::string outputFilePath = "/Users/ChristianReiling/Documents/Masterarbeit/CodeTesting/Data/";
|
||||
string outputFilePath = "/Users/ChristianReiling/Documents/Masterarbeit/CodeTesting/Data/";
|
||||
TestSimulation TEST;
|
||||
TEST.injection (100000, outputFilePath + "injection.dat");
|
||||
TEST.decaySpectrum(100000, outputFilePath + "decaySpectrum.dat");
|
||||
@@ -16,43 +16,43 @@ void runTests() {
|
||||
TEST.maxwellBoltzmann(100000, outputFilePath + "maxwellBoltzmann.dat");
|
||||
}
|
||||
|
||||
void TestSimulation::injection (int numParticles, std::string outputFilePath) {
|
||||
std::ofstream outFile;
|
||||
void TestSimulation::injection (int numParticles, string outputFilePath) {
|
||||
ofstream outFile;
|
||||
outFile.open (outputFilePath);
|
||||
for (int i = 0;i<numParticles;i++) {
|
||||
outFile << inject() <<std::endl;
|
||||
outFile << inject() <<endl;
|
||||
}
|
||||
outFile.close();
|
||||
|
||||
}
|
||||
|
||||
void TestSimulation::decaySpectrum (int numPoints,std::string outputFilePath) {
|
||||
std::ofstream outFile;
|
||||
void TestSimulation::decaySpectrum (int numPoints,string outputFilePath) {
|
||||
ofstream outFile;
|
||||
outFile.open (outputFilePath);
|
||||
double x,y;
|
||||
for (int i = 0;i<numPoints;i++) {
|
||||
x = i * Etridecay_eV/(numPoints-1);
|
||||
y = EnergyDistributionBetaDecay(x);
|
||||
outFile << x <<";"<<y <<std::endl;
|
||||
outFile << x <<";"<<y <<endl;
|
||||
}
|
||||
outFile.close();
|
||||
}
|
||||
|
||||
void TestSimulation::rejectionBetaDecay(int numDecays, std::string outputFilePath) {
|
||||
std::ofstream outFile;
|
||||
void TestSimulation::rejectionBetaDecay(int numDecays, string outputFilePath) {
|
||||
ofstream outFile;
|
||||
outFile.open (outputFilePath);
|
||||
for (int i = 0;i<numDecays;i++) {
|
||||
outFile << getBetaDecayEnergyRejection_eV() <<std::endl;
|
||||
outFile << getBetaDecayEnergyRejection_eV() <<endl;
|
||||
}
|
||||
outFile.close();
|
||||
}
|
||||
|
||||
|
||||
void TestSimulation::maxwellBoltzmann(int numDecays, std::string outputFilePath) {
|
||||
std::ofstream outFile;
|
||||
void TestSimulation::maxwellBoltzmann(int numDecays, string outputFilePath) {
|
||||
ofstream outFile;
|
||||
outFile.open (outputFilePath);
|
||||
for (int i = 0;i<numDecays;i++) {
|
||||
//outFile << getEnergyBoltzmann_eV() <<std::endl;
|
||||
//outFile << getEnergyBoltzmann_eV() <<endl;
|
||||
}
|
||||
outFile.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user