BoundaryDeformableLattice
, BoundaryDeformablePeriodicSwitch
public class BoundaryDeformablePeriodic extends Boundary
Modifier and Type | Field | Description |
---|---|---|
protected Vector[] |
transformVectors |
|
protected double |
truncationRadius |
|
protected double[] |
tV2 |
box, eventManager, inflateEvent, shape, space
Constructor | Description |
---|---|
BoundaryDeformablePeriodic(Space _space) |
Make a cubic boundary with edges of length equal to the default boxSize and
periodic in every direction.
|
BoundaryDeformablePeriodic(Space space,
double boxSize) |
Make a cubic boundary of specified edge length and periodicity.
|
BoundaryDeformablePeriodic(Space space,
Vector[] vex) |
Make a parallelepiped boundary of specified shape and periodicity.
|
Modifier and Type | Method | Description |
---|---|---|
Vector |
centralImage(Vector r) |
Determines the translation vector needed to apply a periodic-image
transformation that moves the given point to an image point within the
boundary (if it lies outside, in a direction subject to periodic
imaging).
|
void |
deform(Tensor deformationTensor) |
Applies the given deformation tensor to the boundary in its current
shape.
|
Tensor |
getBoundaryTensor() |
Returns the boundary tensor that fully describes the shape of the boundary.
|
Vector |
getBoxSize() |
Returns the length of the sides of a rectangular box oriented in the lab
frame and in which the boundary is inscribed.
|
Vector |
getEdgeVector(int d) |
Returns the vector that defines the edge of this boundary for the given
dimension.
|
IndexIteratorSizable |
getIndexIterator() |
|
boolean |
getPeriodicity(int i) |
Returns true if the boundary is periodic in the given direction (as
defined by the getEdgeVector method).
|
double |
getTruncationRadius() |
|
double[][] |
imageOrigins(int nShells) |
Set of vectors describing the displacements needed to translate the
central image to all of the periodic images.
|
void |
nearestImage(Vector dr) |
The nearest image is the pair of atom images that are closest when all
periodic-boundary images are considered.
|
void |
setAsCube(double edgeLength) |
Sets the shape of the boundary to a cube with edges equal to the given value.
|
void |
setAsRectangular(Vector vector) |
Sets the shape of the boundary as a rectangular parallelepiped (or
parallelogram) with edge lengths given by the elements of the given
vector.
|
void |
setBoxSize(Vector v) |
Scales each boundary edge so that its length equals the corresponding value
in the given vector.
|
void |
setDimensions(Tensor t) |
Sets the boundary tensor to equal the given tensor.
|
void |
setEdgeVector(int i,
Vector v) |
|
void |
setEdgeVectors(Vector[] vectors) |
|
void |
setTruncationRadius(double newTruncationRadius) |
|
protected void |
testTransformVector(Vector v) |
We test the given vector (v) to see if 0.5*v would be transformed by any
of our existing transformVectors.
|
protected void |
update() |
|
double |
volume() |
getBox, getCenter, getEventManager, getPeriodicity, getShape, setBox
protected Vector[] transformVectors
protected double[] tV2
protected double truncationRadius
public BoundaryDeformablePeriodic(Space _space)
public BoundaryDeformablePeriodic(Space space, double boxSize)
public BoundaryDeformablePeriodic(Space space, Vector[] vex)
space
- the governing spacevex
- array of vectors specifying directions for the parallelepiped edgesjava.lang.IllegalArgumentException
- if the dimension of space is not 2 or 3java.lang.IllegalArgumentException
- if the vex.length is not equal to the dimension of the spacepublic Vector getBoxSize()
getBoxSize
in class Boundary
public Tensor getBoundaryTensor()
public Vector centralImage(Vector r)
Boundary
centralImage
in class Boundary
r
- vector position of untransformed point; r is not changed by
this methodpublic void nearestImage(Vector dr)
Boundary
If the vector passed to this method is the displacement vector between two points, the vector will be transformed such that it corresponds to the vector between the nearest image of those two points.
nearestImage
in class Boundary
dr
- the vector to be transformedpublic void deform(Tensor deformationTensor)
java.lang.IllegalArgumentException
- if the spatial dimension of the tensor is inconsistent with
the dimension of the boundarypublic void setAsRectangular(Vector vector)
java.lang.IllegalArgumentException
- if the spatial dimension of the vector is inconsistent with
the dimension of the boundarypublic void setAsCube(double edgeLength)
public void setBoxSize(Vector v)
setBoxSize
in class Boundary
v
- the box's new sizepublic void setEdgeVector(int i, Vector v)
public void setEdgeVectors(Vector[] vectors)
public void setDimensions(Tensor t)
public double volume()
public void setTruncationRadius(double newTruncationRadius)
public double getTruncationRadius()
protected void update()
protected void testTransformVector(Vector v)
public Vector getEdgeVector(int d)
Boundary
getEdgeVector
in class Boundary
d
- the dimension of the desired edge vectorpublic boolean getPeriodicity(int i)
Boundary
getPeriodicity
in class Boundary
i
- the dimension of the desired periodicitypublic IndexIteratorSizable getIndexIterator()
getIndexIterator
in class Boundary
public double[][] imageOrigins(int nShells)
Boundary
imageOrigins
in class Boundary
nShells
- the number of shells of images to be computed