salomemed
6.5.0

Computation of barycentric coordinates is used to fill interpolation matrix in case of P1 an P1d types of interpolation.
Computation of barycentric coordinates consists in finding weights of vertices bearing values within the cell. The cell is triangle in 2D space and tetrahedron in 3D space.
Input of the algorithm includes
Purpose is to find coefficients a1...an so that
Combining the last two expressions we get an equation in matrix form a * T = ( b  pn ) where
 x1x3 x2x3   y1y3 y2y3 in 3D case
 x1x4 x2x4 x3x4   y1y4 y2y4 y3y4   z1z4 z2z4 z3z4 
In 2D case solution is found by inversing T which is trivial: a = T^(1) * ( b  pn )
In 3D case we use Gaussian elimination algorithm. First we use elementary row operations to transform T into upper triangular form and then perform back substitution to find coeficients a.