Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
Loading...
Searching...
No Matches
TissueForge::ClusterParticleHandle Struct Reference

The cluster analogue to :class:ParticleHandle. More...

#include <tfCluster.h>

Inheritance diagram for TissueForge::ClusterParticleHandle:
Collaboration diagram for TissueForge::ClusterParticleHandle:

Public Member Functions

 ClusterParticleHandle (const int &id)
 
std::string str () const override
 
Clustercluster ()
 Gets the actual cluster of this handle.
 
ParticleHandleoperator() (ParticleType *partType, FVector3 *position=NULL, FVector3 *velocity=NULL)
 Constituent particle constructor.
 
ParticleHandleoperator() (ParticleType *partType, const std::string &str)
 Constituent particle constructor.
 
bool has (const int32_t &pid)
 
bool has (ParticleHandle *part)
 
ParticleHandlefission (FVector3 *axis=NULL, bool *random=NULL, FPTYPE *time=NULL, FVector3 *normal=NULL, FVector3 *point=NULL)
 
ParticleHandlesplit (FVector3 *axis=NULL, bool *random=NULL, FPTYPE *time=NULL, FVector3 *normal=NULL, FVector3 *point=NULL)
 Split the cluster.
 
ParticleList items ()
 Get all particles of this cluster.
 
FPTYPE getRadiusOfGyration ()
 
FVector3 getCenterOfMass ()
 
FVector3 getCentroid ()
 
FMatrix3 getMomentOfInertia ()
 
uint16_t getNumParts ()
 
std::vector< int32_t > getPartIds ()
 
- Public Member Functions inherited from TissueForge::ParticleHandle
Particlepart ()
 Gets the actual particle of this handle.
 
Particleget ()
 Gets the actual particle of this handle.
 
ParticleTypetype ()
 Gets the particle type of this handle.
 
 ParticleHandle (const int &id)
 
virtual ParticleHandlefission ()
 
virtual ParticleHandlesplit ()
 Splits a single particle into two.
 
virtual ParticleHandlesplit (const FVector3 &childDirection)
 Splits a single particle into two along a given direction.
 
virtual ParticleHandlesplit (const FPTYPE &childRatio)
 Splits a single particle into two with sizes according to a given ratio.
 
virtual ParticleHandlesplit (const std::vector< FPTYPE > &speciesRatios)
 Splits a single particle into two and allocates species according to given ratios.
 
virtual ParticleHandlesplit (const FVector3 &childDirection, const FPTYPE &childRatio, ParticleType *parentType=NULL, ParticleType *childType=NULL)
 Splits a single particle into two along a given direction, with sizes according to a given ratio, and and optionally with different resulting particle types.
 
virtual ParticleHandlesplit (const FVector3 &childDirection, const FPTYPE &childRatio, const std::vector< FPTYPE > &speciesRatios, ParticleType *parentType=NULL, ParticleType *childType=NULL)
 Splits a single particle into two along a given direction, with sizes according to a given ratio, allocates species according to given ratios, and optionally with different resulting particle types.
 
HRESULT destroy ()
 Destroys the particle and removes it from inventory.
 
FVector3 sphericalPosition (Particle *particle=NULL, FVector3 *origin=NULL)
 Calculates the particle's coordinates in spherical coordinates.
 
FVector3 relativePosition (const FVector3 &origin, const bool &comp_bc=true)
 Computes the relative position with respect to an origin while optionally account for boundary conditions.
 
virtual FMatrix3 virial (FPTYPE *radius=NULL)
 Computes the virial tensor. Optionally pass a distance to include a neighborhood.
 
HRESULT become (ParticleType *type)
 Dynamically changes the type of an object. We can change the type of a ParticleType-derived object to anyther pre-existing ParticleType-derived type. What this means is that if we have an object of say type A, we can change it to another type, say B, and and all of the forces and processes that acted on objects of type A stip and the forces and processes defined for type B now take over.
 
ParticleList neighbors (const FPTYPE &distance, const TissueForge::ParticleTypeList &types)
 Gets a list of nearby particles.
 
ParticleList neighbors (const FPTYPE &distance, const std::vector< ParticleType > &types)
 Gets a list of nearby particles.
 
ParticleList neighbors (const FPTYPE &distance)
 Gets a list of nearby particles of all types.
 
ParticleList neighbors (const TissueForge::ParticleTypeList &types)
 Gets a list of nearby particles within the global cutoff distance.
 
ParticleList neighbors (const std::vector< ParticleType > &types)
 Gets a list of nearby particles within the global cutoff distance.
 
std::vector< int32_t > neighborIds (const FPTYPE &distance, const TissueForge::ParticleTypeList &types)
 Gets a list of nearby particles ids.
 
std::vector< int32_t > neighborIds (const FPTYPE &distance, const std::vector< ParticleType > &types)
 Gets a list of nearby particles ids.
 
std::vector< int32_t > neighborIds (const FPTYPE &distance=-FPTYPE_ONE)
 Gets a list of nearby particles ids of all types.
 
std::vector< int32_t > neighborIds (const TissueForge::ParticleTypeList &types)
 Gets a list of nearby particles ids within the global cutoff distance.
 
std::vector< int32_t > neighborIds (const std::vector< ParticleType > &types)
 Gets a list of nearby particles ids within the global cutoff distance.
 
ParticleList getBondedNeighbors ()
 Gets a list of all bonded neighbors.
 
std::vector< int32_t > getBondedNeighborIds ()
 Gets a list of all bonded neighbor ids.
 
FPTYPE distance (ParticleHandle *_other)
 Calculates the distance to another particle.
 
std::vector< struct TissueForge::BondHandlegetBonds ()
 
std::vector< struct TissueForge::AngleHandlegetAngles ()
 
std::vector< struct TissueForge::DihedralHandlegetDihedrals ()
 
FPTYPE getCharge ()
 
void setCharge (const FPTYPE &charge)
 
FPTYPE getMass ()
 
void setMass (const FPTYPE &mass)
 
bool getFrozen ()
 
void setFrozen (const bool frozen)
 
bool getFrozenX ()
 
void setFrozenX (const bool frozen)
 
bool getFrozenY ()
 
void setFrozenY (const bool frozen)
 
bool getFrozenZ ()
 
void setFrozenZ (const bool frozen)
 
rendering::StylegetStyle ()
 
void setStyle (rendering::Style *style)
 
FPTYPE getAge ()
 
FPTYPE getRadius ()
 
void setRadius (const FPTYPE &radius)
 
FPTYPE getVolume ()
 
std::string getName ()
 
std::string getName2 ()
 
FVector3 getPosition ()
 
void setPosition (FVector3 position)
 
FVector3getVelocity ()
 
void setVelocity (FVector3 velocity)
 
FVector3 getForce ()
 
FVector3getForceInit ()
 
void setForceInit (FVector3 force)
 
int getId ()
 
int16_t getTypeId ()
 
int32_t getClusterId ()
 
uint16_t getFlags ()
 
state::StateVectorgetSpecies ()
 
 operator ClusterParticleHandle * ()
 

Additional Inherited Members

- Public Attributes inherited from TissueForge::ParticleHandle
int id
 

Detailed Description

The cluster analogue to :class:ParticleHandle.

These are special in that they can create particles of their constituent particle types, much like a :class:ParticleType.

Member Function Documentation

◆ cluster()

Cluster * TissueForge::ClusterParticleHandle::cluster ( )

Gets the actual cluster of this handle.

Returns
Particle*

◆ getCenterOfMass()

FVector3 TissueForge::ClusterParticleHandle::getCenterOfMass ( )

center of mass of this cluster.

◆ getCentroid()

FVector3 TissueForge::ClusterParticleHandle::getCentroid ( )

centroid of this cluster.

◆ getMomentOfInertia()

FMatrix3 TissueForge::ClusterParticleHandle::getMomentOfInertia ( )

moment of inertia of this cluster.

◆ getNumParts()

uint16_t TissueForge::ClusterParticleHandle::getNumParts ( )

number of particles that belong to this cluster.

◆ getPartIds()

std::vector< int32_t > TissueForge::ClusterParticleHandle::getPartIds ( )

list of particle ids that belong to this cluster.

◆ getRadiusOfGyration()

FPTYPE TissueForge::ClusterParticleHandle::getRadiusOfGyration ( )

radius of gyration of this cluster.

◆ has() [1/2]

bool TissueForge::ClusterParticleHandle::has ( const int32_t & pid)

Test whether the cluster has an id

◆ has() [2/2]

bool TissueForge::ClusterParticleHandle::has ( ParticleHandle * part)

Test whether the cluster has a particle

◆ items()

ParticleList TissueForge::ClusterParticleHandle::items ( )

Get all particles of this cluster.

Returns
ParticleList*

◆ operator()() [1/2]

ParticleHandle * TissueForge::ClusterParticleHandle::operator() ( ParticleType * partType,
const std::string & str )

Constituent particle constructor.

The created particle will belong to this cluster.

Automatically updates when running on a CUDA device.

Parameters
partTypetype of particle to create
strJSON string
Returns
ParticleHandle*

◆ operator()() [2/2]

ParticleHandle * TissueForge::ClusterParticleHandle::operator() ( ParticleType * partType,
FVector3 * position = NULL,
FVector3 * velocity = NULL )

Constituent particle constructor.

The created particle will belong to this cluster.

Automatically updates when running on a CUDA device.

Parameters
partTypetype of particle to create
positionposition of new particle, optional
velocityvelocity of new particle, optional
Returns
ParticleHandle*

◆ split()

ParticleHandle * TissueForge::ClusterParticleHandle::split ( FVector3 * axis = NULL,
bool * random = NULL,
FPTYPE * time = NULL,
FVector3 * normal = NULL,
FVector3 * point = NULL )

Split the cluster.

Parameters
axisaxis of split, optional
randomdivide by randomly and evenly allocating constituent particles, optional
timetime at which to implement the split; currently not supported
normalnormal vector of cleavage plane, optional
pointpoint on cleavage plane, optional
Returns
ParticleHandle*

◆ str()

std::string TissueForge::ClusterParticleHandle::str ( ) const
overridevirtual

Reimplemented from TissueForge::ParticleHandle.


The documentation for this struct was generated from the following file: