class_docstr: Implementation of reduced HCT triangular element with explicit shape
  functions.
  
  Computes z, dz, d2z and the element stiffness matrix for bending energy:
  E(f) = integral( (d2z/dx2 + d2z/dy2)**2 dA)
  
  *** Reference for the shape functions: ***
  [1] Basis functions for general Hsieh-Clough-Tocher _triangles, complete or
      reduced.
      Michel Bernadou, Kamal Hassan
      International Journal for Numerical Methods in Engineering.
      17(5):784 - 789.  2.01
  
  *** Element description: ***
  9 dofs: z and dz given at 3 apex
  C1 (conform)
class_docstr_tok: ["Implementation","of","reduced","HCT","triangular","element","with","explicit","shape","functions",".","Computes","z",",","dz",",","d2z","and","the","element","stiffness","matrix","for","bending","energy",":","E","(","f",")","=","integral","(","(","d2z\/dx2","+","d2z\/dy2",")","*","*","2","dA",")","*","*","*","Reference","for","the","shape","functions",":","*","*","*","[","1","]","Basis","functions","for","general","Hsieh-Clough-Tocher","_triangles",",","complete","or","reduced",".","Michel","Bernadou",",","Kamal","Hassan","International","Journal","for","Numerical","Methods","in","Engineering",".","17","(","5",")",":784","-","789",".","2.01","*","*","*","Element","description",":","*","*","*","9","dofs",":","z","and","dz","given","at","3","apex","C1","(","conform",")"]
docstr: Parameters
  ----------
  *J* is a (N x 2 x 2) array of jacobian matrices (jacobian matrix at
  triangle first apex)
  
  Returns
  -------
  Returns H_rot used to rotate Hessian from local basis of first apex,
  to global coordinates.
  if *return_area* is True, returns also the triangle area (0.5*det(J))
docstr_tok: ["Parameters","--","--","--","--","--","*","J","*","is","a","(","N","x","2","x","2",")","array","of","jacobian","matrices","(","jacobian","matrix","at","triangle","first","apex",")","Returns","--","--","--","-","Returns","H_rot","used","to","rotate","Hessian","from","local","basis","of","first","apex",",","to","global","coordinates",".","if","*","return_area","*","is","True",",","returns","also","the","triangle","area","(","0.5","*","det","(","J",")",")"]
code: def get_Hrot_from_J(self, J, return_area=False):
      """
      Parameters
      ----------
      *J* is a (N x 2 x 2) array of jacobian matrices (jacobian matrix at
      triangle first apex)
  
      Returns
      -------
      Returns H_rot used to rotate Hessian from local basis of first apex,
      to global coordinates.
      if *return_area* is True, returns also the triangle area (0.5*det(J))
      """
      # Here we try to deal with the simplest colinear cases; a null
      # energy and area is imposed.
      J_inv = _safe_inv22_vectorized(J)
      Ji00 = J_inv[:, 0, 0]
      Ji11 = J_inv[:, 1, 1]
      Ji10 = J_inv[:, 1, 0]
      Ji01 = J_inv[:, 0, 1]
      H_rot = _to_matrix_vectorized(
          [
              [Ji00 * Ji00, Ji10 * Ji10, Ji00 * Ji10],
              [Ji01 * Ji01, Ji11 * Ji11, Ji01 * Ji11],
              [
                  2 * Ji00 * Ji01,
                  2 * Ji11 * Ji10,
                  Ji00 * Ji11 + Ji10 * Ji01,
              ],
          ]
      )
      if not return_area:
          return H_rot
      else:
          area = 0.5 * (
              J[:, 0, 0] * J[:, 1, 1] - J[:, 0, 1] * J[:, 1, 0]
          )
          return H_rot, area
  
imports: import numpy
  from matplotlib import _api
  from matplotlib.tri import Triangulation
  from matplotlib.tri._trifinder import TriFinder
  from matplotlib.tri._tritools import TriAnalyzer
label_desc: Use image node_id 6 for calling the _ReducedHCT_Element obj's underlying member method code with example usage: obj.get_Hrot_from_J(J, return_area) and returns: H_rot, H_rot,  area