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< Vector > GetCenters () const
 Return the centers of the particles.
Sphere GetSphere () const
 Computes the bounding sphere 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 sphere.
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< Vector > points
 Set of particles.
double r = 0.0
 Radius of particles.

Static Protected Attributes

static Random random
 Random number generator.
static Xoshiro256 fastrandom
 Fast random number generator.
static constexpr int N = 37
 Generate N evenly distributed cells around a given cell, angle \( 2\pi/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.

The particles at a distance less than 4r from the candidate are first gathered in a subset, which is the only one checked for collisions. The size of this subset is not bounded, it is stored in an array which initially reserves room for 43 particles. This value is the worst case of a dense packing: the minimum distance between two particles is \( 2r(1+\epsilon) = 2.15r \) with \( \epsilon = 0.075 \), and a face-centered cubic packing with this spacing has, around the candidate, 12 particles at distance 2.15r, 6 at 3.04r and 24 at 3.72r, i.e. 1 + 12 + 6 + 24 = 43 particles at a distance less than 4r (the next shell is at 4.3r). The array grows if this number is exceeded.

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.