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

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

[Octave-bug-tracker] [bug #52074] Missing integration functions integral


From: David Bateman
Subject: [Octave-bug-tracker] [bug #52074] Missing integration functions integral2, integral3
Date: Tue, 10 Oct 2017 11:20:16 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #19, bug #52074 (project octave):

Nicolas,

As discussed offline, it would be good to have an implementation of quad2d. In
fact the tiled code integral2 is the code needed for the quad2d function. So
it would be a good idea to split this code out into a seperate quad2d
function. With the attached files I've done this and made a couple of other
changes

* Added the edge singularity weakening transforms to the quad2d and  make it
the default, as is the case for matlabs quad2d function. Though Shampine's
TwoD function by default didn't use these transforms. As we're using a higher
order Gauss-Kronrod rule than Shampine, the order reduction of the rule
imposed by the transform will cost little in terms of iterations, so its
better to leave it on as the default
* Added the 'FailurePlot' option. This option is also present in the matlab
version and allows the areas that need refinement in unconverged quadratures
to be plotted.
* Increased the local tolerance needed for each region. I was off by 4 in my
original code as I forgot to divide the local tolerance after splitting the
zone under consideration into 4 zones. Also Shampine suggests that the local
tolerance should be lower than the global tolerance to avoid problems. He
suggested a factor of 8. So I've effectivement increased the local tolerance
by a factor of 32.
* removed the test for "vecorized" equals true, as it doesn't create an error,
but rather bizarre results due to the matrix-matrix product used in the kernel
of the integral
* Added the integral3 function as a quadcc over the equivalent of an integral2
function call.

The functions quad2d, integral2 and integral3 are attached.

(file #42111, file #42112, file #42113)
    _______________________________________________________

Additional Item Attachment:

File name: quad2d.m                       Size:15 KB
File name: integral2.m                    Size:11 KB
File name: integral3.m                    Size:11 KB


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?52074>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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