Skip to content

Commit 1bd92a3

Browse files
committed
removed tabs and formatted c and h files with emacs.
1 parent eb028b5 commit 1bd92a3

File tree

204 files changed

+30042
-29967
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

204 files changed

+30042
-29967
lines changed

advance.c

+349-349
Large diffs are not rendered by default.

bcucof.c

+35-35
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,42 @@
11
#include "decs.h"
22

33
void bcucof(FTYPE y[], FTYPE y1[], FTYPE y2[], FTYPE y12[], FTYPE d1, FTYPE d2,
4-
FTYPE **c)
4+
FTYPE **c)
55
{
6-
static int wt[16][16]=
7-
{ 1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
8-
0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,
9-
-3,0,0,3,0,0,0,0,-2,0,0,-1,0,0,0,0,
10-
2,0,0,-2,0,0,0,0,1,0,0,1,0,0,0,0,
11-
0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,
12-
0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,
13-
0,0,0,0,-3,0,0,3,0,0,0,0,-2,0,0,-1,
14-
0,0,0,0,2,0,0,-2,0,0,0,0,1,0,0,1,
15-
-3,3,0,0,-2,-1,0,0,0,0,0,0,0,0,0,0,
16-
0,0,0,0,0,0,0,0,-3,3,0,0,-2,-1,0,0,
17-
9,-9,9,-9,6,3,-3,-6,6,-6,-3,3,4,2,1,2,
18-
-6,6,-6,6,-4,-2,2,4,-3,3,3,-3,-2,-1,-1,-2,
19-
2,-2,0,0,1,1,0,0,0,0,0,0,0,0,0,0,
20-
0,0,0,0,0,0,0,0,2,-2,0,0,1,1,0,0,
21-
-6,6,-6,6,-3,-3,3,3,-4,4,2,-2,-2,-2,-1,-1,
22-
4,-4,4,-4,2,2,-2,-2,2,-2,-2,2,1,1,1,1};
23-
int l,k,j,i;
24-
FTYPE xx,d1d2,cl[16],x[16];
6+
static int wt[16][16]=
7+
{ 1,0,0,0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}
33+
for (i=0;i<=15;i++) {
34+
xx=0.0;
35+
for (k=0;k<=15;k++) xx += wt[i][k]*x[k];
36+
cl[i]=xx;
37+
}
38+
l=0;
39+
for (i=1;i<=4;i++)
40+
for (j=1;j<=4;j++) c[i][j]=cl[l++];
4141
}
4242
/* (C) Copr. 1986-92 Numerical Recipes Software *1.@Q.. */

bcuint.c

+22-22
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,30 @@
22
#include "decs.h"
33

44
void bcuint(FTYPE y[], FTYPE y1[], FTYPE y2[], FTYPE y12[], FTYPE x1l,
5-
FTYPE x1u, FTYPE x2l, FTYPE x2u, FTYPE x1, FTYPE x2, FTYPE *ansy,
6-
FTYPE *ansy1, FTYPE *ansy2)
5+
FTYPE x1u, FTYPE x2l, FTYPE x2u, FTYPE x1, FTYPE x2, FTYPE *ansy,
6+
FTYPE *ansy1, FTYPE *ansy2)
77
{
8-
void bcucof(FTYPE y[], FTYPE y1[], FTYPE y2[], FTYPE y12[], FTYPE d1,
9-
FTYPE d2, FTYPE **c);
10-
int i;
11-
FTYPE t,u,d1,d2,**c;
8+
void bcucof(FTYPE y[], FTYPE y1[], FTYPE y2[], FTYPE y12[], FTYPE d1,
9+
FTYPE d2, FTYPE **c);
10+
int i;
11+
FTYPE t,u,d1,d2,**c;
1212

13-
c=fmatrix(1,4,1,4);
14-
d1=x1u-x1l;
15-
d2=x2u-x2l;
16-
bcucof(y,y1,y2,y12,d1,d2,c);
17-
if (x1u == x1l || x2u == x2l) nrerror("Bad input in routine bcuint");
18-
t=(x1-x1l)/d1;
19-
u=(x2-x2l)/d2;
20-
*ansy=(*ansy2)=(*ansy1)=0.0;
21-
for (i=4;i>=1;i--) {
22-
*ansy=t*(*ansy)+((c[i][4]*u+c[i][3])*u+c[i][2])*u+c[i][1];
23-
*ansy2=t*(*ansy2)+(3.0*c[i][4]*u+2.0*c[i][3])*u+c[i][2];
24-
*ansy1=u*(*ansy1)+(3.0*c[4][i]*t+2.0*c[3][i])*t+c[2][i];
25-
}
26-
*ansy1 /= d1;
27-
*ansy2 /= d2;
28-
free_fmatrix(c,1,4,1,4);
13+
c=fmatrix(1,4,1,4);
14+
d1=x1u-x1l;
15+
d2=x2u-x2l;
16+
bcucof(y,y1,y2,y12,d1,d2,c);
17+
if (x1u == x1l || x2u == x2l) nrerror("Bad input in routine bcuint");
18+
t=(x1-x1l)/d1;
19+
u=(x2-x2l)/d2;
20+
*ansy=(*ansy2)=(*ansy1)=0.0;
21+
for (i=4;i>=1;i--) {
22+
*ansy=t*(*ansy)+((c[i][4]*u+c[i][3])*u+c[i][2])*u+c[i][1];
23+
*ansy2=t*(*ansy2)+(3.0*c[i][4]*u+2.0*c[i][3])*u+c[i][2];
24+
*ansy1=u*(*ansy1)+(3.0*c[4][i]*t+2.0*c[3][i])*t+c[2][i];
25+
}
26+
*ansy1 /= d1;
27+
*ansy2 /= d2;
28+
free_fmatrix(c,1,4,1,4);
2929
}
3030
#undef NRANSI
3131
/* (C) Copr. 1986-92 Numerical Recipes Software *1.@Q.. */

0 commit comments

Comments
 (0)