On 9/15/24 23:07, Praveen C wrote:
**
The simplest solution seems to be to add a function like this.
// This is available only after call to reinit.
unsigned int
FEInterfaceValues::get_component(const unsigned int interface_dof_index) const
{
const auto dof_pair = dofmap[interface_dof_index];
if(dof_pair[0] != numbers::invalid_unsigned_int)
{
return get_fe().system_to_component_index(dof_pair[0]).first;
}
else
{
return get_fe().system_to_component_index(dof_pair[1]).first;
}
}
Or should the component info be built during reinit and stored in the class ?
This (or your later variation) works just fine. I don't think you'd save
anything by computing it in reinit().
I would add an assertion at the top that interface_dof_index is within the
allowed range.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: [email protected]
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/dealii/82b525a9-bb70-44ac-a65e-9426540ad4de%40colostate.edu.