BioDynaMo  v1.05.120-25dc9790
Classes | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
bdm::neuroscience::NeuriteElement Class Reference

#include <neurite_element.h>

Inheritance diagram for bdm::neuroscience::NeuriteElement:
[legend]
Collaboration diagram for bdm::neuroscience::NeuriteElement:
[legend]

Classes

struct  MechanicalForcesFunctor
 

Public Member Functions

 NeuriteElement ()
 
void Initialize (const NewAgentEvent &event) override
 
void Update (const NewAgentEvent &event) override
 
const AgentUidGetUid () const override
 
SpinlockGetLock () override
 
void CriticalRegion (std::vector< AgentPointer<>> *aptrs) override
 
Shape GetShape () const override
 
std::set< std::string > GetRequiredVisDataMembers () const override
 
void SetDiameter (real_t diameter) override
 
void SetDensity (real_t density)
 
const Real3GetPosition () const override
 
void SetPosition (const Real3 &position) override
 
void UpdatePosition ()
 
const Real3GetMassLocation () const
 return end of neurite element position More...
 
void SetMassLocation (const Real3 &mass_location)
 
real_t GetAdherence () const
 
void SetAdherence (real_t adherence)
 
const Real3GetXAxis () const
 
const Real3GetYAxis () const
 
const Real3GetZAxis () const
 
real_t GetVolume () const
 
real_t GetDiameter () const override
 
real_t GetDensity () const
 
real_t GetMass () const
 
Real3 OriginOf (const AgentUid &daughter_uid) const override
 
StructureIdentifierSWC GetIdentifierSWC () const override
 
void RetractTerminalEnd (real_t speed)
 
void ElongateTerminalEnd (real_t speed, const Real3 &direction)
 
bool BranchPermitted () const
 
NeuriteElementBranch (real_t new_branch_diameter, const Real3 &direction, real_t length=1.0)
 Create a branch for this neurite element. More...
 
NeuriteElementBranch (const Real3 &direction)
 Create a branch for this neurite element. More...
 
NeuriteElementBranch (real_t diameter)
 Create a branch for this neurite element. More...
 
NeuriteElementBranch ()
 Create a branch for this neurite element. More...
 
bool BifurcationPermitted () const
 
std::array< NeuriteElement *, 2 > Bifurcate (real_t length, real_t diameter_1, real_t diameter_2, const Real3 &direction_1, const Real3 &direction_2)
 Growth cone bifurcation. More...
 
std::array< NeuriteElement *, 2 > Bifurcate (real_t diameter_1, real_t diameter_2, const Real3 &direction_1, const Real3 &direction_2)
 Growth cone bifurcation. More...
 
std::array< NeuriteElement *, 2 > Bifurcate (const Real3 &direction_1, const Real3 &direction_2)
 Growth cone bifurcation. More...
 
std::array< NeuriteElement *, 2 > Bifurcate ()
 Growth cone bifurcation. More...
 
void RemoveDaughter (const AgentPointer< NeuriteElement > &daughter) override
 
void UpdateRelative (const NeuronOrNeurite &old_relative, const NeuronOrNeurite &new_relative) override
 
Real3 ForceTransmittedFromDaugtherToMother (const NeuronOrNeurite &mother)
 
void RunDiscretization () override
 
void MovePointMass (real_t speed, const Real3 &direction)
 
void SetRestingLengthForDesiredTension (real_t tension)
 
void ChangeVolume (real_t speed)
 
void ChangeDiameter (real_t speed)
 
Real3 CalculateDisplacement (const InteractionForce *force, real_t squared_radius, real_t dt) override
 
void ApplyDisplacement (const Real3 &displacement) override
 
void UpdateLocalCoordinateAxis ()
 
void UpdateDiameter ()
 Recomputes diameter after volume has changed. More...
 
void UpdateVolume ()
 Recomputes volume, after diameter has been changed. More...
 
Real3 TransformCoordinatesGlobalToLocal (const Real3 &position) const
 
Real3 TransformCoordinatesLocalToGlobal (const Real3 &position) const
 
Real3 TransformCoordinatesLocalToPolar (const Real3 &position) const
 
Real3 TransformCoordinatesPolarToLocal (const Real3 &position) const
 
Real3 TransformCoordinatesPolarToGlobal (const std::array< real_t, 2 > &position) const
 P -> G : P -> L, then L -> G. More...
 
Real3 TransformCoordinatesGlobalToPolar (const Real3 &position) const
 G -> L : G -> L, then L -> P. More...
 
bool IsAxon () const
 
void SetAxon (bool is_axon)
 
AgentPointer< NeuronOrNeurite > & GetMother ()
 
const AgentPointer< NeuronOrNeurite > & GetMother () const
 
void SetMother (const AgentPointer< NeuronOrNeurite > &mother)
 
const AgentPointer< NeuriteElement > & GetDaughterLeft () const
 
void SetDaughterLeft (const AgentPointer< NeuriteElement > &daughter)
 
const AgentPointer< NeuriteElement > & GetDaughterRight () const
 
void SetDaughterRight (const AgentPointer< NeuriteElement > &daughter)
 
int GetBranchOrder () const
 
void SetBranchOrder (int branch_order)
 
real_t GetActualLength () const
 
void SetActualLength (real_t actual_length)
 Should not be used, since the actual length depends on the geometry. More...
 
real_t GetRestingLength () const
 
void SetRestingLength (real_t resting_length)
 
const Real3GetSpringAxis () const
 
void SetSpringAxis (const Real3 &axis)
 
real_t GetSpringConstant () const
 
void SetSpringConstant (real_t spring_constant)
 
real_t GetTension () const
 
void SetTension (real_t tension)
 
Real3 GetUnitaryAxisDirectionVector () const
 
bool IsTerminal () const
 
Real3 ProximalEnd () const
 
const Real3DistalEnd () const
 Returns the position of the distal end == position_. More...
 
real_t LengthToProximalBranchingPoint () const
 
real_t GetLength () const
 
const Real3GetAxis () const
 Returns the axis direction of a neurite element. More...
 
void UpdateDependentPhysicalVariables () override
 
- Public Member Functions inherited from bdm::Agent
 Agent ()
 
 Agent (TRootIOCtor *io_ctor)
 
 Agent (const Agent &other)
 
virtual ~Agent ()
 
virtual AgentNew () const =0
 Create a new instance of this object using the default constructor. More...
 
virtual AgentNewCopy () const =0
 Create a copy of this object. More...
 
void CreateNewAgents (const NewAgentEvent &event, const std::initializer_list< Agent * > &prototypes)
 
virtual const char * GetTypeName () const
 
void AssignNewUid ()
 
const AgentUidGetUid () const
 
SpinlockGetLock ()
 
uint32_t GetBoxIdx () const
 
void SetBoxIdx (uint32_t idx)
 
void SetStaticnessNextTimestep (bool value) const
 
bool GetPropagateStaticness () const
 
void SetPropagateStaticness (bool value=true)
 
void PropagateStaticness (bool beginning=false)
 
void UpdateStaticness ()
 
bool IsStatic () const
 
template<typename TAgent = Agent>
AgentPointer< TAgent > GetAgentPtr () const
 Return agent pointer. More...
 
void AddBehavior (Behavior *behavior)
 Add a behavior to this agent. More...
 
void RemoveBehavior (const Behavior *behavior)
 
void RunBehaviors ()
 Execute all behaviorsq. More...
 
const InlineVector< Behavior *, 2 > & GetAllBehaviors () const
 Return all behaviors. More...
 
virtual void RemoveFromSimulation ()
 
void * operator new (size_t size)
 
void operator delete (void *p)
 
- Public Member Functions inherited from bdm::neuroscience::NeuronOrNeurite
virtual ~NeuronOrNeurite ()
 
AgentPointer< NeuronOrNeuriteGetNeuronOrNeuriteAgentPtr () const
 
bool IsNeuronSoma () const
 
bool IsNeuriteElement () const
 

Protected Member Functions

void Copy (const NeuriteElement &rhs)
 
- Protected Member Functions inherited from bdm::Agent
template<typename TFrom , typename TTo >
std::enable_if< std::is_base_of< TFrom, TTo >::value, TTo * >::type Cast (TFrom *agent) const
 
template<typename TFrom , typename TTo >
std::enable_if<!std::is_base_of< TFrom, TTo >::value, TTo * >::type Cast (TFrom *agent) const
 

Private Member Functions

 BDM_AGENT_HEADER (NeuriteElement, Agent, 1)
 
NeuriteElementSplitNeuriteElement (real_t distal_portion=0.5)
 Split this neurite element into two segments. More...
 
void RemoveProximalNeuriteElement ()
 
NeuriteElementExtendSideNeuriteElement (real_t length, real_t diameter, const Real3 &direction)
 Extend a side neurite element and assign it to daughter right. More...
 
void InitializeNewNeuriteExtension (NeuronSoma *soma, real_t diameter, real_t phi, real_t theta)
 TODO. More...
 
void InitializeNeuriteBifurcation (NeuriteElement *mother, real_t length, real_t diameter, const Real3 &direction)
 TODO. More...
 
void InitializeSplitOrBranching (NeuriteElement *other, real_t distal_portion)
 
void InitializeSideExtensionOrBranching (NeuriteElement *mother, real_t length, real_t diameter, const Real3 &direction)
 

Private Attributes

Real3 mass_location_ = {{0.0, 0.0, 0.0}}
 
Real3 position_ = {{0.0, 0.0, 0.0}}
 position_ is the middle point of cylinder More...
 
real_t volume_
 
real_t diameter_ = 1
 NB: Use setter and don't assign values directly. More...
 
real_t density_
 NB: Use setter and don't assign values directly. More...
 
real_t adherence_
 NB: Use setter and don't assign values directly. More...
 
Real3 x_axis_ = {{1.0, 0.0, 0.0}}
 First axis of the local coordinate system equal to cylinder axis. More...
 
Real3 y_axis_ = {{0.0, 1.0, 0.0}}
 Second axis of the local coordinate system. More...
 
Real3 z_axis_ = {{0.0, 0.0, 1.0}}
 Third axis of the local coordinate system. More...
 
bool is_axon_ = false
 
AgentPointer< NeuronOrNeuritemother_
 
AgentPointer< NeuriteElementdaughter_left_
 
AgentPointer< NeuriteElementdaughter_right_
 
int branch_order_ = 0
 
Real3 force_to_transmit_to_proximal_mass_ = {{0, 0, 0}}
 The part of the inter-object force transmitted to the mother (parent node) More...
 
Real3 spring_axis_ = {{0, 0, 0}}
 
real_t actual_length_ = 1
 
real_t tension_
 
real_t spring_constant_
 
real_t resting_length_
 
bool has_neurite_neighbor_ = false
 Helper variable needed in CalculateDisplacement. More...
 

Friends

std::ostream & operator<< (std::ostream &str, const NeuriteElement &n)
 

Additional Inherited Members

- Protected Attributes inherited from bdm::Agent
AgentUid uid_
 unique id More...
 
uint32_t box_idx_ = std::numeric_limits<uint32_t>::max()
 Grid box index. More...
 
InlineVector< Behavior *, 2 > behaviors_
 collection of behaviors which define the internal behavior More...
 

Detailed Description

Class defining a neurite element with cylindrical geometry. A cylinder can be seen as a normal cylinder, with two end points and a diameter. It is oriented; the two points are called proximal and distal. The neurite element is be part of a tree-like structure with (one and only) one object at its proximal point and (up to) two neurite elements at its distal end. The proximal end can be a Neurite or Neuron cell body. If there is only one daughter, it is the left one. If daughter_left_ == nullptr, there is no distal neurite element. (it is a terminal neurite element). The presence of a daughter_left_ means that this branch has a bifurcation at its distal end.
All the mass of the neurite element is concentrated at the distal point. Only the distal end is moved. All the forces that are applied to the proximal node are transmitted to the mother element

Definition at line 56 of file neurite_element.h.

Constructor & Destructor Documentation

◆ NeuriteElement()

bdm::neuroscience::NeuriteElement::NeuriteElement ( )

Definition at line 21 of file neurite_element.cc.

Member Function Documentation

◆ ApplyDisplacement()

void bdm::neuroscience::NeuriteElement::ApplyDisplacement ( const Real3 displacement)
overridevirtual

Implements bdm::Agent.

Definition at line 624 of file neurite_element.cc.

◆ BDM_AGENT_HEADER()

bdm::neuroscience::NeuriteElement::BDM_AGENT_HEADER ( NeuriteElement  ,
Agent  ,
 
)
private

◆ Bifurcate() [1/4]

std::array< NeuriteElement *, 2 > bdm::neuroscience::NeuriteElement::Bifurcate ( )

Growth cone bifurcation.

See also
NeuriteBifurcationEvent

Definition at line 317 of file neurite_element.cc.

◆ Bifurcate() [2/4]

std::array< NeuriteElement *, 2 > bdm::neuroscience::NeuriteElement::Bifurcate ( const Real3 direction_1,
const Real3 direction_2 
)

Growth cone bifurcation.

See also
NeuriteBifurcationEvent

Definition at line 307 of file neurite_element.cc.

◆ Bifurcate() [3/4]

std::array< NeuriteElement *, 2 > bdm::neuroscience::NeuriteElement::Bifurcate ( real_t  diameter_1,
real_t  diameter_2,
const Real3 direction_1,
const Real3 direction_2 
)

Growth cone bifurcation.

See also
NeuriteBifurcationEvent

Definition at line 299 of file neurite_element.cc.

◆ Bifurcate() [4/4]

std::array< NeuriteElement *, 2 > bdm::neuroscience::NeuriteElement::Bifurcate ( real_t  length,
real_t  diameter_1,
real_t  diameter_2,
const Real3 direction_1,
const Real3 direction_2 
)

Growth cone bifurcation.

See also
NeuriteBifurcationEvent

Definition at line 282 of file neurite_element.cc.

◆ BifurcationPermitted()

bool bdm::neuroscience::NeuriteElement::BifurcationPermitted ( ) const

Returns true if a bifurcation is physically possible. That is if the neurite element has no daughter and the actual length is bigger than the minimum required.

Definition at line 276 of file neurite_element.cc.

◆ Branch() [1/4]

NeuriteElement * bdm::neuroscience::NeuriteElement::Branch ( )

Create a branch for this neurite element.

Use a random growth direction for the side branch. Diameter of new side branch will be equal to this neurites diameter.

See also
NeuriteBranchingEvent

Definition at line 267 of file neurite_element.cc.

◆ Branch() [2/4]

NeuriteElement * bdm::neuroscience::NeuriteElement::Branch ( const Real3 direction)

Create a branch for this neurite element.

Diameter of new side branch will be equal to this neurites diameter.

See also
NeuriteBranchingEvent

Definition at line 254 of file neurite_element.cc.

◆ Branch() [3/4]

NeuriteElement * bdm::neuroscience::NeuriteElement::Branch ( real_t  diameter)

Create a branch for this neurite element.

Use a random growth direction for the side branch.

See also
NeuriteBranchingEvent

Definition at line 258 of file neurite_element.cc.

◆ Branch() [4/4]

NeuriteElement * bdm::neuroscience::NeuriteElement::Branch ( real_t  new_branch_diameter,
const Real3 direction,
real_t  length = 1.0 
)

Create a branch for this neurite element.

See also
NeuriteBranchingEvent

Definition at line 244 of file neurite_element.cc.

◆ BranchPermitted()

bool bdm::neuroscience::NeuriteElement::BranchPermitted ( ) const

Returns true if a side branch is physically possible. That is if this is not a terminal branch and if there is not already a second daughter.

Definition at line 240 of file neurite_element.cc.

◆ CalculateDisplacement()

Real3 bdm::neuroscience::NeuriteElement::CalculateDisplacement ( const InteractionForce force,
real_t  squared_radius,
real_t  dt 
)
overridevirtual

Implements bdm::Agent.

Definition at line 533 of file neurite_element.cc.

◆ ChangeDiameter()

void bdm::neuroscience::NeuriteElement::ChangeDiameter ( real_t  speed)

Progressive modification of the diameter. Updates the volume.

Parameters
speedmicron/ h

Definition at line 467 of file neurite_element.cc.

◆ ChangeVolume()

void bdm::neuroscience::NeuriteElement::ChangeVolume ( real_t  speed)

Progressive modification of the volume. Updates the diameter.

Parameters
speedcubic micron/ h

Definition at line 454 of file neurite_element.cc.

◆ Copy()

void bdm::neuroscience::NeuriteElement::Copy ( const NeuriteElement rhs)
protected

Definition at line 849 of file neurite_element.cc.

◆ CriticalRegion()

void bdm::neuroscience::NeuriteElement::CriticalRegion ( std::vector< AgentPointer<>> *  aptrs)
overridevirtual

If the thread-safety mechanism is set to user-specified this function will be called before the operations are executed for this agent.
Subclasses define the critical region by adding the AgentPointers of all agents that must not be processed in parallel.
Don't forget to add the current agent.
Here an example from NeuronSoma.

void NeuronSoma::CriticalRegion(std::vector<AgentPointer<>>* aptrs) {
  aptrs->reserve(daughters_.size() + 1);
  aptrs->push_back(Agent::GetAgentPtr<>());
  for (auto& daughter : daughters_) {
    aptrs->push_back(daughter);
  }
}
See also
Param::thread_safety_mechanism
AgentPointer
NeuronSoma::CriticalRegion

Reimplemented from bdm::Agent.

Definition at line 122 of file neurite_element.cc.

◆ DistalEnd()

const Real3& bdm::neuroscience::NeuriteElement::DistalEnd ( ) const
inline

Returns the position of the distal end == position_.

Definition at line 432 of file neurite_element.h.

◆ ElongateTerminalEnd()

void bdm::neuroscience::NeuriteElement::ElongateTerminalEnd ( real_t  speed,
const Real3 direction 
)

Method used for active extension of a terminal branch, representing the steering of a growth cone. The movement should always be forward, otherwise no movement is performed. If direction points in an opposite direction than the axis, i.e. if the dot product is negative, there is no movement (only elongation is possible).

Parameters
speed
direction

Definition at line 233 of file neurite_element.cc.

◆ ExtendSideNeuriteElement()

NeuriteElement * bdm::neuroscience::NeuriteElement::ExtendSideNeuriteElement ( real_t  length,
real_t  diameter,
const Real3 direction 
)
private

Extend a side neurite element and assign it to daughter right.

See also
SideNeuriteExtensionEvent

Definition at line 903 of file neurite_element.cc.

◆ ForceTransmittedFromDaugtherToMother()

Real3 bdm::neuroscience::NeuriteElement::ForceTransmittedFromDaugtherToMother ( const NeuronOrNeurite mother)

Returns the total force that this NeuriteElement exerts on it's mother. It is the sum of the spring force and the part of the inter-object force computed earlier in CalculateDisplacement

Definition at line 369 of file neurite_element.cc.

◆ GetActualLength()

real_t bdm::neuroscience::NeuriteElement::GetActualLength ( ) const
inline

Definition at line 396 of file neurite_element.h.

◆ GetAdherence()

real_t bdm::neuroscience::NeuriteElement::GetAdherence ( ) const
inline

Definition at line 93 of file neurite_element.h.

◆ GetAxis()

const Real3 & bdm::neuroscience::NeuriteElement::GetAxis ( ) const

Returns the axis direction of a neurite element.

Definition at line 789 of file neurite_element.cc.

◆ GetBranchOrder()

int bdm::neuroscience::NeuriteElement::GetBranchOrder ( ) const
inline

Definition at line 392 of file neurite_element.h.

◆ GetDaughterLeft()

const AgentPointer< NeuriteElement > & bdm::neuroscience::NeuriteElement::GetDaughterLeft ( ) const
Returns
the (first) distal neurite element, if it exists, i.e. if this is not the terminal segment (otherwise returns nullptr).

Definition at line 728 of file neurite_element.cc.

◆ GetDaughterRight()

const AgentPointer< NeuriteElement > & bdm::neuroscience::NeuriteElement::GetDaughterRight ( ) const
Returns
the second distal neurite element, if it exists i.e. if there is a branching point just after this element (otherwise returns nullptr).

Definition at line 737 of file neurite_element.cc.

◆ GetDensity()

real_t bdm::neuroscience::NeuriteElement::GetDensity ( ) const
inline

Definition at line 105 of file neurite_element.h.

◆ GetDiameter()

real_t bdm::neuroscience::NeuriteElement::GetDiameter ( ) const
inlineoverridevirtual

Implements bdm::Agent.

Definition at line 103 of file neurite_element.h.

◆ GetIdentifierSWC()

StructureIdentifierSWC bdm::neuroscience::NeuriteElement::GetIdentifierSWC ( ) const
overridevirtual

Returns StructureIdentifierSWC:kAxon if NeuriteElement is an Axon and StructureIdentifierSWC::kApicalDendrite for all other cases.

Reimplemented from bdm::neuroscience::NeuronOrNeurite.

Definition at line 179 of file neurite_element.cc.

◆ GetLength()

real_t bdm::neuroscience::NeuriteElement::GetLength ( ) const
inline

Definition at line 441 of file neurite_element.h.

◆ GetLock()

Spinlock* bdm::neuroscience::NeuriteElement::GetLock ( )
inlineoverridevirtual

Implements bdm::neuroscience::NeuronOrNeurite.

Definition at line 68 of file neurite_element.h.

◆ GetMass()

real_t bdm::neuroscience::NeuriteElement::GetMass ( ) const
inline

Definition at line 107 of file neurite_element.h.

◆ GetMassLocation()

const Real3& bdm::neuroscience::NeuriteElement::GetMassLocation ( ) const
inline

return end of neurite element position

Definition at line 89 of file neurite_element.h.

◆ GetMother() [1/2]

AgentPointer<NeuronOrNeurite>& bdm::neuroscience::NeuriteElement::GetMother ( )
inline

Definition at line 371 of file neurite_element.h.

◆ GetMother() [2/2]

const AgentPointer<NeuronOrNeurite>& bdm::neuroscience::NeuriteElement::GetMother ( ) const
inline

Definition at line 373 of file neurite_element.h.

◆ GetPosition()

const Real3& bdm::neuroscience::NeuriteElement::GetPosition ( ) const
inlineoverridevirtual

Implements bdm::Agent.

Definition at line 82 of file neurite_element.h.

◆ GetRequiredVisDataMembers()

std::set< std::string > bdm::neuroscience::NeuriteElement::GetRequiredVisDataMembers ( ) const
overridevirtual

Returns the data members that are required to visualize this simulation object.

Reimplemented from bdm::Agent.

Definition at line 134 of file neurite_element.cc.

◆ GetRestingLength()

real_t bdm::neuroscience::NeuriteElement::GetRestingLength ( ) const
inline

Definition at line 401 of file neurite_element.h.

◆ GetShape()

Shape bdm::neuroscience::NeuriteElement::GetShape ( ) const
inlineoverridevirtual

Implements bdm::Agent.

Definition at line 72 of file neurite_element.h.

◆ GetSpringAxis()

const Real3& bdm::neuroscience::NeuriteElement::GetSpringAxis ( ) const
inline

Definition at line 405 of file neurite_element.h.

◆ GetSpringConstant()

real_t bdm::neuroscience::NeuriteElement::GetSpringConstant ( ) const
inline

Definition at line 409 of file neurite_element.h.

◆ GetTension()

real_t bdm::neuroscience::NeuriteElement::GetTension ( ) const
inline

Definition at line 413 of file neurite_element.h.

◆ GetUid()

const AgentUid& bdm::neuroscience::NeuriteElement::GetUid ( ) const
inlineoverridevirtual

Implements bdm::neuroscience::NeuronOrNeurite.

Definition at line 66 of file neurite_element.h.

◆ GetUnitaryAxisDirectionVector()

Real3 bdm::neuroscience::NeuriteElement::GetUnitaryAxisDirectionVector ( ) const

NOT A "REAL" GETTER Gets a vector of length 1, with the same direction as the SpringAxis.

Returns
a normalized spring axis

Definition at line 773 of file neurite_element.cc.

◆ GetVolume()

real_t bdm::neuroscience::NeuriteElement::GetVolume ( ) const
inline

Definition at line 101 of file neurite_element.h.

◆ GetXAxis()

const Real3& bdm::neuroscience::NeuriteElement::GetXAxis ( ) const
inline

Definition at line 97 of file neurite_element.h.

◆ GetYAxis()

const Real3& bdm::neuroscience::NeuriteElement::GetYAxis ( ) const
inline

Definition at line 98 of file neurite_element.h.

◆ GetZAxis()

const Real3& bdm::neuroscience::NeuriteElement::GetZAxis ( ) const
inline

Definition at line 99 of file neurite_element.h.

◆ Initialize()

void bdm::neuroscience::NeuriteElement::Initialize ( const NewAgentEvent event)
overridevirtual

This method is called to initialize new agents that are created during a NewAgentEvent. Override this method to initialize attributes of your own Agent subclasses. NB: Don't forget to call the implementation of the base class first. Base::Initialize(event); Failing to do so will result in errors.

Reimplemented from bdm::Agent.

Definition at line 34 of file neurite_element.cc.

◆ InitializeNeuriteBifurcation()

void bdm::neuroscience::NeuriteElement::InitializeNeuriteBifurcation ( NeuriteElement mother,
real_t  length,
real_t  diameter,
const Real3 direction 
)
private

TODO.

Definition at line 954 of file neurite_element.cc.

◆ InitializeNewNeuriteExtension()

void bdm::neuroscience::NeuriteElement::InitializeNewNeuriteExtension ( NeuronSoma soma,
real_t  diameter,
real_t  phi,
real_t  theta 
)
private

TODO.

Definition at line 915 of file neurite_element.cc.

◆ InitializeSideExtensionOrBranching()

void bdm::neuroscience::NeuriteElement::InitializeSideExtensionOrBranching ( NeuriteElement mother,
real_t  length,
real_t  diameter,
const Real3 direction 
)
private

Neurite branching is composed of neurite splitting and side neurite extension. To avoid code duplication in constructors, logic has been moved here.

Definition at line 1016 of file neurite_element.cc.

◆ InitializeSplitOrBranching()

void bdm::neuroscience::NeuriteElement::InitializeSplitOrBranching ( NeuriteElement other,
real_t  distal_portion 
)
private

Neurite branching is composed of neurite splitting and side neurite extension. To avoid code duplication in constructors, logic has been moved here.

See also
SplitNeuriteElementEvent, NeuriteBranchingEvent

Definition at line 995 of file neurite_element.cc.

◆ IsAxon()

bool bdm::neuroscience::NeuriteElement::IsAxon ( ) const
inline

Definition at line 367 of file neurite_element.h.

◆ IsTerminal()

bool bdm::neuroscience::NeuriteElement::IsTerminal ( ) const
inline

Should return yes if the PhysicalCylinder is considered a terminal branch.

Returns
is it a terminal branch

Definition at line 424 of file neurite_element.h.

◆ LengthToProximalBranchingPoint()

real_t bdm::neuroscience::NeuriteElement::LengthToProximalBranchingPoint ( ) const

Returns the total (actual) length of all the neurite elements (including the one in which this method is called) before the previous branching point. Used to decide if long enough to bifurcate or branch, independently of the discretization.

Definition at line 778 of file neurite_element.cc.

◆ MovePointMass()

void bdm::neuroscience::NeuriteElement::MovePointMass ( real_t  speed,
const Real3 direction 
)

Method used for active extension of a terminal branch, representing the steering of a growth cone. There is no check for real extension (unlike in ExtendCylinder()` ).

Parameters
speedof the growth rate (microns/hours).
directionthe 3D direction of movement.

Definition at line 418 of file neurite_element.cc.

◆ OriginOf()

Real3 bdm::neuroscience::NeuriteElement::OriginOf ( const AgentUid daughter_uid) const
overridevirtual

Returns the absolute coordinates of the location where the daughter is attached.

Parameters
daughter_element_idxelement_idx of the daughter
Returns
the coord

Implements bdm::neuroscience::NeuronOrNeurite.

Definition at line 175 of file neurite_element.cc.

◆ ProximalEnd()

Real3 bdm::neuroscience::NeuriteElement::ProximalEnd ( ) const
inline

returns the position of the proximal end, ie the position minus the spring axis. Is mainly used for paint

Definition at line 429 of file neurite_element.h.

◆ RemoveDaughter()

void bdm::neuroscience::NeuriteElement::RemoveDaughter ( const AgentPointer< NeuriteElement > &  daughter)
overridevirtual

Implements bdm::neuroscience::NeuronOrNeurite.

Definition at line 336 of file neurite_element.cc.

◆ RemoveProximalNeuriteElement()

void bdm::neuroscience::NeuriteElement::RemoveProximalNeuriteElement ( )
private

Merges two neurite elements together. The one in which the method is called phagocytes it's mother.

Definition at line 870 of file neurite_element.cc.

◆ RetractTerminalEnd()

void bdm::neuroscience::NeuriteElement::RetractTerminalEnd ( real_t  speed)

Retracts the neurite element, if it is a terminal one. Branch retraction by moving the distal end toward the proximal end (the mother), maintaining the same tension in the neurite element. The method shortens the actual and the resting length so that the result is a shorter neurite element with the same tension.

  • If this neurite element is longer than the required shortening, it simply retracts.
  • If it is shorter and its mother has no other daughter, it merges with it's mother and the method is recursively called (this time the cylinder length is bigger because we have a new neurite element that resulted from the fusion of two).
  • If it is shorter and either the previous neurite element has another daughter or the mother is not a neurite element, it disappears.
    Parameters
    speedthe retraction speed in microns / h

Definition at line 187 of file neurite_element.cc.

◆ RunDiscretization()

void bdm::neuroscience::NeuriteElement::RunDiscretization ( )
overridevirtual

Checks if this NeuriteElement is either too long or too short.

  • too long: insert another NeuriteElement
  • too short fuse it with the proximal element or even delete it

Only executed for terminal neurite elements.

Reimplemented from bdm::Agent.

Definition at line 387 of file neurite_element.cc.

◆ SetActualLength()

void bdm::neuroscience::NeuriteElement::SetActualLength ( real_t  actual_length)

Should not be used, since the actual length depends on the geometry.

Definition at line 746 of file neurite_element.cc.

◆ SetAdherence()

void bdm::neuroscience::NeuriteElement::SetAdherence ( real_t  adherence)

Definition at line 168 of file neurite_element.cc.

◆ SetAxon()

void bdm::neuroscience::NeuriteElement::SetAxon ( bool  is_axon)
inline

Definition at line 369 of file neurite_element.h.

◆ SetBranchOrder()

void bdm::neuroscience::NeuriteElement::SetBranchOrder ( int  branch_order)
inline

Definition at line 394 of file neurite_element.h.

◆ SetDaughterLeft()

void bdm::neuroscience::NeuriteElement::SetDaughterLeft ( const AgentPointer< NeuriteElement > &  daughter)

Definition at line 732 of file neurite_element.cc.

◆ SetDaughterRight()

void bdm::neuroscience::NeuriteElement::SetDaughterRight ( const AgentPointer< NeuriteElement > &  daughter)

Definition at line 741 of file neurite_element.cc.

◆ SetDensity()

void bdm::neuroscience::NeuriteElement::SetDensity ( real_t  density)

Definition at line 146 of file neurite_element.cc.

◆ SetDiameter()

void bdm::neuroscience::NeuriteElement::SetDiameter ( real_t  diameter)
overridevirtual

Implements bdm::Agent.

Definition at line 138 of file neurite_element.cc.

◆ SetMassLocation()

void bdm::neuroscience::NeuriteElement::SetMassLocation ( const Real3 mass_location)

Definition at line 163 of file neurite_element.cc.

◆ SetMother()

void bdm::neuroscience::NeuriteElement::SetMother ( const AgentPointer< NeuronOrNeurite > &  mother)
inline

Definition at line 375 of file neurite_element.h.

◆ SetPosition()

void bdm::neuroscience::NeuriteElement::SetPosition ( const Real3 position)
overridevirtual

Implements bdm::Agent.

Definition at line 153 of file neurite_element.cc.

◆ SetRestingLength()

void bdm::neuroscience::NeuriteElement::SetRestingLength ( real_t  resting_length)

Definition at line 753 of file neurite_element.cc.

◆ SetRestingLengthForDesiredTension()

void bdm::neuroscience::NeuriteElement::SetRestingLengthForDesiredTension ( real_t  tension)

Definition at line 443 of file neurite_element.cc.

◆ SetSpringAxis()

void bdm::neuroscience::NeuriteElement::SetSpringAxis ( const Real3 axis)

Definition at line 757 of file neurite_element.cc.

◆ SetSpringConstant()

void bdm::neuroscience::NeuriteElement::SetSpringConstant ( real_t  spring_constant)

Definition at line 762 of file neurite_element.cc.

◆ SetTension()

void bdm::neuroscience::NeuriteElement::SetTension ( real_t  tension)

Definition at line 766 of file neurite_element.cc.

◆ SplitNeuriteElement()

NeuriteElement * bdm::neuroscience::NeuriteElement::SplitNeuriteElement ( real_t  distal_portion = 0.5)
private

Split this neurite element into two segments.

See also
SplitNeuriteElementEvent

Definition at line 864 of file neurite_element.cc.

◆ TransformCoordinatesGlobalToLocal()

Real3 bdm::neuroscience::NeuriteElement::TransformCoordinatesGlobalToLocal ( const Real3 position) const

3 systems of coordinates :

Global : cartesian coord, defined by orthogonal axis (1,0,0), (0,1,0) and (0,0,1) with origin at (0,0,0). Local : defined by orthogonal axis xAxis (=vect proximal to distal end), yAxis and zAxis, with origin at proximal end Polar : cylindrical coordinates [h,theta,r] with h = first local coord (along xAxis), theta = angle from yAxis, r euclidean distance from xAxis; with origin at proximal end

Note: The methods below transform POSITIONS and not DIRECTIONS !!!

G -> L L -> G

L -> P P -> L

G -> P = G -> L, then L -> P P -> P = P -> L, then L -> G G -> L Returns the position in the local coordinate system (xAxis, yXis, zAxis) of a point expressed in global cartesian coordinates ([1,0,0],[0,1,0],[0,0,1]).

Parameters
positionin global coordinates

Definition at line 681 of file neurite_element.cc.

◆ TransformCoordinatesGlobalToPolar()

Real3 bdm::neuroscience::NeuriteElement::TransformCoordinatesGlobalToPolar ( const Real3 position) const

G -> L : G -> L, then L -> P.

Definition at line 722 of file neurite_element.cc.

◆ TransformCoordinatesLocalToGlobal()

Real3 bdm::neuroscience::NeuriteElement::TransformCoordinatesLocalToGlobal ( const Real3 position) const

L -> G Returns the position in global cartesian coordinates ([1,0,0],[0,1,0],[0,0,1]) of a point expressed in the local coordinate system (xAxis, yXis, zAxis).

Parameters
positionin local coordinates

Definition at line 687 of file neurite_element.cc.

◆ TransformCoordinatesLocalToPolar()

Real3 bdm::neuroscience::NeuriteElement::TransformCoordinatesLocalToPolar ( const Real3 position) const

L -> P Returns the position in cylindrical coordinates (h,theta,r) of a point expressed in the local coordinate system (xAxis, yXis, zAxis).

Parameters
positionin local coordinates

Definition at line 699 of file neurite_element.cc.

◆ TransformCoordinatesPolarToGlobal()

Real3 bdm::neuroscience::NeuriteElement::TransformCoordinatesPolarToGlobal ( const std::array< real_t, 2 > &  position) const

P -> G : P -> L, then L -> G.

Definition at line 711 of file neurite_element.cc.

◆ TransformCoordinatesPolarToLocal()

Real3 bdm::neuroscience::NeuriteElement::TransformCoordinatesPolarToLocal ( const Real3 position) const

P -> L Returns the position in the local coordinate system (xAxis, yXis, zAxis) of a point expressed in cylindrical coordinates (h,theta,r).

Parameters
positionin local coordinates

Definition at line 705 of file neurite_element.cc.

◆ Update()

void bdm::neuroscience::NeuriteElement::Update ( const NewAgentEvent event)
overridevirtual

This method is called to update the existing agent at the end of a NewAgentEvent. Override this method to update attributes of your own Agent subclasses. NB: Don't forget to call the implementation of the base class first. Base::Update(event); Failing to do so will result in errors.

Reimplemented from bdm::Agent.

Definition at line 77 of file neurite_element.cc.

◆ UpdateDependentPhysicalVariables()

void bdm::neuroscience::NeuriteElement::UpdateDependentPhysicalVariables ( )
overridevirtual

Updates the spring axis, the actual length, the tension and the volume.

For tension, T = k * (aL - rL) / rL. k = spring constant, rL = resting length, aL = actual length. (Note the division by rL. Otherwise we could have cylinders with big aL and rL = 0).

Implements bdm::neuroscience::NeuronOrNeurite.

Definition at line 794 of file neurite_element.cc.

◆ UpdateDiameter()

void bdm::neuroscience::NeuriteElement::UpdateDiameter ( )

Recomputes diameter after volume has changed.

Definition at line 669 of file neurite_element.cc.

◆ UpdateLocalCoordinateAxis()

void bdm::neuroscience::NeuriteElement::UpdateLocalCoordinateAxis ( )

Defines the three orthonormal local axis so that a cylindrical coordinate system can be used. The x_axis_ is aligned with the spring_axis_. The two other are in the plane perpendicular to spring_axis_. This method to update the axis was suggested by Matt Coock. Although not perfectly exact, it is accurate enough for us to use.

Definition at line 650 of file neurite_element.cc.

◆ UpdatePosition()

void bdm::neuroscience::NeuriteElement::UpdatePosition ( )

Definition at line 158 of file neurite_element.cc.

◆ UpdateRelative()

void bdm::neuroscience::NeuriteElement::UpdateRelative ( const NeuronOrNeurite old_relative,
const NeuronOrNeurite new_relative 
)
overridevirtual

Implements bdm::neuroscience::NeuronOrNeurite.

Definition at line 353 of file neurite_element.cc.

◆ UpdateVolume()

void bdm::neuroscience::NeuriteElement::UpdateVolume ( )

Recomputes volume, after diameter has been changed.

Definition at line 677 of file neurite_element.cc.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  str,
const NeuriteElement n 
)
friend

Definition at line 809 of file neurite_element.cc.

Member Data Documentation

◆ actual_length_

real_t bdm::neuroscience::NeuriteElement::actual_length_ = 1
private

Real length of the PhysicalCylinder (norm of the springAxis). NB: Use setter and don't assign values directly

Definition at line 509 of file neurite_element.h.

◆ adherence_

real_t bdm::neuroscience::NeuriteElement::adherence_
private

NB: Use setter and don't assign values directly.

Definition at line 474 of file neurite_element.h.

◆ branch_order_

int bdm::neuroscience::NeuriteElement::branch_order_ = 0
private

number of branching points from here to the soma (root of the neuron tree-structure).

Definition at line 497 of file neurite_element.h.

◆ daughter_left_

AgentPointer<NeuriteElement> bdm::neuroscience::NeuriteElement::daughter_left_
private

First child node in the neuron tree structure (can only be a Neurite element)

Definition at line 490 of file neurite_element.h.

◆ daughter_right_

AgentPointer<NeuriteElement> bdm::neuroscience::NeuriteElement::daughter_right_
private

Second child node in the neuron tree structure. (can only be a Neurite element)

Definition at line 493 of file neurite_element.h.

◆ density_

real_t bdm::neuroscience::NeuriteElement::density_
private

NB: Use setter and don't assign values directly.

Definition at line 472 of file neurite_element.h.

◆ diameter_

real_t bdm::neuroscience::NeuriteElement::diameter_ = 1
private

NB: Use setter and don't assign values directly.

Definition at line 470 of file neurite_element.h.

◆ force_to_transmit_to_proximal_mass_

Real3 bdm::neuroscience::NeuriteElement::force_to_transmit_to_proximal_mass_ = {{0, 0, 0}}
private

The part of the inter-object force transmitted to the mother (parent node)

Definition at line 500 of file neurite_element.h.

◆ has_neurite_neighbor_

bool bdm::neuroscience::NeuriteElement::has_neurite_neighbor_ = false
private

Helper variable needed in CalculateDisplacement.

Definition at line 524 of file neurite_element.h.

◆ is_axon_

bool bdm::neuroscience::NeuriteElement::is_axon_ = false
private

Definition at line 482 of file neurite_element.h.

◆ mass_location_

Real3 bdm::neuroscience::NeuriteElement::mass_location_ = {{0.0, 0.0, 0.0}}
private

mass_location_ is distal end of the cylinder NB: Use setter and don't assign values directly

Definition at line 463 of file neurite_element.h.

◆ mother_

AgentPointer<NeuronOrNeurite> bdm::neuroscience::NeuriteElement::mother_
private

Parent node in the neuron tree structure can be a Neurite element or cell body

Definition at line 486 of file neurite_element.h.

◆ position_

Real3 bdm::neuroscience::NeuriteElement::position_ = {{0.0, 0.0, 0.0}}
private

position_ is the middle point of cylinder

Definition at line 466 of file neurite_element.h.

◆ resting_length_

real_t bdm::neuroscience::NeuriteElement::resting_length_
private

The length of the internal spring where tension would be zero. T = k*(A-R)/R --> R = k*A/(T+K)

Definition at line 521 of file neurite_element.h.

◆ spring_axis_

Real3 bdm::neuroscience::NeuriteElement::spring_axis_ = {{0, 0, 0}}
private

from the attachment point to the mass location (proximal -> distal). NB: Use setter and don't assign values directly

Definition at line 505 of file neurite_element.h.

◆ spring_constant_

real_t bdm::neuroscience::NeuriteElement::spring_constant_
private

Spring constant per distance unit (springConstant restingLength = "real" spring constant).

Definition at line 517 of file neurite_element.h.

◆ tension_

real_t bdm::neuroscience::NeuriteElement::tension_
private

Tension in the cylinder spring. NB: Use setter and don't assign values directly

Definition at line 513 of file neurite_element.h.

◆ volume_

real_t bdm::neuroscience::NeuriteElement::volume_
private

Definition at line 468 of file neurite_element.h.

◆ x_axis_

Real3 bdm::neuroscience::NeuriteElement::x_axis_ = {{1.0, 0.0, 0.0}}
private

First axis of the local coordinate system equal to cylinder axis.

Definition at line 476 of file neurite_element.h.

◆ y_axis_

Real3 bdm::neuroscience::NeuriteElement::y_axis_ = {{0.0, 1.0, 0.0}}
private

Second axis of the local coordinate system.

Definition at line 478 of file neurite_element.h.

◆ z_axis_

Real3 bdm::neuroscience::NeuriteElement::z_axis_ = {{0.0, 0.0, 1.0}}
private

Third axis of the local coordinate system.

Definition at line 480 of file neurite_element.h.


The documentation for this class was generated from the following files: