Skip to content
Snippets Groups Projects
Commit 4133ece9 authored by Anna Wellmann's avatar Anna Wellmann
Browse files

Fix formatting in tubulence intensity calculation

parent 79cd2c54
No related branches found
No related tags found
1 merge request!104Add Communication Hiding to GPU version
......@@ -149,7 +149,7 @@ void writeAllTiDatafToFile(Parameter *para, uint timestep)
void writeTiStuffToFile(Parameter *para, uint timestep, int sizeOfTiArray, std::vector<real *> &data,
std::vector<std::string> &datanames)
{
//////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
// set filename
std::string names;
std::for_each(datanames.begin(), datanames.end(), [&names](const std::string &s) { return names += "_" + s; });
......@@ -159,10 +159,10 @@ void writeTiStuffToFile(Parameter *para, uint timestep, int sizeOfTiArray, std::
////////////////////////////////////////////////////////////////////////
// set ofstream
std::ofstream ostr;
//////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
// open file
ostr.open(fname);
//////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
// add header
ostr << "index_sp";
for (auto name : datanames) ostr << "\t" << name;
......@@ -175,8 +175,8 @@ void writeTiStuffToFile(Parameter *para, uint timestep, int sizeOfTiArray, std::
ostr << "\t" << dataset[i];
ostr << std::endl;
}
//////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
// close file
ostr.close();
//////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
}
\ No newline at end of file
......@@ -37,11 +37,6 @@ extern "C" __global__ void CalcTurbulenceIntensity(
unsigned int size_Mat,
bool isEvenTimestep)
{
//////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
const unsigned k = vf::gpu::getNodeIndex();
if (k >= size_Mat)
......@@ -73,7 +68,6 @@ extern "C" __global__ void CalcTurbulenceIntensity(
// velocity (for mean velocity)
vx_mean[k] = vx_mean[k] + vx;
vy_mean[k] = vy_mean[k] + vy;
vz_mean[k] = vz_mean[k] + vz;
vz_mean[k] = vz_mean[k] + vz;
}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
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