Generate a tree-shape network for the conduction system of a heart with particles.
More...
#include <particle_generator_network.h>
Inherits SPH::ParticleGenerator.
|
Vecd | getGradientFromNearestPoints (Vecd pt, Real delta) |
| Get the gradient from nearest points, for imposing repulsive force. More...
|
|
bool | createABranchIfValid (size_t parent_id, Real angle, Real repulsivity, size_t number_segments) |
| Create a new branch if it is valid. More...
|
|
Vecd | createATentativeNewBranchPoint (Vecd init_point, Vecd dir) |
| Functions that creates a new node in the mesh surface and it to the queue is it lies in the surface. More...
|
|
bool | isCollision (const Vecd &new_point, const ListData &nearest_neighbor, size_t parent_id) |
| Check if the new point has collision with the existing points. More...
|
|
virtual bool | extraCheck (const Vecd &new_point) |
| Check if the new point is valid according to extra constraint. More...
|
|
void | growAParticleOnBranch (TreeBody::Branch *branch, const Vecd &new_point, const Vecd &end_direction) |
|
Protected Member Functions inherited from SPH::ParticleGenerator |
virtual void | initializePositionAndVolumetricMeasure (const Vecd &position, Real volumetric_measure) |
|
Protected Member Functions inherited from SPH::BaseParticleGenerator |
virtual void | initializePosition (const Vecd &position) |
|
Generate a tree-shape network for the conduction system of a heart with particles.
◆ createABranchIfValid()
bool SPH::ParticleGeneratorNetwork::createABranchIfValid |
( |
size_t |
parent_id, |
|
|
Real |
angle, |
|
|
Real |
repulsivity, |
|
|
size_t |
number_segments |
|
) |
| |
|
protected |
Create a new branch if it is valid.
- Parameters
-
[in] | sph_body(SPHBody) | The SPHBody to whom the tree belongs. |
[in] | parent_id(size_t) | Id of parent branch. |
[in] | angle(Real) | The angle for growing new points. |
[in] | repulsivity(Real) | The repulsivity for creating new points. |
[in] | number_segments(size_t) | Number of segments in this branch. |
Project grad to surface.
This constraint imposed to avoid too small time step size.
◆ createATentativeNewBranchPoint()
Vecd SPH::ParticleGeneratorNetwork::createATentativeNewBranchPoint |
( |
Vecd |
init_point, |
|
|
Vecd |
dir |
|
) |
| |
|
protected |
Functions that creates a new node in the mesh surface and it to the queue is it lies in the surface.
- Parameters
-
[in] | init_node | vector that contains the coordinates of the last node added in the branch. vector that contains the coordinates of the last node added in the branch. |
[in] | dir | a vector that contains the direction from the init_node to the node to project. |
[out] | end | point of the created segment. |
◆ extraCheck()
virtual bool SPH::ParticleGeneratorNetwork::extraCheck |
( |
const Vecd & |
new_point | ) |
|
|
inlineprotectedvirtual |
Check if the new point is valid according to extra constraint.
- Parameters
-
[in] | new_point(Vecd) | The enquiry point. |
◆ getGradientFromNearestPoints()
Vecd SPH::ParticleGeneratorNetwork::getGradientFromNearestPoints |
( |
Vecd |
pt, |
|
|
Real |
delta |
|
) |
| |
|
protected |
Get the gradient from nearest points, for imposing repulsive force.
- Parameters
-
[in] | pt(Vecd) | Inquiry point. |
[in] | delta(Real) | parameter for gradient calculation. |
◆ initializeGeometricVariables()
void SPH::ParticleGeneratorNetwork::initializeGeometricVariables |
( |
| ) |
|
|
overridevirtual |
Created base particles based on edges in branch
Set vertices in family branch.
Creating a new branch.
Creating a new branch with fixed number of segments.
Implements SPH::BaseParticleGenerator.
◆ isCollision()
bool SPH::ParticleGeneratorNetwork::isCollision |
( |
const Vecd & |
new_point, |
|
|
const ListData & |
nearest_neighbor, |
|
|
size_t |
parent_id |
|
) |
| |
|
protected |
Check if the new point has collision with the existing points.
- Parameters
-
[in] | new_point(Vecd) | The enquiry point. |
[in] | nearest_neighbor(ListData) | The nearest point of the existing points. |
[in] | parent_id(size_t) | Id of parent branch |
◆ angle_
Real SPH::ParticleGeneratorNetwork::angle_ = 0.3 |
|
protected |
angle with respect to the direction of the previous edge and the new edge.
◆ fascicle_angles_
std::vector<Real> SPH::ParticleGeneratorNetwork::fascicle_angles_ = {-1.25, 0.75} |
|
protected |
angles with respect to the initial edge of the fascicles.
◆ fascicle_ratio_
Real SPH::ParticleGeneratorNetwork::fascicle_ratio_ = 15.0 |
|
protected |
ratio of length of the fascicles. Include one per fascicle to include.
◆ fascicles_
bool SPH::ParticleGeneratorNetwork::fascicles_ |
|
protected |
◆ grad_factor_
Real SPH::ParticleGeneratorNetwork::grad_factor_ |
|
protected |
Factor for computing gradient from nearest node.
◆ n_it_
size_t SPH::ParticleGeneratorNetwork::n_it_ |
|
protected |
Number of iterations (generations of branch.
◆ repulsivity_
Real SPH::ParticleGeneratorNetwork::repulsivity_ = 0.175 |
|
protected |
◆ second_pnt_
Vecd SPH::ParticleGeneratorNetwork::second_pnt_ |
|
protected |
Second point, approximate the growing direction.
◆ segment_length_
Real SPH::ParticleGeneratorNetwork::segment_length_ |
|
protected |
segment length of the branch.
◆ segments_in_branch_
size_t SPH::ParticleGeneratorNetwork::segments_in_branch_ |
|
protected |
approximated number of segments in a branch.
◆ starting_pnt_
Vecd SPH::ParticleGeneratorNetwork::starting_pnt_ |
|
protected |
Starting point for net work.
The documentation for this class was generated from the following files: