Skip to content
Snippets Groups Projects
Commit 3555568a authored by Henrik Asmuth's avatar Henrik Asmuth
Browse files

Merge branch 'develop' of https://git.rz.tu-bs.de/irmb/uppsala/VirtualFluids_dev into experimental

parents ce0b4613 1e6c82d0
No related branches found
No related tags found
1 merge request!143Experimental merge
This diff is collapsed.
......@@ -6,7 +6,6 @@
#include <PointerDefinitions.h>
#include "Output/LogWriter.hpp"
#include "Utilities/Buffer2D.hpp"
#include "LBM/LB.h"
......@@ -70,8 +69,6 @@ private:
Buffer2D <int> geo_rbuf_b;
LogWriter output;
vf::gpu::Communicator& communicator;
SPtr<Parameter> para;
std::shared_ptr<DataWriter> dataWriter;
......
#ifndef LOGWRITER_H
#define LOGWRITER_H
#include <iostream>
#include <fstream>
//#include <string>
//#include "Utilities/StringUtil.hpp"
////////////////////////////////////////////////////////////////////////////////
class LogWriter
{
public:
LogWriter()
{
consoleOut = false;
}
LogWriter(std::string fname)
{
consoleOut = false;
this->fname = fname;
}
void setName(std::string name)
{
this->fname = name;
}
void setConsoleOut(bool flag)
{
consoleOut = flag;
}
void clearLogFile()
{
ostr.open(fname.c_str(), std::ios_base::out);
if (ostr.bad())
{
std::string exceptionText = "Error: Output file/directory not found! LogWriter::operator << \n";
throw exceptionText;
}
ostr << "";
ostr.close();
}
template <typename T>
LogWriter& operator << (const T& arg)
{
ostr.open(fname.c_str(), std::ios_base::app);
if (ostr.bad())
{
//std::cout << "Error: Output file/directory not found! LogWriter::operator <<" << std::endl;
//return *this;
std::string exceptionText = "Error: Output file/directory not found! LogWriter::operator << \n";
throw exceptionText;
}
ostr << arg;
ostr.close();
if(consoleOut) std::cout << arg << std::flush;
return *this;
}
protected:
private:
std::string fname;
std::ofstream ostr;
bool consoleOut;
};
#endif
......@@ -58,4 +58,4 @@ inline void writeNeighborLinkLinesDebug(Parameter *para)
} // namespace NeighborDebugWriter
#endif
\ No newline at end of file
#endif
......@@ -11,35 +11,35 @@ static constexpr int STARTDIR = 0;
static constexpr int ENDDIR = 26;
// used in the CPU and the GPU version
static constexpr int DIR_000 = 0; // REST
static constexpr int DIR_P00 = 1; // E
static constexpr int DIR_M00 = 2; // W
static constexpr int DIR_0P0 = 3; // N
static constexpr int DIR_0M0 = 4; // S
static constexpr int DIR_00P = 5; // T
static constexpr int DIR_00M = 6; // B
static constexpr int DIR_PP0 = 7; // NE
static constexpr int DIR_MM0 = 8; // SW
static constexpr int DIR_PM0 = 9; // SE
static constexpr int DIR_MP0 = 10; // NW
static constexpr int DIR_P0P = 11; // TE
static constexpr int DIR_M0M = 12; // BW
static constexpr int DIR_P0M = 13; // BE
static constexpr int DIR_M0P = 14; // TW
static constexpr int DIR_0PP = 15; // TN
static constexpr int DIR_0MM = 16; // BS
static constexpr int DIR_0PM = 17; // BN
static constexpr int DIR_0MP = 18; // TS
static constexpr int DIR_PPP = 19; // TNE
static constexpr int DIR_MPP = 20; // TNW
static constexpr int DIR_PMP = 21; // TSE
static constexpr int DIR_MMP = 22; // TSW
static constexpr int DIR_PPM = 23; // BNE
static constexpr int DIR_MPM = 24; // BNW
static constexpr int DIR_PMM = 25; // BSE
static constexpr int DIR_MMM = 26; // BSW
static constexpr int DIR_000 = 0; // REST
static constexpr int DIR_P00 = 1; // E
static constexpr int DIR_M00 = 2; // W
static constexpr int DIR_0P0 = 3; // N
static constexpr int DIR_0M0 = 4; // S
static constexpr int DIR_00P = 5; // T
static constexpr int DIR_00M = 6; // B
static constexpr int DIR_PP0 = 7; // NE
static constexpr int DIR_MM0 = 8; // SW
static constexpr int DIR_PM0 = 9; // SE
static constexpr int DIR_MP0 = 10; // NW
static constexpr int DIR_P0P = 11; // TE
static constexpr int DIR_M0M = 12; // BW
static constexpr int DIR_P0M = 13; // BE
static constexpr int DIR_M0P = 14; // TW
static constexpr int DIR_0PP = 15; // TN
static constexpr int DIR_0MM = 16; // BS
static constexpr int DIR_0PM = 17; // BN
static constexpr int DIR_0MP = 18; // TS
static constexpr int DIR_PPP = 19; // TNE
static constexpr int DIR_MPP = 20; // TNW
static constexpr int DIR_PMP = 21; // TSE
static constexpr int DIR_MMP = 22; // TSW
static constexpr int DIR_PPM = 23; // BNE
static constexpr int DIR_MPM = 24; // BNW
static constexpr int DIR_PMM = 25; // BSE
static constexpr int DIR_MMM = 26; // BSW
struct countersForPointerChasing{
uint counterInverse;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment