aboutsummaryrefslogtreecommitdiff
path: root/src/common/3d.maple
blob: 6e60822cc0068894725b312bf43b3bf080bc94bf (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
# Maple code to compute common coefficients for all 3d interpolation schemes
# $Header$

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

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

data_list_3d_size2 := map(data_var_name, posn_list_3d_size2, "data_");
coeffs_list_3d_size2 := map(coeff_name, posn_list_3d_size2, "coeff_");

print_name_list_dcl(data_list_3d_size2, "fp",
		    "3d.cube.size2/data-dcl.h");
print_name_list_dcl(coeffs_list_3d_size2, "fp",
		    "3d.cube.size2/coeffs-dcl.h");

print_load_data(posn_list_3d_size2, "data->data_",
		"3d.cube.size2/load-data.c");
print_evaluate_molecule(posn_list_3d_size2,
			"coeffs->coeff_", "data->data_",
			"3d.cube.size2/evaluate-molecule.c");
print_store_coeffs(posn_list_3d_size2,
		   "factor * coeffs->coeff_",
		   "3d.cube.size2/store-coeffs.c");

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

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

data_list_3d_size3 := map(data_var_name, posn_list_3d_size3, "data_");
coeffs_list_3d_size3 := map(coeff_name, posn_list_3d_size3, "coeff_");

print_name_list_dcl(data_list_3d_size3, "fp",
		    "3d.cube.size3/data-dcl.h");
print_name_list_dcl(coeffs_list_3d_size3, "fp",
		    "3d.cube.size3/coeffs-dcl.h");

print_load_data(posn_list_3d_size3, "data->data_",
		"3d.cube.size3/load-data.c");
print_evaluate_molecule(posn_list_3d_size3,
			"coeffs->coeff_", "data->data_",
			"3d.cube.size3/evaluate-molecule.c");
print_store_coeffs(posn_list_3d_size3,
		   "factor * coeffs->coeff_",
		   "3d.cube.size3/store-coeffs.c");

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

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

data_list_3d_size4 := map(data_var_name, posn_list_3d_size4, "data_");
coeffs_list_3d_size4 := map(coeff_name, posn_list_3d_size4, "coeff_");

print_name_list_dcl(data_list_3d_size4, "fp",
		    "3d.cube.size4/data-dcl.h");
print_name_list_dcl(coeffs_list_3d_size4, "fp",
		    "3d.cube.size4/coeffs-dcl.h");

print_load_data(posn_list_3d_size4, "data->data_",
		 "3d.cube.size4/load-data.c");
print_evaluate_molecule(posn_list_3d_size4,
			"coeffs->coeff_", "data->data_",
			"3d.cube.size4/evaluate-molecule.c");
print_store_coeffs(posn_list_3d_size4,
		   "factor * coeffs->coeff_",
		   "3d.cube.size4/store-coeffs.c");

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

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

data_list_3d_size5 := map(data_var_name, posn_list_3d_size5, "data_");
coeffs_list_3d_size5 := map(coeff_name, posn_list_3d_size5, "coeff_");

print_name_list_dcl(data_list_3d_size5, "fp",
		    "3d.cube.size5/data-dcl.h");
print_name_list_dcl(coeffs_list_3d_size5, "fp",
		    "3d.cube.size5/coeffs-dcl.h");

print_load_data(posn_list_3d_size5, "data->data_",
		"3d.cube.size5/load-data.c");
print_evaluate_molecule(posn_list_3d_size5,
			"coeffs->coeff_", "data->data_",
			"3d.cube.size5/evaluate-molecule.c");
print_store_coeffs(posn_list_3d_size5,
		   "factor * coeffs->coeff_",
		   "3d.cube.size5/store-coeffs.c");

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

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

data_list_3d_size6 := map(data_var_name, posn_list_3d_size6, "data_");
coeffs_list_3d_size6 := map(coeff_name, posn_list_3d_size6, "coeff_");

print_name_list_dcl(data_list_3d_size6, "fp",
		    "3d.cube.size6/data-dcl.h");
print_name_list_dcl(coeffs_list_3d_size6, "fp",
		    "3d.cube.size6/coeffs-dcl.h");

print_load_data(posn_list_3d_size6, "data->data_",
		"3d.cube.size6/load-data.c");
print_evaluate_molecule(posn_list_3d_size6,
			"coeffs->coeff_", "data->data_",
			"3d.cube.size6/evaluate-molecule.c");
print_store_coeffs(posn_list_3d_size6,
		   "factor * coeffs->coeff_",
		   "3d.cube.size6/store-coeffs.c");