Open Qmin  0.8.0
GPU-accelerated Q-tensor-based liquid crystal simulations
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
periodicBoundaryConditions Struct Reference

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
 

Detailed Description

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

Constructor & Destructor Documentation

◆ periodicBoundaryConditions() [1/2]

HOSTDEVICE periodicBoundaryConditions::periodicBoundaryConditions ( )
inline

◆ periodicBoundaryConditions() [2/2]

HOSTDEVICE periodicBoundaryConditions::periodicBoundaryConditions ( scalar  sideLength)
inline

Construct a hyper-cubic box with side-lengths given by the specified value.

References setHyperCubic().

Member Function Documentation

◆ getBoxDims()

HOSTDEVICE void periodicBoundaryConditions::getBoxDims ( dVec &  boxDims)
inline

Get the dimensions of the box.

References boxDimensions.

◆ getBoxInvDims()

HOSTDEVICE void periodicBoundaryConditions::getBoxInvDims ( dVec &  iBoxDims)
inline

Get the inverse of the box transformation matrix.

References inverseBoxDimensions.

◆ setHyperCubic()

void periodicBoundaryConditions::setHyperCubic ( scalar  sideLength)

Set the box to some new hypercube.

References boxDimensions, halfBoxDimensions, and inverseBoxDimensions.

Referenced by periodicBoundaryConditions().

◆ setBoxDims()

void periodicBoundaryConditions::setBoxDims ( dVec &  bDims)

Set the box to some new rectangular specification.

References boxDimensions, halfBoxDimensions, and inverseBoxDimensions.

◆ Transform()

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().

◆ invTransform()

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().

◆ 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().

◆ minDist()

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().

◆ move()

void periodicBoundaryConditions::move ( dVec &  p1,
const dVec &  disp 
)

Move p1 by the amount disp, then put it in the box.

References putInBoxReal().

◆ Volume()

HOSTDEVICE scalar periodicBoundaryConditions::Volume ( )
inline

compute volume

References boxDimensions, and scalar.

◆ putInBox()

void periodicBoundaryConditions::putInBox ( dVec &  vp)
protected

Referenced by putInBoxReal().

Member Data Documentation

◆ boxDimensions

dVec periodicBoundaryConditions::boxDimensions
protected

◆ halfBoxDimensions

dVec periodicBoundaryConditions::halfBoxDimensions
protected

Referenced by minDist(), setBoxDims(), and setHyperCubic().

◆ inverseBoxDimensions

dVec periodicBoundaryConditions::inverseBoxDimensions
protected

The documentation for this struct was generated from the following file: