octave-patch-tracker
[Top][All Lists]
Advanced

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

[Octave-patch-tracker] [patch #10023] bvp4c and bvpinit


From: anonymous
Subject: [Octave-patch-tracker] [patch #10023] bvp4c and bvpinit
Date: Fri, 19 Feb 2021 03:44:57 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:72.0) Gecko/20100101 Firefox/72.0

Follow-up Comment #1, patch #10023 (project octave):

As stated in the original submission I have now implemented bvp4c (bpv4cfe.m)
using the finite element method. The function is completely vectorized and I
get similar performance to the finite difference method originally submitted.

The implication is the standard finite element method. I used a cubic Hermite
spline as the interpolation function which makes the method a third-order
method rather than a fourth-order method. I assume this choice makes the
interpolated values returned with interp1 using "chip" exact to what the
solver returns. The function and first derivative are continuous everywhere.
The type and order of the interpolation function could be changed with quite a
lot of effort as most of the complexity of the code is to avoid loops,
specifically, the assembly procedure would need to be rewritten. (The looped
version was unbearably slow like the old Lobatto implementation.)

I integrate each element using a five-point Gauss Legendre quadrature rule.
This rule integrates any ninth or lower-order polynomial exactly. The number
of points can be changed by changing the variable nip. I calculate the weights
and positions each time the function is run. This could be hardcoded rather
than calculated if we agree the integration accuracy is appropriate.

I use the same solving and error estimating method I used for the finite
difference method.

Let me know which of the methods:
* Finite Element,
* Finite Difference, or
* neither if we want to use Lobatto IIIA method
to continue developing. If we choose the Lobatto IIIA method I think will need
to be implemented in c++ as I cannot see a way to vectorizes it.

(file #50882)
    _______________________________________________________

Additional Item Attachment:

File name: bvp4cfe.m                      Size:5 KB
    <https://file.savannah.gnu.org/file/bvp4cfe.m?file_id=50882>



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/patch/?10023>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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