parameters: (pnts, t, rho, pos=(0.0, 0.0))
return_statement: return gu
docstring: r"""Gravitational field od a horizontal half plate.
  
      .. math:: g = -grad u,
  
      Parameters
      ----------
      pnts   :
  
      t   :
  
      rho :
          Density in [kg/m^3]
  
      Returns
      -------
      gz:
          z-component of g
          .. math:: \nabla(\partial u/\partial\vec{r})_z
docstring_summary: r"""Gravitational field od a horizontal half plate.
docstring_tokens: r Gravitational field od a horizontal half plate .
function: def gradUHalfPlateHoriz(pnts, t, rho, pos=(0.0, 0.0)):
      r"""Gravitational field od a horizontal half plate.
  
      .. math:: g = -grad u,
  
      Parameters
      ----------
      pnts   :
  
      t   :
  
      rho :
          Density in [kg/m^3]
  
      Returns
      -------
      gz:
          z-component of g
          .. math:: \nabla(\partial u/\partial\vec{r})_z
      """
      gu = np.zeros((len(pnts), 2))
  
      for i, q in enumerate(pnts):
          zz1 = q[1] - pos[1]
          xx1 = q[0] - pos[0]
          # TODO: Fix first column of gu
          # gu[i][0] = G * rho * (np.pi - 3. * \
          # np.arctan((q[0] - pos[0]) / (q[1] - pos[1])))
          gu[i][1] = -G * rho * t * (np.pi + 2.0 * np.arctan2(xx1, zz1)) * -1.
  
      return gu
function_tokens: def gradUHalfPlateHoriz ( pnts , t , rho , pos = ( 0.0 , 0.0 ) ) : gu = np . zeros ( ( len ( pnts ) , 2 ) ) for i , q in enumerate ( pnts ) : zz1 = q [ 1 ] - pos [ 1 ] xx1 = q [ 0 ] - pos [ 0 ] # TODO: Fix first column of gu # gu[i][0] = G * rho * (np.pi - 3. * \ # np.arctan((q[0] - pos[0]) / (q[1] - pos[1]))) gu [ i ] [ 1 ] = - G * rho * t * ( np . pi + 2.0 * np . arctan2 ( xx1 , zz1 ) ) * - 1. return gu