beginning to fold in HOD code with jeremy tinker's approval

This commit is contained in:
P.M. Sutter 2013-12-30 22:48:07 -06:00
parent d8108d3a8e
commit 44cd0eb71f
95 changed files with 21950 additions and 0 deletions

23
c_tools/hod/splin2.c Normal file
View file

@ -0,0 +1,23 @@
#define NRANSI
#include "nrutil.h"
void splin2(double x1a[], double x2a[], double **ya, double **y2a, int m, int n,
double x1, double x2, double *y)
{
void spline(double x[], double y[], int n, double yp1,
double ypn, double y2[]);
void splint(double xa[], double ya[], double y2a[], int n,
double x, double *y);
int j;
double *ytmp,*yytmp;
ytmp=dvector(1,n);
yytmp=dvector(1,n);
for (j=1;j<=m;j++)
splint(x2a,ya[j],y2a[j],n,x2,&yytmp[j]);
spline(x1a,yytmp,m,1.0e30,1.0e30,ytmp);
splint(x1a,yytmp,ytmp,m,x1,y);
free_dvector(yytmp,1,n);
free_dvector(ytmp,1,n);
}
#undef NRANSI