

,
,
,
and
are deterministic known functions. The system is subject to terminal conditions
and 
.

and 
. This means that instead of obtaining only one solution for
and
(which can be transformed to
and
), I have to obtain several solutions
and
for each
. Once I have them all, I will have
and
surfaces or, equivalently,
and
, which I will be able to interpolate.--
You received this message because you are subscribed to the Google Groups "wasora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wasora+un...@seamplex.com.
To post to this group, send email to was...@seamplex.com.
Visit this group at https://groups.google.com/a/seamplex.com/group/wasora/.
To view this discussion on the web visit https://groups.google.com/a/seamplex.com/d/msgid/wasora/35313D84-72DD-4E28-AD5B-EE70C9A0C1E5%40gmail.com.
For more options, visit https://groups.google.com/a/seamplex.com/d/optout.
On 1May, 2019, at 06:45, Jeremy Theler <jer...@seamplex.com> wrote:
Ramiro, when you have time take a look at the new SUNDIALS 3.xThey allow for choosing the linear solver to approximate the nonlinear solution.Maybe tweaking that kind of stuff will lead to faster solutions.There are also SUNDIALS 4.x and even an alpha 5.xWhen you do take a look, merge your code into wasora!--jeremyOn Wed, 2019-04-24 at 15:58 -0300, Jeremy Theler wrote:
So this is about speed, not about the possibility to solve the equations with wasora, right?First, it seems that this equation can be solved with wasora using an input file (i.e. no external coding).If you do that, can you add your input file to the examples directory?Then, about speed. If you really need to solve this many times as fast as possible, do not guess but profile before optimizing.Use valgrind and kcachegrind to profile. My guess (as I think it its yours) is that the bottle neck would be the evaluation of the residual.If you confirm that, replace the general evaluation of the residual with a hard-coded version of the ODEs.I think that is the fastsest thing you can do.Second, instead of using IDA try KINSOL. The first one is for DAEs and the second one is for ODEs. Being more particular, maybe it would be faster too.Third, I only tested wasora with SUNDIALS v2.x and now they are in v4.x. I think the API changed, so I would suggest you try to compile wasora against the newest version (and push the fixeds!)--jeremyOn Fri, 2019-04-19 at 19:38 -0300, Ramiro Vignolo wrote:
Hi all! It's been a while...
As you may recall, sometimes I come around and ask for your help in some kind of, what I think, is a nice problem. The last time was about a puzzle (which I have solved XD).
Let's focus on today's problem. I have to solve the following system of Riccati ODEs:
<send-math-email_6162.png>
<send-math-email_6163.png>
where <send-math-email_6183.png>, <send-math-email_6128.png>, <send-math-email_6184.png>, <send-math-email_6185.png> and <send-math-email_6165.png> are deterministic known functions. The system is subject to terminal conditions <send-math-email_6160.png> and <send-math-email_6166.png>
In wasora, this problem can be solved by changing the terminal conditions to initial conditions with a change of variable <send-math-email_6167.png>.
In that context, the Riccati system becomes:
<send-math-email_6186.png>
<send-math-email_6169.png>
subject to initial conditions:
<send-math-email_6170.png> and <send-math-email_6171.png>
In reality, I have to solve this system several times, for different values of <send-math-email_6172.png>. This means that instead of obtaining only one solution for <send-math-email_6173.png> and <send-math-email_6174.png> (which can be transformed to <send-math-email_6175.png> and <send-math-email_6176.png>), I have to obtain several solutions <send-math-email_6177.png> and <send-math-email_6178.png> for each <send-math-email_6172.png>. Once I have them all, I will have <send-math-email_6179.png> and <send-math-email_6180.png> surfaces or, equivalently, <send-math-email_6181.png> and <send-math-email_6182.png>, which I will be able to interpolate.
Now that I have explained the problem, I would like to ask you how should I code this problem internally in wasora. Should I follow the steps that wasora performs when I use an input with these DAEs? Do you think there is a faster way to solve the system?
Of course, I am very familiar with wasora and once I follow the IDA steps it performs I will be able to code this properly, but I wanted to check with you for better ideas.
Thanks and have a nice weekend!
Rami
--
You received this message because you are subscribed to the Google Groups "wasora" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wasora+un...@seamplex.com.
To post to this group, send email to was...@seamplex.com.
Visit this group at https://groups.google.com/a/seamplex.com/group/wasora/.
To view this discussion on the web visit https://groups.google.com/a/seamplex.com/d/msgid/wasora/9319ee5e9da12ab98f40e5949f34106817d9079c.camel%40seamplex.com.
To view this discussion on the web visit https://groups.google.com/a/seamplex.com/d/msgid/wasora/C55156F4-1B2C-44EF-B4F8-5CCF7D17C090%40gmail.com.
To view this discussion on the web visit https://groups.google.com/a/seamplex.com/d/msgid/wasora/CAK0Liy%3DrpfTvF0Q-ctK%3DaxgcT7LrmJV08PRyysd1qkPPrT9f5A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/seamplex.com/d/msgid/wasora/40ED81CF-BA3B-47D8-87C6-7AA0527F2478%40gmail.com.
To view this discussion on the web visit https://groups.google.com/a/seamplex.com/d/msgid/wasora/CAK0LiykBn4hfbZp9w%3DUMGF5H%3D4%2BTXsb8uPbpqbofYON_y7xgPQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/seamplex.com/d/msgid/wasora/7441EE60-EA55-4C4A-AAFA-FB2D1297C139%40gmail.com.