[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Switching default integrator for multiple variable to quadcc
From: |
Daniel J Sebald |
Subject: |
Re: Switching default integrator for multiple variable to quadcc |
Date: |
Sun, 20 Jan 2013 00:00:02 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Thunderbird/3.1.16 |
On 01/19/2013 05:14 PM, twinclouds wrote:
@Rik
I don't know if this is related to the problem I am having right now. When
I use Octave 3.2.4, the integration is pretty fast. The only problem is
when the area gets too large, i.e., most area are zeros, it shows "warning:
quadgk: non-finite integrand encountered." When I use Octave 3.6.3, I don't
have this problem but it gets very slow, from a few seconds to a few
minutes. I would like to change the default integrator but don't know how
to. Add the name of the integrator as the last argument of dblquad yields
all sorts of errors. Any suggestions?
Twinclouds,
The change that Rik made is in the scripts portion of the source tree.
The latest source code can be found here:
http://hg.savannah.gnu.org/hgweb/octave/file/d56dd6794a20/scripts/general
There are a small number of related changesets associated with Rik's mod
in this log (search CNTRL-F for "dbl"):
http://hg.savannah.gnu.org/hgweb/octave/shortlog/68a59630798d
The most relevant changeset is here:
http://hg.savannah.gnu.org/hgweb/octave/rev/eb4afb6a1a51
which should give a good idea of the changes Rik made and what you can
do if you want to make changes. (Start by getting the most recent
version and go from there.)
...
I'm curious how the error you describe is coming about. "Non-finite
integrand" suggests your function might have a singularity somewhere.
If you are integrating through a singularity, that might be where the
slowness is coming from. But you described an integrand with a lot of
negligible area--that sort of thing is usually not a problem for
adaptive integrators and runs pretty fast. Discontinuities and
singularities are typically where numerical integration slows down and
often breaks with poor accuracy. Some tricks you can try is that if you
know where there is a singularity or discontinuity, the problem can be
broken up into multiple sections.
Dan
--
View this message in context:
http://octave.1599824.n4.nabble.com/Switching-default-integrator-for-multiple-variable-to-quadcc-tp3458252p4648990.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.
--
Dan Sebald
email: daniel(DOT)sebald(AT)ieee(DOT)org
URL: http://www(DOT)dansebald(DOT)com