commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Luc Maisonobe <Luc.Maison...@free.fr>
Subject [math] Re: ODE Question
Date Thu, 04 Jun 2009 21:52:51 GMT
Angelo Port a écrit :
> Hi,

Hello,

First, please use a marker like [math] when posting to this list
according to the commons component you use. This list is shared by
several components, so it helps subscribers filter the messages.

> 
>  
> 
> I am attempting to use the Dormand-Prince 54 integrator. I get the following
> error:
> 
> org.apache.commons.math.ode.IntegratorException: dimensions mismatch: ODE
> problem has dimension 0, initial state vector has dimension 6
>         at
> org.apache.commons.math.ode.AdaptiveStepsizeIntegrator.sanityChecks(AdaptiveStepsizeIntegrator.java:177)
>         at
> org.apache.commons.math.ode.EmbeddedRungeKuttaIntegrator.integrate(EmbeddedRungeKuttaIntegrator.java:179)
> 
> Did I forget to set the dimension? If so, how is this done?

The problem you pass to the integrator implements the
FirstOrderDifferentialEquations interfaces, which has a getDimension()
method. This method must provide the dimension of the set of
differential equations it computes. In your case, I guess you should have:

public int getDimension() {
  return 6;
}

This must be consistent with the dimension of the state vector.

Luc

> 
>  
> 
> Angelo
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message