IPotential
, IPotentialAtomic
, Potential2Soft
, Potential2Spherical
, PotentialHard
, PotentialSoft
public class P2Ideal extends Potential2 implements Potential2Soft, Potential2Spherical, PotentialHard
Useful as a placeholder where a potential is expected but it is desired to not have the atoms interact.
Modifier and Type | Field | Description |
---|---|---|
protected double |
range |
Modifier and Type | Method | Description |
---|---|---|
void |
bump(IAtomList atom,
double falseTime) |
Does nothing.
|
double |
collisionTime(IAtomList atom,
double falseTime) |
Returns Double.POSITIVE_INFINITY.
|
double |
du(double r2) |
Returns zero.
|
double |
energy(IAtomList atoms) |
Returns zero.
|
double |
energyChange() |
Returns zero.
|
double |
getRange() |
Returns zero.
|
Vector[] |
gradient(IAtomList atoms) |
Returns a zero vector.
|
Vector[] |
gradient(IAtomList atoms,
Tensor pressureTensor) |
Returns the same gradient as gradient(AtomSet) and also adds in the
contribution of the AtomSet to the pressureTensor.
|
double |
hyperVirial(IAtomList pair) |
Returns zero.
|
double |
integral(double rC) |
Returns zero.
|
double |
lastCollisionVirial() |
Returns zero.
|
Tensor |
lastCollisionVirialTensor() |
Returns a tensor of zeros.
|
void |
setBox(Box box) |
Does nothing.
|
void |
setRange(double range) |
|
double |
u(double r2) |
Returns zero.
|
double |
virial(IAtomList pair) |
Returns zero.
|
nBody
public P2Ideal(Space space)
public void setBox(Box box)
setBox
in interface IPotential
setBox
in class Potential
public void setRange(double range)
public double getRange()
getRange
in interface IPotential
getRange
in class Potential
public double energy(IAtomList atoms)
energy
in interface IPotentialAtomic
energy
in class Potential
public double hyperVirial(IAtomList pair)
hyperVirial
in interface Potential2Soft
public double virial(IAtomList pair)
virial
in interface PotentialSoft
public double integral(double rC)
integral
in interface Potential2Soft
public double u(double r2)
u
in interface Potential2Spherical
r2
- the square of the distance between the particles.public double du(double r2)
du
in interface Potential2Soft
public double lastCollisionVirial()
lastCollisionVirial
in interface PotentialHard
public Tensor lastCollisionVirialTensor()
lastCollisionVirialTensor
in interface PotentialHard
public void bump(IAtomList atom, double falseTime)
bump
in interface PotentialHard
public double collisionTime(IAtomList atom, double falseTime)
collisionTime
in interface PotentialHard
public double energyChange()
energyChange
in interface PotentialHard
public Vector[] gradient(IAtomList atoms)
gradient
in interface PotentialSoft
public Vector[] gradient(IAtomList atoms, Tensor pressureTensor)
PotentialSoft
gradient
in interface PotentialSoft