[Dune] Notification from Dune - quadraturerules.cc
Sreejith Pulloor Kuttanikkad
sreejith at hal.iwr.uni-heidelberg.de
Wed Sep 6 16:16:23 CEST 2006
I am sorry. I got confused by two quadraturerules.cc file one in
grid/common and one in grid/common/quadraturerules
I dont know where should one apply the fix. hope some one knows will fix
it.
fixes:
1)
// polynom degree 1
instead of
G[m][0][0] = 0.3333333333;
G[m][0][1] = 0.3333333333;
use
G[m][0][0] = 0.333333333333333333333333333333333;
G[m][0][1] = 0.333333333333333333333333333333333;
2)
// polynomial degree 7
/* 12 inner Gauss points, positive weights */
instead of
G[m][8][1] = 0.304726500868167195918389047318263;
use
G[m][8][1] = 0.0343243029450971464696306424839376;
and i couldnt find the bug for the order 6 yet.
Sreejith
On Wed, Sep 06, 2006 at 02:57:53PM +0200, Sreejith Pulloor Kuttanikkad wrote:
> Yes, I just found that one y-coord of an integ point in order 7 is
> wrong. I couldnt find anything wrong with the data for order 6 though. I
> shall try to fix it soon.
> thanks for pointing the bug.
>
> cheers,
> Sreejith
>
> On Wed, Sep 06, 2006 at 02:16:04PM +0200, Flyspray wrote:
> > THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
> >
> > A new Flyspray task has been opened. Details are below.
> >
> > User who did this: - ()
> >
> > Attached to Project - Dune
> > Summary - Error in simplex quadrature rules of order 6 and 7
> > Task Type - Bug Report
> > Category - Quadrature
> > Status - Unconfirmed
> > Assigned To -
> > Operating System - All
> > Severity - Medium
> > Priority - Normal
> > Reported Version - SVN
> > Due in Version -
> > Due Date - Undecided
> > Details - This is NOT a duplicate of FS#162!
> > The triangle quadrature rules of order 6 and 7 produce wrong results.
> > This is easily
> > checked by integrating y^p:
> >
> > #include <iostream>
> >
> > #include "dune/config.h"
> > #include "dune/grid/common/quadraturerules.hh"
> >
> > int main()
> > {
> > using namespace Dune;
> >
> > for (int p=0; p<12; ++p) {
> > QuadratureRule<double,2> const& qr =
> > QuadratureRules<double,2>::rule(GeometryType(GeometryType::simplex,2),p);
> > double integ = 0;
> > for (size_t g=0; g<qr.size(); ++g) {
> > FieldVector<double,2> const& x = qr[g].position();
> > double weight = qr[g].weight();
> >
> > // integrating x[0]^p instead yields correct result!
> > // Probably the y-coordinate of an integration point is wrong.
> > integ += weight*std::pow(x[1],p);
> > }
> > double exact = 1.0/((p+2)*(p+1));
> > std::cout.precision(16);
> > std::cout << "p=" << p << " integ=" << integ << " (should be " <<
> > exact << ") error = " << integ-exact << "n";
> > }
> > return 0;
> > }
> >
> > This program produces the following output:
> >
> > p=0 integ=0.5 (should be 0.5) error = 0
> > p=1 integ=0.16666666665 (should be 0.1666666666666667) error =
> > -1.666666804567285e-11
> > p=2 integ=0.08333333333333331 (should be 0.08333333333333333) error =
> > -1.387778780781446e-17
> > p=3 integ=0.05 (should be 0.05) error = 0
> > p=4 integ=0.03333333333333333 (should be 0.03333333333333333) error =
> > 0
> > p=5 integ=0.02380952380952381 (should be 0.02380952380952381) error =
> > 3.469446951953614e-18
> > p=6 integ=0.01788018253696759 (should be 0.01785714285714286) error =
> > 2.303967982473024e-05
> > p=7 integ=0.01389590970262738 (should be 0.01388888888888889) error =
> > 7.020813738494933e-06
> > p=8 integ=0.01111111111111111 (should be 0.01111111111111111) error =
> > 1.734723475976807e-18
> > p=9 integ=0.009090909090909089 (should be 0.00909090909090909) error =
> > -1.734723475976807e-18
> > p=10 integ=0.00757575757575758 (should be 0.007575757575757576) error
> > = 4.336808689942018e-18
> > p=11 integ=0.006410256410256407 (should be 0.00641025641025641) error
> > = -2.602085213965211e-18
> >
> > In particular, order 6 and 7 are quite wrong, but also order 1 seems
> > to be less accurate than
> > one should like.
> >
> > Martin Weiser
> >
> >
> > More information can be found at the following URL:
> > http://hal.iwr.uni-heidelberg.de/flyspray/?do=details&id=174
> >
> > You are receiving this message because you have requested it from the
> > Flyspray bugtracking system. You can be removed from future
> > notifications by visiting the URL shown above.
> >
> >
> > _______________________________________________
> > Dune mailing list
> > Dune at dune-project.org
> > http://www.dune-project.org/cgi-bin/mailman/listinfo/dune
> >
>
> --
> Sreejith P. Kuttanikkad
> IWR, University of Heidelberg
> Room:009, Im Neuenheimer Feld-348
> 69120 Heidelberg,Germany.
> Ph :+49-6221-54-5689/4412(Office)
> :+49-(0)17624228904(Mob)
> http://hal.iwr.uni-heidelberg.de/~sreejith/
> -------------------------------------------
>
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://www.dune-project.org/cgi-bin/mailman/listinfo/dune
>
--
Sreejith P. Kuttanikkad
IWR, University of Heidelberg
Room:009, Im Neuenheimer Feld-348
69120 Heidelberg,Germany.
Ph :+49-6221-54-5689/4412(Office)
:+49-(0)17624228904(Mob)
http://hal.iwr.uni-heidelberg.de/~sreejith/
-------------------------------------------
More information about the Dune
mailing list