68 void putInBC1(
dVec & r)
const {
69 for (
int i = 0; i <
NDIM; ++i) {
108 Prism(
const double,
const int);
119 for (
int i = 0; i <
NDIM; i++) {
121 if (r[i] >= 0.5*
side[i])
123 if (r[i] < -0.5*
side[i])
145 Cylinder(
const double,
const double,
const int);
146 Cylinder(
const double,
const double);
The base class which holds details on the generalized box that our system will be simulated inside of...
dVec gridSize
The grid size in each dimension.
Container()
Initialize all variables.
virtual dVec randPosition(MTRand &) const =0
Random position inside a box.
double volume
The volume of the container in A^3.
int numGrid
The number of grid boxes for the position grid.
dVec sideInv
The inverse box dimensions.
dVec pSide
Periodic * side.
TinyVector< unsigned int, NDIM > periodic
Determines which dimensions have periodic bc.
dVec sideInv2
2 times the inverse box dimensions
virtual double gridBoxVolume(const int) const =0
The physical size of a NDIM-dimensional grid box.
virtual dVec randUpdate(MTRand &, const dVec &) const =0
Random updated position inside a box.
double gridRadius2(const int) const
The radius of a grid box.
double rcut2
The smallest separation squared.
string name
The name of the container.
void putInBC(dVec &r) const
Place a vector in boundary conditions.
virtual int gridIndex(const dVec &) const =0
Map a position into a grid index.
bool fullyPeriodic
Is the prism fully periodic?
virtual void putInside(dVec &) const =0
Place a vector inside the simulation cell.
dVec side
The linear dimensions of the box.
virtual ~Container()
Empty destructor.
double maxSep
The maximum possible separation for 2 beads on the same timeslice.
A three dimensional cylinder with fixed boundary conditions in the x and y directions and periodic bo...
dVec randUpdateJumpShell(MTRand &, const dVec &) const
Return a random position close to the supplied one.
dVec randUpdateSmall(MTRand &, const dVec &) const
Return a random position close to the supplied one.
Cylinder(const double, const double, const int)
Create a cylinder given density, radius and number of particles.
dVec randPosition(MTRand &) const
Return a random position inside the cylinder.
double gridBoxVolume(const int) const
Given a grid index, return the hyper volume of the associated grid box.
dVec randUpdate(MTRand &, const dVec &) const
Return a random position close to the supplied one.
void putInside(dVec &r) const
Make sure that a suplied vector is put inside the cylinder.
int gridIndex(const dVec &) const
Given a particle position, return a single integer which maps to a unique grid position.
A NDIM-dimensional hyperprism with periodic boundary conditions.
double gridBoxVolume(const int) const
Given a grid index, return the hyper volume of the associated grid box.
~Prism()
Empty destructor.
dVec randPosition(MTRand &) const
Return a random position inside the cube.
Prism(const double, const int)
Create a NDIM-dimensional hyperprism given density and number of particles.
int gridIndex(const dVec &) const
Given a particle position, return a single integer which maps to a unique grid position.
void putInside(dVec &r) const
For PBC, this is identical to putInBC.
dVec randUpdate(MTRand &, const dVec &) const
Return a random position close to the supplied one.
Global common header with shared dependencies and methods.
#define NDIM
Number of spatial dimnsions.
#define EPS
A small number.
TinyVector< double, NDIM > dVec
A NDIM-vector of type double.
TinyVector< int, NDIM > iVec
A NDIM-vector of type integer.