[Dune] parallel DUNE grid for implementing a spherical shell (UGGrid)

Oliver Sander sander at igpm.rwth-aachen.de
Tue Nov 6 13:35:10 CET 2012


Hi Eike,

Am 06.11.2012 11:37, schrieb Eike Mueller:
> Hi Oliver,
>
> thanks for the patch, but I have been struggeling to apply it. Has it 
> been created against the current trunk of UG?
yes.  But that doesn't matter: the file rm.c hasn't been touched in years.

> To install UG, I followed the instructions on the DUNE webpage and 
> downloaded the tarball from 2008-11-13 and then applied the patch 8 
> given on the webpage.
>
> If I apply your patch, I get this error message:
>
> em459 at mapc-0210 $ pwd
> /localtempdisk/UG-2008-11-13/UG/ug
> em459 at mapc-0210 $ patch -p1 < ../../add-HEXA_QUADSECT_0-rule.patch
> patching file gm/rm.c
> Hunk #1 FAILED at 2828.
> 1 out of 1 hunk FAILED -- saving rejects to file gm/rm.c.rej
Look at the patch file: all it does is adding two lines.  If you run 
into trouble
you can just add them by hand.

>
> I have also tried to download the trunk of UG instead, but if I then 
> try to apply the patch 9 I get something like this:
That is not supported.

best,
Oliver
>
> em459 at mapc-0210 $ patch -p1 < ../../ug-dune-patches-3.9.1-patch9.diff
> The next patch would delete the file arch/AIX/CVS/Entries,
> which does not exist!  Assume -R? [n] y
> patching file arch/AIX/CVS/Entries
> The next patch would delete the file arch/AIX/CVS/Repository,
> which does not exist!  Assume -R? [n] y
> patching file arch/AIX/CVS/Repository
> The next patch would delete the file arch/AIX/CVS/Root,
> which does not exist!  Assume -R? [n] y
> [...]
>
> Thanks,
>
> Eike
>
> Oliver Sander wrote:
>>   Hi Eike,
>> the refinement rule that you want is HEX_QUADSECT_0.
>> There was a bit of implementation missing in UG itself.  Please
>> try the attached patch -- it works for me.
>> best,
>> Oliver
>>
>> Am 05.11.2012 20:24, schrieb Eike Mueller:
>>> Hi Oliver,
>>>
>>> no, it either crashed or did nothing. I attach the updated code.
>>>
>>> Thanks, Eike
>>>
>>>
>>>
>>>
>>> On 5 Nov 2012, at 19:22, Oliver Sander wrote:
>>>
>>>> Hi Eike,
>>>> as mentioned, this is a hardly tested feature.  Can you send me an 
>>>> updated test
>>>> program?  Did you find any rule (besides RED) that does anything?
>>>> best,
>>>> Oliver
>>>>
>>>> Am 05.11.2012 20:14, schrieb Eike Mueller:
>>>>> Hi Oliver,
>>>>>
>>>>> thanks a lot, I think that's what I was looking for. I've now 
>>>>> tried the following RefinementRules, but with little success:
>>>>>
>>>>> RED: I get the previous refinement in all three directions
>>>>> BLUE, COARSE: Nothing happens, i.e. elements do not get refined
>>>>>
>>>>> For
>>>>>
>>>>> HEX_BISECT_0_1,
>>>>> HEX_BISECT_0_2,
>>>>> HEX_BISECT_0_3,
>>>>> HEX_TRISECT_0,
>>>>> HEX_TRISECT_5,
>>>>> HEX_QUADSECT_0,
>>>>> HEX_QUADSECT_1,
>>>>> HEX_QUADSECT_2
>>>>>
>>>>> I always get the following runtime error:
>>>>>
>>>>> ERROR in Patterns2Rules: no mapping for HEXAHEDRON and this pattern!
>>>>> uggrid: rm.c:2838: UG::INT 
>>>>> UG::D3::Patterns2Rules(UG::D3::ELEMENT*, UG::INT): Assertion `0' 
>>>>> failed.
>>>>>
>>>>> so I must still be missing something. I loop over the grid like this:
>>>>>
>>>>> for (ElementLeafIterator it = ibegin;it!=iend;++it) {
>>>>>       grid.mark(*it,UG::D3::PRISM_QUADSECT,0);
>>>>> }
>>>>>
>>>>> Eike
>>>>>
>>>>> On 5 Nov 2012, at 17:01, Oliver Sander wrote:
>>>>>
>>>>>>
>>>>>>
>>>>>> Hi Eike,
>>>>>>
>>>>>> Am 05.11.2012 17:45, schrieb Eike Mueller:
>>>>>>> Dear dune-list,
>>>>>>>
>>>>>>> (1) How can I ensure that the grid is not refined in the radial 
>>>>>>> direction, i.e. I always only end up with one layer of cells in 
>>>>>>> the radial direction? I guess I have to run over the grid and 
>>>>>>> mark cells for refinement, but is this documented anywhere in 
>>>>>>> more detail?
>>>>>> UGGrid has a special non-interface method for anisotropic 
>>>>>> refinement.  Have a look
>>>>>> at the doxygen documentation of the UGGrid class.  There is a method
>>>>>>
>>>>>> bool mark 
>>>>>> <imap://sander@indy5.igpm.rwth-aachen.de:143/fetch%3EUID%3E.INBOX.Sent%3E209?part=1.2.2&filename=a00865.html> 
>>>>>> (const typename Traits::template Codim 
>>>>>> <imap://sander@indy5.igpm.rwth-aachen.de:143/fetch%3EUID%3E.INBOX.Sent%3E209?part=1.2.3&filename=a00218.html>< 
>>>>>> 0 >::Entity 
>>>>>> <imap://sander@indy5.igpm.rwth-aachen.de:143/fetch%3EUID%3E.INBOX.Sent%3E209?part=1.2.4&filename=a00362.html> 
>>>>>> &e, typename UG_NS< dim >::RefinementRule rule, int side=0)
>>>>>>
>>>>>> which marks the entity 'e' for refinement, but with a special 
>>>>>> refinement rule.
>>>>>> The list of rules is UG-specific and has not been properly 
>>>>>> documented (Freiwillige vor!).
>>>>>> You find all possible enum values in the UG header ug/gm.h at 
>>>>>> line 317ff
>>>>>> They are reasonably self-explanatory, but you need to do some 
>>>>>> experimenting.
>>>>>>
>>>>>>> (2) The parallel load balancing does not seem to work. If I run 
>>>>>>> on 24 processes and I call globalRefine(), followed by 
>>>>>>> loadBalance(), some processes end up with no part of the grid. I 
>>>>>>> have checked that I use the parallel version of UG grid.
>>>>>>>
>>>>>>> I attach the code I used to generate the grid, as well as the 
>>>>>>> .vtu files mentioned above.
>>>>>> No clue, I'd have to try this out myself.
>>>>>> cheers,
>>>>>> Oliver
>>>>>>
>>>>>>> Thanks a lot for any help,
>>>>>>>
>>>>>>> Eike
>>>>>>>
>>>>>>> PS: Alternatively, I would also be equaully happy if I can 
>>>>>>> create a PARALLEL 2d surface grid for the surface of the sphere 
>>>>>>> (again, either cubed sphere or a icosahedral grid). However, as 
>>>>>>> far as I can see it, there is no parallel implementation for 
>>>>>>> this, we've tried 2d ALUGRID, parallelised with the metagrid 
>>>>>>> approach, but this does not scale beyond a few hundred 
>>>>>>> processors as the entire grid is stored on each processor and my 
>>>>>>> code runs out of memory.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Dune mailing list
>>>>>>> Dune at dune-project.org
>>>>>>> http://lists.dune-project.org/mailman/listinfo/dune
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Dune mailing list
>>>>>> Dune at dune-project.org <mailto:Dune at dune-project.org>
>>>>>> http://lists.dune-project.org/mailman/listinfo/dune
>>>>>
>>>>
>>>
>>
>
>





More information about the Dune mailing list