Accessing Element Information


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.
[li] Is there something like a getOrder() function to access the polynomial order of an element?[/li]
[li] Let’s say i h-refine one element, how can i determine the element number of the sons of this element? [/li]

Best regards,

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.