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