Skip to main content
added 74 characters in body
Source Link

for face 10 $(0, \frac{2}{3}, \frac{1}{6}), (0, \frac{1}{6}, \frac{1}{6}), (0, \frac{1}{6}, \frac{2}{3})$

for face 21 $(\frac{2}{3}, 0, \frac{1}{6}), (\frac{1}{6}, 0, \frac{1}{6}), (\frac{1}{6}, 0, \frac{2}{3})$

for face 32 $(\frac{2}{3}, \frac{1}{6}, 0), (\frac{1}{6}, \frac{1}{6}, 0), (\frac{1}{6}, \frac{2}{3}, 0)$

for face 43 $(\frac{2}{3}, \frac{1}{6}, \frac{1}{6}), (\frac{1}{6}, \frac{2}{3}, \frac{1}{6}), (\frac{1}{6}, \frac{1}{6}, \frac{2}{3})$

Am I doing anything wrong with the implementation? AnyMy questions are:

  1. Are Gauss integration points for face 3 correct?
  2. Are my computations for Area vector are correct?

Any suggestion or comment will be a great help.

for face 1 $(0, \frac{2}{3}, \frac{1}{6}), (0, \frac{1}{6}, \frac{1}{6}), (0, \frac{1}{6}, \frac{2}{3})$

for face 2 $(\frac{2}{3}, 0, \frac{1}{6}), (\frac{1}{6}, 0, \frac{1}{6}), (\frac{1}{6}, 0, \frac{2}{3})$

for face 3 $(\frac{2}{3}, \frac{1}{6}, 0), (\frac{1}{6}, \frac{1}{6}, 0), (\frac{1}{6}, \frac{2}{3}, 0)$

for face 4 $(\frac{2}{3}, \frac{1}{6}, \frac{1}{6}), (\frac{1}{6}, \frac{2}{3}, \frac{1}{6}), (\frac{1}{6}, \frac{1}{6}, \frac{2}{3})$

Am I doing anything wrong with the implementation? Any suggestion or comment will be a great help.

for face 0 $(0, \frac{2}{3}, \frac{1}{6}), (0, \frac{1}{6}, \frac{1}{6}), (0, \frac{1}{6}, \frac{2}{3})$

for face 1 $(\frac{2}{3}, 0, \frac{1}{6}), (\frac{1}{6}, 0, \frac{1}{6}), (\frac{1}{6}, 0, \frac{2}{3})$

for face 2 $(\frac{2}{3}, \frac{1}{6}, 0), (\frac{1}{6}, \frac{1}{6}, 0), (\frac{1}{6}, \frac{2}{3}, 0)$

for face 3 $(\frac{2}{3}, \frac{1}{6}, \frac{1}{6}), (\frac{1}{6}, \frac{2}{3}, \frac{1}{6}), (\frac{1}{6}, \frac{1}{6}, \frac{2}{3})$

My questions are:

  1. Are Gauss integration points for face 3 correct?
  2. Are my computations for Area vector are correct?

Any suggestion or comment will be a great help.

deleted 120 characters in body; edited tags
Source Link
Anton Menshov
  • 8.7k
  • 7
  • 41
  • 94

// --------shape functions and their derivatives w.r.t. xi, eta and zeta --------

Shape functions and their derivatives w.r.t. $\xi$, $\eta$ and $\zeta$

-------for volume integrals ---------------------------------
// Gauss quadrature points for numerical integration:
(0.5854101966249685, 0.1381966011250105, 0.1381966011250105)
(0.1381966011250105, 0.5854101966249685, 0.1381966011250105)
(0.1381966011250105, 0.1381966011250105, 0.5854101966249685)
(0.1381966011250105, 0.1381966011250105, 0.1381966011250105)

For volume integrals

// Weight of integration points
$W = \frac{1}{24}$

Gauss quadrature points for numerical integration:

(0.5854101966249685, 0.1381966011250105, 0.1381966011250105)
(0.1381966011250105, 0.5854101966249685, 0.1381966011250105)
(0.1381966011250105, 0.1381966011250105, 0.5854101966249685)
(0.1381966011250105, 0.1381966011250105, 0.1381966011250105)

Weight of integration points

-------for surface integrals ---------------------------------$$W = \frac{1}{24}$$

For surface integrals

face_[0] = {1,3,2}face_[0] = {1,3,2} // $\xi=0$
face_[1] = {0,2,3}face_[1] = {0,2,3} // $\eta=0$
face_[2] = {0,3,1}face_[2] = {0,3,1} // $\zeta=0$
face_[3] = {0,1,2}face_[3] = {0,1,2} // $\xi + \eta + \zeta = 1$

Gauss quadrature points

// Gauss quadrature points
for for face 1 $(0, \frac{2}{3}, \frac{1}{6}), (0, \frac{1}{6}, \frac{1}{6}), (0, \frac{1}{6}, \frac{2}{3})$
 

for face 2 $(\frac{2}{3}, 0, \frac{1}{6}), (\frac{1}{6}, 0, \frac{1}{6}), (\frac{1}{6}, 0, \frac{2}{3})$
 

for face 3 $(\frac{2}{3}, \frac{1}{6}, 0), (\frac{1}{6}, \frac{1}{6}, 0), (\frac{1}{6}, \frac{2}{3}, 0)$
 

for face 4 $(\frac{2}{3}, \frac{1}{6}, \frac{1}{6}), (\frac{1}{6}, \frac{2}{3}, \frac{1}{6}), (\frac{1}{6}, \frac{1}{6}, \frac{2}{3})$
 

// Weight of integration points
$W = \frac{1}{6}$

Weight of integration points

// Area vectors for each face$$W = \frac{1}{6}$$

Area vectors for each face

// --------shape functions and their derivatives w.r.t. xi, eta and zeta --------

-------for volume integrals ---------------------------------
// Gauss quadrature points for numerical integration:
(0.5854101966249685, 0.1381966011250105, 0.1381966011250105)
(0.1381966011250105, 0.5854101966249685, 0.1381966011250105)
(0.1381966011250105, 0.1381966011250105, 0.5854101966249685)
(0.1381966011250105, 0.1381966011250105, 0.1381966011250105)

// Weight of integration points
$W = \frac{1}{24}$

-------for surface integrals ---------------------------------

face_[0] = {1,3,2} // $\xi=0$
face_[1] = {0,2,3} // $\eta=0$
face_[2] = {0,3,1} // $\zeta=0$
face_[3] = {0,1,2} // $\xi + \eta + \zeta = 1$

// Gauss quadrature points
for face 1 $(0, \frac{2}{3}, \frac{1}{6}), (0, \frac{1}{6}, \frac{1}{6}), (0, \frac{1}{6}, \frac{2}{3})$
 

for face 2 $(\frac{2}{3}, 0, \frac{1}{6}), (\frac{1}{6}, 0, \frac{1}{6}), (\frac{1}{6}, 0, \frac{2}{3})$
 

for face 3 $(\frac{2}{3}, \frac{1}{6}, 0), (\frac{1}{6}, \frac{1}{6}, 0), (\frac{1}{6}, \frac{2}{3}, 0)$
 

for face 4 $(\frac{2}{3}, \frac{1}{6}, \frac{1}{6}), (\frac{1}{6}, \frac{2}{3}, \frac{1}{6}), (\frac{1}{6}, \frac{1}{6}, \frac{2}{3})$
 

// Weight of integration points
$W = \frac{1}{6}$

// Area vectors for each face

Shape functions and their derivatives w.r.t. $\xi$, $\eta$ and $\zeta$

For volume integrals

Gauss quadrature points for numerical integration:

(0.5854101966249685, 0.1381966011250105, 0.1381966011250105)
(0.1381966011250105, 0.5854101966249685, 0.1381966011250105)
(0.1381966011250105, 0.1381966011250105, 0.5854101966249685)
(0.1381966011250105, 0.1381966011250105, 0.1381966011250105)

Weight of integration points

$$W = \frac{1}{24}$$

For surface integrals

face_[0] = {1,3,2} // $\xi=0$
face_[1] = {0,2,3} // $\eta=0$
face_[2] = {0,3,1} // $\zeta=0$
face_[3] = {0,1,2} // $\xi + \eta + \zeta = 1$

Gauss quadrature points

for face 1 $(0, \frac{2}{3}, \frac{1}{6}), (0, \frac{1}{6}, \frac{1}{6}), (0, \frac{1}{6}, \frac{2}{3})$

for face 2 $(\frac{2}{3}, 0, \frac{1}{6}), (\frac{1}{6}, 0, \frac{1}{6}), (\frac{1}{6}, 0, \frac{2}{3})$

for face 3 $(\frac{2}{3}, \frac{1}{6}, 0), (\frac{1}{6}, \frac{1}{6}, 0), (\frac{1}{6}, \frac{2}{3}, 0)$

for face 4 $(\frac{2}{3}, \frac{1}{6}, \frac{1}{6}), (\frac{1}{6}, \frac{2}{3}, \frac{1}{6}), (\frac{1}{6}, \frac{1}{6}, \frac{2}{3})$

Weight of integration points

$$W = \frac{1}{6}$$

Area vectors for each face

deleted 812 characters in body
Source Link
    sh_[0] = xi_;
    sh_[1] = eta_;
    sh_[2] = zeta_;
    sh_[3] = 1.0 - xi_ - eta_ - zeta_;

    dsh_dxi_[0] = 1.0;      dsh_dxi_[1] = 0.0;     dsh_dxi_[2] = 0.0;    dsh_dxi_[3] = -1.0;        
   dsh_deta_[0] = 0.0;     dsh_deta_[1] = 1.0;    dsh_deta_[2] = 0.0;   dsh_deta_[3] = -1.0;
  dsh_dzeta_[0] = 0.0;    dsh_dzeta_[1] = 0.0;   dsh_dzeta_[2] = 1.0;  dsh_dzeta_[3] = -1.0;

$N_0 = \xi$
$N_1 = \eta$
$N_2 = \zeta$
$N_3 = 1-\xi-\eta-\zeta$

// $N_{0,\xi}$ = 1.0
$N_{1,\xi}$ = 0.0
$N_{2,\xi}$ = 0.0
$N_{3,\xi}$ = -1.0

$N_{0,\eta}$ = 0.0
$N_{1,\eta}$ = 1.0
$N_{2,\eta}$ = 0.0
$N_{3,\eta}$ = -1.0

$N_{0,\zeta}$ = 0.0
$N_{1,\zeta}$ = 0.0
$N_{2,\zeta}$ = 1.0
$N_{3,\zeta}$ = -1.0

-------for volume integrals ---------------------------------
// Gauss quadrature points for numerical integration:
(0.5854101966249685, 0.1381966011250105, 0.1381966011250105)
(0.1381966011250105, 0.5854101966249685, 0.1381966011250105)
(0.1381966011250105, 0.1381966011250105, 0.5854101966249685)
(0.1381966011250105, 0.1381966011250105, 0.1381966011250105)

    // Gauss quadrature points for numerical integration:

    gp_[0] = point_3d(0.5854101966249685, 0.1381966011250105, 0.1381966011250105);
    gp_[1] = point_3d(0.1381966011250105, 0.5854101966249685, 0.1381966011250105);
    gp_[2] = point_3d(0.1381966011250105, 0.1381966011250105, 0.5854101966249685);
    gp_[3] = point_3d(0.1381966011250105, 0.1381966011250105, 0.1381966011250105);

    W = 1.0/24.0;       // Weight of integration points

// Weight of integration points
$W = \frac{1}{24}$

-------for surface integrals ---------------------------------

   // the order of nodes is anticlockwise looking from outside of the face
    face_[0] = {1,3,2};  // xi=0; eta-zeta plane
    face_[1] = {0,2,3};  // eta=0; xi-zeta plane
    face_[2] = {0,3,1};  // zeta=0; xi-eta plane
    face_[3] = {0,1,2};  // xi + eta + zeta = 1 plane

    // Gauss quadrature points
    face_gn_[0] = {  
                     point_3d(0.0, 4.0/6.0, 1.0/6.0), 
                     point_3d(0.0, 1.0/6.0, 1.0/6.0), 
                     point_3d(0.0, 1.0/6.0, 4.0/6.0)
                  };  // xi=0; eta-zeta plane

    face_gn_[1] = {
                     point_3d(4.0/6.0, 0.0, 1.0/6.0), 
                     point_3d(1.0/6.0, 0.0, 4.0/6.0), 
                     point_3d(1.0/6.0, 0.0, 1.0/6.0)
                  };  // eta=0; xi-zeta plane

    face_gn_[2] = {  
                     point_3d(4.0/6.0, 1.0/6.0, 0.0), 
                     point_3d(1.0/6.0, 1.0/6.0, 0.0), 
                     point_3d(1.0/6.0, 4.0/6.0, 0.0)
                  };  // zeta=0; xi-eta plane

    face_gn_[3] = {
                     point_3d(4.0/6.0, 1.0/6.0, 1.0/6.0), 
                     point_3d(1.0/6.0, 4.0/6.0, 1.0/6.0), 
                     point_3d(1.0/6.0, 1.0/6.0, 4.0/6.0)
                  };  // xi + eta + zeta = 1 plane

    W = 1.0/6.0;


// Area vectors for each face 

    if(xi_ == 0.0)
    {
      det_normal_[0] = (y3-y4)*(z2-z4) - (y2-y4)*(z3-z4);
      det_normal_[1] = (z3-z4)*(x2-x4) - (z2-z4)*(x3-x4);
      det_normal_[2] = (x3-x4)*(y2-y4) - (x2-x4)*(y3-y4);
    }
    else if(eta_ == 0.0)
    {
      det_normal_[0] = (y1-y4)*(z3-z4) - (y3-y4)*(z1-z4);
      det_normal_[1] = (z1-z4)*(x3-x4) - (z3-z4)*(x1-x4);
      det_normal_[2] = (x1-x4)*(y3-y4) - (x3-x4)*(y1-y4);
    }
    else if(zeta_ == 0.0)
    {
      det_normal_[0] = (z1-z4)*(y2-y4) - (y1-y4)*(z2-z4);
      det_normal_[1] = (x1-x4)*(z2-z4) - (z1-z4)*(x2-x4);
      det_normal_[2] = (y1-y4)*(x2-x4) - (x1-x4)*(y2-y4);
    }
    else if(xi_ + eta_ + zeta_ == 1.0)
    {
      det_normal_[0] = (y2-y1)*(z3-z1) - (y3-y1)*(z2-z1);
      det_normal_[1] = (z2-z1)*(x3-x1) - (z3-z1)*(x2-x1);
      det_normal_[2] = (x2-x1)*(y3-y1) - (x3-x1)*(y2-y1);        
    }      

face_[0] = {1,3,2} // $\xi=0$
face_[1] = {0,2,3} // $\eta=0$
face_[2] = {0,3,1} // $\zeta=0$
face_[3] = {0,1,2} // $\xi + \eta + \zeta = 1$

// Gauss quadrature points
for face 1 $(0, \frac{2}{3}, \frac{1}{6}), (0, \frac{1}{6}, \frac{1}{6}), (0, \frac{1}{6}, \frac{2}{3})$

for face 2 $(\frac{2}{3}, 0, \frac{1}{6}), (\frac{1}{6}, 0, \frac{1}{6}), (\frac{1}{6}, 0, \frac{2}{3})$

for face 3 $(\frac{2}{3}, \frac{1}{6}, 0), (\frac{1}{6}, \frac{1}{6}, 0), (\frac{1}{6}, \frac{2}{3}, 0)$

for face 4 $(\frac{2}{3}, \frac{1}{6}, \frac{1}{6}), (\frac{1}{6}, \frac{2}{3}, \frac{1}{6}), (\frac{1}{6}, \frac{1}{6}, \frac{2}{3})$

// Weight of integration points
$W = \frac{1}{6}$

// Area vectors for each face

if($\xi$ == 0.0)
{
det_normal_[0] = (y3-y4)(z2-z4) - (y2-y4)(z3-z4)
det_normal_[1] = (z3-z4)(x2-x4) - (z2-z4)(x3-x4)
det_normal_[2] = (x3-x4)(y2-y4) - (x2-x4)(y3-y4)
}
else if($\eta$ == 0.0)
{
det_normal_[0] = (y1-y4)(z3-z4) - (y3-y4)(z1-z4)
det_normal_[1] = (z1-z4)(x3-x4) - (z3-z4)(x1-x4)
det_normal_[2] = (x1-x4)(y3-y4) - (x3-x4)(y1-y4)
}
else if($\zeta$ == 0.0)
{
det_normal_[0] = (z1-z4)(y2-y4) - (y1-y4)(z2-z4)
det_normal_[1] = (x1-x4)(z2-z4) - (z1-z4)(x2-x4)
det_normal_[2] = (y1-y4)(x2-x4) - (x1-x4)(y2-y4)
}
else if($\xi + \eta + \zeta$ == 1.0)
{
det_normal_[0] = (y2-y1)(z3-z1) - (y3-y1)(z2-z1)
det_normal_[1] = (z2-z1)(x3-x1) - (z3-z1)(x2-x1)
det_normal_[2] = (x2-x1)(y3-y1) - (x3-x1)(y2-y1)
}

    sh_[0] = xi_;
    sh_[1] = eta_;
    sh_[2] = zeta_;
    sh_[3] = 1.0 - xi_ - eta_ - zeta_;

    dsh_dxi_[0] = 1.0;      dsh_dxi_[1] = 0.0;     dsh_dxi_[2] = 0.0;    dsh_dxi_[3] = -1.0;        
   dsh_deta_[0] = 0.0;     dsh_deta_[1] = 1.0;    dsh_deta_[2] = 0.0;   dsh_deta_[3] = -1.0;
  dsh_dzeta_[0] = 0.0;    dsh_dzeta_[1] = 0.0;   dsh_dzeta_[2] = 1.0;  dsh_dzeta_[3] = -1.0;

// -------for volume integrals ---------------------------------

    // Gauss quadrature points for numerical integration:

    gp_[0] = point_3d(0.5854101966249685, 0.1381966011250105, 0.1381966011250105);
    gp_[1] = point_3d(0.1381966011250105, 0.5854101966249685, 0.1381966011250105);
    gp_[2] = point_3d(0.1381966011250105, 0.1381966011250105, 0.5854101966249685);
    gp_[3] = point_3d(0.1381966011250105, 0.1381966011250105, 0.1381966011250105);

    W = 1.0/24.0;       // Weight of integration points

// -------for surface integrals ---------------------------------

   // the order of nodes is anticlockwise looking from outside of the face
    face_[0] = {1,3,2};  // xi=0; eta-zeta plane
    face_[1] = {0,2,3};  // eta=0; xi-zeta plane
    face_[2] = {0,3,1};  // zeta=0; xi-eta plane
    face_[3] = {0,1,2};  // xi + eta + zeta = 1 plane

    // Gauss quadrature points
    face_gn_[0] = {  
                     point_3d(0.0, 4.0/6.0, 1.0/6.0), 
                     point_3d(0.0, 1.0/6.0, 1.0/6.0), 
                     point_3d(0.0, 1.0/6.0, 4.0/6.0)
                  };  // xi=0; eta-zeta plane

    face_gn_[1] = {
                     point_3d(4.0/6.0, 0.0, 1.0/6.0), 
                     point_3d(1.0/6.0, 0.0, 4.0/6.0), 
                     point_3d(1.0/6.0, 0.0, 1.0/6.0)
                  };  // eta=0; xi-zeta plane

    face_gn_[2] = {  
                     point_3d(4.0/6.0, 1.0/6.0, 0.0), 
                     point_3d(1.0/6.0, 1.0/6.0, 0.0), 
                     point_3d(1.0/6.0, 4.0/6.0, 0.0)
                  };  // zeta=0; xi-eta plane

    face_gn_[3] = {
                     point_3d(4.0/6.0, 1.0/6.0, 1.0/6.0), 
                     point_3d(1.0/6.0, 4.0/6.0, 1.0/6.0), 
                     point_3d(1.0/6.0, 1.0/6.0, 4.0/6.0)
                  };  // xi + eta + zeta = 1 plane

    W = 1.0/6.0;


// Area vectors for each face 

    if(xi_ == 0.0)
    {
      det_normal_[0] = (y3-y4)*(z2-z4) - (y2-y4)*(z3-z4);
      det_normal_[1] = (z3-z4)*(x2-x4) - (z2-z4)*(x3-x4);
      det_normal_[2] = (x3-x4)*(y2-y4) - (x2-x4)*(y3-y4);
    }
    else if(eta_ == 0.0)
    {
      det_normal_[0] = (y1-y4)*(z3-z4) - (y3-y4)*(z1-z4);
      det_normal_[1] = (z1-z4)*(x3-x4) - (z3-z4)*(x1-x4);
      det_normal_[2] = (x1-x4)*(y3-y4) - (x3-x4)*(y1-y4);
    }
    else if(zeta_ == 0.0)
    {
      det_normal_[0] = (z1-z4)*(y2-y4) - (y1-y4)*(z2-z4);
      det_normal_[1] = (x1-x4)*(z2-z4) - (z1-z4)*(x2-x4);
      det_normal_[2] = (y1-y4)*(x2-x4) - (x1-x4)*(y2-y4);
    }
    else if(xi_ + eta_ + zeta_ == 1.0)
    {
      det_normal_[0] = (y2-y1)*(z3-z1) - (y3-y1)*(z2-z1);
      det_normal_[1] = (z2-z1)*(x3-x1) - (z3-z1)*(x2-x1);
      det_normal_[2] = (x2-x1)*(y3-y1) - (x3-x1)*(y2-y1);        
    }      

$N_0 = \xi$
$N_1 = \eta$
$N_2 = \zeta$
$N_3 = 1-\xi-\eta-\zeta$

$N_{0,\xi}$ = 1.0
$N_{1,\xi}$ = 0.0
$N_{2,\xi}$ = 0.0
$N_{3,\xi}$ = -1.0

$N_{0,\eta}$ = 0.0
$N_{1,\eta}$ = 1.0
$N_{2,\eta}$ = 0.0
$N_{3,\eta}$ = -1.0

$N_{0,\zeta}$ = 0.0
$N_{1,\zeta}$ = 0.0
$N_{2,\zeta}$ = 1.0
$N_{3,\zeta}$ = -1.0

-------for volume integrals ---------------------------------
// Gauss quadrature points for numerical integration:
(0.5854101966249685, 0.1381966011250105, 0.1381966011250105)
(0.1381966011250105, 0.5854101966249685, 0.1381966011250105)
(0.1381966011250105, 0.1381966011250105, 0.5854101966249685)
(0.1381966011250105, 0.1381966011250105, 0.1381966011250105)

// Weight of integration points
$W = \frac{1}{24}$

-------for surface integrals ---------------------------------

face_[0] = {1,3,2} // $\xi=0$
face_[1] = {0,2,3} // $\eta=0$
face_[2] = {0,3,1} // $\zeta=0$
face_[3] = {0,1,2} // $\xi + \eta + \zeta = 1$

// Gauss quadrature points
for face 1 $(0, \frac{2}{3}, \frac{1}{6}), (0, \frac{1}{6}, \frac{1}{6}), (0, \frac{1}{6}, \frac{2}{3})$

for face 2 $(\frac{2}{3}, 0, \frac{1}{6}), (\frac{1}{6}, 0, \frac{1}{6}), (\frac{1}{6}, 0, \frac{2}{3})$

for face 3 $(\frac{2}{3}, \frac{1}{6}, 0), (\frac{1}{6}, \frac{1}{6}, 0), (\frac{1}{6}, \frac{2}{3}, 0)$

for face 4 $(\frac{2}{3}, \frac{1}{6}, \frac{1}{6}), (\frac{1}{6}, \frac{2}{3}, \frac{1}{6}), (\frac{1}{6}, \frac{1}{6}, \frac{2}{3})$

// Weight of integration points
$W = \frac{1}{6}$

// Area vectors for each face

if($\xi$ == 0.0)
{
det_normal_[0] = (y3-y4)(z2-z4) - (y2-y4)(z3-z4)
det_normal_[1] = (z3-z4)(x2-x4) - (z2-z4)(x3-x4)
det_normal_[2] = (x3-x4)(y2-y4) - (x2-x4)(y3-y4)
}
else if($\eta$ == 0.0)
{
det_normal_[0] = (y1-y4)(z3-z4) - (y3-y4)(z1-z4)
det_normal_[1] = (z1-z4)(x3-x4) - (z3-z4)(x1-x4)
det_normal_[2] = (x1-x4)(y3-y4) - (x3-x4)(y1-y4)
}
else if($\zeta$ == 0.0)
{
det_normal_[0] = (z1-z4)(y2-y4) - (y1-y4)(z2-z4)
det_normal_[1] = (x1-x4)(z2-z4) - (z1-z4)(x2-x4)
det_normal_[2] = (y1-y4)(x2-x4) - (x1-x4)(y2-y4)
}
else if($\xi + \eta + \zeta$ == 1.0)
{
det_normal_[0] = (y2-y1)(z3-z1) - (y3-y1)(z2-z1)
det_normal_[1] = (z2-z1)(x3-x1) - (z3-z1)(x2-x1)
det_normal_[2] = (x2-x1)(y3-y1) - (x3-x1)(y2-y1)
}

Source Link
Loading