Core 1.0
EdenGrowth Class Reference

Off-lattice Eden growth. More...

#include <eden.h>

Inheritance diagram for EdenGrowth:
ParticleSet

Public Member Functions

 EdenGrowth (const double &=1.0)
 Create an Eden growth structure.
 
 EdenGrowth (const Vector &, const double &)
 Create an Eden growth structure.
 
 EdenGrowth (const QVector< Vector > &, const double &)
 Create an Eden growth structure.
 
 EdenGrowth (const ParticleSet &)
 Create an Eden growth structure.
 
 ~EdenGrowth ()
 Empty.
 
virtual void Step ()
 Add a new particle to the cluster.
 
virtual void Step (int)
 Perform several growth steps.
 
void AddCell (const Vector &)
 Add a new particle to the cluster.
 
QVector< int > GetIndices () const
 Return the indices.
 
- Public Member Functions inherited from ParticleSet
 ParticleSet ()
 Empty constructor.
 
 ParticleSet (const double &)
 Create an empty set of particles.
 
 ParticleSet (const Vector &, const double &)
 Create a set of particles.
 
 ParticleSet (const QVector< Vector > &, const double &)
 Create a set of particles.
 
int Size () const
 Return the number of particles.
 
Sphere At (int) const
 Get the k-th particle.
 
double Radius () const
 Return the radius of the particles.
 
QVector< VectorGetCenters () const
 Return the centers of the particles.
 
Sphere GetSphere () const
 Computes the bounding circle of the centers of the particles.
 
Box GetBox () const
 Computes the bounding box of the centers of the particles.
 
void Append (const Vector &)
 Add a new particle to the set.
 
bool Intersect (const Sphere &) const
 Check the intersection between the cluster and a circle.
 
bool Intersect (const Box &) const
 Check the intersection between the cluster and a box.
 

Protected Member Functions

virtual int GrowthSites (const Vector &, Vector *) const
 Find candidate growth directions from a particle.
 

Protected Attributes

Sphere sphere
 Bounding circle of the domain.
 
QVector< int > v
 Tree structure topology, i.e., index of the ancestor particle during growth.
 
QVector< int > s
 Set of indexes referencing boundary cells.
 
- Protected Attributes inherited from ParticleSet
QVector< Vectorpoints
 Set of particles.
 
double r = 0.0
 Radius of particles.
 

Static Protected Attributes

static Random random
 Random number generator.
 
static RandomFast fastrandom
 Fast random number generator.
 
static constexpr int N = 37
 Generate N evenly distributed cells around a given cell, angle 2π/N.
 

Detailed Description

Off-lattice Eden growth.

Constructor & Destructor Documentation

◆ EdenGrowth() [1/4]

EdenGrowth::EdenGrowth ( const double & r = 1.0)
explicit

Create an Eden growth structure.

Set initial circle as empty, and list of particles as empty.

Parameters
rRadius of particles.

◆ EdenGrowth() [2/4]

EdenGrowth::EdenGrowth ( const Vector & c,
const double & r )
explicit

Create an Eden growth structure.

Parameters
cInitial particle position.
rRadius of particles.

◆ EdenGrowth() [3/4]

EdenGrowth::EdenGrowth ( const QVector< Vector > & p,
const double & r )
explicit

Create an Eden growth structure.

Parameters
pSet of seed points.
rRadius of particles.

◆ EdenGrowth() [4/4]

EdenGrowth::EdenGrowth ( const ParticleSet & particles)
explicit

Create an Eden growth structure.

Parameters
particlesSet of particles.

Member Function Documentation

◆ AddCell()

void EdenGrowth::AddCell ( const Vector & c)

Add a new particle to the cluster.

If the particle intersects the cluster, it automatically dies and is not added to the cluster.

Otherwise, it is added as a living particle.

◆ GrowthSites()

int EdenGrowth::GrowthSites ( const Vector & q,
Vector * sites ) const
protectedvirtual

Find candidate growth directions from a particle.

This function has an O(n) complexity.

Parameters
qPosition of the candidate particle.
sitesArray of returned growth positions.
Returns
the number of candidate growth directions.

◆ Step() [1/2]

void EdenGrowth::Step ( )
virtual

Add a new particle to the cluster.

Select a random particle in the existing cluster, and compute candidate growth directions. Repeat random selection until a valid particle is found. Then select a randomly generated growth direction and update the cluster.

This function has an O(n) complexity.

◆ Step() [2/2]

void EdenGrowth::Step ( int n)
virtual

Perform several growth steps.

Parameters
nNumber of growth steps.