[Dune] gridcheck.cc : Integral over outer normals is not always zero.

Christian Engwer christian.engwer at uni-muenster.de
Thu Mar 19 09:01:06 CET 2015


    const Dune::QuadratureType::Enum qt = Dune::QuadratureType::GaussLegendre;
    const Dune::QuadratureRule< ctype, Intersection::mydimension > &quadrature
      = Dune::QuadratureRules< ctype, Intersection::mydimension >::rule( intersection.type(), 3, qt );
    for( std::size_t i = 0; i < quadrature.size(); ++i )
      sumNormal.axpy( quadrature[ i ].weight(), intersection.integrationOuterNormal( quadrature[ i ].position() ) );

The test currently requests a 3rd order quadrature rule. I guess in your case this is not sufficcient, so you could simply increase the order and check again.

Christian

On Thu, Mar 19, 2015 at 08:46:24AM +0100, Aleksejs Fomins wrote:
> Dear Martin,
> 
> Thank you for your reply. I am using a volume grid. I misunderstood the warning. The confusion came from the fact that I use curvilinear elements, not a curvilinear 2D world, so I was puzzled as of how the curvature of the elements can affect the divergence theorem, and of course it can't.
> 
> So far my normals seemed fine, I was able to calculate the integral in Gauss theorem.
> 
> I will replicate this exact normal integral test, and if it passes, I will report a bug.
> 
> Thanks,
> Aleksejs
> 
> 
> On 18/03/15 20:26, Martin Nolte wrote:
> > Hi Aleksejs,
> > 
> > the divergence theorem only holds for volumes, not for surfaces. On a surface, the surface integral over all normals equals the integral over the mean curvature. And this is exactly what the message states: In case of a surface grid, the integral might be non-zero if the mean curvature of is nonzero.
> > 
> > If you encounter this message for a volume grid (i.e., a grid with dimgrid = dimworld), then something went wrong. In this case, the divergence theorem holds and, as you stated, the surface integral over all normals should be zero. Apart from a bug in your normal implementation, this might also result from an insufficient quadrature order. Would you consider filing a bug report in the latter case?
> > 
> > Best,
> > 
> > Martin
> > 
> > PS: I am merely the author of the warning, not of the test. Originally, the test simply failed for surface grids with element geometries of nonzero mean curvature (which is plain wrong).
> > 
> > On 03/18/2015 04:23 PM, Aleksejs Fomins wrote:
> > Dear Dune,
> > 
> > When running the gridcheck.cc I notice I encounter the following warning:
> > 
> > -- Checking Intersection Iterator
> > Warning: Integral over outer normals is not always zero.
> >           This behaviour may be correct for entities with nonzero curvature.
> > Warning: Integral over outer normals is not always zero.
> >           This behaviour may be correct for entities with nonzero curvature.
> > 
> > Could the person who wrote this test please explain what this means.
> > 
> > I assume that this refers to the integral Int(vec{n} dS) over the surface of an element.
> > If this is indeed the case, then this integral should be zero by divergence theorem.
> > In particular, could you explain the case in which the integral would not be zero
> > 
> > Greetings,
> > Aleksejs
> >>
> >> _______________________________________________
> >> Dune mailing list
> >> Dune at dune-project.org
> >> http://lists.dune-project.org/mailman/listinfo/dune
> >>
> > 
> 
> _______________________________________________
> Dune mailing list
> Dune at dune-project.org
> http://lists.dune-project.org/mailman/listinfo/dune
> 

-- 
Prof. Dr. Christian Engwer 
Institut für Numerische und Angewandte Mathematik
Fachbereich Mathematik und Informatik der Universität Münster
Einsteinstrasse 62
48149 Münster

E-Mail	christian.engwer at uni-muenster.de
Telefon	+49 251 83-35067
FAX		+49 251 83-32729




More information about the Dune mailing list