CellGPU
0.8.0
GPU-accelerated simulations of cells
|
Data structures and functions for simple active-brownian-particle-like motion. More...
#include <Simple2DActiveCell.h>
Public Member Functions | |
Simple2DActiveCell () | |
A simple constructor. More... | |
void | initializeSimple2DActiveCell (int n) |
initialize class' data structures and set default values More... | |
void | setv0Dr (Dscalar v0new, Dscalar drnew) |
Set uniform motility. More... | |
void | setCellMotility (vector< Dscalar > &v0s, vector< Dscalar > &drs) |
Set non-uniform cell motilites. More... | |
void | setCellDirectorsRandomly () |
Set random cell directors (for active cell models) More... | |
virtual int | getNumberOfDegreesOfFreedom () |
get the number of degrees of freedom, defaulting to the number of cells | |
virtual void | cellDivision (const vector< int > ¶meters, const vector< Dscalar > &dParams={}) |
Divide cell...vector should be cell index i, vertex 1 and vertex 2. More... | |
virtual void | cellDeath (int cellIndex) |
Kill the indexed cell. More... | |
Dscalar | vicsekOrderParameter (Dscalar2 &vParallel, Dscalar2 &vPerpendicular) |
measure the viscek order parameter N^-1 {v_i}{|v_i} | |
Dscalar | vicsekOrderParameterDirector (Dscalar2 &vParallel, Dscalar2 &vPerpendicular) |
measure the viscek order parameter N^-1 {v_i}{|v_i} from the director only | |
void | initializeSimple2DCell (int n) |
initialize class' data structures and set default values More... | |
virtual void | setGPU () |
Enforce GPU-only operation. This is the default mode, so this method need not be called most of the time. | |
virtual void | setCPU () |
Enforce CPU-only operation. Derived classes might have to do more work when the CPU mode is invoked. | |
virtual void | setCPU (bool a)=0 |
virtual void | computeForces () |
do everything necessary to compute forces in the current model | |
virtual void | computeGeometry () |
call either the computeGeometryCPU or GPU routines for the current model More... | |
virtual void | computeGeometryCPU () |
let computeGeometryCPU be defined in derived classes | |
virtual void | computeGeometryGPU () |
let computeGeometryGPU be defined in derived classes | |
virtual Dscalar | computeEnergy () |
do everything necessary to compute the energy for the current model | |
Dscalar | computeKineticEnergy () |
Call masses and velocities to get the total kinetic energy. More... | |
Dscalar4 | computeKineticPressure () |
Call masses and velocities to get the average kinetic contribution to the pressure tensor. More... | |
virtual void | getForces (GPUArray< Dscalar2 > &forces) |
copy the models current set of forces to the variable | |
virtual void | moveDegreesOfFreedom (GPUArray< Dscalar2 > &displacements, Dscalar scale=1.) |
move the degrees of freedom | |
virtual void | enforceTopology () |
Do everything necessary to update or enforce the topology in the current model. | |
void | setCellPreferencesUniform (Dscalar A0, Dscalar P0) |
Set uniform cell area and perimeter preferences. More... | |
void | setCellPreferences (vector< Dscalar2 > &AreaPeriPreferences) |
Set cell area and perimeter preferences according to input vector. More... | |
void | setCellPositionsRandomly () |
Set random cell positions, and set the periodic box to a square with average cell area=1. More... | |
void | setCellPositions (vector< Dscalar2 > newCellPositions) |
Set cell positions according to a user-specified vector. More... | |
void | setVertexPositions (vector< Dscalar2 > newVertexPositions) |
Set vertex positions according to a user-specified vector. More... | |
Dscalar | setCellVelocitiesMaxwellBoltzmann (Dscalar T) |
Set velocities via a temperature. The return value is the total kinetic energy. More... | |
Dscalar | setVertexVelocitiesMaxwellBoltzmann (Dscalar T) |
Set velocities via a temperature for the vertex degrees of freedom. More... | |
void | setModuliUniform (Dscalar newKA, Dscalar newKP) |
set uniform moduli for all cells More... | |
void | setCellTypeUniform (int i) |
Set all cells to the same "type". More... | |
void | setCellType (vector< int > &types) |
Set cells to different "type". More... | |
void | setVertexTopologyFromCells (vector< vector< int > > cellVertexIndices) |
An uncomfortable function to allow the user to set vertex topology "by hand". More... | |
virtual gpubox & | returnBox () |
return the gpubox | |
void | setBox (BoxPtr _box) |
This can be used, but should not normally be. This re-assigns the pointer. | |
virtual vector< int > & | returnItt () |
return the base "itt" re-indexing vector | |
virtual GPUArray< Dscalar2 > & | returnModuli () |
Return a reference to moduli. | |
virtual GPUArray< Dscalar2 > & | returnAreaPeri () |
Return a reference to AreaPeri array. | |
virtual GPUArray< Dscalar2 > & | returnAreaPeriPreferences () |
Return a reference to AreaPeriPreferences. | |
virtual GPUArray< Dscalar2 > & | returnVelocities () |
Return a reference to velocities on cells. VertexModelBase will instead return vertexVelocities. | |
virtual GPUArray< Dscalar2 > & | returnPositions () |
Return a reference to Positions on cells. | |
virtual GPUArray< Dscalar2 > & | returnForces () |
Return a reference to forces on cells. | |
virtual GPUArray< Dscalar > & | returnMasses () |
Return a reference to Masses on cells. | |
virtual GPUArray< Dscalar > & | returnOtherData () |
Return other data just returns the masses; in this class it's not needed. | |
void | setDeltaT (Dscalar dt) |
Set the simulation time stepsize. | |
void | getCellNeighs (int idx, int &nNeighs, vector< int > &neighs) |
Dscalar | getMaxForce () |
Get the maximum force on a cell. | |
void | reportMeanCellForce (bool verbose) |
Report the current average force on each cell. More... | |
void | reportMeanVertexForce (bool verbose=false) |
Report the current average force per vertex...should be close to zero. | |
void | reportAP (bool verbose=false) |
report the current total area, and optionally the area and perimeter for each cell | |
Dscalar | reportq () |
Report the average value of p/sqrt(A) for the cells in the system. More... | |
Dscalar | reportVarq () |
Report the variance of p/sqrt(A) for the cells in the system. More... | |
Dscalar2 | reportVarAP () |
Report the variance of A and P for the cells in the system. More... | |
Dscalar | reportMeanP () |
Report the mean value of the perimeter. More... | |
virtual void | getDynMatEntries (vector< int2 > &rcs, vector< Dscalar > &vals, Dscalar unstress=1.0, Dscalar stress=1.0) |
Do whatever is necessary to get lists of dynamical matrix elements. | |
virtual void | spatialSorting () |
do everything necessary to perform a Hilbert sort | |
virtual void | setTime (Dscalar time) |
set the time | |
Public Attributes | |
GPUArray< Dscalar > | cellDirectors |
An array of angles (relative to the x-axis) that the cell directors point. | |
GPUArray< Dscalar > | cellDirectorForces |
An array of forces acting on the cell directors. | |
Dscalar | v0 |
velocity of cells in mono-motile systems | |
Dscalar | Dr |
rotational diffusion of cell directors in mono-motile systems | |
GPUArray< Dscalar2 > | Motility |
The motility parameters (v0 and Dr) for each cell. | |
int | Ncells |
Number of cells in the simulation. | |
int | Nvertices |
Number of vertices. | |
GPUArray< Dscalar2 > | cellPositions |
Cell positions... not used for computation, but can track, e.g., MSD of cell centers. | |
GPUArray< Dscalar2 > | vertexPositions |
Position of the vertices. | |
GPUArray< Dscalar2 > | cellVelocities |
The velocity vector of cells (only relevant if the equations of motion use it) | |
GPUArray< Dscalar > | cellMasses |
The masses of the cells. | |
GPUArray< Dscalar2 > | vertexVelocities |
The velocity vector of vertices (only relevant if the equations of motion use it) | |
GPUArray< Dscalar > | vertexMasses |
The masses of the vertices. | |
GPUArray< int > | vertexNeighbors |
VERTEX neighbors of every vertex. More... | |
GPUArray< int > | vertexCellNeighbors |
Cell neighbors of every vertex. More... | |
Index2D | n_idx |
A 2dIndexer for computing where in the GPUArray to look for a given cell's vertices. | |
GPUArray< int > | cellNeighborNum |
The number of CELL neighbors of each cell. For simple models this is the same as cellVertexNum, but does not have to be. | |
GPUArray< int > | cellNeighbors |
CELL neighbors of every cell. | |
GPUArray< int > | cellVertexNum |
The number of vertices defining each cell. More... | |
GPUArray< Dscalar2 > | vertexForces |
an array containing net force on each vertex | |
GPUArray< Dscalar2 > | cellForces |
an array containing net force on each cell | |
GPUArray< int > | cellType |
An array of integers labeling cell type...an easy way of determining if cells are different. More... | |
Index2D | cellTypeIndexer |
A indexer for turning a pair of cells into a 1-D index. | |
Dscalar | Energy |
The current potential energy of the system; only updated when an explicit energy calculation is called (i.e. not by default each timestep) | |
Dscalar | KineticEnergy |
The current kinetic energy of the system; only updated when an explicit calculation is called. | |
vector< int > | tagToIdx |
To write consistent files...the cell that started the simulation as index i has current index tagToIdx[i]. More... | |
vector< int > | tagToIdxVertex |
To write consistent files...the vertex that started the simulation as index i has current index tagToIdx[i]. | |
BoxPtr | Box |
the box defining the periodic domain | |
int | Timestep |
Count the number of times "performTimeStep" has been called. | |
Dscalar | deltaT |
The time stepsize of the simulation. | |
bool | forcesUpToDate |
Are the forces (and hence, the geometry) up-to-date? | |
Dscalar | currentTime |
a time variable for keeping track of the simulation variable (for databases) | |
Protected Member Functions | |
void | spatiallySortVerticesAndCellActivity () |
call the Simple2DCell spatial vertex sorter, and re-index arrays of cell activity More... | |
void | spatiallySortCellsAndCellActivity () |
call the Simple2DCell spatial cell sorter, and re-index arrays of cell activity More... | |
void | initializeCellSorting () |
set the size of the cell-sorting structures, initialize lists simply More... | |
void | initializeVertexSorting () |
set the size of the vertex-sorting structures, initialize lists simply More... | |
void | reIndexCellArray (GPUArray< int > &array) |
Re-index cell arrays after a spatial sorting has occured. More... | |
void | reIndexCellArray (GPUArray< Dscalar > &array) |
why use templates when you can type more? More... | |
void | reIndexCellArray (GPUArray< Dscalar2 > &array) |
why use templates when you can type more? More... | |
void | reIndexVertexArray (GPUArray< int > &array) |
Re-index vertex after a spatial sorting has occured. | |
void | reIndexVertexArray (GPUArray< Dscalar > &array) |
why use templates when you can type more? | |
void | reIndexVertexArray (GPUArray< Dscalar2 > &array) |
why use templates when you can type more? More... | |
void | spatiallySortCells () |
Perform a spatial sorting of the cells to try to maintain data locality. More... | |
void | spatiallySortVertices () |
Perform a spatial sorting of the vertices to try to maintain data locality. More... | |
Protected Attributes | |
bool | GPUcompute |
Compute aspects of the model on the GPU. | |
bool | Reproducible |
A flag that determines whether the GPU RNG is the same every time. | |
noiseSource | noise |
A source of noise for random cell initialization. | |
Dscalar | KA |
the area modulus | |
Dscalar | KP |
The perimeter modulus. | |
GPUArray< Dscalar2 > | Moduli |
The area and perimeter moduli of each cell. CURRENTLY NOT SUPPORTED, BUT EASY TO IMPLEMENT. | |
GPUArray< Dscalar2 > | AreaPeri |
The current area and perimeter of each cell. | |
GPUArray< Dscalar2 > | AreaPeriPreferences |
The area and perimeter preferences of each cell. | |
GPUArray< int > | cellVertices |
A structure that indexes the vertices defining each cell. More... | |
int | vertexMax |
An upper bound for the maximum number of neighbors that any cell has. | |
GPUArray< Dscalar2 > | voroCur |
3*Nvertices length array of the position of vertices around cells More... | |
GPUArray< Dscalar4 > | voroLastNext |
vector< int > | itt |
A map between cell index and the spatially sorted version. More... | |
vector< int > | tti |
A temporary structure that inverts itt. | |
vector< int > | idxToTag |
A temporary structure that inverse tagToIdx. | |
vector< int > | ittVertex |
A map between vertex index and the spatially sorted version. | |
vector< int > | ttiVertex |
A temporary structure that inverts itt. | |
vector< int > | idxToTagVertex |
A temporary structure that inverse tagToIdx. | |
GPUArray< Dscalar2 > | displacements |
An array of displacements used only for the equations of motion. | |
Data structures and functions for simple active-brownian-particle-like motion.
A class defining the simplest aspects of a 2D system in which particles have a constant velocity along a director which rotates with gaussian noise
Simple2DActiveCell::Simple2DActiveCell | ( | ) |
A simple constructor.
An extremely simple constructor that does nothing, but enforces default GPU operation
References Simple2DCell::setDeltaT(), and Simple2DCell::Timestep.
void Simple2DActiveCell::initializeSimple2DActiveCell | ( | int | n | ) |
initialize class' data structures and set default values
Initialize the data structures to the size specified by n, and set default values, and call Simple2DCell's initilization routine.
|
virtual |
Set uniform motility.
v0new | the new value of velocity for all cells |
drnew | the new value of the rotational diffusion of cell directors for all cells |
Implements Simple2DCell.
void Simple2DActiveCell::setCellMotility | ( | vector< Dscalar > & | v0s, |
vector< Dscalar > & | drs | ||
) |
Set non-uniform cell motilites.
v0s | the per-particle vector of what all velocities will be |
drs | the per-particle vector of what all rotational diffusions will be |
References cellDirectors, Simple2DCell::cellVelocities, ArrayHandle< T >::data, access_location::host, Motility, Simple2DCell::Ncells, access_mode::overwrite, access_mode::read, and GPUArray< T >::resize().
void Simple2DActiveCell::setCellDirectorsRandomly | ( | ) |
Set random cell directors (for active cell models)
Assign cell directors via a simple, reproducible RNG
References cellDirectorForces, cellDirectors, Simple2DCell::cellVelocities, ArrayHandle< T >::data, noiseSource::getRealUniform(), access_location::host, Simple2DCell::Ncells, Simple2DCell::noise, access_mode::overwrite, noiseSource::Reproducible, Simple2DCell::Reproducible, and GPUArray< T >::resize().
|
virtual |
Divide cell...vector should be cell index i, vertex 1 and vertex 2.
This function supports cellDivisions, updating data structures in Simple2DActiveCell This function will first call Simple2DCell's routine, and then grows the cellDirectors and Motility arrays, and assign the new cell (the last element of those arrays) the values of the cell given by parameters[0] Note that dParams does nothing
Reimplemented from Simple2DCell.
Reimplemented in vertexModelBase, and voronoiModelBase.
References cellDirectors, Simple2DCell::cellDivision(), ArrayHandle< T >::data, noiseSource::getRealUniform(), Motility, Simple2DCell::Ncells, Simple2DCell::noise, noiseSource::Reproducible, and Simple2DCell::Reproducible.
Referenced by getNumberOfDegreesOfFreedom().
|
virtual |
Kill the indexed cell.
This function supports cellDeath, updating the data structures in Simple2DActiveCell. This function will first call Simple2DCell's routine, then modify the cellDirectors and Motility arrays
Reimplemented from Simple2DCell.
Reimplemented in vertexModelBase, and voronoiModelBase.
References Simple2DCell::cellDeath(), cellDirectors, and Motility.
Referenced by voronoiModelBase::cellDeath(), and getNumberOfDegreesOfFreedom().
|
protected |
call the Simple2DCell spatial vertex sorter, and re-index arrays of cell activity
Calls the spatial vertex sorting routine in Simple2DCell, and re-indexes the arrays for the cell RNGS, as well as the cell motility and cellDirector arrays
References cellDirectors, Motility, Simple2DCell::reIndexCellArray(), and Simple2DCell::spatiallySortVertices().
Referenced by vertexModelBase::spatialSorting().
|
protected |
call the Simple2DCell spatial cell sorter, and re-index arrays of cell activity
Calls the spatial vertex sorting routine in Simple2DCell, and re-indexes the arrays for the cell RNGS, as well as the cell motility and cellDirector arrays
References cellDirectors, Motility, Simple2DCell::reIndexCellArray(), and Simple2DCell::spatiallySortCells().
Referenced by voronoiModelBase::spatialSorting().
|
inherited |
initialize class' data structures and set default values
Initialize the data structures to the size specified by n, and set default values.
|
virtualinherited |
call either the computeGeometryCPU or GPU routines for the current model
Simply call either the CPU or GPU routine in the current or derived model
References Simple2DCell::computeGeometryCPU(), Simple2DCell::computeGeometryGPU(), and Simple2DCell::GPUcompute.
Referenced by VertexQuadraticEnergyWithTension::computeForces(), VoronoiQuadraticEnergyWithTension::computeForces(), VertexQuadraticEnergy::computeForces(), VoronoiQuadraticEnergy::computeForces(), and Simple2DCell::computeForces().
|
inherited |
Call masses and velocities to get the total kinetic energy.
E = 0.5*m_i v_i^2
|
inherited |
Call masses and velocities to get the average kinetic contribution to the pressure tensor.
P_ab = m_i v_{ib}v_{ia}
|
inherited |
Set uniform cell area and perimeter preferences.
Generically believe that cells in 2D have a notion of a preferred area and perimeter
Referenced by Simple2DCell::enforceTopology().
|
inherited |
Set cell area and perimeter preferences according to input vector.
Set the Area and Perimeter preferences to the input vector
References Simple2DCell::AreaPeriPreferences, ArrayHandle< T >::data, access_location::host, Simple2DCell::Ncells, access_mode::overwrite, and GPUArray< T >::resize().
|
inherited |
Set random cell positions, and set the periodic box to a square with average cell area=1.
Resize the box so that every cell has, on average, area = 1, and place cells via either a simple, reproducible RNG or a non-reproducible RNG
References Simple2DCell::cellPositions, Simple2DCell::Ncells, and GPUArray< T >::resize().
|
inherited |
Set cell positions according to a user-specified vector.
Does not update any other lists – it is the user's responsibility to maintain topology, etc, when using this function.
References Simple2DCell::cellPositions, ArrayHandle< T >::data, GPUArray< T >::getNumElements(), access_location::host, Simple2DCell::Ncells, access_mode::overwrite, and GPUArray< T >::resize().
|
inherited |
Set vertex positions according to a user-specified vector.
Does not update any other lists – it is the user's responsibility to maintain topology, etc, when using this function.
References ArrayHandle< T >::data, GPUArray< T >::getNumElements(), access_location::host, Simple2DCell::Nvertices, access_mode::overwrite, GPUArray< T >::resize(), and Simple2DCell::vertexPositions.
|
inherited |
Set velocities via a temperature. The return value is the total kinetic energy.
Set the cell velocities by drawing from a Maxwell-Boltzmann distribution, and then make sure there is no net momentum. The return value is the total kinetic energy
|
inherited |
Set velocities via a temperature for the vertex degrees of freedom.
Set the vertex velocities by drawing from a Maxwell-Boltzmann distribution, and then make sure there is no net momentum. The return value is the total kinetic energy.
|
inherited |
set uniform moduli for all cells
set all cell K_A, K_P preferences to uniform values. PLEASE NOTE that as an optimization this data is not actually used at the moment, but the code could be trivially altered to use this
|
inherited |
Set all cells to the same "type".
set all cell types to i
References Simple2DCell::cellType, ArrayHandle< T >::data, access_location::host, Simple2DCell::Ncells, access_mode::overwrite, and GPUArray< T >::resize().
|
inherited |
Set cells to different "type".
types | a vector of integers that the cell types will be set to |
References Simple2DCell::cellType, ArrayHandle< T >::data, access_location::host, Simple2DCell::Ncells, access_mode::overwrite, and GPUArray< T >::resize().
|
inherited |
An uncomfortable function to allow the user to set vertex topology "by hand".
This function allows a user to set the vertex topology by hand. The user is responsible for making sure the input topology is sensible. DMS NOTE – this functionality has not been thoroughly tested
cellVertexIndices | a vector of vector of ints. Each vector of ints must correspond to the counter-clockwise ordering of vertices that make up the cell, and every vertex should appear at most three times in different cells |
References Simple2DCell::cellVertexNum, Simple2DCell::cellVertices, ArrayHandle< T >::data, access_location::host, Simple2DCell::n_idx, Simple2DCell::Ncells, Simple2DCell::Nvertices, access_mode::overwrite, GPUArray< T >::resize(), Simple2DCell::vertexCellNeighbors, Simple2DCell::vertexMax, and Simple2DCell::vertexNeighbors.
|
protectedinherited |
set the size of the cell-sorting structures, initialize lists simply
Sets the size of itt, tti, idxToTag, and tagToIdx, and sets all of them so that array[i] = i, i.e., unsorted
References Simple2DCell::idxToTag, Simple2DCell::itt, Simple2DCell::Ncells, Simple2DCell::tagToIdx, and Simple2DCell::tti.
|
protectedinherited |
set the size of the vertex-sorting structures, initialize lists simply
Sets the size of ittVertex, ttiVertex, idxToTagVertex, and tagToIdxVertex,and sets all of them so that array[i] = i, i.e., things are unsorted
References Simple2DCell::idxToTagVertex, Simple2DCell::ittVertex, Simple2DCell::Nvertices, Simple2DCell::tagToIdxVertex, and Simple2DCell::ttiVertex.
|
protectedinherited |
Re-index cell arrays after a spatial sorting has occured.
Re-indexes GPUarrays of ints
References ArrayHandle< T >::data, access_location::host, Simple2DCell::itt, Simple2DCell::Ncells, access_mode::read, and access_mode::readwrite.
Referenced by Simple2DCell::spatiallySortCells(), spatiallySortCellsAndCellActivity(), Simple2DCell::spatiallySortVertices(), spatiallySortVerticesAndCellActivity(), and voronoiModelBase::spatialSorting().
|
protectedinherited |
why use templates when you can type more?
Re-indexes GPUarrays of Dscalars
References ArrayHandle< T >::data, access_location::host, Simple2DCell::itt, Simple2DCell::Ncells, access_mode::read, and access_mode::readwrite.
|
protectedinherited |
why use templates when you can type more?
Always called after spatial sorting is performed, reIndexCellArray shuffles the order of an array based on the spatial sort order of the cells
References ArrayHandle< T >::data, access_location::host, Simple2DCell::itt, Simple2DCell::Ncells, access_mode::read, and access_mode::readwrite.
|
protectedinherited |
why use templates when you can type more?
Called if the vertices need to be spatially sorted, reIndexVertexArray shuffles the order of an array based on the spatial sort order of the vertices
References ArrayHandle< T >::data, access_location::host, Simple2DCell::ittVertex, Simple2DCell::Nvertices, access_mode::read, and access_mode::readwrite.
|
protectedinherited |
Perform a spatial sorting of the cells to try to maintain data locality.
take the current location of the cells and sort them according the their order along a 2D Hilbert curve
References Simple2DCell::AreaPeri, Simple2DCell::AreaPeriPreferences, Simple2DCell::Box, Simple2DCell::cellMasses, Simple2DCell::cellPositions, Simple2DCell::cellType, Simple2DCell::cellVelocities, ArrayHandle< T >::data, HilbertSorter::getIdx(), access_location::host, Simple2DCell::idxToTag, Simple2DCell::itt, Simple2DCell::Moduli, Simple2DCell::Ncells, access_mode::readwrite, Simple2DCell::reIndexCellArray(), Simple2DCell::tagToIdx, and Simple2DCell::tti.
Referenced by spatiallySortCellsAndCellActivity().
|
protectedinherited |
Perform a spatial sorting of the vertices to try to maintain data locality.
take the current location of the vertices and sort them according the their order along a 2D Hilbert curve. This routine first sorts the vertices, and then uses the vertex sorting to derive a sorting of the cells
References Simple2DCell::AreaPeriPreferences, Simple2DCell::Box, Simple2DCell::cellPositions, Simple2DCell::cellType, Simple2DCell::cellVertexNum, Simple2DCell::cellVertices, ArrayHandle< T >::data, HilbertSorter::getIdx(), access_location::host, Simple2DCell::idxToTag, Simple2DCell::idxToTagVertex, Simple2DCell::itt, Simple2DCell::ittVertex, Simple2DCell::Moduli, Simple2DCell::n_idx, Simple2DCell::Ncells, Simple2DCell::Nvertices, access_mode::read, access_mode::readwrite, Simple2DCell::reIndexCellArray(), Simple2DCell::reIndexVertexArray(), Simple2DCell::tagToIdx, Simple2DCell::tagToIdxVertex, Simple2DCell::tti, Simple2DCell::ttiVertex, Simple2DCell::vertexCellNeighbors, Simple2DCell::vertexMasses, Simple2DCell::vertexNeighbors, Simple2DCell::vertexPositions, and Simple2DCell::vertexVelocities.
Referenced by spatiallySortVerticesAndCellActivity().
|
virtualinherited |
Report the current average force on each cell.
a utility/testing function...output the currently computed mean net force to screen.
verbose | if true also print out the force on each cell |
Implements Simple2DModel.
References Simple2DCell::cellForces, Simple2DCell::cellPositions, access_location::host, and access_mode::read.
|
virtualinherited |
Report the average value of p/sqrt(A) for the cells in the system.
Returns the mean value of the shape parameter:
Implements Simple2DModel.
|
inherited |
Report the variance of p/sqrt(A) for the cells in the system.
Returns the variance of the shape parameter:
|
inherited |
Report the variance of A and P for the cells in the system.
Returns the variance of the A and P for the system:
|
inherited |
Report the mean value of the perimeter.
Returns the mean value of the perimeter
|
inherited |
VERTEX neighbors of every vertex.
in general, we have: vertexNeighbors[3*i], vertexNeighbors[3*i+1], and vertexNeighbors[3*i+2] contain the indices of the three vertices that are connected to vertex i
Referenced by vertexModelBase::cellDeath(), vertexModelBase::flipEdgesGPU(), Simple2DCell::setVertexTopologyFromCells(), Simple2DCell::spatiallySortVertices(), vertexModelBase::testAndPerformT1TransitionsCPU(), and vertexModelBase::testEdgesForT1GPU().
|
inherited |
Cell neighbors of every vertex.
in general, we have: vertexCellNeighbors[3*i], vertexCellNeighbors[3*i+1], and vertexCellNeighbors[3*i+2] contain the indices of the three cells are neighbors of vertex i
Referenced by vertexModelBase::cellDeath(), VertexQuadraticEnergy::computeForcesCPU(), VertexQuadraticEnergy::computeForcesGPU(), vertexModelBase::computeGeometryCPU(), vertexModelBase::computeGeometryGPU(), VertexQuadraticEnergyWithTension::computeVertexTensionForcesCPU(), vertexModelBase::flipEdgesGPU(), vertexModelBase::getCellVertexSetForT1(), Simple2DCell::setVertexTopologyFromCells(), Simple2DCell::spatiallySortVertices(), vertexModelBase::testAndPerformT1TransitionsCPU(), and vertexModelBase::testEdgesForT1GPU().
|
inherited |
The number of vertices defining each cell.
cellVertexNum[c] is an integer storing the number of vertices that make up the boundary of cell c.
Referenced by vertexModelBase::cellDeath(), vertexModelBase::computeGeometryCPU(), vertexModelBase::computeGeometryGPU(), VertexQuadraticEnergyWithTension::computeVertexTensionForcesCPU(), vertexModelBase::flipEdgesGPU(), vertexModelBase::getCellCentroidsCPU(), vertexModelBase::getCellPositionsCPU(), vertexModelBase::getCellPositionsGPU(), vertexModelBase::getCellVertexSetForT1(), vertexModelBase::growCellVerticesList(), vertexModelBase::reportNeighborsCell(), Simple2DCell::setVertexTopologyFromCells(), Simple2DCell::spatiallySortVertices(), vertexModelBase::testAndPerformT1TransitionsCPU(), and vertexModelBase::testEdgesForT1GPU().
|
inherited |
An array of integers labeling cell type...an easy way of determining if cells are different.
Please note that "type" is not meaningful unless it is used by child classes. That is, things like area/perimeter preferences, or motility, or whatever are neither set nor accessed by cell type, but rather by cell index! Thus, this is just an additional data structure that can be useful. For instance, the VoronoiTension2D classes uses the integers of cellType to determine when to apply an additional line tension between cells.
Referenced by Simple2DCell::cellDeath(), Simple2DCell::cellDivision(), VertexQuadraticEnergyWithTension::computeVertexTensionForcesCPU(), VoronoiQuadraticEnergyWithTension::computeVoronoiSimpleTensionForceSetsGPU(), VoronoiQuadraticEnergyWithTension::computeVoronoiTensionForceSetsGPU(), Simple2DCell::setCellType(), Simple2DCell::setCellTypeUniform(), Simple2DCell::spatiallySortCells(), and Simple2DCell::spatiallySortVertices().
|
inherited |
To write consistent files...the cell that started the simulation as index i has current index tagToIdx[i].
The Hilbert sorting stuff makes keeping track of particles, and re-indexing things when particle number changes, a pain. Here's a description of the four relevant data structures. tagToIdx[i] = a. At the beginning of a simulation, a particle had index "i", meaning its current state was found in position "i" of all various data vectors and arrays. That same particle's data is now in position "a" of those data structures. Short version: "Where do I look to find info for what I orinally called partice i?" idxToTag[a] = i. That is, idxToTag just helps invert the tagToIdx list. idxToTag[tagToIdx[i]]=i The above two structures (and the vertex versions of them) tell you how to go back and forth between the current state of the system and the initial state of the system. What about going back and forth between the current sorted state and the previous sorted state? The "itt" and "tti" vectors give this information. The itt and tti vectors are completely overwritten each time a spatial sorting is called. By the way, I apologize if the nomenclature of "index" vs. "tag" is the opposite of what you, the reader of these code comments, might expect.
Referenced by Simple2DCell::cellDeath(), Simple2DCell::cellDivision(), Simple2DCell::initializeCellSorting(), Simple2DCell::spatiallySortCells(), and Simple2DCell::spatiallySortVertices().
|
protectedinherited |
A structure that indexes the vertices defining each cell.
cellVertices is a large, 1D array containing the vertices associated with each cell. It must be accessed with the help of the Index2D structure n_idx. the index of the kth vertex of cell c (where the ordering is counter-clockwise starting with a random vertex) is given by cellVertices[n_idx(k,c)];
Referenced by vertexModelBase::cellDeath(), vertexModelBase::computeGeometryCPU(), vertexModelBase::computeGeometryGPU(), VertexQuadraticEnergyWithTension::computeVertexTensionForcesCPU(), vertexModelBase::flipEdgesGPU(), vertexModelBase::getCellCentroidsCPU(), vertexModelBase::getCellPositionsCPU(), vertexModelBase::getCellPositionsGPU(), vertexModelBase::getCellVertexSetForT1(), vertexModelBase::growCellVerticesList(), vertexModelBase::reportNeighborsCell(), Simple2DCell::setVertexTopologyFromCells(), Simple2DCell::spatiallySortVertices(), vertexModelBase::testAndPerformT1TransitionsCPU(), and vertexModelBase::testEdgesForT1GPU().
|
protectedinherited |
3*Nvertices length array of the position of vertices around cells
For both vertex and Voronoi models, it may help to save the relative position of the vertices around a cell, either for easy force computation or in the geometry routine, etc. voroCur.data[n_idx(nn,i)] gives the nth vertex, in CCW order, of cell i
Referenced by VertexQuadraticEnergy::computeForcesCPU(), VertexQuadraticEnergy::computeForcesGPU(), vertexModelBase::computeGeometryCPU(), voronoiModelBase::computeGeometryCPU(), vertexModelBase::computeGeometryGPU(), voronoiModelBase::computeGeometryGPU(), VertexQuadraticEnergyWithTension::computeVertexTensionForcesCPU(), VoronoiQuadraticEnergy::computeVoronoiForceSetsGPU(), VoronoiQuadraticEnergyWithTension::computeVoronoiSimpleTensionForceSetsGPU(), VoronoiQuadraticEnergyWithTension::computeVoronoiTensionForceSetsGPU(), and voronoiModelBase::resetLists().
|
protectedinherited |
3*Nvertices length array of the position of the last and next vertices along the cell Similarly, voroLastNext.data[n_idx(nn,i)] gives the previous and next vertex of the same
Referenced by VertexQuadraticEnergy::computeForcesCPU(), VertexQuadraticEnergy::computeForcesGPU(), vertexModelBase::computeGeometryCPU(), voronoiModelBase::computeGeometryCPU(), vertexModelBase::computeGeometryGPU(), voronoiModelBase::computeGeometryGPU(), VertexQuadraticEnergyWithTension::computeVertexTensionForcesCPU(), VoronoiQuadraticEnergy::computeVoronoiForceSetsGPU(), VoronoiQuadraticEnergyWithTension::computeVoronoiSimpleTensionForceSetsGPU(), VoronoiQuadraticEnergyWithTension::computeVoronoiTensionForceSetsGPU(), and voronoiModelBase::resetLists().
|
protectedinherited |
A map between cell index and the spatially sorted version.
sortedArray[i] = unsortedArray[itt[i]] after a hilbert sort
Referenced by Simple2DCell::cellDeath(), Simple2DCell::cellDivision(), Simple2DCell::initializeCellSorting(), Simple2DCell::reIndexCellArray(), Simple2DCell::returnItt(), Simple2DCell::spatiallySortCells(), and Simple2DCell::spatiallySortVertices().