AtomLeafAgentManager.AgentSource<Vector>, NeighborCriterionpublic class CriterionSimple extends java.lang.Object implements NeighborCriterion, AtomLeafAgentManager.AgentSource<Vector>
| Modifier and Type | Field | Description |
|---|---|---|
protected AtomLeafAgentManager<Vector> |
agentManager |
|
protected Boundary |
boundary |
|
protected BoxAgentManager<AtomLeafAgentManager<Vector>> |
boxAgentManager |
|
protected double |
displacementLimit2 |
|
protected Vector |
dr |
|
protected double |
interactionRange |
|
protected double |
neighborRadius2 |
|
protected double |
r2 |
|
protected double |
r2MaxSafe |
|
protected double |
safetyFactor |
|
protected Space |
space |
| Constructor | Description |
|---|---|
CriterionSimple(Simulation sim,
Space _space,
double interactionRange,
double neighborRadius) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
accept(IAtom atom1,
IAtom atom2) |
|
double |
getInteractionRange() |
|
Dimension |
getInteractionRangeDimension() |
|
double |
getNeighborRange() |
|
Dimension |
getNeighborRangeDimension() |
|
double |
getSafetyFactor() |
|
Vector |
makeAgent(IAtom atom,
Box agentBox) |
Returns an agent for the given Atom.
|
boolean |
needUpdate(IAtom atom) |
Indicates whether the neighbor list for the given atom should
be updated, according to this criterion.
|
void |
releaseAgent(Vector agent,
IAtom atom,
Box agentBox) |
This informs the agent source that the agent is going away and that
the agent source should disconnect the agent from other elements.
|
void |
reset(IAtom atom) |
Indicates to criterion that given atom's neighbor list has just been
updated, and that properties (e.g., record of atom's position)
used by needUpdate and unsafe() methods should be reset.
|
void |
setBox(Box box) |
Specifies the box where the criterion is being applied.
|
void |
setInteractionRange(double newInteractionRange) |
|
void |
setNeighborRange(double r) |
|
void |
setSafetyFactor(double f) |
|
boolean |
unsafe() |
Indicates whether the atom has changed (e.g.
|
protected final Space space
protected double interactionRange
protected double displacementLimit2
protected double neighborRadius2
protected final Vector dr
protected Boundary boundary
protected double safetyFactor
protected double r2
protected double r2MaxSafe
protected AtomLeafAgentManager<Vector> agentManager
protected final BoxAgentManager<AtomLeafAgentManager<Vector>> boxAgentManager
public CriterionSimple(Simulation sim, Space _space, double interactionRange, double neighborRadius)
public void setSafetyFactor(double f)
public double getSafetyFactor()
public void setNeighborRange(double r)
public double getNeighborRange()
public Dimension getNeighborRangeDimension()
public void setInteractionRange(double newInteractionRange)
public double getInteractionRange()
public Dimension getInteractionRangeDimension()
public boolean needUpdate(IAtom atom)
NeighborCriterionneedUpdate in interface NeighborCriterionpublic void setBox(Box box)
NeighborCriterionsetBox in interface NeighborCriterionpublic boolean unsafe()
NeighborCriterionunsafe in interface NeighborCriterionpublic boolean accept(IAtom atom1, IAtom atom2)
accept in interface NeighborCriterionpublic void reset(IAtom atom)
NeighborCriterionreset in interface NeighborCriterionpublic Vector makeAgent(IAtom atom, Box agentBox)
AtomLeafAgentManager.AgentSourcemakeAgent in interface AtomLeafAgentManager.AgentSource<Vector>agentBox - TODOpublic void releaseAgent(Vector agent, IAtom atom, Box agentBox)
AtomLeafAgentManager.AgentSourcereleaseAgent in interface AtomLeafAgentManager.AgentSource<Vector>