Open Qmin
0.8.0
GPU-accelerated Q-tensor-based liquid crystal simulations
|
A simple box defining a hypercubic periodic domain. More...
#include <periodicBoundaryConditions.h>
Public Member Functions | |
HOSTDEVICE | periodicBoundaryConditions () |
HOSTDEVICE | periodicBoundaryConditions (scalar sideLength) |
Construct a hyper-cubic box with side-lengths given by the specified value. More... | |
HOSTDEVICE void | getBoxDims (dVec &boxDims) |
Get the dimensions of the box. More... | |
HOSTDEVICE void | getBoxInvDims (dVec &iBoxDims) |
Get the inverse of the box transformation matrix. More... | |
HOSTDEVICE void | setHyperCubic (scalar sideLength) |
Set the box to some new hypercube. More... | |
HOSTDEVICE void | setBoxDims (dVec &bDims) |
Set the box to some new rectangular specification. More... | |
HOSTDEVICE void | Transform (const dVec &p1, dVec &pans) |
Take a point in the unit square and find its position in the box. More... | |
HOSTDEVICE void | invTransform (const dVec p1, dVec &pans) |
Take a point in the box and find its position in the unit square. More... | |
HOSTDEVICE void | putInBoxReal (dVec &p1) |
Take the point and put it back in the unit cell. More... | |
HOSTDEVICE void | minDist (const dVec &p1, const dVec &p2, dVec &pans) |
Calculate the minimum distance between two points. More... | |
HOSTDEVICE void | move (dVec &p1, const dVec &disp) |
Move p1 by the amount disp, then put it in the box. More... | |
HOSTDEVICE scalar | Volume () |
compute volume More... | |
Protected Member Functions | |
HOSTDEVICE void | putInBox (dVec &vp) |
Protected Attributes | |
dVec | boxDimensions |
dVec | halfBoxDimensions |
dVec | inverseBoxDimensions |
A simple box defining a hypercubic periodic domain.
gives access to Box.setBoxDimensions(vector<scalar> dimensions); Box.returnBoxDimensions(); //return a vector with box dimensions laid out in some way Box.movePoint(dvec &A, dvec disp); // A = putInBox(A +disp). i.e., move the particle by some amound and if necessary, e.g., wrap it back into the primary unit cell Box.minDist(dvec &A, dvec &B, dvec &result); // stores in "result" the minimum distance between A and B
|
inline |
|
inline |
Construct a hyper-cubic box with side-lengths given by the specified value.
References setHyperCubic().
|
inline |
Get the dimensions of the box.
References boxDimensions.
|
inline |
Get the inverse of the box transformation matrix.
References inverseBoxDimensions.
void periodicBoundaryConditions::setHyperCubic | ( | scalar | sideLength | ) |
Set the box to some new hypercube.
References boxDimensions, halfBoxDimensions, and inverseBoxDimensions.
Referenced by periodicBoundaryConditions().
void periodicBoundaryConditions::setBoxDims | ( | dVec & | bDims | ) |
Set the box to some new rectangular specification.
References boxDimensions, halfBoxDimensions, and inverseBoxDimensions.
void periodicBoundaryConditions::Transform | ( | const dVec & | p1, |
dVec & | pans | ||
) |
Take a point in the unit square and find its position in the box.
References boxDimensions.
Referenced by putInBoxReal().
void periodicBoundaryConditions::invTransform | ( | const dVec | p1, |
dVec & | pans | ||
) |
Take a point in the box and find its position in the unit square.
References inverseBoxDimensions.
Referenced by putInBoxReal().
void periodicBoundaryConditions::putInBoxReal | ( | dVec & | p1 | ) |
Take the point and put it back in the unit cell.
References invTransform(), putInBox(), and Transform().
Referenced by gpu_move_particles_kernel(), and move().
void periodicBoundaryConditions::minDist | ( | const dVec & | p1, |
const dVec & | p2, | ||
dVec & | pans | ||
) |
Calculate the minimum distance between two points.
References boxDimensions, and halfBoxDimensions.
Referenced by gpu_compute_neighbor_list_kernel(), gpu_compute_neighbor_list_TPC_kernel(), and gpu_compute_neighbor_list_TPP_kernel().
void periodicBoundaryConditions::move | ( | dVec & | p1, |
const dVec & | disp | ||
) |
Move p1 by the amount disp, then put it in the box.
References putInBoxReal().
|
inline |
compute volume
References boxDimensions, and scalar.
|
protected |
Referenced by putInBoxReal().
|
protected |
Referenced by getBoxDims(), minDist(), setBoxDims(), setHyperCubic(), Transform(), and Volume().
|
protected |
Referenced by minDist(), setBoxDims(), and setHyperCubic().
|
protected |
Referenced by getBoxInvDims(), invTransform(), setBoxDims(), and setHyperCubic().