IPotential, IPotentialAtomic, PotentialHardpublic 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)
IPotentialAtomicenergy in interface IPotentialAtomicpublic int nBody()
IPotentialnBody in interface IPotentialpublic void setBox(Box box)
IPotentialsetBox in interface IPotentialpublic PotentialHard getWrappedPotential()
public void setWrappedPotential(PotentialHard newWrappedPotential)
public double getRange()
IPotentialgetRange in interface IPotentialpublic void bump(IAtomList atoms, double falseTime)
PotentialHardbump in interface PotentialHardpublic double collisionTime(IAtomList atoms, double falseTime)
PotentialHardcollisionTime in interface PotentialHardpublic double energyChange()
PotentialHardenergyChange in interface PotentialHardpublic double lastCollisionVirial()
PotentialHardlastCollisionVirial in interface PotentialHardpublic Tensor lastCollisionVirialTensor()
PotentialHardlastCollisionVirialTensor in interface PotentialHard