22 #include <LbmLib/include/reportHandler/DensityReporter.hpp>
23 #include <UtilLib/include/Exception.hpp>
24 #include <LbmLib/include/nodes/PhysicalNode.hpp>
25 #include <LbmLib/include/solver/CDESolver/CDEAbstractSolver.hpp>
26 #include <LbmLib/include/solver/FluidSolver/FluidSolver.hpp>
33 namespace reportHandler {
35 std::stringstream filename;
36 filename <<
filename_ <<
"_" << time <<
".txt";
37 std::ofstream oStream(filename.str().c_str());
38 if (!oStream.is_open()) {
41 for (
const auto& i : physicalNodes_) {
42 for (
const auto& pt : i) {
43 if (solverName_.empty()) {
44 oStream << std::setprecision(12) << pt->getXPos() <<
"\t" <<
45 pt->getYPos() <<
"\t" <<
46 pt->getFluidSolver().getRho() <<
"\n";
48 oStream << std::setprecision(12) << pt->getXPos() <<
"\t" <<
49 pt->getYPos() <<
"\t" << pt->getCDESolverSlow(
50 solverName_).getC() <<
"\n";
virtual void operator()(unsigned int time) const
operator() Writes the report
const std::string filename_
filename_ Stores the filename of this functor