[CSC 335] Help with Gauss-Laguerre
Andrew J. Pounds
pounds_aj at mercer.edu
Sun Oct 20 21:26:56 EDT 2013
Gentlemen -- some of you seem to be having difficulty unravelling the
Gauss-Laguerre quadrature problem I gave you. To give you a hand, here
is my definition of the integrand in python...
def fofx(x):
r = x*0.529e-10
Z = 1.0
a0 = 0.529e-10
a = 1.0 / (4.0 * math.sqrt(2.0*math.pi))*math.pow(Z/a0,3.0/2.0)
b = 2.0 - Z/a0*r
c = math.exp(-(Z/a0*r)/2.0)
psi = a*b*c
return psi*psi*math.pow(r,3)
and my gaussian quadrature summation in python looks like
sum += W[i] * fofx(X[i]) * math.exp(X[i])
where the W[i] and X[i] are the weights and abscissi respectively.
--
Andrew J. Pounds, Ph.D. (pounds_aj at mercer.edu)
Professor of Chemistry and Computer Science
Mercer University, Macon, GA 31207 (478) 301-5627
http://faculty.mercer.edu/pounds_aj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc335/attachments/20131020/922d2ea6/attachment.html>
More information about the csc335
mailing list