22 #include <LbmLib/include/solver/BioSolver/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;
39 static std::mt19937 gen(seed);
42 std::uniform_int_distribution<> dis(1,2);
43 std::stringstream forcedescriptor;
44 const double RADIUS = 1.0;
45 const double K = 0.02;
46 const double L0 = 0.5;
49 BioSolverCellJunction::BioSolverCellJunction() : BioBaseSolver()
56 if (Parameters.getCurrentIteration()%FREQUENCY != 0) {
65 auto nodes_length = tempnodesmap.size();
66 std::vector<std::map<unsigned int,std::shared_ptr<nodes::GeometryNode> >::const_iterator> helper_nodes;
67 auto nodes_it = tempnodesmap.begin();
73 helper_nodes.push_back(nodes_it++);
76 #pragma omp parallel for schedule(static) private(forcedescriptor)
80 std::shared_ptr<nodes::GeometryNode> closestnode =
82 helper_nodes[j]->second->getYPos(),
84 helper_nodes[j]->second->getDomainIdOfAdjacentConnections());
85 if (closestnode !=
nullptr) {
86 forcedescriptor.str( std::string() );
87 forcedescriptor.clear();
88 forcedescriptor <<
"7\t"
89 << helper_nodes[j]->second->getId() <<
"\t"
90 << closestnode->getId() <<
"\t"
93 forcesolver.
addForce(&forcedescriptor);
95 forcedescriptor.str( std::string() );
96 forcedescriptor.clear();
97 forcedescriptor <<
"7\t"
98 << closestnode->getId() <<
"\t"
99 << helper_nodes[j]->second->getId() <<
"\t"
102 forcesolver.
addForce(&forcedescriptor);
107 const std::string BioSolverCellJunction::name =
"BioSolverCellJunction";
virtual void applyBioProcess(geometry::GeometryHandler &geometryhandler, solver::ForceSolver &forcesolver)
Applies biological processes.
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
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