<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>Hi Martin,</p>
<p>I turned on the dune assertion but I have no interruption using dune 2.3</p>
<p>I tried to build my code using dune 2.4.1 and dune-subgrid r424 but dunecontrol tells me that it cannot find a configuration file for sune-subgrid.</p>
<p>Is there a way to avoid this build error?</p>
<p>Thanks</p>
<br>
Bests,
<div>Marco<br>
<div style="color: rgb(0, 0, 0);">
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Da:</b> Marco Cisternino <marco.cisternino@optimad.it><br>
<b>Inviato:</b> mercoledì 1 giugno 2016 16.01<br>
<b>A:</b> Martin Nolte; Dune<br>
<b>Oggetto:</b> Re: [Dune] Intersection area and corners</font>
<div> </div>
</div>
<div>
<div id="divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>Hi Martin,</p>
<p>I have a restart procedure, but I try to give the simplest version of the code reproducing the error.</p>
<p>However, I'll try to rebuild dune with assertion in order to see if even with dune 2.3 I have the same assertion interruption.</p>
<p>I'll try to move to 2.4, but I need to say if the dune-subgrid di compatible with this version, because I need it.</p>
<p>Did you need to change a lot of things in my code to run with dune 2.4?</p>
<p>What do you mean with bugs in initialization order??</p>
<p>Thanks a lot for your help.</p>
<br>
Marco<br>
<div style="color:rgb(0,0,0)">
<div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Da:</b> Martin Nolte <nolte@mathematik.uni-freiburg.de><br>
<b>Inviato:</b> mercoledì 1 giugno 2016 12.29<br>
<b>A:</b> Dune<br>
<b>Oggetto:</b> Re: [Dune] Intersection area and corners</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt">
<div class="PlainText">Hi Macro,<br>
<br>
I ported you code to the master branch (which was not too painful). For me,<br>
the program results in an assertion (see output below), so I cannot reproduce<br>
your bug.<br>
<br>
Unfortunately, your "small example" is really huge (> 4000 lines of code).<br>
This is quite a problem, because I have to understand (and trust) your example<br>
code, before I can start hunting bugs in GeometryGrid. At the moment, I do<br>
neither understand the code, nor do I trust it (my compiler spat out a ton of<br>
warnings, including bugs in initialization order). It also seems to me that<br>
the code can be further reduced.<br>
<br>
Another problem is that the code runs quite some time in debug mode (to<br>
compute some parametrizations). Couldn't they be precompiled offline (on your<br>
machine) and be shipped as data?<br>
<br>
To be honest, I am a bit at a loss how to help you. We're not supporting 2.3<br>
anymore (since 2.4 is released) and I cannot reproduce your bug in the master<br>
branch. Instead I get a curious assertion, which indicates you are<br>
dereferencing an end intersection iterator.<br>
<br>
Best,<br>
<br>
Martin<br>
<br>
PS: This is the output I get:<br>
<br>
Hello World! This is intersectionBug.<br>
I am rank 0 of 1 processes!<br>
Starting folder selection...<br>
The folder exists. With write permissions.<br>
The folder exists. With write permissions.<br>
End of folder selection...<br>
The number of element parameters is: 0<br>
The number of vertex parameters is: 0<br>
Has boundary parameters? 1<br>
4018 vertices read.<br>
0 is the size of vtxParams_<br>
1920 elements read: 0 simplices, 0 pyramids, 0 prisms, 1920 cubes.<br>
0 is the size of elParams_<br>
WARNING (ignored): Could not open file 'alugrid.cfg', using default values 0 <<br>
[balance] < 1.2, partitioning method 'ALUGRID_SpaceFillingCurve(9)'.<br>
<br>
You are using DUNE-ALUGrid, please don't forget to cite the paper:<br>
Alkaemper, Dedner, Kloefkorn, Nolte. The DUNE-ALUGrid Module, 2016.<br>
<br>
Created parallel ALUGrid<3,3,cube,nonconforming> from macro grid file<br>
'testgrid2'.<br>
<br>
Computing parametrizations...<br>
End of parametrizations computation...<br>
intersectionBug:<br>
/home/nolte/numerics/master/dune-alugrid/dune/alugrid/3d/topology.hh:201:<br>
static int Dune::ElementTopologyMapping<type>::dune2aluFace(int) [with<br>
Dune::ALU3dGridElementType type = (Dune::ALU3dGridElementType)7u]: Assertion<br>
`index >= 0 && index < numFaces' failed.<br>
Aborted<br>
<br>
<br>
On 05/30/2016 07:14 PM, Marco Cisternino wrote:<br>
> Hi Martin,<br>
> <br>
> I found where the error is produced:<br>
> <br>
> <br>
> it is exaclty in dune/grid/geometrygrid/cornerstorage.hh in the<br>
> IntersectionCoordVector method <br>
> <br>
> template< std::size_t size ><br>
> void calculate ( array< Coordinate, size > (&corners) ) const<br>
> <br>
> Here corners are computed by using<br>
> <br>
> corners[ i ] = elementGeometry_.global( hostLocalGeometry_.corner( i ) )<br>
> <br>
> <br>
> hostLocalGeometry_.corner( i ) gives the right coordinates in reference<br>
> element of corner i of the intersection, but the global() method gives the<br>
> wrong result<br>
> <br>
> In global() method this statement is used to compute the return <br>
> mapping_->global( local )<br>
> <br>
> if the mapping is affine (and this is the case) the method starts from<br>
> physical position of 0-corner of the element and compute the position of the<br>
> current corner by<br>
> jacobianTransposed_.umtv( local, global )<br>
> <br>
> this is where the error is made: local is right and input global too, but<br>
> for only one element, namely element 43 and for only 2 corner, namely<br>
> {0,1,1}, i.e. corner 6 ,and {1,1,1}, i.e. corner 7 the results is wrong<br>
> I would say wrong jacobian but it works fine for all the other 6 corner of the<br>
> element (and the algorithm to compute it works for all the other intersections<br>
> in the grid!!)<br>
> <br>
> Let me remark that elementGeometry_ member in IntersectionCoordVector has the<br>
> right physical corners relatives to {0,1,1}, i.e. corner 6 ,and {1,1,1}, i.e.<br>
> corner 7. So, it is a little bit weird to recompute intersection corners<br>
> starting from corner 0, instead of using corners stored in elementGeometry_.<br>
> Could you explain me why you chose this way?<br>
> <br>
> Thanks for any help!<br>
> Bests,<br>
> <br>
> Marco<br>
> <br>
> <br>
> ------------------------------------------------------------------------------<br>
> *Da:* Marco Cisternino <marco.cisternino@optimad.it><br>
> *Inviato:* venerdì 27 maggio 2016 19.13<br>
> *A:* Martin Nolte; Dune<br>
> *Oggetto:* Re: [Dune] Intersection area and corners<br>
> <br>
> <br>
> Hi Martin,<br>
> <br>
> I prepared the smallest case I could do.<br>
> <br>
> It is a bit slow because of the computation of the element parametrizations.<br>
> <br>
> It will print at stdout the corners of the element (index 43) having the sick<br>
> intersection from the geometry grid and from the host one and the corners of<br>
> the sick intersection from both grids.<br>
> <br>
> The intersection has index 3 in this element.<br>
> <br>
> As you can see in the geometry grid case corners 0 and 1 of the intersection<br>
> are not at the same position of corners 6 and 7 of the element.<br>
> <br>
> In the case of the host grid everything works fine.<br>
> <br>
> I would no say the bug is in dune, but I cannot understand why the<br>
> intersection is not coherent with its element.<br>
> <br>
> It is not evident from this code but the neighbour through this intersection<br>
> is not coherent too. Its index is 1025.<br>
> <br>
> <br>
> I remark that using the leaf mapper of the geometry grid crashes the run<br>
> giving segmantation fault, see line 142 of intersectionBug.cc.<br>
> All the test I made are serial.<br>
> <br>
> If you need more feel free to ask.<br>
> Thanks for your help,<br>
> <br>
> Marco<br>
> ------------------------------------------------------------------------------<br>
> *Da:* Marco Cisternino <marco.cisternino@optimad.it><br>
> *Inviato:* giovedì 26 maggio 2016 14.12<br>
> *A:* Martin Nolte; Dune<br>
> *Oggetto:* Re: [Dune] Intersection area and corners<br>
> <br>
> <br>
> Hi Martin,<br>
> <br>
> I'll try to set up a small example.<br>
> <br>
> The weird thing is that I have 2k elements in my coarse grid and this problem<br>
> occurs for only 1 intersection. That's why I would like to see how the<br>
> intersection is built, in order to understand if my code wrongly changes that<br>
> intersection object.<br>
> <br>
> Thanks.<br>
> <br>
> <br>
> Marco<br>
> <br>
> <br>
> <br>
> ------------------------------------------------------------------------------<br>
> *Da:* Martin Nolte <nolte@mathematik.uni-freiburg.de><br>
> *Inviato:* mercoledì 25 maggio 2016 17.47<br>
> *A:* Dune<br>
> *Oggetto:* Re: [Dune] Intersection area and corners<br>
> <br>
> Hi Marco,<br>
> <br>
> the intersection of GeometryGrid is based on the intersection of the host<br>
> grid. Then, you use the geometryInInside and the element geometry (of the<br>
> inside element) to build the global geometry of the intersection. So, in a<br>
> conforming situation, the corners of the intersection should be a subset of<br>
> the corners of the inside element.<br>
> <br>
> Therefore, I consider your question a bug. Can you provide a small example?<br>
> <br>
> Best,<br>
> <br>
> Martin<br>
> <br>
> On 05/25/2016 03:59 PM, Marco Cisternino wrote:<br>
>> Thank you Martin for your quick reply.<br>
>> <br>
>> No, for the configuration I'm debugging I'm not dealing with non-conforming<br>
>> elements. That's why I cannot really understand why intersection and element<br>
>> are not coherent.<br>
>> <br>
>> How the intersection is built? I could look in the constructor to see why its<br>
>> corners are not among the element corners.<br>
>> <br>
>> Thanks again<br>
>> <br>
>> <br>
>> Marco<br>
>> <br>
>> <br>
>> <br>
>> <br>
>> ------------------------------------------------------------------------------<br>
>> *Da:* Martin Nolte <nolte@mathematik.uni-freiburg.de><br>
>> *Inviato:* mercoledì 25 maggio 2016 11.00<br>
>> *A:* Dune<br>
>> *Oggetto:* Re: [Dune] Intersection area and corners<br>
>> <br>
>> Hi Marco,<br>
>> <br>
>> I am not sure whether I get your question correctly. You seem to be comparing<br>
>> the geometry of the inside element to the geometry of the intersection.<br>
>> <br>
>> This is only reasonable, if the intersection is conforming. Otherwise I expect<br>
>> the corners to be different. Is it possible, that your intersection is<br>
>> non-conforming?<br>
>> <br>
>> Please note the using GeometryGrid with non-conforming grid views is a bit<br>
>> problematic. Basically you are creating a first order Lagrange function over a<br>
>> non-conforming grid. If you don't constrain hanging nodes, the position of a<br>
>> hanging node might not be on the edge of the bigger element but slightly moved.<br>
>> <br>
>> You might also want to have a look at the following merge request:<br>
>> <br>
>> <a href="https://gitlab.dune-project.org/core/dune-grid/merge_requests/60" id="LPlnk577560">
https://gitlab.dune-project.org/core/dune-grid/merge_requests/60</a>
<div id="LPBorder_GT_14647894220340.24442784152621178" style="margin-bottom:20px; overflow:auto; width:100%; text-indent:0px">
<table id="LPContainer_14647894220310.623919944737491" cellspacing="0" style="width:90%; overflow:auto; padding-top:20px; padding-bottom:20px; margin-top:20px; border-top-width:1px; border-top-style:dotted; border-top-color:rgb(200,200,200); border-bottom-width:1px; border-bottom-style:dotted; border-bottom-color:rgb(200,200,200); background-color:rgb(255,255,255)">
<tbody>
<tr valign="top" style="border-spacing:0px">
<td id="ImageCell_14647894220320.45859950226699975" colspan="1" style="width:250px; display:table-cell; padding-right:20px">
<div id="LPImageContainer_14647894220320.9515289751497538" style="height:128px; margin:auto; display:table; width:128px; background-color:rgb(255,255,255)">
<a id="LPImageAnchor_14647894220320.9063460087235873" href="https://gitlab.dune-project.org/core/dune-grid/merge_requests/60" target="_blank" style="display:table-cell; text-align:center"><img width="128" height="128" style="display:inline-block; margin-left:auto; margin-right:auto; max-width:250px; max-height:250px; height:128px; width:128px; border-width:0px; vertical-align:bottom" src="https://gitlab.dune-project.org/assets/gitlab_logo-cdf021b35c4e6bb149e26460f26fae81e80552bc879179dd80e9e9266b14e894.png"></a></div>
</td>
<td id="TextCell_14647894220330.2736636743457126" colspan="2" style="vertical-align: top; padding: 0px; display: table-cell; position: relative;">
<div id="LPRemovePreviewContainer_14647894220330.7482703906662376"></div>
<div id="LPTitle_14647894220330.6838405581171134" style="top:0px; color:rgb(108,139,56); font-weight:normal; font-size:21px; font-family:wf_segoe-ui_light,'Segoe UI Light','Segoe WP Light','Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; line-height:21px">
<a id="LPUrlAnchor_14647894220330.8546858264223591" href="https://gitlab.dune-project.org/core/dune-grid/merge_requests/60" target="_blank" style="text-decoration:none">Bugfix/geometrygrid various (!60) · Merge Requests · Core Modules / dune-grid</a></div>
<div id="LPMetadata_14647894220330.5253780797699621" style="margin:10px 0px 16px; color:rgb(102,102,102); font-weight:normal; font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; font-size:14px; line-height:14px">
gitlab.dune-project.org</div>
<div id="LPDescription_14647894220340.052649900933776195" style="display:block; color:rgb(102,102,102); font-weight:normal; font-family:wf_segoe-ui_normal,'Segoe UI','Segoe WP',Tahoma,Arial,sans-serif; font-size:14px; line-height:20px; max-height:100px; overflow:hidden">
Grid Interface and Implementations</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
> <<a href="https://gitlab.dune-project.org/core/dune-grid/merge_requests/60">https://gitlab.dune-project.org/core/dune-grid/merge_requests/60</a>><br>
> <br>
> Bugfix/geometrygrid various (!60) · Merge Requests · Core Modules / dune-grid<br>
> <<a href="https://gitlab.dune-project.org/core/dune-grid/merge_requests/60">https://gitlab.dune-project.org/core/dune-grid/merge_requests/60</a>><br>
> gitlab.dune-project.org<br>
> Grid Interface and Implementations<br>
> <br>
> <br>
> <br>
>> <<a href="https://gitlab.dune-project.org/core/dune-grid/merge_requests/60">https://gitlab.dune-project.org/core/dune-grid/merge_requests/60</a>><br>
>> <br>
>> Bugfix/geometrygrid various (!60) · Merge Requests · Core Modules / dune-grid<br>
>> <<a href="https://gitlab.dune-project.org/core/dune-grid/merge_requests/60">https://gitlab.dune-project.org/core/dune-grid/merge_requests/60</a>><br>
>> gitlab.dune-project.org<br>
>> Grid Interface and Implementations<br>
>> <br>
>> <br>
>> <br>
>> <br>
>> It deals with normals in non-conforming grids, which might also be buggy in<br>
>> DUNE 2.3.<br>
>> <br>
>> Best,<br>
>> <br>
>> Martin<br>
>> <br>
>> On 05/25/2016 10:44 AM, Marco Cisternino wrote:<br>
>>> Good morning,<br>
>>> I have a problem with one intersection in my dune application.<br>
>>> The area I get is not what I expect.<br>
>>> So I tried to look inside the Intersection object using gdb<br>
>>> It is important to say that my grid is a GeometryGrid with a DiscreteFunction to parametrize the elements.<br>
>>> <br>
>>> If I look at these two things:<br>
>>> <br>
>>> - *(in.real.insideGeo_.mapping_)<br>
>>> - *(iGeo.realGeometry.mapping_)<br>
>>> <br>
>>> where the in variable type is <br>
>>> GeometryGrid::LeafGridView::IntersectionIterator::Intersection<br>
>>> and iGeo is <br>
>>> GeometryGrid::LeafGridView::IntersectionIterator::Intersection::Geometry<br>
>>> <br>
>>> I see different corners stored in. I mean two of the 4 corners given by *(iGeo.realGeometry.mapping_) are different from the two correspondant corners given by *(in.real.insideGeo_.mapping_). All the other corners are the same.<br>
>>> <br>
>>> If I compute the intersection area using corners given by *(in.real.insideGeo_.mapping_), I get the right area. On the other hand, if I compute the intersection area using the corners given by *(iGeo.realGeometry.mapping_), the area is wrong.<br>
>>> <br>
>>> I want to specify that the corners given by *(in.real.insideGeo_.mapping_) are the same I get using e.geometry().corners(i) where e is of type<br>
>>> GeometryGrid::LeafGridView::template Codim<0>::template Partition<Dune::InteriorBorder_Partition>::Iterator::Entity<br>
>>> <br>
>>> Could anyone help me please? Am I doing something wrong?<br>
>>> Ask for more details if you need.<br>
>>> <br>
>>> I'm using DUNE 2.3 with ALUGrid 1.52. I know it is old, but at the moment I cannot migrate to the new Dune releases.<br>
>>> <br>
>>> Thanks a lot!<br>
>>> <br>
>>> Marco<br>
>>> <br>
>>> _______________________________________________<br>
>>> Dune mailing list<br>
>>> Dune@dune-project.org<br>
>>> <a href="http://lists.dune-project.org/mailman/listinfo/dune">http://lists.dune-project.org/mailman/listinfo/dune</a><br>
>>> <br>
>> <br>
>> -- <br>
>> Dr. Martin Nolte <nolte@mathematik.uni-freiburg.de><br>
>> <br>
>> Universität Freiburg phone: +49-761-203-5630<br>
>> Abteilung für angewandte Mathematik fax: +49-761-203-5632<br>
>> Hermann-Herder-Straße 10<br>
>> 79104 Freiburg, Germany<br>
>> <br>
>> <br>
> <br>
> -- <br>
> Dr. Martin Nolte <nolte@mathematik.uni-freiburg.de><br>
> <br>
> Universität Freiburg phone: +49-761-203-5630<br>
> Abteilung für angewandte Mathematik fax: +49-761-203-5632<br>
> Hermann-Herder-Straße 10<br>
> 79104 Freiburg, Germany<br>
> <br>
> <br>
<br>
-- <br>
Dr. Martin Nolte <nolte@mathematik.uni-freiburg.de><br>
<br>
Universität Freiburg phone: +49-761-203-5630<br>
Abteilung für angewandte Mathematik fax: +49-761-203-5632<br>
Hermann-Herder-Straße 10<br>
79104 Freiburg, Germany<br>
</div>
</span></font></div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>