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>
42 std::stringstream fileName;
45 std::string outfolder =
"output/";
46 const int mk = mkdir(outfolder.c_str(), 0777);
48 lbm_fail(
"Cannot create the output directory.");
50 auto ret = system(
"exec rm -r output/*");
53 std::shared_ptr<std::ostream> pStream(
new std::ofstream(outfolder+
"log.txt"));
55 lbm_fail(
"Cannot open the log file.");
67 LbmLib::Parameters.getReportSteps());
73 fileName << outfolder+
"Cells";
74 reporter.registerReporter(std::unique_ptr < LbmLib::reportHandler::
75 AbstractReportFunctor > (
new LbmLib::reportHandler::
78 geohandler.getCellTypeTrackerMap(),
86 fileName << outfolder+
"Cells";
87 reporter.registerReporter(std::unique_ptr < LbmLib::reportHandler::
88 AbstractReportFunctor > (
new LbmLib::reportHandler::
98 fileName << outfolder+
"Cells";
99 reporter.registerReporter(std::unique_ptr < LbmLib::reportHandler::
100 AbstractReportFunctor > (
new LbmLib::reportHandler::
102 geo.getGeometryNodes(),
103 simRunner.getForceSolver(),
111 fileName << outfolder+
"Cells";
112 reporter.registerReporter(std::unique_ptr < LbmLib::reportHandler::
113 AbstractReportFunctor > (
new LbmLib::reportHandler::
115 geohandler.getPhysicalNodes(),
124 fileName << outfolder+
"Cells";
125 reporter.registerReporter(std::unique_ptr < LbmLib::reportHandler::
126 AbstractReportFunctor > (
new LbmLib::reportHandler::
128 geohandler.getPhysicalNodes(),
135 simRunner.initSolvers();
136 simRunner.initForceSolver(
"config/force.txt");
138 simRunner.addMassSolver(
"MassSolverBoxOutlet");
139 simRunner.addBioSolver(
"tutorial_01_BioSolverAreaRegulator");
140 simRunner.addBioSolver(
"tutorial_01_BioSolverMembraneTension");
141 simRunner.addBioSolver(
"tutorial_01_BioSolverCellJunction");
142 simRunner.addBioSolver(
"tutorial_01_BioSolverDifferentiation");
143 simRunner.addBioSolver(
"tutorial_01_BioSolverCellDivision");
145 simRunner.runSimulation();
147 }
catch(
const std::exception& exp) {
148 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