JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.forceFields
Class OneBody

java.lang.Object
  extended bygov.nasa.javaGenes.forceFields.MultiBody
      extended bygov.nasa.javaGenes.forceFields.Body
          extended bygov.nasa.javaGenes.forceFields.OneBody
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class OneBody
extends Body

represents a single body in a multibody potential. The body maintains a list of TwoBody(s) that it is involved with.

See Also:
Serialized Form

Field Summary
 SecondBody[] secondBody
          the twoBody(s) this is involved with in a public array for fast access.
protected  ExtendedVector vector
           
 
Fields inherited from class gov.nasa.javaGenes.forceFields.Body
species, speciesIndex
 
Fields inherited from class gov.nasa.javaGenes.forceFields.MultiBody
_name, howMany
 
Constructor Summary
OneBody(Species s)
           
 
Method Summary
 void add(SecondBody body)
           
 void createArrays()
          moves the TwoBody(s) from any ExtendedVector to an array for fast access
 SecondBody[] getSecondBodies()
           
 void removeInternalElementsOutsideOfCutoff(Potential form)
           
 void scaleLengthsBy(double scaleFactor)
           
 void setSpeciesIndices(Species2IndexMap map)
          converts the species of this and the SecondBody(s) to an integer for fast access
 java.lang.String toString()
           
 boolean withinCutoff(Potential form)
           
 
Methods inherited from class gov.nasa.javaGenes.forceFields.Body
setSpeciesIndex, tabSeparatedString
 
Methods inherited from class gov.nasa.javaGenes.forceFields.MultiBody
copy, divideHowManyBy, getHowMany, getName, incrementHowMany, setHowMany, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

vector

protected ExtendedVector vector

secondBody

public SecondBody[] secondBody
the twoBody(s) this is involved with in a public array for fast access. Will not contain anything until createArrays() is called

Constructor Detail

OneBody

public OneBody(Species s)
Parameters:
s - the type of body this is
Method Detail

getSecondBodies

public SecondBody[] getSecondBodies()

removeInternalElementsOutsideOfCutoff

public void removeInternalElementsOutsideOfCutoff(Potential form)
Overrides:
removeInternalElementsOutsideOfCutoff in class MultiBody

withinCutoff

public boolean withinCutoff(Potential form)
Overrides:
withinCutoff in class Body

scaleLengthsBy

public void scaleLengthsBy(double scaleFactor)
Overrides:
scaleLengthsBy in class Body

add

public void add(SecondBody body)

createArrays

public void createArrays()
moves the TwoBody(s) from any ExtendedVector to an array for fast access


setSpeciesIndices

public void setSpeciesIndices(Species2IndexMap map)
converts the species of this and the SecondBody(s) to an integer for fast access


toString

public java.lang.String toString()

JavaGenes, NASA Ames. Written largely by Al Globus