|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmeshi.energy.AbstractEnergy
public abstract class AbstractEnergy
A super class for all meshi energy terms. Currently oriented towards drivable energy functions. See meshi.energy.bond.BondEnergy.
| Nested Class Summary | |
|---|---|
private static class |
AbstractEnergy.IsEnergy
|
protected class |
AbstractEnergy.UpdateableList
A list of updateable elements (implementing the meshi.util.Updateable interface). |
| Field Summary | |
|---|---|
private java.util.HashMap |
attributes
|
protected java.lang.String |
comment
A short name for the energy term. |
static Filter |
filter
|
static double |
INFINITY
1/0 good for dubugging. |
static double |
NaN
sqrt(-1) good for dubugging. |
protected boolean |
on
The energy term is evaluated only if it is on. |
protected AbstractEnergy.UpdateableList |
updateableResources
|
protected double |
weight
The weight of the energy term within the total energy. |
| Constructor Summary | |
|---|---|
AbstractEnergy()
Construct a dummy object that cannot be evaluated. |
|
AbstractEnergy(Updateable[] updateableResources,
double weight)
construct An energy term. |
|
| Method Summary | |
|---|---|
void |
addAttribute(MeshiAttribute attribute)
|
java.lang.String |
comment()
|
abstract double |
evaluate()
Evaluates the energy term and update the derivatives. |
abstract void |
evaluateAtoms()
Evaluates the energy term and devides the energy between the atoms. |
MeshiAttribute |
getAttribute(int key)
|
void |
handleMissingParameters(java.lang.Object obj)
|
boolean |
isOn()
|
void |
off()
Turnes the energyTerm OFF. |
void |
on()
Turnes the energyTerm ON. |
abstract void |
test(TotalEnergy totalEnergy,
Atom atom)
Looking for one "criminal" atom whose derivation is wrong. |
protected static Updateable[] |
toArray()
Generates an empty array. |
protected static Updateable[] |
toArray(Updateable o1)
Generates an aray with one element - the parameter. |
protected static Updateable[] |
toArray(Updateable o1,
Updateable o2)
|
protected static Updateable[] |
toArray(Updateable o1,
Updateable o2,
Updateable o3)
|
java.lang.String |
toString()
|
void |
update(int numberOfUpdates)
Updates the updatable resources. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.lang.String comment
protected double weight
protected boolean on
public static final Filter filter
public static final double INFINITY
public static final double NaN
protected AbstractEnergy.UpdateableList updateableResources
private java.util.HashMap attributes
| Constructor Detail |
|---|
public AbstractEnergy()
public AbstractEnergy(Updateable[] updateableResources,
double weight)
| Method Detail |
|---|
public void update(int numberOfUpdates)
throws UpdateableException
update in interface UpdateableUpdateableExceptionpublic abstract double evaluate()
public abstract void evaluateAtoms()
public void on()
public void off()
public boolean isOn()
public abstract void test(TotalEnergy totalEnergy,
Atom atom)
public void handleMissingParameters(java.lang.Object obj)
public java.lang.String comment()
public java.lang.String toString()
toString in class java.lang.Objectprotected static Updateable[] toArray()
protected static Updateable[] toArray(Updateable o1)
protected static Updateable[] toArray(Updateable o1,
Updateable o2)
protected static Updateable[] toArray(Updateable o1,
Updateable o2,
Updateable o3)
public final void addAttribute(MeshiAttribute attribute)
addAttribute in interface Attributablepublic final MeshiAttribute getAttribute(int key)
getAttribute in interface Attributable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||