parameters: (mesh, b=None)
return_statement: return B
docstring: r"""Create the mass matrix.
  
      Calculates the Mass matrix (Finite element identity matrix) the given mesh.
  
      ..math::
              ...
  
      Parameters
      ----------
      mesh : :gimliapi:`GIMLI::Mesh`
  
          Arbitrary mesh to calculate the mass element matrix.
          Type of base and shape functions depends on the cell types.
  
      b : array
          Per cell values. If None given default is 1.
  
      Returns
      -------
      A : :gimliapi:`GIMLI::RSparseMatrix`
          Mass element matrix
docstring_summary: r"""Create the mass matrix.
docstring_tokens: r Create the mass matrix .
function: def createMassMatrix(mesh, b=None):
      r"""Create the mass matrix.
  
      Calculates the Mass matrix (Finite element identity matrix) the given mesh.
  
      ..math::
              ...
  
      Parameters
      ----------
      mesh : :gimliapi:`GIMLI::Mesh`
  
          Arbitrary mesh to calculate the mass element matrix.
          Type of base and shape functions depends on the cell types.
  
      b : array
          Per cell values. If None given default is 1.
  
      Returns
      -------
      A : :gimliapi:`GIMLI::RSparseMatrix`
          Mass element matrix
      """
  
      # need callable here
      if b is None:
          b = pg.Vector(mesh.cellCount(), 1.0)
      elif not hasattr(b, '__iter__'):
          b = pg.Vector(mesh.cellCount(), b)
  
      B = pg.matrix.SparseMatrix()
      B.fillMassMatrix(mesh, b)
      return B
function_tokens: def createMassMatrix ( mesh , b = None ) : # need callable here if b is None : b = pg . Vector ( mesh . cellCount ( ) , 1.0 ) elif not hasattr ( b , '__iter__' ) : b = pg . Vector ( mesh . cellCount ( ) , b ) B = pg . matrix . SparseMatrix ( ) B . fillMassMatrix ( mesh , b ) return B