A class that defines regions of a lattice based on a set of geometries defined by shapes. It also allows packing different types of particles into different regions.  
 More...
#include <LatticeBuilder.h>
|  | 
| struct | ParticlePlacement | 
|  | A representation of a placement operation that needs to occur (i.e. where to place (siteType), what to place (particleType) and how many (count))  More... 
 | 
|  | 
|  | LatticeBuilder (si_dist_t xLen, si_dist_t yLen, si_dist_t zLen, si_dist_t collisionGridSpacing, uint32_t seedTop, uint32_t seedBottom=0) | 
|  | Create a Lattice Builder. 
 | 
| virtual | ~LatticeBuilder () | 
| virtual void | addRegion (Shape *shape) | 
|  | Add a region to the lattice. 
 | 
| virtual bool | placeObject (Shape *shape) | 
|  | Add an shape to the lattice. 
 | 
| virtual void | removeObject (Shape *s) | 
|  | Remove the shape from the lattice. 
 | 
| virtual bool | placeSphere (point center, si_dist_t radius, site_t type) | 
|  | Place a sphere in the lattice (for obstacles) 
 | 
| virtual void | removeSphere (point center, si_dist_t radius, site_t type) | 
|  | Remove a sphere in the lattice (for obstacles) 
 | 
| virtual uint | placeRandomSphere (si_dist_t radius, site_t type, site_t region) | 
|  | Place a sphere randomly in the lattice (for obstacles) 
 | 
| virtual void | placeRandomSpheres (uint count, si_dist_t radius, site_t type, site_t region) | 
|  | Place many spheres randomly in the lattice (for obstacles) 
 | 
| virtual void | fillWithRandomSpheres (double volumeFraction, si_dist_t radius, site_t type, site_t region) | 
|  | Fill a region with random spheres to a specified volume fraction. 
 | 
| virtual void | getSpatialModel (lm::io::SpatialModel *spatialModel) | 
|  | Gets a spatial model of the lattice for interface with python. NOTE: this operation clears the object passed in from python. 
 | 
| virtual void | addParticles (particle_t particleType, site_t siteType, uint count) | 
|  | Add particles of a given type. 
 | 
| virtual void | discretizeTo (lm::rdme::Lattice *lattice, site_t obstacleSiteType, double fractionObstacleSitesOccupied) | 
|  | Discretizes the regions to a square lattice. 
 | 
A class that defines regions of a lattice based on a set of geometries defined by shapes. It also allows packing different types of particles into different regions. 
◆ LatticeBuilder()
Create a Lattice Builder. 
- Parameters
- 
  
    | xLen | Length of the domain along x-axis |  | yLen | Length of the domain along y-axis |  | zLen | Length of the domain along z-axis |  | collisionGridSpacing | The spacing for collision objects |  | seedTop | High 32 bits of the seed (allows a constant seed for debugging) |  | seedBottom | Low 32 bits of the seed |  
 
 
 
◆ ~LatticeBuilder()
  
  | 
        
          | lm::builder::LatticeBuilder::~LatticeBuilder | ( |  | ) |  |  | virtual | 
 
 
◆ addParticles()
  
  | 
        
          | void lm::builder::LatticeBuilder::addParticles | ( | particle_t | particleType, |  
          |  |  | site_t | siteType, |  
          |  |  | uint | count ) |  | virtual | 
 
Add particles of a given type. 
- Parameters
- 
  
    | particleType | The type of particles to randomly place in the lattice |  | siteType | Type of lattice site into which to place |  | count | Number of particles to place |  
 
 
 
◆ addRegion()
  
  | 
        
          | void lm::builder::LatticeBuilder::addRegion | ( | Shape * | shape | ) |  |  | virtual | 
 
Add a region to the lattice. 
- Parameters
- 
  
    | shape | A Shape object to add as a region |  
 
 
 
◆ discretizeObstaclesTo()
  
  | 
        
          | void lm::builder::LatticeBuilder::discretizeObstaclesTo | ( | lm::rdme::Lattice * | lattice, |  
          |  |  | site_t | obstacleSiteType, |  
          |  |  | double | fractionObstacleSitesOccupied ) |  | protectedvirtual | 
 
Discretizes the obstacles to a square lattice. 
- Parameters
- 
  
    | lattice | Lattice object into which to place |  | obstacleSiteType | An identifier for obstacle sites in the lattice |  | fractionObstacleSitesOccupied | Percentage of obstacle sites to be filled |  
 
 
 
◆ discretizeTo()
  
  | 
        
          | void lm::builder::LatticeBuilder::discretizeTo | ( | lm::rdme::Lattice * | lattice, |  
          |  |  | site_t | obstacleSiteType, |  
          |  |  | double | fractionObstacleSitesOccupied ) |  | virtual | 
 
Discretizes the regions to a square lattice. 
- Parameters
- 
  
    | lattice | Lattice object into which to place |  | obstacleSiteType | An identifier for obstacle sites in the lattice |  | fractionObstacleSitesOccupied | Percentage of obstacle sites to be filled |  
 
 
 
◆ fillWithRandomSpheres()
  
  | 
        
          | void lm::builder::LatticeBuilder::fillWithRandomSpheres | ( | double | volumeFraction, |  
          |  |  | si_dist_t | radius, |  
          |  |  | site_t | type, |  
          |  |  | site_t | region ) |  | virtual | 
 
Fill a region with random spheres to a specified volume fraction. 
- Parameters
- 
  
    | volumeFraction | Total fraction of volume that should be filled with spheres |  | radius | Radius of spheres |  | type | The type of site to fill (i.e. the type of site to exclude other objects from) |  | region | The region of the lattice to place spheres into |  
 
 
 
◆ getSpatialModel()
  
  | 
        
          | void lm::builder::LatticeBuilder::getSpatialModel | ( | lm::io::SpatialModel * | spatialModel | ) |  |  | virtual | 
 
Gets a spatial model of the lattice for interface with python. NOTE: this operation clears the object passed in from python. 
- Parameters
- 
  
    | spatialModel | An object of a spatial model for interaction in python or HDF5. The model will be filled with the current lattice |  
 
 
 
◆ placeObject()
  
  | 
        
          | bool lm::builder::LatticeBuilder::placeObject | ( | Shape * | shape | ) |  |  | virtual | 
 
Add an shape to the lattice. 
- Parameters
- 
  
    | shape | A Shape object to add as a region |  
 
- Returns
- true if the object to place does not intersect another object 
 
 
◆ placeRandomSphere()
Place a sphere randomly in the lattice (for obstacles) 
- Parameters
- 
  
    | radius | Radius of the sphere obstacle |  | type | The type of site in which to place sphere |  | region | The region in which to place obstacle randomly |  
 
- Returns
- number of times a placement operation occured 
 
 
◆ placeRandomSpheres()
Place many spheres randomly in the lattice (for obstacles) 
- Parameters
- 
  
    | radius | Radius of the sphere obstacle |  | type | The type of site in which to place sphere |  | region | The region in which to place obstacle randomly |  
 
- Returns
- number of times a placement operation occured 
 
 
◆ placeSphere()
Place a sphere in the lattice (for obstacles) 
- Parameters
- 
  
    | center | The center point of sphere obstacle |  | radius | Radius of the sphere obstacle |  | type | The type of site in which to place sphere |  
 
- Returns
- true if the sphere did not intersect 
 
 
◆ removeObject()
  
  | 
        
          | void lm::builder::LatticeBuilder::removeObject | ( | Shape * | s | ) |  |  | virtual | 
 
Remove the shape from the lattice. 
s Shape to remove 
 
 
◆ removeSphere()
Remove a sphere in the lattice (for obstacles) 
- Parameters
- 
  
    | center | The center point of sphere obstacle |  | radius | Radius of the sphere obstacle |  | type | The type of site in which to place sphere |  
 
 
 
◆ collisionGrid
  
  | 
        
          | Shape*** lm::builder::LatticeBuilder::collisionGrid |  | protected | 
 
 
◆ collisionGridOccupancy
  
  | 
        
          | uint* lm::builder::LatticeBuilder::collisionGridOccupancy |  | protected | 
 
 
◆ collisionGridSize
  
  | 
        
          | uint* lm::builder::LatticeBuilder::collisionGridSize |  | protected | 
 
 
◆ collisionGridSpacing
  
  | 
        
          | si_dist_t lm::builder::LatticeBuilder::collisionGridSpacing |  | protected | 
 
 
◆ collisionGridXSize
  
  | 
        
          | uint lm::builder::LatticeBuilder::collisionGridXSize |  | protected | 
 
 
◆ collisionGridYSize
  
  | 
        
          | uint lm::builder::LatticeBuilder::collisionGridYSize |  | protected | 
 
 
◆ collisionGridZSize
  
  | 
        
          | uint lm::builder::LatticeBuilder::collisionGridZSize |  | protected | 
 
 
◆ definedRegions
  
  | 
        
          | std::vector<site_t> lm::builder::LatticeBuilder::definedRegions |  | protected | 
 
 
◆ objects
  
  | 
        
          | std::vector<Shape *> lm::builder::LatticeBuilder::objects |  | protected | 
 
 
◆ particles
◆ recipCollisionGridSpacing
  
  | 
        
          | double lm::builder::LatticeBuilder::recipCollisionGridSpacing |  | protected | 
 
 
◆ regionBounds
◆ regionShapes
  
  | 
        
          | std::map<site_t,std::vector<Shape *> > lm::builder::LatticeBuilder::regionShapes |  | protected | 
 
 
◆ rng
◆ xLen
◆ yLen
◆ zLen
The documentation for this class was generated from the following files: