[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TISEAN: decision about porting a function

From: Juan Pablo Carbajal
Subject: Re: TISEAN: decision about porting a function
Date: Tue, 16 Jun 2015 08:34:11 +0200

On Mon, Jun 15, 2015 at 8:17 PM, Piotr Held <address@hidden> wrote:
> Hi Juan,
> I encountered a problem (more like a decision) about some of the functions.
> The problem is that the output is dependent on time (that is execution
> time). The reason why the TISEAN programs were implemented this way was to
> get some results without waiting for the program to finish (which I assume
> could have taken a very long time). What happens is that when a certain
> amount of time passes the program outputs wherever it's at and then
> continues on computing. This applies to 'lyap_spec', 'd2' and maybe others.
> For further reading see:
> * 'Description of output' section of:
> http://www.mpipks-dresden.mpg.de/~tisean/Tisean_3.0.1/docs/docs_c/lyap_spec.html
> * lines 429-442 of:
> https://bitbucket.org/josiah425/tisean/src/cf22e24e3e20fbf7d8575929098d9ba08d296219/src/__lyap_spec__.cc?at=devel
> * my discussion on github with 'heggus':
> https://github.com/heggus/Tisean/issues/9
> The solution I thought of was to add an option to the program (similar to
> 'q' in 'more') that would terminate the program and return the latest output
> it had calculated.
> What do you propose to solve this issue?
> :)

Basically this is emulating an event. Instead of terminating the
program you can ask for a handle to a function that will plot/print
the data provided every time in a while (could be another parameter,
something like "ShowEvery" and an integer indicating the number of
iterations to wait before showing a result). This is how it is done in
the odepkg package[1], so you can continue with the calculation but
from time to time update a plot with the current values. How do you
see this?

You could implement this part in an m-file and have a call to the C++
code only to do the calculation.
Some thing like
(assume ShowEvery was given)

while (calculation is not finished)
    L = __calculate_lyap__ (..., ShowEvery);
    print/plot L;

The last argument of calculate_lyap is just indicating how many
iterations should be calculated. This means that at each call all the
necessary data has to be provided. It would be easier if one could
have a reference to the variables being updated, but I do not know if
this is possible (that is updating a plot/print from within the C++
code). I will check and report back.

Also looking at the code...we need to discuss the gram_schmidt in
there. It might be convenient to use qr (but this is just a future
improvement of TISEAN!).

line 280 and so on

reply via email to

[Prev in Thread] Current Thread [Next in Thread]