On 9/23/21 5:48 AM, Sylvain Mathonnière wrote:
I found in the documentation a fonction
*face_system_to_component_index()* but no
function*face_component_to_system_index()*. What would be the best way
to proceed at this point ?
It would not be difficult to actually add this function. Would you like
to give it a try? If you see how the non-face functions are implemented,
you'd probably see right away how to add such a function for faces as well.
That said, the way you approach this is a bit unusual. A better way
would be to consider that you have a vector-valued element and, as we
always do, loop over all DoFs i and j that belong to *all* components.
You can then either do something like
for (i=0...dofs_per_cell)
for (j=0...dofs_per_cell)
if (fe.system_to_component_index(i).first ==
fe.system_to_component_index(j).first)
...add matrix term...
or, if you would rather do this, write things as
for (i=0...dofs_per_cell)
for (j=0...dofs_per_cell)
for (c=0...n_components)
copy_data_face.cell_matrix_RTE(i,j) +=
... fe_face[c].shape_value(i,q) ...
... fe_face[c].shape_value(j,q) ...
The first of these ways would correspond to how step-8 assembles its
matrix, whereas the second is used in all other tutorial programs
solving vector-valued problems (e.g., step-22). You might also want to
look at the vector-valued documentation module for discussions around
these sorts of issues.
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/35e53fc1-449f-0e4f-fc4e-97160e8af863%40colostate.edu.