Actually, it might work also for ALUGrid if 
DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS is set to _false_ because that triggers 
the default behavior of boundaryFlag().


Bernd



--
_______________________________________________________________

Bernd Flemisch                         phone: +49 711 685 69162
IWS, Universität Stuttgart             fax:   +49 711 685 60430
Pfaffenwaldring 61            email: [email protected]
D-70569 Stuttgart            url: www.hydrosys.uni-stuttgart.de
_______________________________________________________________
________________________________
Von: Dumux <[email protected]> im Auftrag von Flemisch, 
Bernd <[email protected]>
Gesendet: Montag, 8. April 2019 23:55:11
An: DuMuX User Forum; Samuel Scherrer
Betreff: Re: [DuMuX] How to get intersections from scvf and element?


Martin is right about the boundaryId. I guess that means it doesn't work with 
ALUGrid like this at the moment. For other grids,
scvf.boundaryFlag()
should return the boundarySegmentIndex, so
gridData->getBoundaryDomainMarker(scvf.boundaryFlag())
should return the right thing. Are you bound to ALUGrid or can you try with 
UGGrid?

Apart from that, we should see how to make things consistent.

Kind regards
Bernd


--
_______________________________________________________________

Bernd Flemisch                         phone: +49 711 685 69162
IWS, Universität Stuttgart             fax:   +49 711 685 60430
Pfaffenwaldring 61            email: [email protected]
D-70569 Stuttgart            url: www.hydrosys.uni-stuttgart.de
_______________________________________________________________
________________________________
Von: Dumux <[email protected]> im Auftrag von Martin 
Schneider <[email protected]>
Gesendet: Montag, 8. April 2019 22:41:51
An: DuMuX User Forum; Samuel Scherrer
Betreff: Re: [DuMuX] How to get intersections from scvf and element?

Hi Samuel,

maybe I am wrong but the scvf.boundaryFlag() returns the boundaryId
of AluGrid which is only properly defined if you are using a DGF grid file.
The CO2 test uses such a DGF file, which is why it works there.

Maybe having a look at the tests in test/io/gridmanager helps.

Best regards,
Martin


On 08.04.19 19:34, Samuel Scherrer wrote:
> Hi Timo, Hi Bernd,
>
> thanks a lot for your help.
> I'm compiling the dune modules with the cmake.opts in the dumux
> repository, which contains "-
> DDUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS:BOOL=True" in "CMAKE_FLAGS", so
> I assume that I don't need any additional changes.
>
> The problem file in co2/implicit looks like what I need. However, when
> using scvf.boundaryFlag() I always get the same value, 1, but when I
> instead loop over all interfaces of the current element and use the
> 'getBoundaryDomainMarker'-function I do get the values I expect.
>
> I'm using the gmsh mesh-format version 2.2 and ALUGrid. Do you know
> what might be going wrong here?
>
> Best regards,
> Samuel
>
>
>
> On Mon, 2019-04-08 at 18:09 +0200, Timo Koch wrote:
>> Hi Samuel,
>>
>> as an addition to Bernd's answer, you might have to set
>> DUNE_GRID_EXPERIMENTAL_GRID_EXTENSIONS:BOOL=TRUE
>> for compiling dune-grid and the grid modules. I'm not sure if this is
>> still required.
>>
>> Best wishes
>> Timo
>>
>> On 08.04.19 17:37, Flemisch, Bernd wrote:
>>> Hi Samuel,
>>>
>>> I think that it is given by scvf.boundaryFlag(). Have a look at
>>>
> https://git.iws.uni-stuttgart.de/dumux-repositories/dumux/blob/master/test/porousmediumflow/co2/implicit/problem.hh
>>> Kind regards
>>> Bernd
>>>
>>>
>>>
>>> --
>>> _______________________________________________________________
>>>
>>> Bernd Flemisch                         phone: +49 711 685 69162
>>> IWS, Universität Stuttgart             fax:   +49 711 685 60430
>>> Pfaffenwaldring 61            email: [email protected]
>>> D-70569 Stuttgart            url: 
>>> www.hydrosys.uni-stuttgart.de<http://www.hydrosys.uni-stuttgart.de>
>>> _______________________________________________________________
>>> Von: Dumux <[email protected]> im Auftrag von
>>> Samuel Scherrer <[email protected]>
>>> Gesendet: Montag, 8. April 2019 17:30:26
>>> An: [email protected]
>>> Betreff: [DuMuX] How to get intersections from scvf and element?
>>>
>>> Hi Dumux people,
>>>
>>> I'm currently trying to use a grid generated with gmsh and would
>>> like
>>> to set the boundaries based on BoundaryDomainMarkers.
>>> I found that it's possible to access the boundary domain markers
>>> via
>>> the function 'getBoundaryDomainMarkers', which accepts either a
>>> Intersection or a boundary segment index as argument.
>>>
>>> How do I now get the intersection/boundary segment index when I
>>> have a
>>> given element and scvf, e.g. inside the 'neumann' function
>>> (solution
>>> dependent neumann boundary)?
>>>
>>> Best regards,
>>> Samuel
>>>
>>> _______________________________________________
>>> Dumux mailing list
>>> [email protected]
>>> https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
>>>
>>>
>>> _______________________________________________
>>> Dumux mailing list
>>> [email protected]
>>> https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
>> _______________________________________________
>> Dumux mailing list
>> [email protected]
>> https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
> _______________________________________________
> Dumux mailing list
> [email protected]
> https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux
_______________________________________________
Dumux mailing list
[email protected]
https://listserv.uni-stuttgart.de/mailman/listinfo/dumux

Reply via email to