Forum Message

 

 

We have moved the forum to https://forum.ngsolve.org . This is an archived version of the topics until 05/05/23. All the topics were moved to the new forum and conversations can be continued there. This forum is just kept as legacy to not invalidate old links. If you want to continue a conversation just look for the topic in the new forum.

Notice

The forum is in read only mode.

Accessing Element Information

More
5 years 6 months ago #1221 by THaubold
Hello,

i'm planning to implement the HP-Finite Element Method by Melenk and Wohlmuth (2001) using the Python Framework. Since i'm able to set the polynomial degree with ngsolve, this shouldn't be a problem.
Though for the error estimator or predicted refinement rate i need to access two information and i'm not sure how to do this.
  1. Is there something like a getOrder() function to access the polynomial order of an element?
  2. Let's say i h-refine one element, how can i determine the element number of the sons of this element?

Best regards,
Tim
More
5 years 6 months ago #1223 by joachim
Hi Tim,

not all hp-functionality of NGSolve is wrapped to Python, yet. It will improve over the next weeks.

I just added the GetOrder function. You can query the order for each cell, face, and edge. Only isotropic order is supported (the C++ code supports anisotropic order as well). It will be in the upcoming nightly release.

To the second question: You cannot ask for the childs, but you can ask for the parent element: mesh.GetParentElement.

Best,
Joachim
The following user(s) said Thank You: THaubold
Time to create page: 0.159 seconds