Lattice Microbes 2.5
This is for whole cell modeling
Loading...
Searching...
No Matches
Lattice Class Referenceabstract

Base class for lattice type objects. More...

#include <Lattice.h>

Inheritance diagram for Lattice:
[legend]
Collaboration diagram for Lattice:
[legend]

Public Member Functions

virtual site_t getMaxSiteType () const=0
 Get the maximum number of site types possible in the lattice.
virtual particle_t getMaxParticle () const=0
 Get the maximum number of particle types possible in the lattice.
virtual site_size_t getMaxOccupancy () const=0
 Get the maximum number of particles that can live in a site.
 Lattice (lattice_coord_t size, si_dist_t spacing)
 Create a Lattice object.
 Lattice (lattice_size_t xSize, lattice_size_t ySize, lattice_size_t zSize, si_dist_t spacing)
 Create a Lattice object.
virtual ~Lattice ()
 Destroy the Lattice object.
virtual lattice_coord_t getSize () const
 Get size of the Lattice.
virtual lattice_size_t getXSize () const
 Get x dimension of the Lattice.
virtual lattice_size_t getYSize () const
 Get y dimension of the Lattice.
virtual lattice_size_t getZSize () const
 Get z dimension of the Lattice.
virtual lattice_size_t getNumberSites () const
 Get total number of sites in the Lattice.
virtual si_dist_t getSpacing () const
 Get spacing between lattice sites.
virtual void getNeighboringSites (lattice_size_t index, lattice_size_t *neighboringIndices)=0
 Get the sites that are neighbor to the indicated site.
virtual site_t getSiteType (lattice_size_t x, lattice_size_t y, lattice_size_t z) const=0
 Get the site type at the specified location.
virtual site_t getSiteType (lattice_size_t index) const=0
 Get the site type at the specified location.
virtual void setSiteType (lattice_size_t x, lattice_size_t y, lattice_size_t z, site_t site)=0
 Set the site type at the specified location.
virtual void setSiteType (lattice_size_t index, site_t site)=0
 Set the site type at the specified location.
std::vector< lattice_coord_tgetNearbySites (lattice_size_t xc, lattice_size_t yc, lattice_size_t zc, uint minDistance, uint maxDistance)
 Get a list of sites near the specified site within a certain distance.
virtual site_size_t getOccupancy (lattice_size_t x, lattice_size_t y, lattice_size_t z) const=0
 Get the number of particles in the specified lattice site.
virtual site_size_t getOccupancy (lattice_size_t index) const=0
 Get the number of particles in the specified lattice site.
virtual particle_t getParticle (lattice_size_t x, lattice_size_t y, lattice_size_t z, site_size_t particleIndex) const=0
 Get the particle at the specified site with at the specified number in the particle list.
virtual particle_t getParticle (lattice_size_t index, site_size_t particleIndex) const=0
 Get the particle at the specified site with at the specified number in the particle list.
virtual void addParticle (lattice_size_t x, lattice_size_t y, lattice_size_t z, particle_t particle)=0
 Add a particle to the specified site.
virtual void addParticle (lattice_size_t index, particle_t particle)=0
 Add a particle to the specified site.
virtual void removeParticles (lattice_size_t x, lattice_size_t y, lattice_size_t z)=0
 Remove a particle to the specified site.
virtual void removeParticles (lattice_size_t index)=0
 Remove a particle to the specified site.
virtual void removeAllParticles ()
 Empty all particles from the specified site.
virtual std::map< particle_t, uintgetParticleCounts ()=0
 Get the number of each particle type in the lattice.
virtual std::vector< particle_loc_tfindParticles (particle_t minParticleType, particle_t maxParticleType)=0
 Get the number of the specified particles types in the lattice.
virtual void print () const
 Print the lattice to the console.
virtual void setFromRowMajorByteData (void *buffer, size_t bufferSize)=0
virtual void setSitesFromRowMajorByteData (void *buffer, size_t bufferSize)=0
virtual size_t getLatticeMemorySize () const=0

Static Public Member Functions

static void rowMajorByteSerialize (void *destBuffer, void *lattice, size_t bufferSize)
static void rowMajorIntSerialize (void *destBuffer, void *lattice, size_t bufferSize)
static void rowMajorByteSerializeSites (void *destBuffer, void *lattice, size_t bufferSize)

Protected Attributes

lattice_coord_t size
lattice_size_t numberSites
si_dist_t spacing

Detailed Description

Base class for lattice type objects.

Constructor & Destructor Documentation

◆ Lattice() [1/2]

lm::rdme::Lattice::Lattice ( lattice_coord_t size,
si_dist_t spacing )

Create a Lattice object.

Parameters
sizeSize of the lattice as (x,y,z)
spacingPhysical spacing between lattice sites

◆ Lattice() [2/2]

lm::rdme::Lattice::Lattice ( lattice_size_t xSize,
lattice_size_t ySize,
lattice_size_t zSize,
si_dist_t spacing )

Create a Lattice object.

Parameters
xSizeNumber of sites in x
ySizeNumber of sites in y
zSizeNumber of sites in z
spacingPhysical spacing between lattice sites

◆ ~Lattice()

lm::rdme::Lattice::~Lattice ( )
virtual

Destroy the Lattice object.

Member Function Documentation

◆ addParticle() [1/2]

virtual void lm::rdme::Lattice::addParticle ( lattice_size_t index,
particle_t particle )
pure virtual

Add a particle to the specified site.

◆ addParticle() [2/2]

virtual void lm::rdme::Lattice::addParticle ( lattice_size_t x,
lattice_size_t y,
lattice_size_t z,
particle_t particle )
pure virtual

Add a particle to the specified site.

◆ findParticles()

virtual std::vector< particle_loc_t > lm::rdme::Lattice::findParticles ( particle_t minParticleType,
particle_t maxParticleType )
pure virtual

Get the number of the specified particles types in the lattice.

◆ getLatticeMemorySize()

virtual size_t lm::rdme::Lattice::getLatticeMemorySize ( ) const
pure virtual

◆ getMaxOccupancy()

virtual site_size_t lm::rdme::Lattice::getMaxOccupancy ( ) const
pure virtual

Get the maximum number of particles that can live in a site.

◆ getMaxParticle()

virtual particle_t lm::rdme::Lattice::getMaxParticle ( ) const
pure virtual

Get the maximum number of particle types possible in the lattice.

◆ getMaxSiteType()

virtual site_t lm::rdme::Lattice::getMaxSiteType ( ) const
pure virtual

Get the maximum number of site types possible in the lattice.

◆ getNearbySites()

std::vector< lattice_coord_t > lm::rdme::Lattice::getNearbySites ( lattice_size_t xc,
lattice_size_t yc,
lattice_size_t zc,
uint minDistance,
uint maxDistance )

Get a list of sites near the specified site within a certain distance.

Parameters
xcX location of the center site
ycY location of the center site
zcZ location of the center site
minDistanceMinimum distance for halo of sites
maxDistanceMaximum distance for halo of sites

◆ getNeighboringSites()

virtual void lm::rdme::Lattice::getNeighboringSites ( lattice_size_t index,
lattice_size_t * neighboringIndices )
pure virtual

Get the sites that are neighbor to the indicated site.

Parameters
indexIndex of the site for which to get neighbors
neighboringIndiciesAn array to hold the indicies of the neighbor sites

◆ getNumberSites()

lattice_size_t lm::rdme::Lattice::getNumberSites ( ) const
virtual

Get total number of sites in the Lattice.

◆ getOccupancy() [1/2]

virtual site_size_t lm::rdme::Lattice::getOccupancy ( lattice_size_t index) const
pure virtual

Get the number of particles in the specified lattice site.

◆ getOccupancy() [2/2]

virtual site_size_t lm::rdme::Lattice::getOccupancy ( lattice_size_t x,
lattice_size_t y,
lattice_size_t z ) const
pure virtual

Get the number of particles in the specified lattice site.

◆ getParticle() [1/2]

virtual particle_t lm::rdme::Lattice::getParticle ( lattice_size_t index,
site_size_t particleIndex ) const
pure virtual

Get the particle at the specified site with at the specified number in the particle list.

◆ getParticle() [2/2]

virtual particle_t lm::rdme::Lattice::getParticle ( lattice_size_t x,
lattice_size_t y,
lattice_size_t z,
site_size_t particleIndex ) const
pure virtual

Get the particle at the specified site with at the specified number in the particle list.

◆ getParticleCounts()

virtual std::map< particle_t, uint > lm::rdme::Lattice::getParticleCounts ( )
pure virtual

Get the number of each particle type in the lattice.

Particle searching methods.

◆ getSiteType() [1/2]

virtual site_t lm::rdme::Lattice::getSiteType ( lattice_size_t index) const
pure virtual

Get the site type at the specified location.

◆ getSiteType() [2/2]

virtual site_t lm::rdme::Lattice::getSiteType ( lattice_size_t x,
lattice_size_t y,
lattice_size_t z ) const
pure virtual

Get the site type at the specified location.

◆ getSize()

lattice_coord_t lm::rdme::Lattice::getSize ( ) const
virtual

Get size of the Lattice.

◆ getSpacing()

si_dist_t lm::rdme::Lattice::getSpacing ( ) const
virtual

Get spacing between lattice sites.

◆ getXSize()

lattice_size_t lm::rdme::Lattice::getXSize ( ) const
virtual

Get x dimension of the Lattice.

◆ getYSize()

lattice_size_t lm::rdme::Lattice::getYSize ( ) const
virtual

Get y dimension of the Lattice.

◆ getZSize()

lattice_size_t lm::rdme::Lattice::getZSize ( ) const
virtual

Get z dimension of the Lattice.

◆ print()

void lm::rdme::Lattice::print ( ) const
virtual

Print the lattice to the console.

◆ removeAllParticles()

void lm::rdme::Lattice::removeAllParticles ( )
virtual

Empty all particles from the specified site.

◆ removeParticles() [1/2]

virtual void lm::rdme::Lattice::removeParticles ( lattice_size_t index)
pure virtual

Remove a particle to the specified site.

◆ removeParticles() [2/2]

virtual void lm::rdme::Lattice::removeParticles ( lattice_size_t x,
lattice_size_t y,
lattice_size_t z )
pure virtual

Remove a particle to the specified site.

◆ rowMajorByteSerialize()

void lm::rdme::Lattice::rowMajorByteSerialize ( void * destBuffer,
void * lattice,
size_t bufferSize )
static

◆ rowMajorByteSerializeSites()

void lm::rdme::Lattice::rowMajorByteSerializeSites ( void * destBuffer,
void * lattice,
size_t bufferSize )
static

◆ rowMajorIntSerialize()

void lm::rdme::Lattice::rowMajorIntSerialize ( void * destBuffer,
void * lattice,
size_t bufferSize )
static

◆ setFromRowMajorByteData()

virtual void lm::rdme::Lattice::setFromRowMajorByteData ( void * buffer,
size_t bufferSize )
pure virtual

◆ setSitesFromRowMajorByteData()

virtual void lm::rdme::Lattice::setSitesFromRowMajorByteData ( void * buffer,
size_t bufferSize )
pure virtual

◆ setSiteType() [1/2]

virtual void lm::rdme::Lattice::setSiteType ( lattice_size_t index,
site_t site )
pure virtual

Set the site type at the specified location.

◆ setSiteType() [2/2]

virtual void lm::rdme::Lattice::setSiteType ( lattice_size_t x,
lattice_size_t y,
lattice_size_t z,
site_t site )
pure virtual

Set the site type at the specified location.

Member Data Documentation

◆ numberSites

lattice_size_t lm::rdme::Lattice::numberSites
protected

◆ size

lattice_coord_t lm::rdme::Lattice::size
protected

◆ spacing

si_dist_t lm::rdme::Lattice::spacing
protected

The documentation for this class was generated from the following files:
  • /data2/LM_zls_github/Lattice-Microbes/src/rdme/Lattice.h
  • /data2/LM_zls_github/Lattice-Microbes/src/rdme/Lattice.cpp