22 #include <LbmLib/include/reportHandler/FluidReporter.hpp>
23 #include <UtilLib/include/Exception.hpp>
24 #include <LbmLib/include/nodes/PhysicalNode.hpp>
25 #include <LbmLib/include/solver/FluidSolver/FluidSolver.hpp>
31 namespace reportHandler {
33 std::stringstream filename;
34 filename <<
filename_ <<
"_" << time <<
".txt";
35 std::ofstream oStream(filename.str().c_str());
36 if (!oStream.is_open()) {
39 for (
auto i : physicalNodes_) {
41 oStream << std::setprecision(12) << pt->getXPos() <<
"\t" <<
42 pt->getYPos() <<
"\t" << pt->getFluidSolver().getRho() <<
43 "\t" << pt->getFluidSolver().getVelocity().x <<
"\t" <<
44 pt->getFluidSolver().getVelocity().y <<
"\n";
const std::string filename_
filename_ Stores the filename of this functor
virtual void operator()(unsigned int time) const
operator() Writes the report