BoundaryDeformablePeriodic
, BoundaryRectangular
, BoundaryTruncatedOctahedron
public abstract class Boundary
extends java.lang.Object
The boundary is responsible for firing inflate events when the boundary dimensions change.
Modifier and Type | Field | Description |
---|---|---|
protected Box |
box |
|
protected BoundaryEventManager |
eventManager |
|
protected BoundaryEvent |
inflateEvent |
|
protected Polytope |
shape |
|
protected Space |
space |
Constructor | Description |
---|---|
Boundary(Space space,
Polytope shape) |
Subclasses must invoke this constructor and provide a Space instance that
can be used to generate Vectors, and a Polytope that defines the shape
and volume of the boundary region.
|
Modifier and Type | Method | Description |
---|---|---|
abstract 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).
|
Box |
getBox() |
|
abstract 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 |
getCenter() |
|
abstract Vector |
getEdgeVector(int d) |
Returns the vector that defines the edge of this boundary for the given
dimension.
|
BoundaryEventManager |
getEventManager() |
|
abstract IndexIteratorSizable |
getIndexIterator() |
|
boolean[] |
getPeriodicity() |
|
abstract boolean |
getPeriodicity(int d) |
Returns true if the boundary is periodic in the given direction (as
defined by the getEdgeVector method).
|
Polytope |
getShape() |
|
abstract double[][] |
imageOrigins(int nShells) |
Set of vectors describing the displacements needed to translate the
central image to all of the periodic images.
|
abstract void |
nearestImage(Vector dr) |
The nearest image is the pair of atom images that are closest when all
periodic-boundary images are considered.
|
void |
setBox(Box newBox) |
Sets the box that holds the boundary.
|
abstract void |
setBoxSize(Vector v) |
Scales the boundary dimensions such that the boundary's would be
inscribed within a rectangle of the of the given size.
|
double |
volume() |
protected final Polytope shape
protected final Space space
protected Box box
protected BoundaryEvent inflateEvent
protected BoundaryEventManager eventManager
public Box getBox()
public void setBox(Box newBox)
newBox
- the box that holds the boundarypublic Polytope getShape()
public double volume()
public Vector getCenter()
public BoundaryEventManager getEventManager()
public abstract IndexIteratorSizable getIndexIterator()
public abstract double[][] imageOrigins(int nShells)
nShells
- the number of shells of images to be computedpublic abstract Vector centralImage(Vector r)
r
- vector position of untransformed point; r is not changed by
this methodpublic abstract void nearestImage(Vector dr)
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.
dr
- the vector to be transformedpublic abstract Vector getBoxSize()
Manipulation of this copy will not cause any change to the boundary's dimensions.
public abstract void setBoxSize(Vector v)
v
- the box's new sizepublic abstract Vector getEdgeVector(int d)
d
- the dimension of the desired edge vectorpublic abstract boolean getPeriodicity(int d)
d
- the dimension of the desired periodicitypublic boolean[] getPeriodicity()