mirror of
https://bitbucket.org/cosmicvoids/vide_public.git
synced 2025-07-04 23:31:12 +00:00
beginning to fold in HOD code with jeremy tinker's approval
This commit is contained in:
parent
d8108d3a8e
commit
44cd0eb71f
95 changed files with 21950 additions and 0 deletions
23
c_tools/hod/splin2.c
Normal file
23
c_tools/hod/splin2.c
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue