-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rewrote czspline to use iso_c_binding.
- Loading branch information
Showing
11 changed files
with
1,242 additions
and
1,077 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,42 @@ | ||
# pspline | ||
PSPLINE -- a collection of Spline and Hermite interpolation tools for 1D, 2D, and 3D datasets on rectilinear grids developed as part of the TRANSP code. | ||
|
||
![GitHub release (latest by date including pre-releases)](https://img.shields.io/github/v/release/transp/pspline?include_prereleases) | ||
|
||
## About | ||
|
||
PSPLINE is a collection of Spline and Hermite interpolation tools for 1D, 2D, and 3D datasets on rectilinear grids developed as part of the TRANSP code. | ||
|
||
The spline routines give full control over boundary conditions -- the user may specify "periodic", "not a knot", 1st derivative match, 2nd derivative match, or divided difference based boundary conditions on either end of each grid dimension. Hermite routines take as input the function value and derivatives at each grid point, giving back a representation of the function between grid points. Routines are provided for creating Hermite datasets, with appropriate boundary conditions applied. The 1D spline and Hermite routines are based on standard methods; the 2D and 3D spline or Hermite interpolation functions are constructed from 1D spline or Hermite interpolation functions in a straightforward manner. The splines are continuously twice differentiable in all directions across all grid cell boundaries and over the entire grid domain; Hermite functions are continuously once differentiable in all directions over the entire grid domain. For a representation of dimensionality N, an N-dimensional spline or Hermite function requires 2\*\*N\*(nx1\*nx2\*...\*nxN) memory words. There is also an "explicit spline" representation requiring 4\*\*N\*(nx1\*nx2\*...\*nxN) memory words: much more memory but somewhat faster computationally. Spline and Hermite interpolation functions are often much faster to evaluate than other representations using e.g. Fourier series or otherwise involving transcendental functions. | ||
|
||
This version of PSPLINE includes EZspline, a Fortran-90 interface to the spline and Hermite routines. Currently working on C-bindings for EZspline which will replace CZspline (a c-callable interface to the EZspline routines). | ||
This version of PSPLINE includes EZspline, a Fortran-90 interface to the spline and Hermite routines. CZSPLINE, a c-callable interface to the EZspline routines, was rewritten in 10/2019 to use the Fortran instrinic iso_c_binding. | ||
|
||
|
||
CONTACT: [email protected] | ||
## Contact | ||
|
||
[email protected] | ||
|
||
|
||
1. CONTENTS: | ||
## Contents | ||
|
||
Makefile: GNU make should be used | ||
Makefile.def Definitions for the Makefile | ||
|
||
Source directories for: | ||
pspline The original pspline F77 routines, reformatted into Fortran 90 | ||
ezspline A Fortran-90 interface to the spline and Hermite routines | ||
czspline A C/C++ callable interface to ezpsline, using Fortran intrinsic iso_c_bindings | ||
|
||
Test programs are included in the source directories. | ||
|
||
|
||
2. CONFIGURATION | ||
## Configuration | ||
|
||
See the sample configuration used at PPPL: pppl-bashrc | ||
|
||
If you want to use the NETCDF I/O capability with EZspline then you must have the EZCDF library installed. It is also on github: https://github.com/transp/ezcdf. See the PPPL configuration file for how to include EZCDF with PSPLINE. | ||
|
||
|
||
3. BUILDING INSTRUCTIONS: | ||
## Build | ||
|
||
make -- will build libpspline.a and the test programs | ||
make debug -- will build a debug version of libpspline.a | ||
|
@@ -40,7 +47,7 @@ make clobber -- will run clean and remove the libs and test programs | |
The Makefile.def is set-up for compiling with the GNU, Intel, and Portland group compilers. | ||
|
||
|
||
4. INSTALLATION: | ||
## Install | ||
|
||
Installation will be put in a location specified by the PREFIX environment variable. The directory './build/' will be used if not specified. Installation done with: | ||
|
||
|
@@ -51,3 +58,10 @@ You can specify the PREFIX with the make command: | |
|
||
make PREFIX=/path/to/location install | ||
make PREFIX=/path/to/location uninstall | ||
|
||
|
||
## Support | ||
|
||
This project was supported by TRANSP development at the Princeton Plasma Physics Laboratory via `U.S. Department of Energy (DE-AC02-09CH11466)`. | ||
|
||
|
Oops, something went wrong.