22 #include <LbmLib/include/geometry/Geometry.hpp>
23 #include <LbmLib/include/geometry/GeometryHandler.hpp>
24 #include <LbmLib/include/SimulationRunner.hpp>
26 #include <LbmLib/include/reportHandler/ReportHandler.hpp>
27 #include <LbmLib/include/reportHandler/vtkCellReporter.hpp>
28 #include <LbmLib/include/reportHandler/vtkForceReporter.hpp>
29 #include <LbmLib/include/reportHandler/vtkCDEReporter.hpp>
30 #include <LbmLib/include/reportHandler/vtkFluidReporter.hpp>
31 #include <LbmLib/include/reportHandler/vtkCellPNGReporter.hpp>
48 std::stringstream fileName;
51 std::string outfolder =
"output/";
52 const int mk = mkdir(outfolder.c_str(), 0777);
54 lbm_fail(
"Cannot create the output directory.");
56 auto ret = system(
"exec rm -r output/*");
59 std::shared_ptr<std::ostream> pStream(
new std::ofstream(outfolder+
"log.txt"));
61 lbm_fail(
"Cannot open the log file.");
73 LbmLib::Parameters.getReportSteps());
79 fileName << outfolder+
"Cells";
80 reporter.registerReporter(std::unique_ptr < LbmLib::reportHandler::
81 AbstractReportFunctor > (
new LbmLib::reportHandler::
84 build.getCellTypeTrackerMap(),
92 fileName << outfolder+
"Cells";
93 reporter.registerReporter(std::unique_ptr < LbmLib::reportHandler::
94 AbstractReportFunctor > (
new LbmLib::reportHandler::
96 geo.getGeometryNodes(),
97 simRunner.getForceSolver(),
105 fileName << outfolder+
"Cells";
106 reporter.registerReporter(std::unique_ptr < LbmLib::reportHandler::
107 AbstractReportFunctor > (
new LbmLib::reportHandler::
109 build.getPhysicalNodes(),
118 fileName << outfolder+
"Cells";
119 reporter.registerReporter(std::unique_ptr < LbmLib::reportHandler::
120 AbstractReportFunctor > (
new LbmLib::reportHandler::
122 build.getPhysicalNodes(),
129 simRunner.initSolvers();
130 simRunner.initForceSolver(
"config/force.txt");
132 simRunner.addMassSolver(
"MassSolverBoxOutlet");
133 simRunner.addBioSolver(
"tutorial_02_BioSolverGrowth");
134 simRunner.addBioSolver(
"tutorial_02_BioSolverMembraneTension");
135 simRunner.addBioSolver(
"tutorial_02_BioSolverCellJunction");
136 simRunner.addBioSolver(
"tutorial_02_BioSolverCellDivision");
139 simRunner.runSimulation();
141 }
catch(
const std::exception& exp) {
142 std::cout << exp.what() << std::endl;
the main simulation class
void loadGlobalSimulationParameters(const std::string &fileName)
loads the parameters from the file
static void setStream(std::shared_ptr< std::ostream > pStream)
void printParameters() const
prints the parameters to the standard output
class representing the external geometry
the report handler which stores the reporters
class responsible for generating the internal geometry representation