aboutsummaryrefslogtreecommitdiff
path: root/src/GeneralizedPolynomial-Uniform/common/1d.maple
blob: 41c18d891b354d0e93afc494d3997b00e73a8104 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
# Maple code to compute common coefficients for all 1d interpolation schemes
# $Header$

################################################################################

#
# generic stuff for 1d, cube, size=2
#

data_list_1d_size2 := map(data_var_name, posn_list_1d_size2, "data_");
coeffs_list_1d_size2 := map(coeff_name, posn_list_1d_size2, "coeff_");

print_name_list_dcl(data_list_1d_size2, "fp",
		    "1d.cube.size2/data-dcl.h");
print_name_list_dcl(coeffs_list_1d_size2, "fp",
		    "1d.cube.size2/coeffs-dcl.h");

print_fetch_data(posn_list_1d_size2, "data->data_",
		 "1d.cube.size2/fetch-data.c");
print_evaluate_molecule(posn_list_1d_size2,
			"coeffs->coeff_", "data->data_",
			"1d.cube.size2/evaluate-molecule.c");
print_store_coeffs(posn_list_1d_size2,
		   "factor * coeffs->coeff_",
		   "1d.cube.size2/store-coeffs.c");

################################################################################

#
# generic stuff for 1d, cube, size=3
#

data_list_1d_size3 := map(data_var_name, posn_list_1d_size3, "data_");
coeffs_list_1d_size3 := map(coeff_name, posn_list_1d_size3, "coeff_");

print_name_list_dcl(data_list_1d_size3, "fp",
		    "1d.cube.size3/data-dcl.h");
print_name_list_dcl(coeffs_list_1d_size3, "fp",
		    "1d.cube.size3/coeffs-dcl.h");

print_fetch_data(posn_list_1d_size3, "data->data_",
		 "1d.cube.size3/fetch-data.c");
print_evaluate_molecule(posn_list_1d_size3,
			"coeffs->coeff_", "data->data_",
			"1d.cube.size3/evaluate-molecule.c");
print_store_coeffs(posn_list_1d_size3,
		   "factor * coeffs->coeff_",
		   "1d.cube.size3/store-coeffs.c");

################################################################################

#
# generic stuff for 1d, cube, size=4
#

data_list_1d_size4 := map(data_var_name, posn_list_1d_size4, "data_");
coeffs_list_1d_size4 := map(coeff_name, posn_list_1d_size4, "coeff_");

print_name_list_dcl(data_list_1d_size4, "fp",
		    "1d.cube.size4/data-dcl.h");
print_name_list_dcl(coeffs_list_1d_size4, "fp",
		    "1d.cube.size4/coeffs-dcl.h");

print_fetch_data(posn_list_1d_size4, "data->data_",
		 "1d.cube.size4/fetch-data.c");
print_evaluate_molecule(posn_list_1d_size4,
			"coeffs->coeff_", "data->data_",
			"1d.cube.size4/evaluate-molecule.c");
print_store_coeffs(posn_list_1d_size4,
		   "factor * coeffs->coeff_",
		   "1d.cube.size4/store-coeffs.c");

################################################################################

#
# generic stuff for 1d, cube, size=5
#

data_list_1d_size5 := map(data_var_name, posn_list_1d_size5, "data_");
coeffs_list_1d_size5 := map(coeff_name, posn_list_1d_size5, "coeff_");

print_name_list_dcl(data_list_1d_size5, "fp",
		    "1d.cube.size5/data-dcl.h");
print_name_list_dcl(coeffs_list_1d_size5, "fp",
		    "1d.cube.size5/coeffs-dcl.h");

print_fetch_data(posn_list_1d_size5, "data->data_",
		 "1d.cube.size5/fetch-data.c");
print_evaluate_molecule(posn_list_1d_size5,
			"coeffs->coeff_", "data->data_",
			"1d.cube.size5/evaluate-molecule.c");
print_store_coeffs(posn_list_1d_size5,
		   "factor * coeffs->coeff_",
		   "1d.cube.size5/store-coeffs.c");

################################################################################

#
# generic stuff for 1d, cube, size=6
#

data_list_1d_size6 := map(data_var_name, posn_list_1d_size6, "data_");
coeffs_list_1d_size6 := map(coeff_name, posn_list_1d_size6, "coeff_");

print_name_list_dcl(data_list_1d_size6, "fp",
		    "1d.cube.size6/data-dcl.h");
print_name_list_dcl(coeffs_list_1d_size6, "fp",
		    "1d.cube.size6/coeffs-dcl.h");

print_fetch_data(posn_list_1d_size6, "data->data_",
		 "1d.cube.size6/fetch-data.c");
print_evaluate_molecule(posn_list_1d_size6,
			"coeffs->coeff_", "data->data_",
			"1d.cube.size6/evaluate-molecule.c");
print_store_coeffs(posn_list_1d_size6,
		   "factor * coeffs->coeff_",
		   "1d.cube.size6/store-coeffs.c");

################################################################################

#
# generic stuff for 1d, cube, size=7
#

data_list_1d_size7 := map(data_var_name, posn_list_1d_size7, "data_");
coeffs_list_1d_size7 := map(coeff_name, posn_list_1d_size7, "coeff_");

print_name_list_dcl(data_list_1d_size7, "fp",
		    "1d.cube.size7/data-dcl.h");
print_name_list_dcl(coeffs_list_1d_size7, "fp",
		    "1d.cube.size7/coeffs-dcl.h");

print_fetch_data(posn_list_1d_size7, "data->data_",
		 "1d.cube.size7/fetch-data.c");
print_evaluate_molecule(posn_list_1d_size7,
			"coeffs->coeff_", "data->data_",
			"1d.cube.size7/evaluate-molecule.c");
print_store_coeffs(posn_list_1d_size7,
		   "factor * coeffs->coeff_",
		   "1d.cube.size7/store-coeffs.c");

################################################################################