Skip to content
Snippets Groups Projects
Commit 3de62a71 authored by Konstantin Kutscher's avatar Konstantin Kutscher
Browse files

fix compatibility issue with Intel compiler for std::vector<std::stringstream>

parent ffdda798
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,7 @@
#include "UbScheduler.h"
#include "BCProcessor.h"
#include "BCArray3D.h"
#include <sstream>
MicrophoneArrayCoProcessor::MicrophoneArrayCoProcessor(SPtr<Grid3D> grid, SPtr<UbScheduler> s, const std::string & path, SPtr<Communicator> comm) : CoProcessor(grid, s), path(path), comm(comm)
{
......@@ -70,7 +71,7 @@ bool MicrophoneArrayCoProcessor::addMicrophone(Vector3D coords)
mic->nodeIndexes = grid->getNodeIndexes(block, coords[0], coords[1], coords[2]);
microphones.push_back(mic);
strVector.resize(microphones.size());
strVector.push_back(new std::stringstream);
std::string fname = path+"/mic/mic_"+UbSystem::toString(micID)+".csv";
std::ofstream ostr;
......@@ -100,7 +101,7 @@ void MicrophoneArrayCoProcessor::collectData(double step)
microphones[i]->distridution->getDistribution(f, val<1>(microphones[i]->nodeIndexes), val<2>(microphones[i]->nodeIndexes), val<3>(microphones[i]->nodeIndexes));
LBMReal vx1, vx2, vx3, rho;
calcMacros(f, rho, vx1, vx2, vx3);
strVector[i] << step << ';' << rho << '\n';
*strVector[i] << step << ';' << rho << '\n';
}
}
......@@ -118,7 +119,7 @@ void MicrophoneArrayCoProcessor::writeFile(double step)
if (path.size()>0) { UbSystem::makeDirectory(path); ostr.open(fname.c_str(), std::ios_base::out | std::ios_base::app); }
if (!ostr) throw UbException(UB_EXARGS, "couldn't open file "+fname);
}
ostr << strVector[i].str();
ostr << strVector[i]->str();
ostr.close();
}
}
\ No newline at end of file
......@@ -45,7 +45,7 @@ private:
};
std::vector< SPtr<Mic> > microphones;
std::vector<std::stringstream > strVector;
std::vector<std::stringstream* > strVector;
int count;
int micID;
......
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