Re: [deal.II] Element-wise DOF numbering and shape function numbering

2021-09-29 Thread Lixing Zhu
Hi Daniel,

Thanks. I'll also look into  DoFTools::map_dofs_to_support_points and  
DoFTools::map_support_points_to_dofs.

Regards,
Lixing

On Thursday, September 30, 2021 at 2:05:56 AM UTC+8 d.arnd...@gmail.com 
wrote:

> Lixing,
>
> Yes, using FiniteElemnt::component_to_system_index() seems to be 
> reasonable to use to identify the overall DoF number for copies of the same 
> finite element. The FiniteElement class doesn't need class accessor 
> argument and the mapping is thus generic.
> Also note that there is DoFTools::map_dofs_to_support_points and 
> DoFTools::map_support_points_to_dofs that might be helpful for you.
>
> Best,
> Daniel
>
> Am Mi., 29. Sept. 2021 um 13:27 Uhr schrieb Lixing Zhu  >:
>
>> Hi all,
>>
>> I am playing with a vector-valued 2D problem (displacement vector u and 
>> v). Since I need to use the shape functions of a specific vertex, I export 
>> the DOFs numbering and its corresponding number of the vertex. As 
>> illustrated in FiniteElement 
>> , for 
>> quadratic 2D FE_Q element, the pair of DODs of a specific vertex are 
>> grouped as follows:
>>
>> #DOF, #component, #within the base
>> 0 0 0
>> 1 1 0
>> 2 0 1
>> 3 1 1
>> 4 0 2
>> 5 1 2
>> 6 0 3
>> 7 1 3
>> 8 0 4
>> 9 1 4
>> 10 0 5
>> 11 1 5
>> 12 0 6
>> 13 1 6
>> 14 0 7
>> 15 1 7
>> 16 0 8
>> 17 1 8
>>
>> However, for high-order elements (higher than or equal to 3), this 
>> pattern no longer exists. In other words, the DOFs of the same vertex are 
>> not grouped. Take 4th order 2D FE_Q as an example,
>>
>> #DOF, #component, #within the base
>> 0 0 0
>> 1 1 0
>> 2 0 1
>> 3 1 1
>> 4 0 2
>> 5 1 2
>> 6 0 3
>> 7 1 3
>> 8 0 4
>> 9 0 5
>> 10 0 6
>> 11 1 4
>> 12 1 5
>> 13 1 6
>> 14 0 7
>> 15 0 8
>> 16 0 9
>> 17 1 7
>> 18 1 8
>> 19 1 9
>> 20 0 10
>> 21 0 11
>> 22 0 12
>> 23 1 10
>> 24 1 11
>> 25 1 12
>> 26 0 13
>> 27 0 14
>> 28 0 15
>> 29 1 13
>> 30 1 14
>> 31 1 15
>> 32 0 16
>> 33 0 17
>> 34 0 18
>> 35 0 19
>> 36 0 20
>> 37 0 21
>> 38 0 22
>> 39 0 23
>> 40 0 24
>> 41 1 16
>> 42 1 17
>> 43 1 18
>> 44 1 19
>> 45 1 20
>> 46 1 21
>> 47 1 22
>> 48 1 23
>> 49 1 24
>>
>> I guess this suggests that we cannot simply assume the pairing of DOFs in 
>> vector-valued problems. My question is, is the numbering of the DOF is 
>> fixed among the same type of elements? Since I need to fetch the DOFs of a 
>> specific vertex, I guess FiniteElement::component_to_system_index() can 
>> help determine the current DOF number of a specific vertex. Do I need to 
>> check them for each element? or just check it once for a certain type of 
>> element?
>>
>> Regards,
>> Lixing
>>
>> -- 
>> 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+un...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/dealii/26a04f52-2766-442c-ae99-00589fda8612n%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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/1f3f2723-c132-4284-9766-77e2af2449b4n%40googlegroups.com.


Re: [deal.II] Element-wise DOF numbering and shape function numbering

2021-09-29 Thread Daniel Arndt
Lixing,

Yes, using FiniteElemnt::component_to_system_index() seems to be reasonable
to use to identify the overall DoF number for copies of the same finite
element. The FiniteElement class doesn't need class accessor argument and
the mapping is thus generic.
Also note that there is DoFTools::map_dofs_to_support_points and
DoFTools::map_support_points_to_dofs that might be helpful for you.

Best,
Daniel

Am Mi., 29. Sept. 2021 um 13:27 Uhr schrieb Lixing Zhu <
zhulixin...@gmail.com>:

> Hi all,
>
> I am playing with a vector-valued 2D problem (displacement vector u and
> v). Since I need to use the shape functions of a specific vertex, I export
> the DOFs numbering and its corresponding number of the vertex. As
> illustrated in FiniteElement
> , for
> quadratic 2D FE_Q element, the pair of DODs of a specific vertex are
> grouped as follows:
>
> #DOF, #component, #within the base
> 0 0 0
> 1 1 0
> 2 0 1
> 3 1 1
> 4 0 2
> 5 1 2
> 6 0 3
> 7 1 3
> 8 0 4
> 9 1 4
> 10 0 5
> 11 1 5
> 12 0 6
> 13 1 6
> 14 0 7
> 15 1 7
> 16 0 8
> 17 1 8
>
> However, for high-order elements (higher than or equal to 3), this pattern
> no longer exists. In other words, the DOFs of the same vertex are not
> grouped. Take 4th order 2D FE_Q as an example,
>
> #DOF, #component, #within the base
> 0 0 0
> 1 1 0
> 2 0 1
> 3 1 1
> 4 0 2
> 5 1 2
> 6 0 3
> 7 1 3
> 8 0 4
> 9 0 5
> 10 0 6
> 11 1 4
> 12 1 5
> 13 1 6
> 14 0 7
> 15 0 8
> 16 0 9
> 17 1 7
> 18 1 8
> 19 1 9
> 20 0 10
> 21 0 11
> 22 0 12
> 23 1 10
> 24 1 11
> 25 1 12
> 26 0 13
> 27 0 14
> 28 0 15
> 29 1 13
> 30 1 14
> 31 1 15
> 32 0 16
> 33 0 17
> 34 0 18
> 35 0 19
> 36 0 20
> 37 0 21
> 38 0 22
> 39 0 23
> 40 0 24
> 41 1 16
> 42 1 17
> 43 1 18
> 44 1 19
> 45 1 20
> 46 1 21
> 47 1 22
> 48 1 23
> 49 1 24
>
> I guess this suggests that we cannot simply assume the pairing of DOFs in
> vector-valued problems. My question is, is the numbering of the DOF is
> fixed among the same type of elements? Since I need to fetch the DOFs of a
> specific vertex, I guess FiniteElement::component_to_system_index() can
> help determine the current DOF number of a specific vertex. Do I need to
> check them for each element? or just check it once for a certain type of
> element?
>
> Regards,
> Lixing
>
> --
> 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/26a04f52-2766-442c-ae99-00589fda8612n%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 dealii+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/CAOYDWbK9pyw%2BvpQP7sCFwgZ6FDdaB91ircfSpA1XyR2FHDuRww%40mail.gmail.com.


[deal.II] Element-wise DOF numbering and shape function numbering

2021-09-29 Thread Lixing Zhu
Hi all,

I am playing with a vector-valued 2D problem (displacement vector u and v). 
Since I need to use the shape functions of a specific vertex, I export the 
DOFs numbering and its corresponding number of the vertex. As illustrated 
in FiniteElement 
, for 
quadratic 2D FE_Q element, the pair of DODs of a specific vertex are 
grouped as follows:

#DOF, #component, #within the base
0 0 0
1 1 0
2 0 1
3 1 1
4 0 2
5 1 2
6 0 3
7 1 3
8 0 4
9 1 4
10 0 5
11 1 5
12 0 6
13 1 6
14 0 7
15 1 7
16 0 8
17 1 8

However, for high-order elements (higher than or equal to 3), this pattern 
no longer exists. In other words, the DOFs of the same vertex are not 
grouped. Take 4th order 2D FE_Q as an example,

#DOF, #component, #within the base
0 0 0
1 1 0
2 0 1
3 1 1
4 0 2
5 1 2
6 0 3
7 1 3
8 0 4
9 0 5
10 0 6
11 1 4
12 1 5
13 1 6
14 0 7
15 0 8
16 0 9
17 1 7
18 1 8
19 1 9
20 0 10
21 0 11
22 0 12
23 1 10
24 1 11
25 1 12
26 0 13
27 0 14
28 0 15
29 1 13
30 1 14
31 1 15
32 0 16
33 0 17
34 0 18
35 0 19
36 0 20
37 0 21
38 0 22
39 0 23
40 0 24
41 1 16
42 1 17
43 1 18
44 1 19
45 1 20
46 1 21
47 1 22
48 1 23
49 1 24

I guess this suggests that we cannot simply assume the pairing of DOFs in 
vector-valued problems. My question is, is the numbering of the DOF is 
fixed among the same type of elements? Since I need to fetch the DOFs of a 
specific vertex, I guess FiniteElement::component_to_system_index() can 
help determine the current DOF number of a specific vertex. Do I need to 
check them for each element? or just check it once for a certain type of 
element?

Regards,
Lixing

-- 
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/26a04f52-2766-442c-ae99-00589fda8612n%40googlegroups.com.