[Dune] Strange code in testbasicgeometry.cc

Jö Fahlke jorrit at jorrit.de
Wed May 2 12:56:31 CEST 2012


Am Wed,  2. May 2012, 12:03:38 +0200 schrieb Oliver Sander:
> Dear Dune,
> when looking at the file testbasicgeometry.cc, I found the following
> code right at the top:
> 
> template <class TestGeometry>
> void testBasicGeometry(const TestGeometry& geometry,
>                        typename TestGeometry::ctype expectedVolume,
>                        bool expectedAffine, int &result)
> {
>     typedef typename TestGeometry::ctype ctype;
> 
>     if(expectedVolume == expectedVolume) {
> 
> 
> That looks strange to me.  What is the purpose of that last line?
> (Please don't tell me we are piping NaN into this to switch of
> the test?)

Yes we are.  I wasn't able to calculate an expected volume for all geometries
that are tested, and for some geometries it is difficult for the volume()
method to compute a precise volume.  setting expected-volume=NaN means don't
check the volume but only the other stuff.  See also FS#870.

Bye,
Jö.

-- 
Jorrit (Jö) Fahlke, Interdisciplinary Center for Scientific Computing,
Heidelberg University, Im Neuenheimer Feld 368, D-69120 Heidelberg
Tel: +49 6221 54 8890 Fax: +49 6221 54 8884

featured product: Debian GNU/Linux - http://www.debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
URL: <https://lists.dune-project.org/pipermail/dune/attachments/20120502/4ca01279/attachment.sig>


More information about the Dune mailing list