From: Ray Durrants on 14 Mar 2010 23:36 I've been searching for a 2-D quadrature that uses nodes and weights to evaluate an integral over a certain interval but I'm not having much luck. There seem to be plenty of 1-D quadratures with nodes and weights that can solve int(f(x),x) but not very many 2-D quadratures that can solve int(f(x,y),x,y) At the moment, I'm using quad2d function but it's fairly slow and I want to be able to vectorise it so I can solve for multiple sets of intervals at the same time. Could someone recommend one?
From: Michael Hosea on 15 Mar 2010 00:33 Well, QUAD2D uses a tensor product of 1-D quadrature rules (weights and nodes). You can always do that, but what I'd like to know first is why you say QUAD2D is "fairly slow"? What are you comparing against? Why is it slow? Is your problem highly oscillatory? Using a higher order method may help. Singular? A change of variables might help. Are there some particular trouble spots where it is spending most of its time? It's hard to know which direction to go in without more information. -- Mike "Ray Durrants" <ray.durrants(a)gmail.com> wrote in message news:hnk9v2$pi0$1(a)fred.mathworks.com... > I've been searching for a 2-D quadrature that uses nodes and weights to > evaluate an integral over a certain interval but I'm not having much luck. > > There seem to be plenty of 1-D quadratures with nodes and weights that can > solve int(f(x),x) but not very many 2-D quadratures that can solve > int(f(x,y),x,y) > > At the moment, I'm using quad2d function but it's fairly slow and I want > to be able to vectorise it so I can solve for multiple sets of intervals > at the same time. > > Could someone recommend one?
|
Pages: 1 Prev: Adding system fonts not currently supported Next: Inline LaTeX Equations in HTML Publish... |