22 #include <LbmLib/include/solver/BioSolver/tutorial_01_BioSolverCellJunction.hpp>
23 #include <LbmLib/include/nodes/GeometryNode.hpp>
24 #include <LbmLib/include/geometry/GeometryHandler.hpp>
25 #include <LbmLib/include/solver/ForceSolver.hpp>
26 #include <LbmLib/include/GlobalSimulationParameters.hpp>
37 const unsigned int FREQUENCY = 10;
38 const double RADIUS = 1.0;
39 const double K = 0.02;
40 const double L0 = 0.5;
41 std::stringstream forcedescriptor;
44 tutorial_01_BioSolverCellJunction::tutorial_01_BioSolverCellJunction() : BioBaseSolver()
51 if (Parameters.getCurrentIteration()%FREQUENCY != 0) {
60 auto nodes_length = tempnodesmap.size();
61 std::vector<std::map<unsigned int,std::shared_ptr<nodes::GeometryNode> >::const_iterator> helper_nodes;
62 auto nodes_it = tempnodesmap.begin();
68 helper_nodes.push_back(nodes_it++);
71 #pragma omp parallel for schedule(static) private(forcedescriptor)
75 std::shared_ptr<nodes::GeometryNode> closestnode =
77 helper_nodes[j]->second->getYPos(),
79 helper_nodes[j]->second->getDomainIdOfAdjacentConnections());
80 if (closestnode !=
nullptr) {
81 forcedescriptor.str( std::string() );
82 forcedescriptor.clear();
83 forcedescriptor <<
"7\t"
84 << helper_nodes[j]->second->getId() <<
"\t"
85 << closestnode->getId() <<
"\t"
88 forcesolver.
addForce(&forcedescriptor);
90 forcedescriptor.str( std::string() );
91 forcedescriptor.clear();
92 forcedescriptor <<
"7\t"
93 << closestnode->getId() <<
"\t"
94 << helper_nodes[j]->second->getId() <<
"\t"
97 forcesolver.
addForce(&forcedescriptor);
102 const std::string tutorial_01_BioSolverCellJunction::name =
"tutorial_01_BioSolverCellJunction";
void deleteForceType(const unsigned int forcetype)
reset all forces
const std::map< unsigned int, std::shared_ptr< nodes::GeometryNode > > & getGeometryNodes() const
Getter for the geometry nodes.
const Geometry & getGeometry() const
getter for the geometry
void addForce(std::stringstream *const forcedescriptor)
add a force
virtual void applyBioProcess(geometry::GeometryHandler &geometryhandler, solver::ForceSolver &forcesolver)
Applies biological processes.
std::shared_ptr< nodes::GeometryNode > getGeometryNodesWithinRadiusWithAvoidanceClosest(const double x, const double y, const double radius, const unsigned int avoidDomainID) const
getGeometryNodesWithinRadiusWithAvoidanceClosest Return closest GeometryNode, but only nodes with dom...
class responsible for generating the internal geometry representation