Generated from zone_potential.F90 with ROBODoc v3.2.3 on Fri Dec 12 10:17:45 2003

TABLE OF CONTENTS

  1. source/solvers/poisson/multipole_opt/zone_potential

source/solvers/poisson/multipole_opt/zone_potential

NAME

  zone_potential


SYNOPSIS
  zone_potential(xprime, yprime, zprime, potential)

  zone_potential(real, real, real, real)


DESCRIPTION
  A routine to calculate the value of the potential at one location using 
  the moments of the interior and exterior mass distributions.


ARGUMENTS
  x/y/zprime      Coordinates of the current zone, relative to the center 
                  of mass

  potential       The (estimated) value of the potential in the current 
                  zone (output)

USES
  mpole_common:

  mpole_lmax          Maximum moment number (runtime parameter)

  Moment(q,i,j,l,m)   The moments of the mass distribution (partially 
                      summed).  q = dividing radius; i = Even/Odd; 
                      j = Inner/Outer; l, m = multipole indices.

  costable(m)         Table containing the cosine of m * the current
                      azimuthal angle; also sintable(m)

  rpower(l)           The value of rprime^l

  rprinv(l)           The current cell's density * rprime^-(l+1)


NOTES

  On exit, the potential at the specified location (actually, the estimate 
  based on the multipole expansion) is contained in potential.

  The associated Legendre polynomial values are calculated using a recurrence 
  relation given in Press et al. (2d ed) pp 247-8.  The loops over l and m 
  are arranged so as to most efficiently utilize this relation (ie. first 
  loop over m, then over l).  The cosines and sines of multiples of the 
  azimuthal angle are computed using the recurrence relations for the cosine 
  and sine functions (see Press et al. p173).

  To obtain the zone-averaged potential, mpole_potential calls this routine 
  for several different points within a zone, then finds the average of the 
  returned values.