We use code from the book Numerical Recipes in C (available online at the Universal Library ) to solve a nonlinear optimization problem that arises in lightning structure analysis. This library is provided as a group of functions in C. We communicate with it by defining functions with special names, setting the values of certain global variables, and then calling the functions in the NR library to solve the system and leave the results in global variables. Since the NR functions all use FORTRAN indexing conventions, we must also convert arrays to and from this format. This is quite awkward.
author(s): Andrew Wilson,
Eric D. Baker
last update: 10 May 1999 3:22p by Eric D. Baker