Oh, I think I know what those values appears and it is my bad ...
It is probably not 22116 but 22 and 116 and it is probably not 89130 but 
rather 89 and 130. I used something like *std::cout << dof_index[0] << 
std::endl* to get those values and sometimes they just get attached to each 
other like if the *std::endl* was skipped (not sure why, maybe because I 
have several threads ?). I did not realise it before reading your message 
but it actually makes sense because I was not getting an error for those 
values and my Assert was not triggered. I should have seen it, sorry.

As for the 4294967295 occurence, is it because I am dealing with an 
interface which is a boundary as well ? Isn't this case handled by the 
*boundary_worker* and not the *face_worker* (using step-12 notation) ?

Best,

Sylvain

El viernes, 23 de julio de 2021 a la(s) 17:17:17 UTC+2, Wolfgang Bangerth 
escribió:

> On 7/23/21 8:59 AM, Sylvain Mathonnière wrote:
> > Thank you for the answer. I have been looking at a way of doing what you 
> > suggested and I found the function*FEInterfaceValues 
> > <
> https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdealii.org%2Fdeveloper%2Fdoxygen%2Fdeal.II%2FclassFEInterfaceValues.html&data=04%7C01%7CWolfgang.Bangerth%40colostate.edu%7Cbe067ec5c8ab4601e70308d94dea8304%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C637626491881337201%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hrnX9t7udM50eZvFVTiCBunh8ShGkow1iyI4AZq7udw%3D&reserved=0>::interface_dof_to_dof_indices()*
>  
>
> > which seems to be doing what I want.
>
> Ah yes, I had forgotten about this function!
>
>
> > I provide it with the interface index "i" and it returns a pair of local 
> > indices corresponding to the active and neighbouring cell. If then I 
> query the 
> > first element *dof_index[0]*, I obtain the local index of the current 
> cell, so 
> > I though of using it like this :
> > 
> > *            //get the local indices of the current cell and 
> neighbouring cell*
> > **
> > *            std::array<unsigned int, 2> dof_index = 
> > fe_iv.interface_dof_to_dof_indices(i);*
> > **
> > **
> > **
> > *           //use local index to obtain component of shape function.*
> > **
> > *           unsigned int component_i = 
> > fe_RTE.system_to_component_index(dof_index[0]).first;*
> > 
> > Then with the debugger and printing some values I realised that 
> dof_index[0] 
> > is kind of always below 160 as expected, but on a couple of occasion it 
> goes 
> > to 22116; 89130 or 4294967295 and triggers the error of 
> > system_to_component_index(). Those values looks like global indices 
> whereas 
> > interface_dof_to_dof_indices(i) should returns local_indices. I must be 
> doing 
> > something horribly wrong but I could not find a tutorial that uses 
> > interface_dof_to_dof_indices(). Am I confused with how to use those 
> functions ?
>
> No, I think you're right that that is how the function is supposed to work.
>
> 4294967295 is numbers::invalid_dof_index, which is the case discussed in 
> the 
> documentation where a DoF lives only one one side of the interface. The 
> other 
> values (22116; 89130) shouldn't happen. If that's what you get, then there 
> is 
> a bug somewhere.
>
> Do you think you could construct a small testcase that illustrates what 
> you have?
>
> Best
> W.
>
> -- 
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: bang...@colostate.edu
> www: http://www.math.colostate.edu/~bangerth/
>
>

-- 
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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/55622014-8692-448a-92ab-818c134c920an%40googlegroups.com.

Reply via email to