[Dune] Maximal level difference

Andreas Dedner dedner at mathematik.uni-freiburg.de
Mon Nov 29 16:24:56 CET 2010


My suggestion was along the line of
    void setClosureType(ClosureType type,int nonConformLevel=-1)
Of course (green,10) make no sense (but you had that problem in any case)
 (none,-1) would be like it is now, i.e., default behavior.
Then you also have (none,0) which is the same as green.

Just a thought
Andreas

On 29/11/10 15:19, Carsten Gräser wrote:
> Hi,
> Am 29.11.2010 16:04, schrieb Andreas Dedner:
>   
>> Independent of the question if you want to have it in utility, it should
>> be a method on UG
>> I think The details of the adaptation process in UG are already handled
>> quite a few methods
>> (at least setRefinementType setClosureType).
>> Isn't what you are suggestion only a special refinement type (or a
>> closure type)?
>> So, would you actually need a new method?
>>     
> Sure you can interpret implicit refinements to ensure level
> constraints as some closure type. But for the desired behaviour
> you will also need to provide an additional int which is useless
> for the other refinement/closure types. Hence you would need
> a special method in any case.
>
> Regards,
> Carsten
>
>   
>> Best
>> Andreas
>>
>> On 29/11/10 13:44, Carsten Gräser wrote:
>>     
>>> Sorry, I forgot another issue regarding this:
>>>
>>> Am 29.11.2010 14:35, schrieb Carsten Gräser:
>>>   
>>>       
>>>> Dear dune,
>>>> in dune-subgrid we implemented a simple method to automatically
>>>> add refinement marks and remove coarsening marks such that
>>>> the level of neighboring elements differs at most by a user
>>>> defined number. (ALUGrid e.g. does this internally).
>>>>
>>>> As someone asked for this functionality in UGGrid I extracted
>>>> this using the grid interface only. This might also be helpfull
>>>> for other third party grid implementations.
>>>>
>>>> Are there any objections to add this to dune/grid/utility?
>>>>     
>>>>         
>>> We could also add a method
>>>
>>>   setMaxLevelDifference(unsigned int level)
>>>
>>> to UGGrid and call the utility-function from within
>>> UGGrid::preAdapt() internally. On the one hand this
>>> would make it a little easier to write portable code,
>>> on the other hand it's essentially syntactic candy
>>> that blows up the UGGrid interface (by one method).
>>>
>>> Furthermore I'm not sure if the name is good. Currently
>>> the function is called
>>>
>>>   template<class GridType>
>>>   static void enforceNeighborLevelDifference(GridType& grid, int maxLevelDiff);
>>>
>>> Any opinions?
>>>
>>> Regards,
>>> Carsten
>>>
>>> PS: You can find the full implementation attached.
>>>       
>
>   





More information about the Dune mailing list