|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object JSci.physics.Particle JSci.physics.AbstractClassicalParticle JSci.physics.ClassicalParticle
public class ClassicalParticle
The ClassicalParticle class provides an object for encapsulating classical point particles. This class is suitable for representing particles that live in an arbitrary number of dimensions.
Field Summary | |
---|---|
protected double |
mass
|
protected AbstractDoubleVector |
v
|
protected AbstractDoubleVector |
x
|
Constructor Summary | |
---|---|
ClassicalParticle(int n)
Constructs a classical particle. |
Method Summary | |
---|---|
ClassicalParticle |
accelerate(AbstractDoubleVector a,
double dt)
Accelerates this particle. |
ClassicalParticle |
applyForce(AbstractDoubleVector F,
double dt)
Applies a force to this particle. |
double |
energy()
Returns the energy of this particle. |
double |
getMass()
Returns the mass of this particle. |
AbstractDoubleVector |
getMomentum()
|
AbstractDoubleVector |
getPosition()
|
AbstractDoubleVector |
getVelocity()
|
ClassicalParticle |
move(double dt)
Evolves this particle forward according to its kinematics. |
void |
setMass(double m)
Sets the mass of this particle. |
void |
setMomentum(AbstractDoubleVector momentum)
|
void |
setPosition(AbstractDoubleVector pos)
|
void |
setVelocity(AbstractDoubleVector vel)
|
double |
speed()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected double mass
protected AbstractDoubleVector x
protected AbstractDoubleVector v
Constructor Detail |
---|
public ClassicalParticle(int n)
n
- number of dimensions.Method Detail |
---|
public void setMass(double m)
public double getMass()
getMass
in class AbstractClassicalParticle
public void setPosition(AbstractDoubleVector pos)
public AbstractDoubleVector getPosition()
getPosition
in class AbstractClassicalParticle
public void setVelocity(AbstractDoubleVector vel)
public AbstractDoubleVector getVelocity()
getVelocity
in class AbstractClassicalParticle
public double speed()
speed
in class AbstractClassicalParticle
public void setMomentum(AbstractDoubleVector momentum)
public AbstractDoubleVector getMomentum()
getMomentum
in class AbstractClassicalParticle
public double energy()
energy
in class AbstractClassicalParticle
public ClassicalParticle move(double dt)
public ClassicalParticle accelerate(AbstractDoubleVector a, double dt)
accelerate(a1, dt).accelerate(a2, dt)
is equivalent to accelerate(a1+a2, dt)
.
public ClassicalParticle applyForce(AbstractDoubleVector F, double dt)
applyForce(F1, dt).applyForce(F2, dt)
is equivalent to applyForce(F1+F2, dt)
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |