Skip to content

Commit b7a48e6

Browse files
committed
changed some things to imporve code quality
1 parent 4a32933 commit b7a48e6

File tree

3 files changed

+4
-22
lines changed

3 files changed

+4
-22
lines changed

src/cart_cell.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ CartCell::CartCell(const Real3& position) {
3939

4040

4141
// Pointer to oxygen diffusion grid
42-
ResourseManager &rm = *Simulation::GetActive()->GetResourceManager();
42+
auto &rm = *Simulation::GetActive()->GetResourceManager();
4343
oxygen_dgrid_ = rm.GetDiffusionGrid("oxygen");
4444
// Pointer to immunostimulatory_factor diffusion grid
4545
immunostimulatory_factor_dgrid_ = rm.GetDiffusionGrid("immunostimulatory_factor");

src/diffusion_thomas_algorithm.cc

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -160,25 +160,7 @@ void DiffusionThomasAlgorithm::Step(real_t dt) {//instead of overwriting Step, i
160160
}
161161
DiffuseChemical(dt);
162162

163-
//This should be done this way instead but there is a bug in BioDynaMo that makes bc_type be "Neumann" no matter what. In future versions of BioDynaMo this should be fixed
164-
// auto bc_type = Simulation::GetActive()->GetParam()->diffusion_boundary_condition;
165-
// std::cout << bc_type << std::endl;
166-
// if (bc_type == "Closed") {
167-
// DiffuseWithClosedEdge(dt);
168-
// } else if (bc_type == "Open" ) {
169-
// DiffuseWithOpenEdge(dt);
170-
// } else if (bc_type == "Dirichlet") {
171-
// DiffuseWithDirichlet(dt);
172-
// } else if (bc_type == "Neumann") {
173-
// DiffuseWithNeumann(dt);
174-
// } else if (bc_type == "Periodic") {
175-
// DiffuseWithPeriodic(dt);
176-
// } else {
177-
// Log::Error(
178-
// "DiffusionThomasAlgorithm::Diffuse", "Boundary condition of type '",
179-
// bc_type,
180-
// "' is not implemented. Defaulting to 'closed' boundary condition");
181-
// }
163+
//This should be done considering different border cases instead of using the dirichlet_border_ flag. However, there is a bug in BioDynaMo that makes bc_type be "Neumann" no matter what. In future versions of BioDynaMo this should be fixed
182164

183165
}
184166

src/forces_tumor_cart.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ namespace bdm {
2525

2626
Real4 InteractionVelocity::Calculate(const Agent* lhs, const Agent* rhs) const {
2727

28-
auto* a = static_cast<const Cell*>(lhs);
29-
auto* b = static_cast<const Cell*>(rhs);
28+
auto* a = dynamic_cast<const Cell*>(lhs);
29+
auto* b = dynamic_cast<const Cell*>(rhs);
3030

3131
// Ignore self-interaction
3232
if (a->GetUid() == b->GetUid())

0 commit comments

Comments
 (0)