I have not written a post for a while because I have had some health issues.

During the first two weeks of GSoC I have worked on Autotools and I have compiled

**Octave with link to SUNDIALS**. The first step for doing this was to check the presence and usability of ida.h in configure.ac, so I used the macro OCTAVE_CHECK_LIB which also sets the flags CPPFLAGS, LDFLAGS and LIBS. Then I set the right configuration variables in the build-aux folder and modified build-env namespace. Finally I wrote a dld-function which includes ida.h and calls the function IDACreate from SUNDIALS which returns a pointer to the IDA memory structure.

This dld-function generates an oct-file which can be executed from Octave.

All these changes are visible in my public repository on

**Bitbucket**:

https://bitbucket.org/Francesco_Faccio/octave

In the next few days I will further investigate the recursive dependencies of SUNDIALS and their license and set up the correct build flags for such dependencies, I will write more tests in configure.ac in order to check the availability of functions and headers of the library.

After discussing with mentors we decided to start the implementation of

**ode15i**because it's more close to IDA and more general than ode15s. Once ode15i will be written,

**ode15s**will be built around it.

We have also decided which are the next steps before midterm evaluation:

- implement a
**minimal .oct wrapper for IDA**in Octave with a primitive interface such as**$[t , y] = ode15i (odefun, tspan, y0, yp0, Jacobian)$**

that invokes IDA with all options set to default values - use two benchmark problems to
**test the correctness and speed of the code**:

I will compare it with the C implementation of SUNDIALS and with the m-file implementation relying on the mex interface of SUNDIALS

As benchmark problems we have chosen two examples which deal with dense and sparse methods.

The first one regards

**Robertson chemical kinetics problem**, in which differential equations are given for species $y_{1}$ and $y_{2}$ while an algebraic equation determines $y_{3}$. The equations for the species concentrations $y_{i}(t)$ are:

\begin{eqnarray*} \begin{cases} y_{1}^{'} = -0.04y_{1} + 10^{4}y_{2}y_{3} \\ y_{2}^{'} = 0.04y_{1} - 10^{4}y_{2}y_{3} - 3\cdot 10^{7}y_{2}^{2} \\ 0 = y_{1} + y_{2} + y_{3} - 1 \end{cases} \end{eqnarray*}

The initial values are taken as $y_{1} = 1$, $y_{2} = 0$ and $y_{3} = 0$. This example computes the three concentration components on the interval from $t = 0$ through $t = 4\cdot 10^{10}$.

This is the

**plot of the solution**(the value of $y_{2}$ is multiplied by a factor of $10^{4}$).

**Dense methods**of IDA are applied for solving this problem.

The second problem is a

**$2D$ heat equation**, semidiscretized to a DAE. The DAE system arises from the Dirichlet boundary condition $u = 0$, along with the differential equations arising from the discretization of the interior of the region.

The domain is the unit square $\Omega = \{0 \leq x, y \geq 1\}$ and the equations solved are:

## Nessun commento:

## Posta un commento