Skip to content

Commit

Permalink
Update BDM_BRANCH to umar_neurite_test and make changes to Mechanical…
Browse files Browse the repository at this point in the history
…ForcesOp and NeuriteElement
  • Loading branch information
UmarAbubacar committed Jun 15, 2024
1 parent 2240cec commit c538cce
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 4 deletions.
6 changes: 3 additions & 3 deletions Singularity
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ From:ubuntu:20.04
git config --system user.name "Test User"
git config --system user.email user@test.com

export BDM_BRANCH="master"
export BDM_BRANCH="umar_neurite_test"
git clone https://github.com/BioDynaMo/biodynamo.git
cd biodynamo
git checkout $BDM_BRANCH
Expand All @@ -70,6 +70,6 @@ From:ubuntu:20.04
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..

ninja -j $(($(nproc) - 1))

export XVFBARGS=":99 -ac -screen 0 2560x1440x24"

%runscript
%runscript
4 changes: 4 additions & 0 deletions src/core/operation/mechanical_forces_op.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ class MechanicalForcesOp : public AgentOperationImpl {
last_time_run_[tid] = current_time;
}

if (agent->GetShape() == Shape::kCylinder) {
squared_radius_ = 0.0001;
}

const auto& displacement =
agent->CalculateDisplacement(force_, squared_radius_, delta_time_[tid]);
agent->ApplyDisplacement(displacement);
Expand Down
3 changes: 2 additions & 1 deletion src/neuroscience/neurite_element.cc
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ void NeuriteElement::CriticalRegion(std::vector<AgentPointer<>>* aptrs) {
}

std::set<std::string> NeuriteElement::GetRequiredVisDataMembers() const {
return {"mass_location_", "diameter_", "actual_length_", "spring_axis_"};
return {"mass_location_", "diameter_", "actual_length_",
"spring_axis_", "mother_cell_type_", "mother_uid_"};
}

void NeuriteElement::SetDiameter(real_t diameter) {
Expand Down
18 changes: 18 additions & 0 deletions src/neuroscience/neurite_element.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,18 @@ class NeuriteElement : public Agent, public NeuronOrNeurite {

void SetMassLocation(const Real3& mass_location);

// Getter and setter for mother_cell_type_ (used for visualization)
real_t GetMotherCellType() const { return mother_cell_type_; }

void SetMotherCellType(real_t mother_cell_type) {
mother_cell_type_ = mother_cell_type;
}

// Getter and setter for mother_uid_ (used for synapses)
AgentUid GetMotherUid() { return mother_uid_; }

void SetMotherUid(AgentUid mother_uid) { mother_uid_ = mother_uid; }

real_t GetAdherence() const { return adherence_; }

void SetAdherence(real_t adherence);
Expand Down Expand Up @@ -465,6 +477,12 @@ class NeuriteElement : public Agent, public NeuronOrNeurite {
/// position_ is the middle point of cylinder
Real3 position_ = {{0.0, 0.0, 0.0}};

/// This is the type of the mother neuron
real_t mother_cell_type_;

/// The uid of the mother neuron
AgentUid mother_uid_;

real_t volume_;
/// NB: Use setter and don't assign values directly
real_t diameter_ = 1;
Expand Down

0 comments on commit c538cce

Please sign in to comment.