Hi Corbin,

Indeed, the following code:

sd.fe_interface_values.reinit(cell, face_index);

initializes the object as a boundary face. You need to pass the two
neighboring cells to the other reinit() function.




On Tue, Apr 13, 2021 at 11:08 PM Corbin Foucart
<[email protected]> wrote:
>
> I took a look at the unit tests for FEInterfaceValues in 
> tests/feinterface/fe_interface_values_0*.cc, and found that the following 
> modification to the code in the face loop, changing how reinit and the 
> boundary check is done:
>
> for ( cell loop)
>   for ( face loop)
>           ...
>
>           // detect top face
>           if (nrml[0][1] > 0 && !(cell->at_boundary(face_index)))
>           {
>             std::cout << std::endl;
>             sd.fe_interface_values.reinit(cell,
>                                           face_index,
>                                           numbers::invalid_unsigned_int,
>                                           cell->neighbor(face_index),
>                                           
> cell->neighbor_of_neighbor(face_index),
>                                           numbers::invalid_unsigned_int);
>            ...
>            
> sd.fe_interface_values.get_fe_face_values(1).get_function_values(field, 
> uhat_qpt);
>            }
>
> Works fine at getting the values from the other side of the interface. 
> Perhaps I used the reinit(...) function incorrectly.
>
> Best,
> Corbin
>
>
> On Tue, Apr 13, 2021 at 9:56 PM Corbin Foucart <[email protected]> 
> wrote:
>>
>> Hello all,
>>
>> I have found an unexpected behavior in using the FEInterfaceValues object. 
>> Namely, it seems that a line like,
>>
>> fe_interface_values.get_fe_face_values(1).get_function_values(...);
>>
>> returns the following error
>>
>> > The violated condition was:
>> >     cell_index == 0 || !at_boundary()
>> > Additional information:
>> >     You are on a boundary, so you can only ask for the first FEFaceValues 
>> > object.
>>
>> ...if the cell is on a boundary, but the face is an interior face.
>>
>> I've attached code for a small test case illustrating the issue. It consists 
>> of a 2x2 2D mesh, and attempts to use FEInterfaceValues to get field values 
>> from the cell "above".
>>
>> Is this indeed a bug, or am I misunderstanding the intended usage of 
>> FEInterfaceValues? I'm using deal.II, version 9.2.0.
>>
>> Best,
>> Corbin
>>
>> --
>> The deal.II project is located at http://www.dealii.org/
>> For mailing list/forum options, see 
>> https://groups.google.com/d/forum/dealii?hl=en
>> ---
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "deal.II User Group" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/dealii/vGc16ulvglE/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> [email protected].
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/dealii/22813e93-5959-4244-aa45-1652d3e8c7b8n%40googlegroups.com.
>
> --
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see 
> https://groups.google.com/d/forum/dealii?hl=en
> ---
> You received this message because you are subscribed to the Google Groups 
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/dealii/CAE%2BMPofcZ5nizy0XyfDtiXpn5S%2BXiyhNoC3CW-EgO1YC4xaDqA%40mail.gmail.com.



-- 
Timo Heister
http://www.math.clemson.edu/~heister/

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAMRj59GcRZ%3DAqcs6%3DVWs349eqrcZFw%2BzF7q5MFHBPbLdNPDAGw%40mail.gmail.com.

Reply via email to