bvp4c not implemented in Octave 4.0?

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

bvp4c not implemented in Octave 4.0?

fbarbuto
Otherwise, why am I getting this message?

warning: the 'bvp4c' function is not yet implemented in Octave

Octave 4.0 on Ubuntu 14.04-64.


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: bvp4c not implemented in Octave 4.0?

nrjank

On Wed, Jul 15, 2015 at 10:54 PM, Fausto Arinos de A. Barbuto <[hidden email]> wrote:
Otherwise, why am I getting this message?

warning: the 'bvp4c' function is not yet implemented in Octave

Octave 4.0 on Ubuntu 14.04-64.



just as it says:

>> bvp4c
warning: the 'bvp4c' function is not yet implemented in Octave

Please read `http://www.octave.org/missing.html' to learn how you can
contribute missing functionality.

error: 'bvp4c' undefined near line 1 column 1

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: bvp4c not implemented in Octave 4.0?

nrjank
On Wed, Jul 15, 2015 at 11:05 PM, Nicholas Jankowski <[hidden email]> wrote:

On Wed, Jul 15, 2015 at 10:54 PM, Fausto Arinos de A. Barbuto <[hidden email]> wrote:
Otherwise, why am I getting this message?

warning: the 'bvp4c' function is not yet implemented in Octave

Octave 4.0 on Ubuntu 14.04-64.



just as it says:

>> bvp4c
warning: the 'bvp4c' function is not yet implemented in Octave

Please read `http://www.octave.org/missing.html' to learn how you can
contribute missing functionality.

error: 'bvp4c' undefined near line 1 column 1


I stand corrected. it seems it's in the ODE package.

>> pkg load odepkg
>> help bvp4c

'bvp4c' is a function from the file C:\Octave\octave-4.0.0\share\octave\packages\odepkg-0.8.5\bvp4c.m

 -- Function File: A = bvp4c (ODEFUN, BCFUN, SOLINIT)
     Solves the first order system of non-linear differential equations
     defined by ODEFUN with the boundary conditions defined in BCFUN.

     The structure SOLINIT defines the grid on which to compute the
     solution (SOLINIT.X), and an initial guess for the solution
     (SOLINIT.Y).  The output SOL is also a structure with the
     following fields:
        * SOL.X list of points where the solution is evaluated

        * SOL.Y solution evaluated at the points SOL.X

        * SOL.YP derivative of the solution evaluated at the points
          SOL.X

        * SOL.SOLVER = "bvp4c" for compatibility

     See also: odpkg.


------------------------


not sure why it gives the missing function warning without the package loaded. some flag not get set so it would give the 'belongs to a package not loaded' message?

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: bvp4c not implemented in Octave 4.0?

tmacchant
----- Original Message -----

>From: Nicholas Jankowski 
>To: Fausto Arinos de A. Barbuto 
>Cc: help 
>Date: 2015/7/16, Thu 12:09
>Subject: Re: bvp4c not implemented in Octave 4.0?
>
>
>On Wed, Jul 15, 2015 at 11:05 PM, Nicholas Jankowski  wrote:
>
>
>>
>>On Wed, Jul 15, 2015 at 10:54 PM, Fausto Arinos de A. Barbuto  wrote:
>>
>>Otherwise, why am I getting this message?
>>>
>>>warning: the 'bvp4c' function is not yet implemented in Octave
>>>
>>>Octave 4.0 on Ubuntu 14.04-64.
>>>
>>>
>>
>>
>>
>>just as it says:
>>
>>>> bvp4c
>>warning: the 'bvp4c' function is not yet implemented in Octave
>>
>>Please read `http://www.octave.org/missing.html'; to learn how you can
>>contribute missing functionality.
>>
>>error: 'bvp4c' undefined near line 1 column 1
>>
>
>
>I stand corrected. it seems it's in the ODE package.
>
>
>>> pkg load odepkg
>
>>> help bvp4c
>
>'bvp4c' is a function from the file C:\Octave\octave-4.0.0\share\octave\packages\odepkg-0.8.5\bvp4c.m
>
> -- Function File: A = bvp4c (ODEFUN, BCFUN, SOLINIT)
>     Solves the first order system of non-linear differential equations
>     defined by ODEFUN with the boundary conditions defined in BCFUN.
>
>     The structure SOLINIT defines the grid on which to compute the
>     solution (SOLINIT.X), and an initial guess for the solution
>     (SOLINIT.Y).  The output SOL is also a structure with the
>     following fields:
>        * SOL.X list of points where the solution is evaluated
>
>        * SOL.Y solution evaluated at the points SOL.X
>
>        * SOL.YP derivative of the solution evaluated at the points
>          SOL.X
>
>        * SOL.SOLVER = "bvp4c" for compatibility
>
>     See also: odpkg.
>
>
>------------------------
>
>
>
>not sure why it gives the missing function warning without the package loaded. some flag not get set so it would give the 'belongs to a package not loaded' message?
>
To install odepkg, from octave prompt, execute:
>> pkg install -forge odepkg

Confirm install by:
>> pkg list

To active the package:
>> pkg load odepkg

The package to be auto loaded at octave start-up:
>> pkg rebuild -auto odepkg
Then restart octave and confirm by:
>> pkg list
(Activated package are marked by '*').

bvp4c manual with demonstration.

http://octave.sourceforge.net/odepkg/function/bvp4c.html


HTH

Tatsuro

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: bvp4c not implemented in Octave 4.0?

fbarbuto
I finally found out what the error was. The error was I. I screwed my
own Octave setup. Package installation with "pkg -forge install [...]"
created folders under ~/octave/ and I thought it would be safe to delete
those folders after packages were installed, as those folders would be
locations where those packages would sit temporarily. And as it turns
out they aren't meant to be temporary folders and shouldn't be removed,
ever. I had to install everything over again.

Yet bvp4c is not behaving well. "Demonstration 2" example in the link
you indicated runs for a long time and produces nothing. CTRL-C shows
it was cranking away silently behind the scenes though, without
reaching convergence.


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Fwd: Re: bvp4c not implemented in Octave 4.0?

c.-2
In reply to this post by nrjank
---------- Messaggio inoltrato ----------
Da: "Carlo de Falco" <[hidden email]>
Data: 16/lug/2015 08:07
Oggetto: Re: bvp4c not implemented in Octave 4.0?
A: "Nicholas Jankowski" <[hidden email]>
Cc:


Il 16/lug/2015 05:10, "Nicholas Jankowski" <[hidden email]> ha scritto:
>
> On Wed, Jul 15, 2015 at 11:05 PM, Nicholas Jankowski <[hidden email]> wrote:
>>
>>
>> On Wed, Jul 15, 2015 at 10:54 PM, Fausto Arinos de A. Barbuto <[hidden email]> wrote:
>>>
>>> Otherwise, why am I getting this message?
>>>
>>> warning: the 'bvp4c' function is not yet implemented in Octave
>>>
>>> Octave 4.0 on Ubuntu 14.04-64.
>>>
>>
>>
>> just as it says:
>>
>> >> bvp4c
>> warning: the 'bvp4c' function is not yet implemented in Octave
>>
>> Please read `http://www.octave.org/missing.html' to learn how you can
>> contribute missing functionality.
>>
>> error: 'bvp4c' undefined near line 1 column 1
>
>
>
> I stand corrected. it seems it's in the ODE package.
>
> >> pkg load odepkg
> >> help bvp4c
>
> 'bvp4c' is a function from the file C:\Octave\octave-4.0.0\share\octave\packages\odepkg-0.8.5\bvp4c.m
>
>  -- Function File: A = bvp4c (ODEFUN, BCFUN, SOLINIT)
>      Solves the first order system of non-linear differential equations
>      defined by ODEFUN with the boundary conditions defined in BCFUN.
>
>      The structure SOLINIT defines the grid on which to compute the
>      solution (SOLINIT.X), and an initial guess for the solution
>      (SOLINIT.Y).  The output SOL is also a structure with the
>      following fields:
>         * SOL.X list of points where the solution is evaluated
>
>         * SOL.Y solution evaluated at the points SOL.X
>
>         * SOL.YP derivative of the solution evaluated at the points
>           SOL.X
>
>         * SOL.SOLVER = "bvp4c" for compatibility
>
>      See also: odpkg.
>
>

The bvp4c implementation which I contributed in odepkg is extremely primitive and inefficient it can be seen as nothing else but a stub. If anyone is interested in making it work better I'd be happy to help.
c.


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: bvp4c not implemented in Octave 4.0?

tmacchant
In reply to this post by fbarbuto


----- Original Message -----

> From: Fausto Arinos de A. Barbuto 
> To: help
> Cc:
> Date: 2015/7/16, Thu 13:39
> Subject: Re: bvp4c not implemented in Octave 4.0?
>
> I finally found out what the error was. The error was I. I screwed my
> own Octave setup. Package installation with "pkg -forge install [...]"
> created folders under ~/octave/ and I thought it would be safe to delete
> those folders after packages were installed, as those folders would be
> locations where those packages would sit temporarily. And as it turns
> out they aren't meant to be temporary folders and shouldn't be removed,
> ever. I had to install everything over again.
>
> Yet bvp4c is not behaving well. "Demonstration 2" example in the link
> you indicated runs for a long time and produces nothing. CTRL-C shows
> it was cranking away silently behind the scenes though, without
> reaching convergence.
>
This is just information.


I have run the bvp4c demo on windows 7 (64 bit) using 32 bit octave 4.0.0 with odepkg-0.8.5.
(Intel Corei5 2400, 3.1 GHz, with 4Gbyte memory. (not slow but not fast.))

>> demo bvp4c

Each demo took several minutes but finally got solutions.


As Calro wrote, if you need efficiency, it is necessary to polish the code.


Tatsuro  

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: bvp4c not implemented in Octave 4.0?

Carlo de Falco-2

On 16 Jul 2015, at 09:36, Tatsuro MATSUOKA <[hidden email]> wrote:

> As Calro wrote, if you need efficiency, it is necessary to polish the code.

What bvp4c currently does is just set up the system of nonlinear equations
for the discretized differential problem then let fsolve deal with the solution,
IIRC it doesn't even build a Jacobian. After error estimation the problem is
solved again from scratch on a new grid.

So the solution should be correct but the implementation approach is really not
efficient, the correct algorithm is described in full detail in Shampine's
book so if anyone is interested it should be quite straightforward to implement.

c.
_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: bvp4c not implemented in Octave 4.0?

nrjank
On Thu, Jul 16, 2015 at 4:50 AM, Carlo De Falco <[hidden email]> wrote:

On 16 Jul 2015, at 09:36, Tatsuro MATSUOKA <[hidden email]> wrote:

> As Calro wrote, if you need efficiency, it is necessary to polish the code.

What bvp4c currently does is just set up the system of nonlinear equations
for the discretized differential problem then let fsolve deal with the solution,
IIRC it doesn't even build a Jacobian. After error estimation the problem is
solved again from scratch on a new grid.

So the solution should be correct but the implementation approach is really not
efficient, the correct algorithm is described in full detail in Shampine's
book so if anyone is interested it should be quite straightforward to implement.

c.
_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave


All that said, if the package is released with a functionally correct (even if slow) implementation, Octave should produce the warning:

warning: the 'bvp4c' function belongs to the odepkg package from Octave Forge
which you have installed but not loaded.

I don't know if there's some other appropriate way (perhaps in the help? or a warning when running?) to flash a warning that 'this will work for you, but don't expect much unless you come and help fix it'

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: bvp4c not implemented in Octave 4.0?

Sebastian Schöps
NJank wrote
On Thu, Jul 16, 2015 at 4:50 AM, Carlo De Falco <[hidden email]>
wrote:

>
All that said, if the package is released with a functionally correct (even
if slow) implementation, Octave should produce the warning:
...
The problem should resolve itself. Many routines of odepkg will be merged into core soon and I expect bvp4c to be part of it. Let's see if we can improve Carlo's initial version until then. However, volunteers are welcome.

Sebastian