parameters: (p, sourcePos, k, sigma=1)
docstring: Calculates the analytical solution for the 2.5D geoelectrical problem.
  
      Solves the 2.5D geoelectrical problem for one wave number k.
      It calculates the normalized (for injection current 1 A and sigma=1 S/m)
      potential at position p for a current injection at position sourcePos.
      Injection at the subsurface is recognized via mirror sources along the
      surface at depth=0.
  
      Parameters
      ----------
      p : pg.Pos
          Position for the sought potential
      sourcePos : pg.Pos
          Current injection position.
      k : float
          Wave number
  
      Returns
      -------
      u : float
          Solution u(p)
docstring_summary: Calculates the analytical solution for the 2.5D geoelectrical problem.
docstring_tokens: Calculates the analytical solution for the 2 . 5D geoelectrical problem .
function: def uAnalytical(p, sourcePos, k, sigma=1):
      """Calculates the analytical solution for the 2.5D geoelectrical problem.
  
      Solves the 2.5D geoelectrical problem for one wave number k.
      It calculates the normalized (for injection current 1 A and sigma=1 S/m)
      potential at position p for a current injection at position sourcePos.
      Injection at the subsurface is recognized via mirror sources along the
      surface at depth=0.
  
      Parameters
      ----------
      p : pg.Pos
          Position for the sought potential
      sourcePos : pg.Pos
          Current injection position.
      k : float
          Wave number
  
      Returns
      -------
      u : float
          Solution u(p)
      """
      r1A = (p - sourcePos).abs()
      # Mirror on surface at depth=0
      r2A = (p - pg.Pos([1.0, -1.0])*sourcePos).abs()
  
      if r1A > 1e-12 and r2A > 1e-12:
          return  1 / (2.0 * np.pi) * 1/sigma * \
              (pg.math.besselK0(r1A * k) + pg.math.besselK0(r2A * k))
      else:
          return 0.
function_tokens: def uAnalytical ( p , sourcePos , k , sigma = 1 ) : r1A = ( p - sourcePos ) . abs ( ) # Mirror on surface at depth=0 r2A = ( p - pg . Pos ( [ 1.0 , - 1.0 ] ) * sourcePos ) . abs ( ) if r1A > 1e-12 and r2A > 1e-12 : return 1 / ( 2.0 * np . pi ) * 1 / sigma * ( pg . math . besselK0 ( r1A * k ) + pg . math . besselK0 ( r2A * k ) ) else : return 0.