$Header$ This directory contains the interpolator registered for CCTK_InterpLocalUniform() under the name "generalized polynomial interpolation" The source code files are as follows: * startup.c registers the interpolation operator * InterpLocalUniform.c is the top-level driver: it gets the various options from the parameter table, then decodes (N_dims, molecule_family, order, smoothing) and calls the appropriate subfunction to do the actual interpolation, then finally stores some results back in the parameter table. * [123]d.cube.order*.smooth*.c define the individual interpolation subfunctions. Each of them just #defines a whole bunch of macros, then #includes template.c (which has the actual code). * template.c is the actual interpolation code. It is written in terms of a large number of macros, which should be #defined before #including template.c. There's a long block comment "Implementation notes:" at the start of the function, which gives an outline of how the function works. (This is probably the best place to start reading if you want to understand this interpolator!) All the actual interpolation is done by Maple-generated code fragments in the [123]d.coeffs/directories; template.c uses various macros to tell it which fragments to #include. * [123]d.maple are the top-level Maple code files; they call various functions in interpolate.maple and util.maple to do the actual work. * interpolate.maple contains the high-level Maple code for computing an interpolant and manipulating/printing it in various ways * util.maple contains low-level utility routines To add a new combination of (N_dims, molecule_family, order, smoothing), to this interpolator, you need to * edit the appropriate Maple script (1d.maple, 2d.maple, 3d.maple, etc) to generate the coefficients and write the appropriate files * edit the makefile to create the appropriate directory or directories, and if necessary add any new targets * 'make' as appropriate to create the new coefficients etc [note this can be rather computationally intensive -- the current set of {1d,2d,3d} coefficients take {4 seconds, 15 seconds, 8 minutes} to generate using Maple 7 on a xeon (1.7 GHz Pentium 4)] * edit InterpLocalUniform.c to add the new case to the decoding switch statements * create an appropriate "script" file which defines the right macros, then does a #include "template.c" to define the actual interpolation function; the best way to create the script file is just to copy an existing one (eg. 2d.cube.order3.smooth0.c) * add the appropriate entry to all_prototypes.h to define a prototype for the actual interpolation function * add the new "script" file to the list in make.code.defn Other makefile targets: test_molecule_posn This makes a standalone test driver for the LocalInterp_molecule_posn() function defined in molecule_posn.c Copyright ========= This interpolator is copyright (C) 2002-2003 by Jonathan Thornburg . This interpolator is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This interpolator is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this thorn (see the file COPYING in this directory); if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA