Reference element transformation

Hi. I’m trying to understand how the MappedIntegrationPoint works.

Say I have a mesh Omega and I call ip = Omega(x,y).

I understand that the returned object ip contains information on the element containing the point (x,y) ( as well as the coordinates of of (x,y) when transformed to the reference element.

Which is this reference element? for the triangle is it?
(0,0) (1,0) (0,1) ??

Is this documented anywhere?

Concerning the coordinates in the reference domain, I assume they are stored in ip.pnt. How are those coordinates defined?

If they are defined as baricentric coordinates, I understand that:

a, b, c = ip.pnt
a*P + b*Q + c*R 

should return the original point (x,y), right?
( P, Q and R are np.array containing the coordinates of the original triangle)

I’ve tried this, bu I dont always get the expected results.

What am I missing? (is there any place in the documentation where I can read about it? )

Thank you very much

The reference triangle has vertices (1,0), (0,1), (0,0).

You can find more information in Tutorial 9.1 on NGSolve - C++ programming.

best, Joachim

Thank you very much, that was what I was looking for!