26 #include <trng/uniform01_dist.hpp>
33 namespace CellDaughters {
44 const trng::uniform01_dist<double> dist;
45 m_uniform_generator = m_cd.m_random_engine->GetGenerator(dist);
48 void Perimeter::operator()(
Cell* daughter1,
Cell* daughter2)
51 const unsigned int cell_count = m_cd.m_mesh->GetCells().size();
52 if (cell_count == 2) {
53 daughter1->SetCellType(1);
54 daughter2->SetCellType(0);
58 if (daughter1->GetCellType() == 1) {
60 if (daughter1->HasBoundaryWall() && daughter2->HasBoundaryWall()) {
61 if (m_uniform_generator() < 0.5) {
62 daughter1->SetCellType(1);
63 daughter2->SetCellType(0);
65 daughter1->SetCellType(0);
66 daughter2->SetCellType(1);
70 if (daughter1->HasBoundaryWall()) {
71 daughter1->SetCellType(1);
72 daughter2->SetCellType(0);
74 daughter1->SetCellType(0);
75 daughter2->SetCellType(1);
Core data with mesh, parameters, random engine and time data.
A cell contains walls and nodes.
Interface of RandomEngine.
Namespace for components of the Default model group.
CellDaughters::Perimeter header file.