integrators
Class SemiExplicitAPCIntegrator
java.lang.Object
integrators.Integrator
integrators.SemiExplicitAPCIntegrator
- public class SemiExplicitAPCIntegrator
- extends Integrator
The SemiExplicitAPCIntegrator implements a custom-modified fourth-order
Adams-Bashforth-Moulton predictor-corrector method, with a special way of writing
the corrector formula that, dependent on the parameters of the underlying equations,
allows the fixed-point iteration to converge for larger values of the partial
derivatives of the system than would be possible for the straight Adams method.
In a nutshell, all those terms of the derivative at y(t+h) that happen to be linear
in y sub i are moved to the left hand side of the formula; then the formula is re-
solved for y(t+h) to yield a partially-explicit formula. The advantage of this is
that the coefficients of terms linear in y sub i now appear in the denominator of
the right hand side, thus improving the likelihood that fixed-point iteration will
converge for a large time step. In practice, this Integrator is typically able to
take much larger time steps than the straight Adams method (even as implemented in
AdamsIntegrator where convergence is assisted with a mild trick). On the other hand,
if the coefficients of linear terms are not large, the Cash-Karp integration method
generally takes larger time steps (although this method remains competetive because
it uses fewer derivative evaluations). Like the AdamsIntegrator, this Integrator
uses fourth-order Runge-Kutta steps to start off the integration or to restart it
internally. See the documentation for the AdamsIntegrator for a description of the
basic Adams-Bashforth-Moulton method.
Method Summary |
protected void |
getFhatAndDfdyi(NodeValues[] fhat_vals,
NodeValues[] dfdyi_vals)
|
void |
init(Model model)
Any object planning to use an Integrator of any kind MUST call its
init(Model) method, which (among other things) is generally used to allocate
storage arrays for the intermediates in an integration method. |
float |
IntegrateOneStep()
Integrates across a single time step. |
void |
reset()
Should be called after the Integrator has crossed an entire interval. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SemiExplicitAPCIntegrator
public SemiExplicitAPCIntegrator()
init
public void init(Model model)
- Description copied from class:
Integrator
- Any object planning to use an Integrator of any kind MUST call its
init(Model) method, which (among other things) is generally used to allocate
storage arrays for the intermediates in an integration method. This method
does NOT do any numerics so does not depend on the state of the model, but
it DOES need to be called after the model has been properly populated with
Cells and Nodes, and needs to be called again if these change.
- Overrides:
init
in class Integrator
reset
public void reset()
- Description copied from class:
Integrator
- Should be called after the Integrator has crossed an entire interval.
The base class does nothing; typical subclasses will override Integrator.reset()
to reset the time step size to the default value. This method is NOT used to
reallocate storage; that requires a call to init().
- Overrides:
reset
in class Integrator
IntegrateOneStep
public float IntegrateOneStep()
- Description copied from class:
Integrator
- Integrates across a single time step. Return value is the size of the
timestep, which may differ from that specified by the calling method if the
Integrator subclass adapts the step size to match error requirements.
- Overrides:
IntegrateOneStep
in class Integrator
getFhatAndDfdyi
protected void getFhatAndDfdyi(NodeValues[] fhat_vals,
NodeValues[] dfdyi_vals)