Component dof index

22 views
Skip to first unread message

Uclus Heis

unread,
Aug 9, 2022, 8:22:31 AM8/9/22
to deal.II User Group
Dear all, 

Is it possible to obtain the index of the total dof distribution for each component?

I work with two components, having a 2*N size system and I need to know where in my solution vector is each component.

I found functions like count_dofs_per_component or ComponentMask however, I can not find a option to obtain the index position of the components in the dof vector.

Thank you

Wolfgang Bangerth

unread,
Aug 9, 2022, 2:12:02 PM8/9/22
to dea...@googlegroups.com
On 8/9/22 06:22, Uclus Heis wrote:
>
> Is it possible to obtain the index of the total dof distribution for each
> component?
>
> I work with two components, having a 2*N size system and I need to know where
> in my solution vector is each component.

You want to look at DoFTools::extract_dofs(). It returns the indices of those
DoFs that correspond to one or several solution components.

Best
Wolfgang


--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Reply all
Reply to author
Forward
0 new messages