Question to element numbering/indexing

More
4 years 8 months ago #2445 by NilsHM
Hello everyone!

I'm working with element indices in python and C++ and I'm getting strange results.

In python I get the element list with:
Code:
elements = [e for e in fes.Elements()]
where the list order matches the element.nr :
Code:
elements[i].nr == i

In C++ I get the element number in two different ways:
Code:
elnr = mip.GetTransformation().GetElementNr();
and
Code:
FESpace::Element el elnr = el.Nr();

Is the element numbering the same between the two languages?

I noticed the the python element object also has a index value:
Code:
elements[i].index
What does that mean?

Thanks for the help!
More
4 years 8 months ago - 4 years 8 months ago #2446 by lkogler
Code:
elements[i].index
tells you which domain (or surface) the element is part of.

The others should all coincide.

Best,
Lukas
Last edit: 4 years 8 months ago by lkogler.
The following user(s) said Thank You: NilsHM
Time to create page: 0.096 seconds