[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [Help-gsl] ODE solvers with complex data
From: |
Michael Stauffer |
Subject: |
RE: [Help-gsl] ODE solvers with complex data |
Date: |
Fri, 02 Nov 2007 17:12:58 -0400 |
Thanks, that seems like the approach to take. It makes sense not to make
duplicate functions. I don't know the math behind all this well enough to
fully understand it, but I'm learning as I try to convert my source code.
Cheers,
Michael
> -----Original Message-----
> From: Brian Gough [mailto:address@hidden
> Sent: Friday, November 02, 2007 4:49 AM
> To: Michael Stauffer
> Cc: address@hidden
> Subject: Re: [Help-gsl] ODE solvers with complex data
>
>
> At Wed, 31 Oct 2007 20:29:38 -0400,
> Michael Stauffer wrote:
> > My first task with GSL is to convert some Matlab code to C.
> The code
> > uses the Matlab ODE solvers, and so I'm planning on using the GSL
> > odeiv routines. However, the Matlab code uses complex data, but it
> > seems the GSL odeiv routines only use double-type data. The
> GSL odeiv
> > system "function" routine specifies input and output as
> type double. I
> > figured that since GSL supports complex data types, there would be
> > matching odeiv functions for complex types if it were
> possible to use
> > them.
>
> For odes, you'll need to work with the real and imaginary
> components as doubles in an array of length 2N.
>
> We don't generally have complex versions of every function
> when the real version can be used, as it leads to a lot of
> duplication in the code.
>
> --
> best regards,
>
> Brian Gough
>
> GNU Scientific Library -
> http://www.gnu.org/software/gsl/