IPotential
, IPotentialAtomic
, PotentialHard
public class P2HardWrapper extends java.lang.Object implements PotentialHard
Modifier and Type | Field | Description |
---|---|---|
protected Space |
space |
|
protected PotentialHard |
wrappedPotential |
Constructor | Description |
---|---|
P2HardWrapper(Space space,
PotentialHard potential) |
Modifier and Type | Method | Description |
---|---|---|
void |
bump(IAtomList atoms,
double falseTime) |
Implements the collision dynamics.
|
double |
collisionTime(IAtomList atoms,
double falseTime) |
Computes the time of collision of the given atom(s) with the hard
potential, assuming no intervening collisions.
|
double |
energy(IAtomList atoms) |
Returns the interaction energy between the given atoms.
|
double |
energyChange() |
returns change in potential energy due to the last collision
|
double |
getRange() |
Returns the range over which the potential applies.
|
PotentialHard |
getWrappedPotential() |
|
double |
lastCollisionVirial() |
Value of the virial from the most recent collision.
|
Tensor |
lastCollisionVirialTensor() |
Value of the virial from the most recent collision, decomposed into it
tensoral elements.
|
int |
nBody() |
The number of atoms on which the potential depends.
|
void |
setBox(Box box) |
Informs the potential of the box on which it acts so that it can
properly consider the boundaries.
|
void |
setWrappedPotential(PotentialHard newWrappedPotential) |
protected final Space space
protected PotentialHard wrappedPotential
public P2HardWrapper(Space space, PotentialHard potential)
public double energy(IAtomList atoms)
IPotentialAtomic
energy
in interface IPotentialAtomic
public int nBody()
IPotential
nBody
in interface IPotential
public void setBox(Box box)
IPotential
setBox
in interface IPotential
public PotentialHard getWrappedPotential()
public void setWrappedPotential(PotentialHard newWrappedPotential)
public double getRange()
IPotential
getRange
in interface IPotential
public void bump(IAtomList atoms, double falseTime)
PotentialHard
bump
in interface PotentialHard
public double collisionTime(IAtomList atoms, double falseTime)
PotentialHard
collisionTime
in interface PotentialHard
public double energyChange()
PotentialHard
energyChange
in interface PotentialHard
public double lastCollisionVirial()
PotentialHard
lastCollisionVirial
in interface PotentialHard
public Tensor lastCollisionVirialTensor()
PotentialHard
lastCollisionVirialTensor
in interface PotentialHard