org.simBio.core.integrator
Class Euler

java.lang.Object
  extended by org.simBio.core.Component
      extended by org.simBio.core.Parameter
          extended by org.simBio.core.integrator.Euler
All Implemented Interfaces:
Node, Variable
Direct Known Subclasses:
Positive

public class Euler
extends Parameter
implements Variable

the variable calculated by euler method
オイラー法で計算される変数

Version:
$Id: Euler.java,v 1.3 2006/06/10 07:20:56 nsarai Exp $
Author:
Nobuaki Sarai

Field Summary
protected  double dydt
          dy/dt
 
Fields inherited from class org.simBio.core.Parameter
value
 
Fields inherited from interface org.simBio.core.Variable
TINY
 
Constructor Summary
Euler()
           
 
Method Summary
 void addDydt(double d)
          always throws UnsupportedOperationException, need to implement 'Node'
 void addValue(double value)
          log warn, this Method should not be used.
 double getDydt()
          return dy/dt
dy/dtの値を返す。
 double getDydtOverY()
          dy/dtを現在値(y)で割った値を返す。
 void setValue(double newValue)
          log warn, this Method should not be used.
protected  void update(double dt)
          calculate new y = old y + dy/dt * dt, clear dy/dt
new y = old y + dy/dt * dtを計算し、dy/dtを0にする
 
Methods inherited from class org.simBio.core.Parameter
getValue, getValueString, prepare, setInitializer, setValueString, setValueToField
 
Methods inherited from class org.simBio.core.Component
accept, end, getIndent, getIndentedShortName, getName, getName, getParent, getRoot, getShortName, getUnits, isNamed, isPrefixed, logIndented, quit, setLinks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.simBio.core.Node
getValue
 

Field Detail

dydt

protected double dydt
dy/dt

Constructor Detail

Euler

public Euler()
Method Detail

addDydt

public void addDydt(double d)
Description copied from class: Component
always throws UnsupportedOperationException, need to implement 'Node'

Specified by:
addDydt in interface Node
Overrides:
addDydt in class Component
Parameters:
d - dy/dt
See Also:
Node.addDydt(double)

getDydt

public double getDydt()
Description copied from interface: Variable
return dy/dt
dy/dtの値を返す。

Specified by:
getDydt in interface Variable
Returns:
dy/dt
See Also:
Variable.getDydt()

update

protected void update(double dt)
calculate new y = old y + dy/dt * dt, clear dy/dt
new y = old y + dy/dt * dtを計算し、dy/dtを0にする

Parameters:
dt -

getDydtOverY

public double getDydtOverY()
Description copied from interface: Variable
dy/dtを現在値(y)で割った値を返す。

Specified by:
getDydtOverY in interface Variable
Returns:
dy/dt over y
See Also:
Variable.getDydtOverY()

setValue

public void setValue(double newValue)
log warn, this Method should not be used.

Specified by:
setValue in interface Node
Overrides:
setValue in class Parameter
Parameters:
newValue -
See Also:
Node.setValue(double)

addValue

public void addValue(double value)
log warn, this Method should not be used.

Specified by:
addValue in interface Node
Overrides:
addValue in class Parameter
Parameters:
value -


Copyright © 2002-2008 Cell/Biodinamics simulation project. All Rights Reserved.