| Xmath - The eXtended Math Library |
| Introduction |
When writing scientific programs the computational scientist often has to solve reoccurring numerical problems. Now there exists of course a wealth of numerical libraries for exactly this reason. Most of these libraries are written in FORTRAN and issues such as index order and dynamic memory allocation render their use in C programs very inflexible and hindering. The existing C adaptations of these established libraries are merely more than a change in syntax and do not change the inherent shortcomings.
Consequently we started collecting the numerical functions that were needed in our scientific projects in a distinguished library, the eXtended Math Library. At the moment the Xmath library is comprised of eight modules, each covering a certain area of numerical problems. The Xmath library is not meant to be a complete numerical library by any means but rather serves as a small, self contained set of functions that were needed for our own projects.
| Download & Install |
Download the latest Xmath package:
Xmath-Gans-2.tgz
Then typetar xzvf Xmath-Gans.tgzto unpack or, alternatively, gunzip and untar the file in two separate steps. This creates a directory namedXmathwhich contains all the necessary files. Change into this directory and customize themakefile. Then typemake. This should leave you with the library file namedlibxmath.a.Note: For convenience the Xmath package includes pre-compiled static library files in the FFTw subdirectory that contain the functions of the FFTw library. The provided library files cover a variety of platforms and compilers:
Libraries for additional platforms or compilers can be generated by installing the FFTw package.
libfftw-cygwin.a/librfftw-cygwin.a- Cygwin with GCClibfftw-gcc2.0.a/librfftw-gcc2.0.a- GNU/Linux with GCC andglibc 2.0.*libfftw-gcc2.1.a/librfftw-gcc2.1.a- GNU/Linux with GCC andglibc 2.1.*libfftw-pgcc2.0.a/librfftw-pgcc2.0.a- GNU/Linux with PGCC andglibc 2.0.*libfftw-pgcc2.1.a/librfftw-pgcc2.1.a- GNU/Linux with PGCC andglibc 2.1.*libfftw-sgi.a/librfftw-sgi.a- SGI/IRIX with MIPS C Compiler (32 bit)libfftw-sgi64.a/librfftw-sgi64.a- SGI/IRIX with MIPS C Compiler (64 bit)
| Xmath Modules |
xmalloc Simplifies the handling of dynamic arrays of various types and dimensions. Includes functions to allocate continuous memory, multi-index arrays.
xmcomplex Complex data types and associated functions... Until we all have C99 compilers...
xmfft Access to the well established FFTw library. The main reason for this wrapper module was our wish to allow easy access to other FFT libraries without causing major changes in the programs that use the Xmath library. For this reason many of the flexible FFTw calls are wrapped in very specific xmfft calls. At this point xmfft supports FFTw 2.1.2. To use the xmfft functions the FFTw library needs to be installed on the system. Xmath's subdirectory FFTw is the default location and should contain the two header filesfftw.handrfftw.hnext to the actual library files which need to be linked to the code that uses calls from the xmfft module.
xmintegral Simple Simpson form for numerical integration.
xminterpol 3rd order Simpson's rule interpolation.
xmisosurf Isosurface routines for three dimensional data arrays.
xmlinalg Basic linear algebra routines.
xmmisc Short miscellaneous calls.
| To Do List |
- Use of MPI routines for the FFTw calls in xmfft
| Copyleft |
'Xmath' - The eXtended Math Library
Copyright (C) 2000 University of California, Santa Barbara
This program 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 program 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 program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA