Defining HCurl space of type 1 for specific degrees of freedom

More
5 years 4 months ago - 5 years 4 months ago #1680 by Elsakori
Hello,

I am using NGSolve to solve Maxwell’s equations in time-harmonic form. I created a finite element space as:
fes = HCurl(mesh, order=1, type1=True, dirichlet="outer"),
fes.SetOrder(TRIG,2)
fes.SetOrder(TET,3)
fes.Update()

Can I define HCurl space with just face degrees of freedom of order 2, HCurl space with just cell degrees of freedom of order 3, or HCurl space with both face degrees of freedom of order 2 and cell degrees of freedom of order 3?

I am grateful for any help
Last edit: 5 years 4 months ago by Elsakori.
More
5 years 4 months ago #1686 by mneunteufel
Hi Elsakori,

you will always have the lowest order degrees of freedom at the edges.

With your example you create an HCurl space with face degrees of freedom of order 2 and cell degrees of freedom of order 3 + the lowest order edge degrees of freedom.

Attached you'll find a minimal example creating different kind of HCurl spaces and the number of degrees of freedom.

If you really want to neglect the lowest order edge dofs you need to work with BitArrays, or set them as unused_dofs.

Best
Michael
The following user(s) said Thank You: Elsakori
More
5 years 4 months ago #1692 by Elsakori
Hello Michael,

Thank you for your response and clarification.

As you mentioned in the last line, I want to neglect the lowest order edge dofs. I want HCurl space just with face degrees of freedom of order 2 and cell degrees of freedom of order 3. Can you explain more about setting them as "unused_dofs" in my case?, I couldn't find more information about "unused_dofs" in the website.

Thanks,

Ahmed
More
5 years 4 months ago #1693 by mneunteufel
Hi Elsakori,

I managed to "neglect" the lowest order dofs by using bitarrays and setting them as UNUSED_DOF.
It is important that the lowest order dofs are saved before all other dofs.

Attached you find both approaches

File Attachment:

File Name: hcurl_no_lo_dofs.py
File Size:2 KB

File Attachment:

File Name: hcurl_no_lo_dofs.py
File Size:2 KB
.

Best
Michael
The following user(s) said Thank You: Elsakori
More
5 years 4 months ago - 5 years 4 months ago #1694 by Elsakori
Hi Michael,

Thank you so much.
It is much clear now, I will try using these approaches in my code.

Thanks,

Ahmed
Last edit: 5 years 4 months ago by Elsakori.
Time to create page: 0.106 seconds