Lattice Microbes 2.5
This is for whole cell modeling
Loading...
Searching...
No Matches
lm::rdme::IntLattice Class Reference

A Lattice that is based on one particle per word, with sites strided per particle. More...

#include <IntLattice.h>

Inheritance diagram for lm::rdme::IntLattice:
[legend]
Collaboration diagram for lm::rdme::IntLattice:
[legend]

Public Member Functions

virtual site_t getMaxSiteType () const
 Get the maximum number of site types possible in the lattice.
virtual particle_t getMaxParticle () const
 Get the maximum number of particle types possible in the lattice.
virtual site_size_t getMaxOccupancy () const
 Get the maximum number of particles that can live in a site.
 IntLattice (lattice_coord_t size, si_dist_t spacing, uint particlesPerSite)
 IntLattice (lattice_size_t xSize, lattice_size_t ySize, lattice_size_t zSize, si_dist_t spacing, uint particlesPerSite)
virtual ~IntLattice ()
virtual void getNeighboringSites (lattice_size_t index, lattice_size_t *neighboringIndices)
 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
 Get the site type at the specified location.
virtual site_t getSiteType (lattice_size_t index) const
 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 siteType)
 Set the site type at the specified location.
virtual void setSiteType (lattice_size_t index, site_t site)
 Set the site type at the specified location.
virtual void * getSiteTypes ()
virtual site_size_t getOccupancy (lattice_size_t x, lattice_size_t y, lattice_size_t z) const
 Get the number of particles in the specified lattice site.
virtual site_size_t getOccupancy (lattice_size_t subvolume) const
 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
 Get the particle at the specified site with at the specified number in the particle list.
virtual particle_t getParticle (lattice_size_t subvolume, site_size_t particleIndex) const
 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)
 Add a particle to the specified site.
virtual void addParticle (lattice_size_t subvolume, particle_t particle)
 Add a particle to the specified site.
virtual void removeParticles (lattice_size_t x, lattice_size_t y, lattice_size_t z)
 Remove a particle to the specified site.
virtual void removeParticles (lattice_size_t subvolume)
 Remove a particle to the specified site.
virtual void removeAllParticles ()
 Empty all particles from the specified site.
virtual std::map< particle_t, uintgetParticleCounts ()
 Get the number of each particle type in the lattice.
virtual std::vector< particle_loc_tfindParticles (particle_t minParticleType, particle_t maxParticleType)
 Get the number of the specified particles types in the lattice.
virtual void setFromRowMajorByteData (void *buffer, size_t bufferSize)
virtual void setFromRowMajorData (void *buffer, size_t bufferSize)
virtual void setSitesFromRowMajorByteData (void *buffer, size_t bufferSize)
virtual void getParticleLatticeView (uint32_t **particleLattice, int *Nw, int *Nz, int *Ny, int *Nx, int *Np)
virtual void getSiteLatticeView (uint8_t **siteLattice, int *Nz, int *Ny, int *Nx)
virtual size_t getLatticeMemorySize () const
Public Member Functions inherited from lm::rdme::Lattice
 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.
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 void print () const
 Print the lattice to the console.

Static Public Member Functions

static void nativeSerialize (void *destBuffer, void *lattice, size_t latticeSize)
static void copyNativeToRowMajor (void *destBuffer, void *sourceBuffer, lattice_size_t xSize, lattice_size_t ySize, lattice_size_t zSize, uint particlesPerSite, size_t bufferSize)
static void copyRowMajorToNative (void *destBuffer, void *sourceBuffer, lattice_size_t xSize, lattice_size_t ySize, lattice_size_t zSize, uint particlesPerSite, size_t bufferSize)
static void copySitesRowMajorByteToNative (void *destBuffer, void *sourceBuffer, lattice_size_t xSize, lattice_size_t ySize, lattice_size_t zSize, size_t bufferSize)
Static Public Member Functions inherited from lm::rdme::Lattice
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 Member Functions

virtual void allocateMemory ()
virtual void deallocateMemory ()
virtual uint32_t * getParticlesMemory ()
virtual uint8_t * getSitesMemory ()

Protected Attributes

uint wordsPerSite
uint32_t * particles
uint8_t * siteTypes
Protected Attributes inherited from lm::rdme::Lattice
lattice_coord_t size
lattice_size_t numberSites
si_dist_t spacing

Friends

class MGPUMpdRdmeSolver
class MPIMpdRdmeSolver
class MGPUIntMpdRdmeSolver

Detailed Description

A Lattice that is based on one particle per word, with sites strided per particle.

Constructor & Destructor Documentation

◆ IntLattice() [1/2]

lm::rdme::IntLattice::IntLattice ( lattice_coord_t size,
si_dist_t spacing,
uint particlesPerSite )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ IntLattice() [2/2]

lm::rdme::IntLattice::IntLattice ( lattice_size_t xSize,
lattice_size_t ySize,
lattice_size_t zSize,
si_dist_t spacing,
uint particlesPerSite )
Here is the call graph for this function:

◆ ~IntLattice()

lm::rdme::IntLattice::~IntLattice ( )
virtual
Here is the call graph for this function:

Member Function Documentation

◆ addParticle() [1/2]

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

Add a particle to the specified site.

Implements lm::rdme::Lattice.

Reimplemented in lm::rdme::CudaIntLattice.

Here is the call graph for this function:

◆ addParticle() [2/2]

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

Add a particle to the specified site.

Implements lm::rdme::Lattice.

Reimplemented in lm::rdme::CudaIntLattice.

Here is the call graph for this function:

◆ allocateMemory()

void lm::rdme::IntLattice::allocateMemory ( )
protectedvirtual
Here is the caller graph for this function:

◆ copyNativeToRowMajor()

void lm::rdme::IntLattice::copyNativeToRowMajor ( void * destBuffer,
void * sourceBuffer,
lattice_size_t xSize,
lattice_size_t ySize,
lattice_size_t zSize,
uint particlesPerSite,
size_t bufferSize )
static
Here is the caller graph for this function:

◆ copyRowMajorToNative()

void lm::rdme::IntLattice::copyRowMajorToNative ( void * destBuffer,
void * sourceBuffer,
lattice_size_t xSize,
lattice_size_t ySize,
lattice_size_t zSize,
uint particlesPerSite,
size_t bufferSize )
static
Here is the caller graph for this function:

◆ copySitesRowMajorByteToNative()

void lm::rdme::IntLattice::copySitesRowMajorByteToNative ( void * destBuffer,
void * sourceBuffer,
lattice_size_t xSize,
lattice_size_t ySize,
lattice_size_t zSize,
size_t bufferSize )
static
Here is the caller graph for this function:

◆ deallocateMemory()

void lm::rdme::IntLattice::deallocateMemory ( )
protectedvirtual
Here is the caller graph for this function:

◆ findParticles()

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

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

Implements lm::rdme::Lattice.

◆ getLatticeMemorySize()

size_t lm::rdme::IntLattice::getLatticeMemorySize ( ) const
virtual

Implements lm::rdme::Lattice.

◆ getMaxOccupancy()

site_size_t lm::rdme::IntLattice::getMaxOccupancy ( ) const
virtual

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

Implements lm::rdme::Lattice.

Here is the caller graph for this function:

◆ getMaxParticle()

particle_t lm::rdme::IntLattice::getMaxParticle ( ) const
virtual

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

Implements lm::rdme::Lattice.

◆ getMaxSiteType()

site_t lm::rdme::IntLattice::getMaxSiteType ( ) const
virtual

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

Implements lm::rdme::Lattice.

◆ getNeighboringSites()

void lm::rdme::IntLattice::getNeighboringSites ( lattice_size_t index,
lattice_size_t * neighboringIndices )
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

Implements lm::rdme::Lattice.

◆ getOccupancy() [1/2]

site_size_t lm::rdme::IntLattice::getOccupancy ( lattice_size_t index) const
virtual

Get the number of particles in the specified lattice site.

Implements lm::rdme::Lattice.

◆ getOccupancy() [2/2]

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

Get the number of particles in the specified lattice site.

Implements lm::rdme::Lattice.

◆ getParticle() [1/2]

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

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

Implements lm::rdme::Lattice.

Here is the call graph for this function:

◆ getParticle() [2/2]

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

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

Implements lm::rdme::Lattice.

Here is the call graph for this function:

◆ getParticleCounts()

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

Get the number of each particle type in the lattice.

Particle searching methods.

Implements lm::rdme::Lattice.

◆ getParticleLatticeView()

void lm::rdme::IntLattice::getParticleLatticeView ( uint32_t ** particleLattice,
int * Nw,
int * Nz,
int * Ny,
int * Nx,
int * Np )
virtual

◆ getParticlesMemory()

uint32_t * lm::rdme::IntLattice::getParticlesMemory ( )
protectedvirtual

◆ getSiteLatticeView()

void lm::rdme::IntLattice::getSiteLatticeView ( uint8_t ** siteLattice,
int * Nz,
int * Ny,
int * Nx )
virtual

◆ getSitesMemory()

uint8_t * lm::rdme::IntLattice::getSitesMemory ( )
protectedvirtual

◆ getSiteType() [1/2]

site_t lm::rdme::IntLattice::getSiteType ( lattice_size_t index) const
virtual

Get the site type at the specified location.

Implements lm::rdme::Lattice.

◆ getSiteType() [2/2]

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

Get the site type at the specified location.

Implements lm::rdme::Lattice.

◆ getSiteTypes()

void * lm::rdme::IntLattice::getSiteTypes ( )
virtual

◆ nativeSerialize()

void lm::rdme::IntLattice::nativeSerialize ( void * destBuffer,
void * lattice,
size_t latticeSize )
static
Here is the call graph for this function:

◆ removeAllParticles()

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

Empty all particles from the specified site.

Reimplemented from lm::rdme::Lattice.

Reimplemented in lm::rdme::CudaIntLattice.

◆ removeParticles() [1/2]

void lm::rdme::IntLattice::removeParticles ( lattice_size_t index)
virtual

Remove a particle to the specified site.

Implements lm::rdme::Lattice.

Reimplemented in lm::rdme::CudaIntLattice.

◆ removeParticles() [2/2]

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

Remove a particle to the specified site.

Implements lm::rdme::Lattice.

Reimplemented in lm::rdme::CudaIntLattice.

◆ setFromRowMajorByteData()

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

Implements lm::rdme::Lattice.

Reimplemented in lm::rdme::CudaIntLattice.

◆ setFromRowMajorData()

void lm::rdme::IntLattice::setFromRowMajorData ( void * buffer,
size_t bufferSize )
virtual
Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSitesFromRowMajorByteData()

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

Implements lm::rdme::Lattice.

Here is the call graph for this function:

◆ setSiteType() [1/2]

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

Set the site type at the specified location.

Implements lm::rdme::Lattice.

Reimplemented in lm::rdme::CudaIntLattice.

◆ setSiteType() [2/2]

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

Set the site type at the specified location.

Implements lm::rdme::Lattice.

Reimplemented in lm::rdme::CudaIntLattice.

◆ MGPUIntMpdRdmeSolver

friend class MGPUIntMpdRdmeSolver
friend

◆ MGPUMpdRdmeSolver

friend class MGPUMpdRdmeSolver
friend

◆ MPIMpdRdmeSolver

friend class MPIMpdRdmeSolver
friend

Member Data Documentation

◆ particles

uint32_t* lm::rdme::IntLattice::particles
protected

◆ siteTypes

uint8_t* lm::rdme::IntLattice::siteTypes
protected

◆ wordsPerSite

uint lm::rdme::IntLattice::wordsPerSite
protected

The documentation for this class was generated from the following files: