From f66e9bbb167e3e3e98b0647e30fa22139d6f28f0 Mon Sep 17 00:00:00 2001 From: jthorn Date: Sun, 1 Sep 2002 18:10:41 +0000 Subject: reorganize common to Lagrange and Hermite interpolators (i.e. code depending only on molecule size/shape) --> now there are separate *functions* rather than just code fragments --> ../template.c should hopefully compile in finite time..... git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/LocalInterp/trunk@109 df1f8a13-aa1d-4dd4-9681-27ded5b42416 --- .../common/1d.cube.size2/coeffs-dcl.h | 2 + .../common/1d.cube.size2/data-dcl.h | 2 + .../common/1d.cube.size2/evaluate-molecule.c | 2 + .../common/1d.cube.size2/fetch-data.c | 2 + .../common/1d.cube.size2/store-coeffs.c | 2 + .../common/1d.cube.size3/coeffs-dcl.h | 3 + .../common/1d.cube.size3/data-dcl.h | 3 + .../common/1d.cube.size3/evaluate-molecule.c | 3 + .../common/1d.cube.size3/fetch-data.c | 3 + .../common/1d.cube.size3/store-coeffs.c | 3 + .../common/1d.cube.size4/coeffs-dcl.h | 4 + .../common/1d.cube.size4/data-dcl.h | 4 + .../common/1d.cube.size4/evaluate-molecule.c | 4 + .../common/1d.cube.size4/fetch-data.c | 4 + .../common/1d.cube.size4/store-coeffs.c | 4 + .../common/1d.cube.size5/coeffs-dcl.h | 5 + .../common/1d.cube.size5/data-dcl.h | 5 + .../common/1d.cube.size5/evaluate-molecule.c | 5 + .../common/1d.cube.size5/fetch-data.c | 5 + .../common/1d.cube.size5/store-coeffs.c | 5 + .../common/1d.cube.size6/coeffs-dcl.h | 6 + .../common/1d.cube.size6/data-dcl.h | 6 + .../common/1d.cube.size6/evaluate-molecule.c | 6 + .../common/1d.cube.size6/fetch-data.c | 6 + .../common/1d.cube.size6/store-coeffs.c | 6 + .../common/1d.cube.size7/coeffs-dcl.h | 7 + .../common/1d.cube.size7/data-dcl.h | 7 + .../common/1d.cube.size7/evaluate-molecule.c | 7 + .../common/1d.cube.size7/fetch-data.c | 7 + .../common/1d.cube.size7/store-coeffs.c | 7 + src/GeneralizedPolynomial-Uniform/common/1d.log | 659 ++++++------ src/GeneralizedPolynomial-Uniform/common/1d.maple | 269 ++--- .../common/2d.cube.size2/coeffs-dcl.h | 4 + .../common/2d.cube.size2/data-dcl.h | 4 + .../common/2d.cube.size2/evaluate-molecule.c | 4 + .../common/2d.cube.size2/fetch-data.c | 4 + .../common/2d.cube.size2/store-coeffs.c | 4 + .../common/2d.cube.size3/coeffs-dcl.h | 9 + .../common/2d.cube.size3/data-dcl.h | 9 + .../common/2d.cube.size3/evaluate-molecule.c | 9 + .../common/2d.cube.size3/fetch-data.c | 9 + .../common/2d.cube.size3/store-coeffs.c | 9 + .../common/2d.cube.size4/coeffs-dcl.h | 16 + .../common/2d.cube.size4/data-dcl.h | 16 + .../common/2d.cube.size4/evaluate-molecule.c | 16 + .../common/2d.cube.size4/fetch-data.c | 16 + .../common/2d.cube.size4/store-coeffs.c | 16 + .../common/2d.cube.size5/coeffs-dcl.h | 25 + .../common/2d.cube.size5/data-dcl.h | 25 + .../common/2d.cube.size5/evaluate-molecule.c | 25 + .../common/2d.cube.size5/fetch-data.c | 25 + .../common/2d.cube.size5/store-coeffs.c | 25 + .../common/2d.cube.size6/coeffs-dcl.h | 36 + .../common/2d.cube.size6/data-dcl.h | 36 + .../common/2d.cube.size6/evaluate-molecule.c | 36 + .../common/2d.cube.size6/fetch-data.c | 36 + .../common/2d.cube.size6/store-coeffs.c | 36 + src/GeneralizedPolynomial-Uniform/common/2d.log | 801 +++++++-------- src/GeneralizedPolynomial-Uniform/common/2d.maple | 307 ++---- .../common/3d.cube.size2/coeffs-dcl.h | 8 + .../common/3d.cube.size2/data-dcl.h | 8 + .../common/3d.cube.size2/evaluate-molecule.c | 8 + .../common/3d.cube.size2/fetch-data.c | 8 + .../common/3d.cube.size2/store-coeffs.c | 8 + .../common/3d.cube.size3/coeffs-dcl.h | 27 + .../common/3d.cube.size3/data-dcl.h | 27 + .../common/3d.cube.size3/evaluate-molecule.c | 27 + .../common/3d.cube.size3/fetch-data.c | 27 + .../common/3d.cube.size3/store-coeffs.c | 27 + .../common/3d.cube.size4/coeffs-dcl.h | 64 ++ .../common/3d.cube.size4/data-dcl.h | 64 ++ .../common/3d.cube.size4/evaluate-molecule.c | 64 ++ .../common/3d.cube.size4/fetch-data.c | 64 ++ .../common/3d.cube.size4/store-coeffs.c | 64 ++ .../common/3d.cube.size5/coeffs-dcl.h | 125 +++ .../common/3d.cube.size5/data-dcl.h | 125 +++ .../common/3d.cube.size5/evaluate-molecule.c | 125 +++ .../common/3d.cube.size5/fetch-data.c | 125 +++ .../common/3d.cube.size5/store-coeffs.c | 125 +++ .../common/3d.cube.size6/coeffs-dcl.h | 216 ++++ .../common/3d.cube.size6/data-dcl.h | 216 ++++ .../common/3d.cube.size6/evaluate-molecule.c | 216 ++++ .../common/3d.cube.size6/fetch-data.c | 216 ++++ .../common/3d.cube.size6/store-coeffs.c | 216 ++++ src/GeneralizedPolynomial-Uniform/common/3d.log | 1068 +++++++++----------- src/GeneralizedPolynomial-Uniform/common/3d.maple | 425 ++------ .../common/evaluate.c | 135 +++ .../common/evaluate.h | 44 + .../common/fetch-template.c | 94 ++ .../common/fetch-template.h | 64 ++ src/GeneralizedPolynomial-Uniform/common/fetch.c | 179 ++++ src/GeneralizedPolynomial-Uniform/common/fetch.h | 141 +++ src/GeneralizedPolynomial-Uniform/common/makefile | 6 +- src/GeneralizedPolynomial-Uniform/common/store.c | 166 +++ src/GeneralizedPolynomial-Uniform/common/store.h | 76 ++ src/GeneralizedPolynomial-Uniform/common/structs.h | 82 +- 96 files changed, 5109 insertions(+), 2192 deletions(-) create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size2/coeffs-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size2/data-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size2/evaluate-molecule.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size2/fetch-data.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size2/store-coeffs.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size3/coeffs-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size3/data-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size3/evaluate-molecule.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size3/fetch-data.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size3/store-coeffs.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size4/coeffs-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size4/data-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size4/evaluate-molecule.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size4/fetch-data.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size4/store-coeffs.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size5/coeffs-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size5/data-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size5/evaluate-molecule.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size5/fetch-data.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size5/store-coeffs.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size6/coeffs-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size6/data-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size6/evaluate-molecule.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size6/fetch-data.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size6/store-coeffs.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size7/coeffs-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size7/data-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size7/evaluate-molecule.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size7/fetch-data.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/1d.cube.size7/store-coeffs.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size2/coeffs-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size2/data-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size2/evaluate-molecule.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size2/fetch-data.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size2/store-coeffs.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size3/coeffs-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size3/data-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size3/evaluate-molecule.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size3/fetch-data.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size3/store-coeffs.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size4/coeffs-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size4/data-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size4/evaluate-molecule.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size4/fetch-data.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size4/store-coeffs.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size5/coeffs-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size5/data-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size5/evaluate-molecule.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size5/fetch-data.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size5/store-coeffs.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size6/coeffs-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size6/data-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size6/evaluate-molecule.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size6/fetch-data.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/2d.cube.size6/store-coeffs.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size2/coeffs-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size2/data-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size2/evaluate-molecule.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size2/fetch-data.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size2/store-coeffs.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size3/coeffs-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size3/data-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size3/evaluate-molecule.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size3/fetch-data.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size3/store-coeffs.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size4/coeffs-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size4/data-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size4/evaluate-molecule.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size4/fetch-data.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size4/store-coeffs.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size5/coeffs-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size5/data-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size5/evaluate-molecule.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size5/fetch-data.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size5/store-coeffs.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size6/coeffs-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size6/data-dcl.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size6/evaluate-molecule.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size6/fetch-data.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/3d.cube.size6/store-coeffs.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/evaluate.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/evaluate.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/fetch-template.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/fetch-template.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/fetch.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/fetch.h create mode 100644 src/GeneralizedPolynomial-Uniform/common/store.c create mode 100644 src/GeneralizedPolynomial-Uniform/common/store.h (limited to 'src/GeneralizedPolynomial-Uniform') diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size2/coeffs-dcl.h b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size2/coeffs-dcl.h new file mode 100644 index 0000000..c3406db --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size2/coeffs-dcl.h @@ -0,0 +1,2 @@ +fp coeff_0; +fp coeff_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size2/data-dcl.h b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size2/data-dcl.h new file mode 100644 index 0000000..1e82c48 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size2/data-dcl.h @@ -0,0 +1,2 @@ +fp data_0; +fp data_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size2/evaluate-molecule.c b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size2/evaluate-molecule.c new file mode 100644 index 0000000..873eecb --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size2/evaluate-molecule.c @@ -0,0 +1,2 @@ + coeffs->coeff_0*data->data_0 + + coeffs->coeff_p1*data->data_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size2/fetch-data.c b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size2/fetch-data.c new file mode 100644 index 0000000..c6bb0e3 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size2/fetch-data.c @@ -0,0 +1,2 @@ +data->data_0 = DATA(0); +data->data_p1 = DATA(1); diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size2/store-coeffs.c b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size2/store-coeffs.c new file mode 100644 index 0000000..6117dc3 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size2/store-coeffs.c @@ -0,0 +1,2 @@ +COEFF(0) = factor * coeffs->coeff_0; +COEFF(1) = factor * coeffs->coeff_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size3/coeffs-dcl.h b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size3/coeffs-dcl.h new file mode 100644 index 0000000..0dd24dc --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size3/coeffs-dcl.h @@ -0,0 +1,3 @@ +fp coeff_m1; +fp coeff_0; +fp coeff_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size3/data-dcl.h b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size3/data-dcl.h new file mode 100644 index 0000000..c82ad9b --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size3/data-dcl.h @@ -0,0 +1,3 @@ +fp data_m1; +fp data_0; +fp data_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size3/evaluate-molecule.c b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size3/evaluate-molecule.c new file mode 100644 index 0000000..eef1e44 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size3/evaluate-molecule.c @@ -0,0 +1,3 @@ + coeffs->coeff_m1*data->data_m1 + + coeffs->coeff_0*data->data_0 + + coeffs->coeff_p1*data->data_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size3/fetch-data.c b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size3/fetch-data.c new file mode 100644 index 0000000..42b7f8c --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size3/fetch-data.c @@ -0,0 +1,3 @@ +data->data_m1 = DATA(-1); +data->data_0 = DATA(0); +data->data_p1 = DATA(1); diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size3/store-coeffs.c b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size3/store-coeffs.c new file mode 100644 index 0000000..2067270 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size3/store-coeffs.c @@ -0,0 +1,3 @@ +COEFF(-1) = factor * coeffs->coeff_m1; +COEFF(0) = factor * coeffs->coeff_0; +COEFF(1) = factor * coeffs->coeff_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size4/coeffs-dcl.h b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size4/coeffs-dcl.h new file mode 100644 index 0000000..40576b6 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size4/coeffs-dcl.h @@ -0,0 +1,4 @@ +fp coeff_m1; +fp coeff_0; +fp coeff_p1; +fp coeff_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size4/data-dcl.h b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size4/data-dcl.h new file mode 100644 index 0000000..3fe13fa --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size4/data-dcl.h @@ -0,0 +1,4 @@ +fp data_m1; +fp data_0; +fp data_p1; +fp data_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size4/evaluate-molecule.c b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size4/evaluate-molecule.c new file mode 100644 index 0000000..efc10e9 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size4/evaluate-molecule.c @@ -0,0 +1,4 @@ + coeffs->coeff_m1*data->data_m1 + + coeffs->coeff_0*data->data_0 + + coeffs->coeff_p1*data->data_p1 + + coeffs->coeff_p2*data->data_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size4/fetch-data.c b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size4/fetch-data.c new file mode 100644 index 0000000..c38e68d --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size4/fetch-data.c @@ -0,0 +1,4 @@ +data->data_m1 = DATA(-1); +data->data_0 = DATA(0); +data->data_p1 = DATA(1); +data->data_p2 = DATA(2); diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size4/store-coeffs.c b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size4/store-coeffs.c new file mode 100644 index 0000000..5e73681 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size4/store-coeffs.c @@ -0,0 +1,4 @@ +COEFF(-1) = factor * coeffs->coeff_m1; +COEFF(0) = factor * coeffs->coeff_0; +COEFF(1) = factor * coeffs->coeff_p1; +COEFF(2) = factor * coeffs->coeff_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size5/coeffs-dcl.h b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size5/coeffs-dcl.h new file mode 100644 index 0000000..bce2488 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size5/coeffs-dcl.h @@ -0,0 +1,5 @@ +fp coeff_m2; +fp coeff_m1; +fp coeff_0; +fp coeff_p1; +fp coeff_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size5/data-dcl.h b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size5/data-dcl.h new file mode 100644 index 0000000..4308108 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size5/data-dcl.h @@ -0,0 +1,5 @@ +fp data_m2; +fp data_m1; +fp data_0; +fp data_p1; +fp data_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size5/evaluate-molecule.c b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size5/evaluate-molecule.c new file mode 100644 index 0000000..e4d7c70 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size5/evaluate-molecule.c @@ -0,0 +1,5 @@ + coeffs->coeff_m2*data->data_m2 + + coeffs->coeff_m1*data->data_m1 + + coeffs->coeff_0*data->data_0 + + coeffs->coeff_p1*data->data_p1 + + coeffs->coeff_p2*data->data_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size5/fetch-data.c b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size5/fetch-data.c new file mode 100644 index 0000000..2a6e8c7 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size5/fetch-data.c @@ -0,0 +1,5 @@ +data->data_m2 = DATA(-2); +data->data_m1 = DATA(-1); +data->data_0 = DATA(0); +data->data_p1 = DATA(1); +data->data_p2 = DATA(2); diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size5/store-coeffs.c b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size5/store-coeffs.c new file mode 100644 index 0000000..ec2e17b --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size5/store-coeffs.c @@ -0,0 +1,5 @@ +COEFF(-2) = factor * coeffs->coeff_m2; +COEFF(-1) = factor * coeffs->coeff_m1; +COEFF(0) = factor * coeffs->coeff_0; +COEFF(1) = factor * coeffs->coeff_p1; +COEFF(2) = factor * coeffs->coeff_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size6/coeffs-dcl.h b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size6/coeffs-dcl.h new file mode 100644 index 0000000..90d978c --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size6/coeffs-dcl.h @@ -0,0 +1,6 @@ +fp coeff_m2; +fp coeff_m1; +fp coeff_0; +fp coeff_p1; +fp coeff_p2; +fp coeff_p3; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size6/data-dcl.h b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size6/data-dcl.h new file mode 100644 index 0000000..301e199 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size6/data-dcl.h @@ -0,0 +1,6 @@ +fp data_m2; +fp data_m1; +fp data_0; +fp data_p1; +fp data_p2; +fp data_p3; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size6/evaluate-molecule.c b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size6/evaluate-molecule.c new file mode 100644 index 0000000..9e6e3c4 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size6/evaluate-molecule.c @@ -0,0 +1,6 @@ + coeffs->coeff_m2*data->data_m2 + + coeffs->coeff_m1*data->data_m1 + + coeffs->coeff_0*data->data_0 + + coeffs->coeff_p1*data->data_p1 + + coeffs->coeff_p2*data->data_p2 + + coeffs->coeff_p3*data->data_p3; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size6/fetch-data.c b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size6/fetch-data.c new file mode 100644 index 0000000..d271075 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size6/fetch-data.c @@ -0,0 +1,6 @@ +data->data_m2 = DATA(-2); +data->data_m1 = DATA(-1); +data->data_0 = DATA(0); +data->data_p1 = DATA(1); +data->data_p2 = DATA(2); +data->data_p3 = DATA(3); diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size6/store-coeffs.c b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size6/store-coeffs.c new file mode 100644 index 0000000..c1ccbeb --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size6/store-coeffs.c @@ -0,0 +1,6 @@ +COEFF(-2) = factor * coeffs->coeff_m2; +COEFF(-1) = factor * coeffs->coeff_m1; +COEFF(0) = factor * coeffs->coeff_0; +COEFF(1) = factor * coeffs->coeff_p1; +COEFF(2) = factor * coeffs->coeff_p2; +COEFF(3) = factor * coeffs->coeff_p3; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size7/coeffs-dcl.h b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size7/coeffs-dcl.h new file mode 100644 index 0000000..08ea7e6 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size7/coeffs-dcl.h @@ -0,0 +1,7 @@ +fp coeff_m3; +fp coeff_m2; +fp coeff_m1; +fp coeff_0; +fp coeff_p1; +fp coeff_p2; +fp coeff_p3; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size7/data-dcl.h b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size7/data-dcl.h new file mode 100644 index 0000000..c75fafc --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size7/data-dcl.h @@ -0,0 +1,7 @@ +fp data_m3; +fp data_m2; +fp data_m1; +fp data_0; +fp data_p1; +fp data_p2; +fp data_p3; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size7/evaluate-molecule.c b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size7/evaluate-molecule.c new file mode 100644 index 0000000..ad83d90 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size7/evaluate-molecule.c @@ -0,0 +1,7 @@ + coeffs->coeff_m3*data->data_m3 + + coeffs->coeff_m2*data->data_m2 + + coeffs->coeff_m1*data->data_m1 + + coeffs->coeff_0*data->data_0 + + coeffs->coeff_p1*data->data_p1 + + coeffs->coeff_p2*data->data_p2 + + coeffs->coeff_p3*data->data_p3; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size7/fetch-data.c b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size7/fetch-data.c new file mode 100644 index 0000000..43973ff --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size7/fetch-data.c @@ -0,0 +1,7 @@ +data->data_m3 = DATA(-3); +data->data_m2 = DATA(-2); +data->data_m1 = DATA(-1); +data->data_0 = DATA(0); +data->data_p1 = DATA(1); +data->data_p2 = DATA(2); +data->data_p3 = DATA(3); diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.cube.size7/store-coeffs.c b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size7/store-coeffs.c new file mode 100644 index 0000000..93b597f --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/1d.cube.size7/store-coeffs.c @@ -0,0 +1,7 @@ +COEFF(-3) = factor * coeffs->coeff_m3; +COEFF(-2) = factor * coeffs->coeff_m2; +COEFF(-1) = factor * coeffs->coeff_m1; +COEFF(0) = factor * coeffs->coeff_0; +COEFF(1) = factor * coeffs->coeff_p1; +COEFF(2) = factor * coeffs->coeff_p2; +COEFF(3) = factor * coeffs->coeff_p3; diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.log b/src/GeneralizedPolynomial-Uniform/common/1d.log index 4c1a387..845a8c1 100644 --- a/src/GeneralizedPolynomial-Uniform/common/1d.log +++ b/src/GeneralizedPolynomial-Uniform/common/1d.log @@ -10,7 +10,7 @@ # fix_rationals - convert numbers to RATIONAL() calls # nonmatching_names - find names in a list which *don't* have a specified prefix # sprint_numeric_list - convert a numeric list to a valid C identifier suffix -# print_name_list_dcl - print a C declaration for a list of names +# print_name_list_dcl - print C declarations for a list of names # # hypercube_points - compute all (integer) points in an N-dimensional hypercube # @@ -297,49 +297,42 @@ end proc ################################################################################ > # -# This function prints a C declaration for a list of names. +# This function prints a sequence of C declarations for a list of names. # # Argument: # name_list = A list of the names. -# name_type = The C type of the names, eg. "double". +# type_name = The C type of the names, eg. "double". # file_name = The file name to write the declaration to. This is # truncated before writing. # > print_name_list_dcl := > proc( name_list::list({name,string}), -> name_type::string, +> type_name::string, > file_name::string ) > local blanks, separator_string; > > ftruncate(file_name); > -# a sequence of blanks with the same length as name_type -> seq(" ", i=1..length(name_type)); -> -# string to separate names -> separator_string := cat(",\n", %, " "); -> -> map(convert, name_list, string); -> ListTools[Join](%, separator_string); -> cat(op(%)); -> -> fprintf(file_name, -> "%s %s;\n", -> name_type, %); +> map( +> proc(var::{name,string}) +> fprintf(file_name, +> "%s %s;\n", +> type_name, var); +> end proc +> , +> name_list +> ); > > fclose(file_name); > NULL; > end proc; print_name_list_dcl := proc( -name_list::list({name, string}), name_type::string, file_name::string) +name_list::list({name, string}), type_name::string, file_name::string) local blanks, separator_string; ftruncate(file_name); - seq(" ", i = 1 .. length(name_type)); - separator_string := cat(",\n", %, " "); - map(convert, name_list, string); - ListTools[Join](%, separator_string); - cat(op(%)); - fprintf(file_name, "%s %s;\n", name_type, %); + map(proc(var::{name, string}) + fprintf(file_name, "%s %s;\n", type_name, var) + end proc, name_list); fclose(file_name); NULL end proc @@ -445,7 +438,7 @@ ftruncate := proc(file_name::string) fopen(file_name, 'WRITE'); fclose(%); NULL end proc # interpolate.maple -- compute interpolation formulas/coefficients -# $Header: /cactusdevcvs/CactusBase/LocalInterp/src/GeneralizedPolynomial-Uniform/interpolate.maple,v 1.8 2002/08/20 16:46:05 jthorn Exp $ +# $Header: /cactusdevcvs/CactusBase/LocalInterp/src/GeneralizedPolynomial-Uniform/interpolate.maple,v 1.10 2002/08/28 11:31:09 jthorn Exp $ > # # <<>> @@ -454,8 +447,8 @@ ftruncate := # coeff_as_lc_of_data - coefficients of ... (linear combination of data) # # print_coeff__lc_of_data - print C code to compute coefficients -# print_data_var_assign - print C code to assign data-value variables -# print_interp_coeff_var_store - print C code to store coeff vars "somewhere" +# print_fetch_data - print C code to fetch input array chunk into struct data +# print_store_coeffs - print C code to store struct coeffs "somewhere" # print_interp_cmpt__lc_of_data - print C code for computation of interpolant # # coeff_name - name of coefficient of data at a given [m] coordinate @@ -543,7 +536,7 @@ end proc # # This function computes a Hermite polynomial interpolant in any # number of dimensions. This is a polynomial which -# has values which match the given data DATA() at a specified set of +# * has values which match the given data DATA() at a specified set of # points, and # * has derivatives which match the specified finite-difference derivatives # of the given data DATA() at a specified set of points @@ -562,50 +555,45 @@ end proc # + c01*y + c11*x*y + c21*x^2*y + c31*x^3*y # + c00 + c10*x + c20*x^2 + c30*x^3 # end proc; -# coeff_list = A set of the interpolation coefficients (coefficients in +# coeff_set = A set of the interpolation coefficients (coefficients in # the interpolation function), for example -# [ +# { # c03, c13, c23, c33, # c02, c12, c22, c32, # c01, c11, c21, c31, # c00, c10, c20, c30 -# ] +# } # coord_list = A list of the coordinates (independent variables in the # interpolation function), for example [x,y]. -# deriv_coord_list = A list of lists of coordinates specifying which -# derivatives are computed by the deriv_proc_list[] -# procedures, for example -# [[x], [y], [x,y]] -# deriv_proc_list = A list of procedures for computing finite-difference -# derivatives. Each procedure should take N_dims integer -# arguments specifying an evaluation point, and return -# a suitable linear combination of the DATA() for the -# derivative at that point. For example -# example, -# [ -# proc(i::integer, j::integer) -# - 1/2*DATA(i-1,j) + 1/2*DATA(i+1,j) -# end proc +# deriv_set = A set of equations of the form +# {coords} = proc +# giving the derivatives which are to be matched, and the +# procedures to compute their finite-difference approximations. +# Each procedure should take N_dims integer arguments specifying +# an evaluation point, and return a suitable linear combination +# of the DATA() for the derivative at that point. For example +# { +# {x} = proc(i::integer, j::integer) +# - 1/2*DATA(i-1,j) + 1/2*DATA(i+1,j) +# end proc # , -# proc(i::integer, j::integer) -# - 1/2*DATA(i,j-1) + 1/2*DATA(i,j+1) -# end proc +# {y} = proc(i::integer, j::integer) +# - 1/2*DATA(i,j-1) + 1/2*DATA(i,j+1) +# end proc # , -# proc(i::integer, j::integer) -# - 1/4*DATA(i-1,j+1) + 1/4*DATA(i+1,j+1) -# + 1/4*DATA(i-1,j-1) - 1/4*DATA(i+1,j-1) -# end proc -# ] -# fn_posn_list = A list of positions (each a list of numeric values) -# where the interpolant is to match the given data DATA(), -# for example -# [[0,0], [0,1], [1,0], [1,1]] -# deriv_posn_list = A list of positions (each a list of numeric values) -# where the interpolant is to match each possible product -# of 1st derivatives"1st" -# derivatives (actually all derivatives the given data DATA(), -# for example -# [[0,0], [0,1], [1,0], [1,1]] +# {x,y} = proc(i::integer, j::integer) +# - 1/4*DATA(i-1,j+1) + 1/4*DATA(i+1,j+1) +# + 1/4*DATA(i-1,j-1) - 1/4*DATA(i+1,j-1) +# end proc +# } +# fn_posn_set = A set of positions (each a list of numeric values) +# where the interpolant is to match the given data DATA(), +# for example +# {[0,0], [0,1], [1,0], [1,1]} +# deriv_posn_set = A list of positions (each a list of numeric values) +# where the interpolant is to match the derivatives +# specified by deriv_set , for example +# {[0,0], [0,1], [1,0], [1,1]} # # Results: # This function returns the interpolating polynomial, in the form of @@ -613,93 +601,123 @@ end proc # > Hermite_polynomial_interpolant := > proc( -> fn::procedure, coeff_list::list(name), coord_list::list(name), -> deriv_coord_list::list(list(name)), fd_deriv_proc_list::list(procedure), -> fn_posn_list::list(list(numeric)), deriv_posn_list::list(list(numeric)) +> fn::procedure, +> coeff_set::set(name), +> coord_list::list(name), +> deriv_set::set(set(name) = procedure), +> fn_posn_set::set(list(numeric)), +> deriv_posn_set::set(list(numeric)) > ) -> local fn_eset, -> fn_expr, deriv_eset; -> -# set of equations {fn(posn) = DATA(posn)} -> fn_eset := map( -> # return equation that fn(this point) = DATA(this point) -> proc(posn::list(integer)) -> fn(op(posn)) = 'DATA'(op(posn)); -> end proc -> , -> {op(fn_posn_list)} -> ); -> -# set of sets of equations -# { -# { deriv1(posn1) = fd_deriv1(posn1), -# deriv2(posn1) = fd_deriv2(posn1), -# ... }, -# { deriv1(posn2) = fd_deriv1(posn2), -# deriv2(posn2) = fd_deriv2(posn2), -# ... }, -# ... -# } -> fn_expr := fn(op(coord_list)); +> local fn_eqnset, deriv_eqnset, coeff_eqns, subs_eqnset; +> +> +# +# compute a set of equations +# {fn(posn) = DATA(posn)} +# giving the function values to be matched +# +> fn_eqnset := map( +> # return equation that fn(posn) = DATA(posn) +> proc(posn::list(integer)) +> fn(op(posn)) = 'DATA'(op(posn)); +> end proc +> , +> fn_posn_set +> ); +> +> +# +# compute a set of equations +# { diff(fn,coords)(posn) = DERIV(coords)(posn) } +# giving the derivative values to be matched, where DERIV(coords) +# is a placeholder for the appropriate derivative +# > map( -> # return set of equations -> # {deriv(posn) = fd_deriv(posn)} -> # for this point -> proc(posn::list(integer)) -> { -> op( -> zip( -> # return equation that -> # deriv(posn) = fd_deriv(posn) -> # for this deriv and this point -> proc(deriv_coords::list(name), fd_deriv_proc::procedure) -> local fn_deriv_proc; -> fn_deriv_proc := unapply( diff(fn_expr,deriv_coords), -> op(coord_list) ); -> fn_deriv_proc(op(posn)) = fd_deriv_proc(op(posn)); -> end proc -> , -> [op(deriv_coord_list)] -> , -> [op(fd_deriv_proc_list)] -> ) -> ) -> } +> # return set of equations for this particular derivative +> proc(deriv_coords::set(name)) +> local deriv_fn; +> fn(op(coord_list)); +> diff(%, op(deriv_coords)); +> deriv_fn := unapply(%, op(coord_list)); +> map( +> proc(posn::list(integer)) +> deriv_fn(op(posn)) = 'DERIV'(op(deriv_coords))(op(posn)); +> end proc +> , +> deriv_posn_set +> ); > end proc > , -> {op(deriv_posn_list)} +> map(lhs, deriv_set) > ); +> deriv_eqnset := `union`(op(%)); +> +> +# +# solve overall set of equations for coefficients +# in terms of DATA() and DERIV() values +# +> coeff_eqns := solve[linear](fn_eqnset union deriv_eqnset, coeff_set); +> if (indets(map(rhs,%)) <> {}) +> then error "no unique solution for coefficients -- %1 eqns for %2 coeffs", +> nops(fn_eqnset union deriv_eqnset), +> nops(coeff_set); +> fi; > -# set of equations {deriv-i(posn-j) = fd_deriv-i(posn-j)} -> deriv_eset := `union`(op(%)); > -# solve equations for coeffs -> solve(fn_eset union deriv_eset, {op(coeff_list)}); +# +# compute a set of substitution equations +# {'DERIV'(coords) = procedure} +# +> subs_eqnset := map( +> proc(eqn::set(name) = procedure) +> 'DERIV'(op(lhs(eqn))) = rhs(eqn); +> end proc +> , +> deriv_set +> ); > -# interpolant as a polynomial in the coordinates -> return subs(%, eval(fn))(op(coord_list)); +> +# +# compute the coefficients in terms of the DATA() values +# +> subs(subs_eqnset, coeff_eqns); +> eval(%); +> +# +# compute the interpolant as a polynomial in the coordinates +# +> subs(%, fn(op(coord_list))); > end proc; -Hermite_polynomial_interpolant := proc(fn::procedure, coeff_list::list(name), -coord_list::list(name), deriv_coord_list::list(list(name)), -fd_deriv_proc_list::list(procedure), fn_posn_list::list(list(numeric)), -deriv_posn_list::list(list(numeric))) -local fn_eset, fn_expr, deriv_eset; - fn_eset := map( +Hermite_polynomial_interpolant := proc(fn::procedure, coeff_set::set(name), +coord_list::list(name), deriv_set::set(set(name) = procedure), +fn_posn_set::set(list(numeric)), deriv_posn_set::set(list(numeric))) +local fn_eqnset, deriv_eqnset, coeff_eqns, subs_eqnset; + fn_eqnset := map( proc(posn::list(integer)) fn(op(posn)) = 'DATA'(op(posn)) end proc, - {op(fn_posn_list)}); - fn_expr := fn(op(coord_list)); - map(proc(posn::list(integer)) - {op(zip(proc(deriv_coords::list(name), fd_deriv_proc::procedure - ) - local fn_deriv_proc; - fn_deriv_proc := - unapply(diff(fn_expr, deriv_coords), op(coord_list)); - fn_deriv_proc(op(posn)) = fd_deriv_proc(op(posn)) - end proc, [op(deriv_coord_list)], [op(fd_deriv_proc_list)]))} - end proc, {op(deriv_posn_list)}); - deriv_eset := `union`(op(%)); - solve(fn_eset union deriv_eset, {op(coeff_list)}); - return subs(%, eval(fn))(op(coord_list)) + fn_posn_set); + map(proc(deriv_coords::set(name)) + local deriv_fn; + fn(op(coord_list)); + diff(%, op(deriv_coords)); + deriv_fn := unapply(%, op(coord_list)); + map(proc(posn::list(integer)) + deriv_fn(op(posn)) = + 'DERIV'(op(deriv_coords))(op(posn)) + end proc, deriv_posn_set) + end proc, map(lhs, deriv_set)); + deriv_eqnset := `union`(op(%)); + coeff_eqns := solve[linear](fn_eqnset union deriv_eqnset, coeff_set); + if indets(map(rhs, %)) <> {} then error + "no unique solution for coefficients -- %1 eqns for %2 coeffs", + nops(fn_eqnset union deriv_eqnset), nops(coeff_set) + end if; + subs_eqnset := map(proc(eqn::(set(name) = procedure)) + 'DERIV'(op(lhs(eqn))) = rhs(eqn) + end proc, deriv_set); + subs(subs_eqnset, coeff_eqns); + eval(%); + subs(%, fn(op(coord_list))) end proc > @@ -858,7 +876,7 @@ end proc # # This function prints a sequence of C expression to assign the data-value # variables, eg -# data_m1_p1 = DATA(-1,1); +# data->data_m1_p1 = DATA(-1,1); # # Arguments: # posn_list = The same list of positions as was used to compute the @@ -867,7 +885,7 @@ end proc # file_name = The file name to write the coefficients to. This is # truncated before writing. # -> print_data_var_assign := +> print_fetch_data := > proc( > posn_list::list(list(numeric)), > data_var_name_prefix::string, @@ -889,7 +907,7 @@ end proc > > NULL; > end proc; -print_data_var_assign := proc(posn_list::list(list(numeric)), +print_fetch_data := proc(posn_list::list(list(numeric)), data_var_name_prefix::string, file_name::string) ftruncate(file_name); map(proc(posn::list(numeric)) @@ -906,25 +924,18 @@ end proc # # This function prints a sequence of C expression to store the interpolation # coefficients in COEFF(...) expressions, eg -# COEFF(1,-1) = factor * coeff_dx_p1_m1; +# COEFF(1,-1) = factor * coeffs->coeff_p1_m1; # # Arguments: -# posn_list = The same list of positions as was used to compute the -# interpolating polynomial. -# RHS_factor_name = If this string is non-empty, then the coefficient is -# multiplied by this factor before being stored, eg -# setting this to "factor" would give the example above. -# If this string is empty (""), the multiplication is -# omitted, eg -# COEFF(1,-1) = coeff_dx_p1_m1; -# coeff_name_prefix = A prefix string for the coefficient names. +# posn_list = The list of positions in the molecule. +# coeff_name_prefix = A prefix string for the coefficient names, +# eg "factor * coeffs->coeff_" # file_name = The file name to write the coefficients to. This is # truncated before writing. # -> print_interp_coeff_var_store := +> print_store_coeffs := > proc( > posn_list::list(list(numeric)), -> RHS_factor_name::string, > coeff_name_prefix::string, > file_name::string > ) @@ -932,17 +943,10 @@ end proc > ftruncate(file_name); > map( > proc(posn::list(numeric)) -> if (length(RHS_factor_name) > 0) -> then fprintf(file_name, -> "%a = %s * %s;\n", -> 'COEFF'(op(posn)), -> RHS_factor_name, -> coeff_name(posn,coeff_name_prefix)); -> else fprintf(file_name, -> "%a = %s;\n", -> 'COEFF'(op(posn)), -> coeff_name(posn,coeff_name_prefix)); -> end if; +> fprintf(file_name, +> "%a = %s;\n", +> 'COEFF'(op(posn)), +> coeff_name(posn,coeff_name_prefix)); > end proc > , > posn_list @@ -951,16 +955,12 @@ end proc > > NULL; > end proc; -print_interp_coeff_var_store := proc(posn_list::list(list(numeric)), -RHS_factor_name::string, coeff_name_prefix::string, file_name::string) +print_store_coeffs := proc(posn_list::list(list(numeric)), +coeff_name_prefix::string, file_name::string) ftruncate(file_name); map(proc(posn::list(numeric)) - if 0 < length(RHS_factor_name) then fprintf(file_name, - "%a = %s * %s;\n", 'COEFF'(op(posn)), RHS_factor_name, - coeff_name(posn, coeff_name_prefix)) - else fprintf(file_name, "%a = %s;\n", 'COEFF'(op(posn)), - coeff_name(posn, coeff_name_prefix)) - end if + fprintf(file_name, "%a = %s;\n", 'COEFF'(op(posn)), + coeff_name(posn, coeff_name_prefix)) end proc, posn_list); fclose(file_name); NULL @@ -970,25 +970,19 @@ end proc ################################################################################ > # -# This function prints a C expression to compute the interpolant, -# using the coefficients computed by print_coeff__lc_of_data() -# (i.e. expressing the interpolant as a linear combination of the -# data values). +# This function prints a C expression to evaluate a molecule, i.e. +# to compute the molecule as a linear combination of the data values. # # Arguments: -# posn_list = The same list of positions as was used to compute the -# interpolating polynomial. -# result_var_name = The (string) name of the variable to which the -# result is to be assigned. +# posn_list = The list of positions in the molecule. # coeff_name_prefix = A prefix string for the coefficient names. # data_var_name_prefix = A prefix string for the data variable names. # file_name = The file name to write the coefficients to. This is # truncated before writing. # -> print_interp_cmpt__lc_of_data := +> print_evaluate_molecule := > proc( > posn_list::list(list(numeric)), -> result_var_name::string, > coeff_name_prefix::string, > data_var_name_prefix::string, > file_name::string @@ -996,8 +990,6 @@ end proc > > ftruncate(file_name); > -> fprintf(file_name, "%s =\n", result_var_name); -> # list of "coeff*data_var" terms > map( > proc(posn::list(numeric)) @@ -1009,26 +1001,24 @@ end proc > posn_list > ); > -> ListTools[Join](%, "\n\t+ "); +> ListTools[Join](%, "\n + "); > cat(op(%)); -> fprintf(file_name, "\t%s;\n", %); +> fprintf(file_name, " %s;\n", %); > > fclose(file_name); > > NULL; > end proc; -print_interp_cmpt__lc_of_data := proc(posn_list::list(list(numeric)), -result_var_name::string, coeff_name_prefix::string, -data_var_name_prefix::string, file_name::string) +print_evaluate_molecule := proc(posn_list::list(list(numeric)), +coeff_name_prefix::string, data_var_name_prefix::string, file_name::string) ftruncate(file_name); - fprintf(file_name, "%s =\n", result_var_name); map(proc(posn::list(numeric)) sprintf("%s*%s", coeff_name(posn, coeff_name_prefix), data_var_name(posn, data_var_name_prefix)) end proc, posn_list); - ListTools[Join](%, "\n\t+ "); + ListTools[Join](%, "\n + "); cat(op(%)); - fprintf(file_name, "\t%s;\n", %); + fprintf(file_name, " %s;\n", %); fclose(file_name); NULL end proc @@ -1331,31 +1321,26 @@ posn_list_3d_size6 := [[-2, -2, -2], [-1, -2, -2], [0, -2, -2], [1, -2, -2], # generic stuff for 1d, cube, size=2 # > -> data_var_list_1d_size2 := map(data_var_name, posn_list_1d_size2, "data_"); - data_var_list_1d_size2 := ["data_0", "data_p1"] +> data_list_1d_size2 := map(data_var_name, posn_list_1d_size2, "data_"); + data_list_1d_size2 := ["data_0", "data_p1"] + +> coeffs_list_1d_size2 := map(coeff_name, posn_list_1d_size2, "coeff_"); + coeffs_list_1d_size2 := ["coeff_0", "coeff_p1"] > -> print_name_list_dcl(data_var_list_1d_size2, "fp", -> "1d.cube.size2/data-var.dcl.c"); -> print_data_var_assign(posn_list_1d_size2, "data_", -> "1d.cube.size2/data-var.assign.c"); -> -> print_interp_coeff_var_store(posn_list_1d_size2, "", "coeff_I_", -> "1d.cube.size2/coeff-I.store.c"); -> print_interp_coeff_var_store(posn_list_1d_size2, "factor", "coeff_dx_", -> "1d.cube.size2/coeff-dx.store.c"); -> -> print_name_list_dcl(map(coeff_name, posn_list_1d_size2, "coeff_I_"), "fp", -> "1d.cube.size2/coeff-I.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_1d_size2, "coeff_dx_"), "fp", -> "1d.cube.size2/coeff-dx.dcl.c"); +> 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_interp_cmpt__lc_of_data(posn_list_1d_size2, -> "result", "coeff_I_", "data_", -> "1d.cube.size2/interp-I.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_1d_size2, -> "result", "coeff_dx_", "data_", -> "1d.cube.size2/interp-dx.compute.c"); +> 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"); > ################################################################################ > @@ -1363,38 +1348,26 @@ posn_list_3d_size6 := [[-2, -2, -2], [-1, -2, -2], [0, -2, -2], [1, -2, -2], # generic stuff for 1d, cube, size=3 # > -> data_var_list_1d_size3 := map(data_var_name, posn_list_1d_size3, "data_"); - data_var_list_1d_size3 := ["data_m1", "data_0", "data_p1"] +> data_list_1d_size3 := map(data_var_name, posn_list_1d_size3, "data_"); + data_list_1d_size3 := ["data_m1", "data_0", "data_p1"] + +> coeffs_list_1d_size3 := map(coeff_name, posn_list_1d_size3, "coeff_"); + coeffs_list_1d_size3 := ["coeff_m1", "coeff_0", "coeff_p1"] > -> print_name_list_dcl(data_var_list_1d_size3, "fp", -> "1d.cube.size3/data-var.dcl.c"); -> print_data_var_assign(posn_list_1d_size3, "data_", -> "1d.cube.size3/data-var.assign.c"); -> -> print_interp_coeff_var_store(posn_list_1d_size3, "", "coeff_I_", -> "1d.cube.size3/coeff-I.store.c"); -> print_interp_coeff_var_store(posn_list_1d_size3, "factor", "coeff_dx_", -> "1d.cube.size3/coeff-dx.store.c"); -> print_interp_coeff_var_store(posn_list_1d_size3, "factor", "coeff_dxx_", -> "1d.cube.size3/coeff-dxx.store.c"); -> -> print_name_list_dcl(map(coeff_name, posn_list_1d_size3, "coeff_I_"), "fp", -> "1d.cube.size3/coeff-I.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_1d_size3, "coeff_dx_"), "fp", -> "1d.cube.size3/coeff-dx.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_1d_size3, "coeff_dxx_"), "fp", -> "1d.cube.size3/coeff-dxx.dcl.c"); +> 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_interp_cmpt__lc_of_data(posn_list_1d_size3, -> "result", "coeff_I_", "data_", -> "1d.cube.size3/interp-I.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_1d_size3, -> "result", "coeff_dx_", "data_", -> "1d.cube.size3/interp-dx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_1d_size3, -> "result", "coeff_dxx_", "data_", -> "1d.cube.size3/interp-dxx.compute.c"); +> 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"); > ################################################################################ > @@ -1402,38 +1375,26 @@ posn_list_3d_size6 := [[-2, -2, -2], [-1, -2, -2], [0, -2, -2], [1, -2, -2], # generic stuff for 1d, cube, size=4 # > -> data_var_list_1d_size4 := map(data_var_name, posn_list_1d_size4, "data_"); - data_var_list_1d_size4 := ["data_m1", "data_0", "data_p1", "data_p2"] +> data_list_1d_size4 := map(data_var_name, posn_list_1d_size4, "data_"); + data_list_1d_size4 := ["data_m1", "data_0", "data_p1", "data_p2"] + +> coeffs_list_1d_size4 := map(coeff_name, posn_list_1d_size4, "coeff_"); + coeffs_list_1d_size4 := ["coeff_m1", "coeff_0", "coeff_p1", "coeff_p2"] > -> print_name_list_dcl(data_var_list_1d_size4, "fp", -> "1d.cube.size4/data-var.dcl.c"); -> print_data_var_assign(posn_list_1d_size4, "data_", -> "1d.cube.size4/data-var.assign.c"); -> -> print_interp_coeff_var_store(posn_list_1d_size4, "", "coeff_I_", -> "1d.cube.size4/coeff-I.store.c"); -> print_interp_coeff_var_store(posn_list_1d_size4, "factor", "coeff_dx_", -> "1d.cube.size4/coeff-dx.store.c"); -> print_interp_coeff_var_store(posn_list_1d_size4, "factor", "coeff_dxx_", -> "1d.cube.size4/coeff-dxx.store.c"); -> -> print_name_list_dcl(map(coeff_name, posn_list_1d_size4, "coeff_I_"), "fp", -> "1d.cube.size4/coeff-I.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_1d_size4, "coeff_dx_"), "fp", -> "1d.cube.size4/coeff-dx.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_1d_size4, "coeff_dxx_"), "fp", -> "1d.cube.size4/coeff-dxx.dcl.c"); +> 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_interp_cmpt__lc_of_data(posn_list_1d_size4, -> "result", "coeff_I_", "data_", -> "1d.cube.size4/interp-I.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_1d_size4, -> "result", "coeff_dx_", "data_", -> "1d.cube.size4/interp-dx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_1d_size4, -> "result", "coeff_dxx_", "data_", -> "1d.cube.size4/interp-dxx.compute.c"); +> 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"); > ################################################################################ > @@ -1441,40 +1402,28 @@ posn_list_3d_size6 := [[-2, -2, -2], [-1, -2, -2], [0, -2, -2], [1, -2, -2], # generic stuff for 1d, cube, size=5 # > -> data_var_list_1d_size5 := map(data_var_name, posn_list_1d_size5, "data_"); -data_var_list_1d_size5 := +> data_list_1d_size5 := map(data_var_name, posn_list_1d_size5, "data_"); + data_list_1d_size5 := ["data_m2", "data_m1", "data_0", "data_p1", "data_p2"] - ["data_m2", "data_m1", "data_0", "data_p1", "data_p2"] +> coeffs_list_1d_size5 := map(coeff_name, posn_list_1d_size5, "coeff_"); +coeffs_list_1d_size5 := + + ["coeff_m2", "coeff_m1", "coeff_0", "coeff_p1", "coeff_p2"] > -> print_name_list_dcl(data_var_list_1d_size5, "fp", -> "1d.cube.size5/data-var.dcl.c"); -> print_data_var_assign(posn_list_1d_size5, "data_", -> "1d.cube.size5/data-var.assign.c"); -> -> print_interp_coeff_var_store(posn_list_1d_size5, "", "coeff_I_", -> "1d.cube.size5/coeff-I.store.c"); -> print_interp_coeff_var_store(posn_list_1d_size5, "factor", "coeff_dx_", -> "1d.cube.size5/coeff-dx.store.c"); -> print_interp_coeff_var_store(posn_list_1d_size5, "factor", "coeff_dxx_", -> "1d.cube.size5/coeff-dxx.store.c"); -> -> print_name_list_dcl(map(coeff_name, posn_list_1d_size5, "coeff_I_"), "fp", -> "1d.cube.size5/coeff-I.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_1d_size5, "coeff_dx_"), "fp", -> "1d.cube.size5/coeff-dx.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_1d_size5, "coeff_dxx_"), "fp", -> "1d.cube.size5/coeff-dxx.dcl.c"); +> 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_interp_cmpt__lc_of_data(posn_list_1d_size5, -> "result", "coeff_I_", "data_", -> "1d.cube.size5/interp-I.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_1d_size5, -> "result", "coeff_dx_", "data_", -> "1d.cube.size5/interp-dx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_1d_size5, -> "result", "coeff_dxx_", "data_", -> "1d.cube.size5/interp-dxx.compute.c"); +> 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"); > ################################################################################ > @@ -1482,40 +1431,30 @@ data_var_list_1d_size5 := # generic stuff for 1d, cube, size=6 # > -> data_var_list_1d_size6 := map(data_var_name, posn_list_1d_size6, "data_"); -data_var_list_1d_size6 := +> data_list_1d_size6 := map(data_var_name, posn_list_1d_size6, "data_"); +data_list_1d_size6 := ["data_m2", "data_m1", "data_0", "data_p1", "data_p2", "data_p3"] +> coeffs_list_1d_size6 := map(coeff_name, posn_list_1d_size6, "coeff_"); +coeffs_list_1d_size6 := + + ["coeff_m2", "coeff_m1", "coeff_0", "coeff_p1", "coeff_p2", "coeff_p3"] + > -> print_name_list_dcl(data_var_list_1d_size6, "fp", -> "1d.cube.size6/data-var.dcl.c"); -> print_data_var_assign(posn_list_1d_size6, "data_", -> "1d.cube.size6/data-var.assign.c"); -> -> print_interp_coeff_var_store(posn_list_1d_size6, "", "coeff_I_", -> "1d.cube.size6/coeff-I.store.c"); -> print_interp_coeff_var_store(posn_list_1d_size6, "factor", "coeff_dx_", -> "1d.cube.size6/coeff-dx.store.c"); -> print_interp_coeff_var_store(posn_list_1d_size6, "factor", "coeff_dxx_", -> "1d.cube.size6/coeff-dxx.store.c"); -> -> print_name_list_dcl(map(coeff_name, posn_list_1d_size6, "coeff_I_"), "fp", -> "1d.cube.size6/coeff-I.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_1d_size6, "coeff_dx_"), "fp", -> "1d.cube.size6/coeff-dx.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_1d_size6, "coeff_dxx_"), "fp", -> "1d.cube.size6/coeff-dxx.dcl.c"); -> -> print_interp_cmpt__lc_of_data(posn_list_1d_size6, -> "result", "coeff_I_", "data_", -> "1d.cube.size6/interp-I.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_1d_size6, -> "result", "coeff_dx_", "data_", -> "1d.cube.size6/interp-dx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_1d_size6, -> "result", "coeff_dxx_", "data_", -> "1d.cube.size6/interp-dxx.compute.c"); +> 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"); > ################################################################################ > @@ -1523,41 +1462,31 @@ data_var_list_1d_size6 := # generic stuff for 1d, cube, size=7 # > -> data_var_list_1d_size7 := map(data_var_name, posn_list_1d_size7, "data_"); -data_var_list_1d_size7 := [ +> data_list_1d_size7 := map(data_var_name, posn_list_1d_size7, "data_"); +data_list_1d_size7 := [ "data_m3", "data_m2", "data_m1", "data_0", "data_p1", "data_p2", "data_p3"] +> coeffs_list_1d_size7 := map(coeff_name, posn_list_1d_size7, "coeff_"); +coeffs_list_1d_size7 := ["coeff_m3", "coeff_m2", "coeff_m1", "coeff_0", + + "coeff_p1", "coeff_p2", "coeff_p3"] + +> +> 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_name_list_dcl(data_var_list_1d_size7, "fp", -> "1d.cube.size7/data-var.dcl.c"); -> print_data_var_assign(posn_list_1d_size7, "data_", -> "1d.cube.size7/data-var.assign.c"); -> -> print_interp_coeff_var_store(posn_list_1d_size7, "", "coeff_I_", -> "1d.cube.size7/coeff-I.store.c"); -> print_interp_coeff_var_store(posn_list_1d_size7, "factor", "coeff_dx_", -> "1d.cube.size7/coeff-dx.store.c"); -> print_interp_coeff_var_store(posn_list_1d_size7, "factor", "coeff_dxx_", -> "1d.cube.size7/coeff-dxx.store.c"); -> -> print_name_list_dcl(map(coeff_name, posn_list_1d_size7, "coeff_I_"), "fp", -> "1d.cube.size7/coeff-I.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_1d_size7, "coeff_dx_"), "fp", -> "1d.cube.size7/coeff-dx.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_1d_size7, "coeff_dxx_"), "fp", -> "1d.cube.size7/coeff-dxx.dcl.c"); -> -> print_interp_cmpt__lc_of_data(posn_list_1d_size7, -> "result", "coeff_I_", "data_", -> "1d.cube.size7/interp-I.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_1d_size7, -> "result", "coeff_dx_", "data_", -> "1d.cube.size7/interp-dx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_1d_size7, -> "result", "coeff_dxx_", "data_", -> "1d.cube.size7/interp-dxx.compute.c"); +> 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"); > ################################################################################ > quit -bytes used=797948, alloc=720764, time=0.13 +bytes used=584788, alloc=589716, time=0.10 diff --git a/src/GeneralizedPolynomial-Uniform/common/1d.maple b/src/GeneralizedPolynomial-Uniform/common/1d.maple index 8abef92..41c18d8 100644 --- a/src/GeneralizedPolynomial-Uniform/common/1d.maple +++ b/src/GeneralizedPolynomial-Uniform/common/1d.maple @@ -7,29 +7,22 @@ # generic stuff for 1d, cube, size=2 # -data_var_list_1d_size2 := map(data_var_name, posn_list_1d_size2, "data_"); - -print_name_list_dcl(data_var_list_1d_size2, "fp", - "1d.cube.size2/data-var.dcl.c"); -print_data_var_assign(posn_list_1d_size2, "data_", - "1d.cube.size2/data-var.assign.c"); - -print_interp_coeff_var_store(posn_list_1d_size2, "", "coeff_I_", - "1d.cube.size2/coeff-I.store.c"); -print_interp_coeff_var_store(posn_list_1d_size2, "factor", "coeff_dx_", - "1d.cube.size2/coeff-dx.store.c"); - -print_name_list_dcl(map(coeff_name, posn_list_1d_size2, "coeff_I_"), "fp", - "1d.cube.size2/coeff-I.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_1d_size2, "coeff_dx_"), "fp", - "1d.cube.size2/coeff-dx.dcl.c"); - -print_interp_cmpt__lc_of_data(posn_list_1d_size2, - "result", "coeff_I_", "data_", - "1d.cube.size2/interp-I.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_1d_size2, - "result", "coeff_dx_", "data_", - "1d.cube.size2/interp-dx.compute.c"); +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"); ################################################################################ @@ -37,36 +30,22 @@ print_interp_cmpt__lc_of_data(posn_list_1d_size2, # generic stuff for 1d, cube, size=3 # -data_var_list_1d_size3 := map(data_var_name, posn_list_1d_size3, "data_"); - -print_name_list_dcl(data_var_list_1d_size3, "fp", - "1d.cube.size3/data-var.dcl.c"); -print_data_var_assign(posn_list_1d_size3, "data_", - "1d.cube.size3/data-var.assign.c"); - -print_interp_coeff_var_store(posn_list_1d_size3, "", "coeff_I_", - "1d.cube.size3/coeff-I.store.c"); -print_interp_coeff_var_store(posn_list_1d_size3, "factor", "coeff_dx_", - "1d.cube.size3/coeff-dx.store.c"); -print_interp_coeff_var_store(posn_list_1d_size3, "factor", "coeff_dxx_", - "1d.cube.size3/coeff-dxx.store.c"); - -print_name_list_dcl(map(coeff_name, posn_list_1d_size3, "coeff_I_"), "fp", - "1d.cube.size3/coeff-I.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_1d_size3, "coeff_dx_"), "fp", - "1d.cube.size3/coeff-dx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_1d_size3, "coeff_dxx_"), "fp", - "1d.cube.size3/coeff-dxx.dcl.c"); - -print_interp_cmpt__lc_of_data(posn_list_1d_size3, - "result", "coeff_I_", "data_", - "1d.cube.size3/interp-I.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_1d_size3, - "result", "coeff_dx_", "data_", - "1d.cube.size3/interp-dx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_1d_size3, - "result", "coeff_dxx_", "data_", - "1d.cube.size3/interp-dxx.compute.c"); +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"); ################################################################################ @@ -74,36 +53,22 @@ print_interp_cmpt__lc_of_data(posn_list_1d_size3, # generic stuff for 1d, cube, size=4 # -data_var_list_1d_size4 := map(data_var_name, posn_list_1d_size4, "data_"); - -print_name_list_dcl(data_var_list_1d_size4, "fp", - "1d.cube.size4/data-var.dcl.c"); -print_data_var_assign(posn_list_1d_size4, "data_", - "1d.cube.size4/data-var.assign.c"); - -print_interp_coeff_var_store(posn_list_1d_size4, "", "coeff_I_", - "1d.cube.size4/coeff-I.store.c"); -print_interp_coeff_var_store(posn_list_1d_size4, "factor", "coeff_dx_", - "1d.cube.size4/coeff-dx.store.c"); -print_interp_coeff_var_store(posn_list_1d_size4, "factor", "coeff_dxx_", - "1d.cube.size4/coeff-dxx.store.c"); - -print_name_list_dcl(map(coeff_name, posn_list_1d_size4, "coeff_I_"), "fp", - "1d.cube.size4/coeff-I.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_1d_size4, "coeff_dx_"), "fp", - "1d.cube.size4/coeff-dx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_1d_size4, "coeff_dxx_"), "fp", - "1d.cube.size4/coeff-dxx.dcl.c"); - -print_interp_cmpt__lc_of_data(posn_list_1d_size4, - "result", "coeff_I_", "data_", - "1d.cube.size4/interp-I.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_1d_size4, - "result", "coeff_dx_", "data_", - "1d.cube.size4/interp-dx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_1d_size4, - "result", "coeff_dxx_", "data_", - "1d.cube.size4/interp-dxx.compute.c"); +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"); ################################################################################ @@ -111,36 +76,22 @@ print_interp_cmpt__lc_of_data(posn_list_1d_size4, # generic stuff for 1d, cube, size=5 # -data_var_list_1d_size5 := map(data_var_name, posn_list_1d_size5, "data_"); - -print_name_list_dcl(data_var_list_1d_size5, "fp", - "1d.cube.size5/data-var.dcl.c"); -print_data_var_assign(posn_list_1d_size5, "data_", - "1d.cube.size5/data-var.assign.c"); - -print_interp_coeff_var_store(posn_list_1d_size5, "", "coeff_I_", - "1d.cube.size5/coeff-I.store.c"); -print_interp_coeff_var_store(posn_list_1d_size5, "factor", "coeff_dx_", - "1d.cube.size5/coeff-dx.store.c"); -print_interp_coeff_var_store(posn_list_1d_size5, "factor", "coeff_dxx_", - "1d.cube.size5/coeff-dxx.store.c"); - -print_name_list_dcl(map(coeff_name, posn_list_1d_size5, "coeff_I_"), "fp", - "1d.cube.size5/coeff-I.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_1d_size5, "coeff_dx_"), "fp", - "1d.cube.size5/coeff-dx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_1d_size5, "coeff_dxx_"), "fp", - "1d.cube.size5/coeff-dxx.dcl.c"); - -print_interp_cmpt__lc_of_data(posn_list_1d_size5, - "result", "coeff_I_", "data_", - "1d.cube.size5/interp-I.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_1d_size5, - "result", "coeff_dx_", "data_", - "1d.cube.size5/interp-dx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_1d_size5, - "result", "coeff_dxx_", "data_", - "1d.cube.size5/interp-dxx.compute.c"); +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"); ################################################################################ @@ -148,36 +99,22 @@ print_interp_cmpt__lc_of_data(posn_list_1d_size5, # generic stuff for 1d, cube, size=6 # -data_var_list_1d_size6 := map(data_var_name, posn_list_1d_size6, "data_"); - -print_name_list_dcl(data_var_list_1d_size6, "fp", - "1d.cube.size6/data-var.dcl.c"); -print_data_var_assign(posn_list_1d_size6, "data_", - "1d.cube.size6/data-var.assign.c"); - -print_interp_coeff_var_store(posn_list_1d_size6, "", "coeff_I_", - "1d.cube.size6/coeff-I.store.c"); -print_interp_coeff_var_store(posn_list_1d_size6, "factor", "coeff_dx_", - "1d.cube.size6/coeff-dx.store.c"); -print_interp_coeff_var_store(posn_list_1d_size6, "factor", "coeff_dxx_", - "1d.cube.size6/coeff-dxx.store.c"); - -print_name_list_dcl(map(coeff_name, posn_list_1d_size6, "coeff_I_"), "fp", - "1d.cube.size6/coeff-I.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_1d_size6, "coeff_dx_"), "fp", - "1d.cube.size6/coeff-dx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_1d_size6, "coeff_dxx_"), "fp", - "1d.cube.size6/coeff-dxx.dcl.c"); - -print_interp_cmpt__lc_of_data(posn_list_1d_size6, - "result", "coeff_I_", "data_", - "1d.cube.size6/interp-I.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_1d_size6, - "result", "coeff_dx_", "data_", - "1d.cube.size6/interp-dx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_1d_size6, - "result", "coeff_dxx_", "data_", - "1d.cube.size6/interp-dxx.compute.c"); +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"); ################################################################################ @@ -185,35 +122,21 @@ print_interp_cmpt__lc_of_data(posn_list_1d_size6, # generic stuff for 1d, cube, size=7 # -data_var_list_1d_size7 := map(data_var_name, posn_list_1d_size7, "data_"); - -print_name_list_dcl(data_var_list_1d_size7, "fp", - "1d.cube.size7/data-var.dcl.c"); -print_data_var_assign(posn_list_1d_size7, "data_", - "1d.cube.size7/data-var.assign.c"); - -print_interp_coeff_var_store(posn_list_1d_size7, "", "coeff_I_", - "1d.cube.size7/coeff-I.store.c"); -print_interp_coeff_var_store(posn_list_1d_size7, "factor", "coeff_dx_", - "1d.cube.size7/coeff-dx.store.c"); -print_interp_coeff_var_store(posn_list_1d_size7, "factor", "coeff_dxx_", - "1d.cube.size7/coeff-dxx.store.c"); - -print_name_list_dcl(map(coeff_name, posn_list_1d_size7, "coeff_I_"), "fp", - "1d.cube.size7/coeff-I.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_1d_size7, "coeff_dx_"), "fp", - "1d.cube.size7/coeff-dx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_1d_size7, "coeff_dxx_"), "fp", - "1d.cube.size7/coeff-dxx.dcl.c"); - -print_interp_cmpt__lc_of_data(posn_list_1d_size7, - "result", "coeff_I_", "data_", - "1d.cube.size7/interp-I.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_1d_size7, - "result", "coeff_dx_", "data_", - "1d.cube.size7/interp-dx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_1d_size7, - "result", "coeff_dxx_", "data_", - "1d.cube.size7/interp-dxx.compute.c"); +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"); ################################################################################ diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size2/coeffs-dcl.h b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size2/coeffs-dcl.h new file mode 100644 index 0000000..c52e5c6 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size2/coeffs-dcl.h @@ -0,0 +1,4 @@ +fp coeff_0_0; +fp coeff_p1_0; +fp coeff_0_p1; +fp coeff_p1_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size2/data-dcl.h b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size2/data-dcl.h new file mode 100644 index 0000000..b6bbee6 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size2/data-dcl.h @@ -0,0 +1,4 @@ +fp data_0_0; +fp data_p1_0; +fp data_0_p1; +fp data_p1_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size2/evaluate-molecule.c b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size2/evaluate-molecule.c new file mode 100644 index 0000000..a4232ef --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size2/evaluate-molecule.c @@ -0,0 +1,4 @@ + coeffs->coeff_0_0*data->data_0_0 + + coeffs->coeff_p1_0*data->data_p1_0 + + coeffs->coeff_0_p1*data->data_0_p1 + + coeffs->coeff_p1_p1*data->data_p1_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size2/fetch-data.c b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size2/fetch-data.c new file mode 100644 index 0000000..dfc6c80 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size2/fetch-data.c @@ -0,0 +1,4 @@ +data->data_0_0 = DATA(0,0); +data->data_p1_0 = DATA(1,0); +data->data_0_p1 = DATA(0,1); +data->data_p1_p1 = DATA(1,1); diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size2/store-coeffs.c b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size2/store-coeffs.c new file mode 100644 index 0000000..1415ab1 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size2/store-coeffs.c @@ -0,0 +1,4 @@ +COEFF(0,0) = factor * coeffs->coeff_0_0; +COEFF(1,0) = factor * coeffs->coeff_p1_0; +COEFF(0,1) = factor * coeffs->coeff_0_p1; +COEFF(1,1) = factor * coeffs->coeff_p1_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size3/coeffs-dcl.h b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size3/coeffs-dcl.h new file mode 100644 index 0000000..1dfb73d --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size3/coeffs-dcl.h @@ -0,0 +1,9 @@ +fp coeff_m1_m1; +fp coeff_0_m1; +fp coeff_p1_m1; +fp coeff_m1_0; +fp coeff_0_0; +fp coeff_p1_0; +fp coeff_m1_p1; +fp coeff_0_p1; +fp coeff_p1_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size3/data-dcl.h b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size3/data-dcl.h new file mode 100644 index 0000000..22dca3b --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size3/data-dcl.h @@ -0,0 +1,9 @@ +fp data_m1_m1; +fp data_0_m1; +fp data_p1_m1; +fp data_m1_0; +fp data_0_0; +fp data_p1_0; +fp data_m1_p1; +fp data_0_p1; +fp data_p1_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size3/evaluate-molecule.c b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size3/evaluate-molecule.c new file mode 100644 index 0000000..b4d0c00 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size3/evaluate-molecule.c @@ -0,0 +1,9 @@ + coeffs->coeff_m1_m1*data->data_m1_m1 + + coeffs->coeff_0_m1*data->data_0_m1 + + coeffs->coeff_p1_m1*data->data_p1_m1 + + coeffs->coeff_m1_0*data->data_m1_0 + + coeffs->coeff_0_0*data->data_0_0 + + coeffs->coeff_p1_0*data->data_p1_0 + + coeffs->coeff_m1_p1*data->data_m1_p1 + + coeffs->coeff_0_p1*data->data_0_p1 + + coeffs->coeff_p1_p1*data->data_p1_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size3/fetch-data.c b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size3/fetch-data.c new file mode 100644 index 0000000..62725c2 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size3/fetch-data.c @@ -0,0 +1,9 @@ +data->data_m1_m1 = DATA(-1,-1); +data->data_0_m1 = DATA(0,-1); +data->data_p1_m1 = DATA(1,-1); +data->data_m1_0 = DATA(-1,0); +data->data_0_0 = DATA(0,0); +data->data_p1_0 = DATA(1,0); +data->data_m1_p1 = DATA(-1,1); +data->data_0_p1 = DATA(0,1); +data->data_p1_p1 = DATA(1,1); diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size3/store-coeffs.c b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size3/store-coeffs.c new file mode 100644 index 0000000..2226970 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size3/store-coeffs.c @@ -0,0 +1,9 @@ +COEFF(-1,-1) = factor * coeffs->coeff_m1_m1; +COEFF(0,-1) = factor * coeffs->coeff_0_m1; +COEFF(1,-1) = factor * coeffs->coeff_p1_m1; +COEFF(-1,0) = factor * coeffs->coeff_m1_0; +COEFF(0,0) = factor * coeffs->coeff_0_0; +COEFF(1,0) = factor * coeffs->coeff_p1_0; +COEFF(-1,1) = factor * coeffs->coeff_m1_p1; +COEFF(0,1) = factor * coeffs->coeff_0_p1; +COEFF(1,1) = factor * coeffs->coeff_p1_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size4/coeffs-dcl.h b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size4/coeffs-dcl.h new file mode 100644 index 0000000..beb0825 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size4/coeffs-dcl.h @@ -0,0 +1,16 @@ +fp coeff_m1_m1; +fp coeff_0_m1; +fp coeff_p1_m1; +fp coeff_p2_m1; +fp coeff_m1_0; +fp coeff_0_0; +fp coeff_p1_0; +fp coeff_p2_0; +fp coeff_m1_p1; +fp coeff_0_p1; +fp coeff_p1_p1; +fp coeff_p2_p1; +fp coeff_m1_p2; +fp coeff_0_p2; +fp coeff_p1_p2; +fp coeff_p2_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size4/data-dcl.h b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size4/data-dcl.h new file mode 100644 index 0000000..a55365f --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size4/data-dcl.h @@ -0,0 +1,16 @@ +fp data_m1_m1; +fp data_0_m1; +fp data_p1_m1; +fp data_p2_m1; +fp data_m1_0; +fp data_0_0; +fp data_p1_0; +fp data_p2_0; +fp data_m1_p1; +fp data_0_p1; +fp data_p1_p1; +fp data_p2_p1; +fp data_m1_p2; +fp data_0_p2; +fp data_p1_p2; +fp data_p2_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size4/evaluate-molecule.c b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size4/evaluate-molecule.c new file mode 100644 index 0000000..03e306b --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size4/evaluate-molecule.c @@ -0,0 +1,16 @@ + coeffs->coeff_m1_m1*data->data_m1_m1 + + coeffs->coeff_0_m1*data->data_0_m1 + + coeffs->coeff_p1_m1*data->data_p1_m1 + + coeffs->coeff_p2_m1*data->data_p2_m1 + + coeffs->coeff_m1_0*data->data_m1_0 + + coeffs->coeff_0_0*data->data_0_0 + + coeffs->coeff_p1_0*data->data_p1_0 + + coeffs->coeff_p2_0*data->data_p2_0 + + coeffs->coeff_m1_p1*data->data_m1_p1 + + coeffs->coeff_0_p1*data->data_0_p1 + + coeffs->coeff_p1_p1*data->data_p1_p1 + + coeffs->coeff_p2_p1*data->data_p2_p1 + + coeffs->coeff_m1_p2*data->data_m1_p2 + + coeffs->coeff_0_p2*data->data_0_p2 + + coeffs->coeff_p1_p2*data->data_p1_p2 + + coeffs->coeff_p2_p2*data->data_p2_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size4/fetch-data.c b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size4/fetch-data.c new file mode 100644 index 0000000..ee17aca --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size4/fetch-data.c @@ -0,0 +1,16 @@ +data->data_m1_m1 = DATA(-1,-1); +data->data_0_m1 = DATA(0,-1); +data->data_p1_m1 = DATA(1,-1); +data->data_p2_m1 = DATA(2,-1); +data->data_m1_0 = DATA(-1,0); +data->data_0_0 = DATA(0,0); +data->data_p1_0 = DATA(1,0); +data->data_p2_0 = DATA(2,0); +data->data_m1_p1 = DATA(-1,1); +data->data_0_p1 = DATA(0,1); +data->data_p1_p1 = DATA(1,1); +data->data_p2_p1 = DATA(2,1); +data->data_m1_p2 = DATA(-1,2); +data->data_0_p2 = DATA(0,2); +data->data_p1_p2 = DATA(1,2); +data->data_p2_p2 = DATA(2,2); diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size4/store-coeffs.c b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size4/store-coeffs.c new file mode 100644 index 0000000..804500c --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size4/store-coeffs.c @@ -0,0 +1,16 @@ +COEFF(-1,-1) = factor * coeffs->coeff_m1_m1; +COEFF(0,-1) = factor * coeffs->coeff_0_m1; +COEFF(1,-1) = factor * coeffs->coeff_p1_m1; +COEFF(2,-1) = factor * coeffs->coeff_p2_m1; +COEFF(-1,0) = factor * coeffs->coeff_m1_0; +COEFF(0,0) = factor * coeffs->coeff_0_0; +COEFF(1,0) = factor * coeffs->coeff_p1_0; +COEFF(2,0) = factor * coeffs->coeff_p2_0; +COEFF(-1,1) = factor * coeffs->coeff_m1_p1; +COEFF(0,1) = factor * coeffs->coeff_0_p1; +COEFF(1,1) = factor * coeffs->coeff_p1_p1; +COEFF(2,1) = factor * coeffs->coeff_p2_p1; +COEFF(-1,2) = factor * coeffs->coeff_m1_p2; +COEFF(0,2) = factor * coeffs->coeff_0_p2; +COEFF(1,2) = factor * coeffs->coeff_p1_p2; +COEFF(2,2) = factor * coeffs->coeff_p2_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size5/coeffs-dcl.h b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size5/coeffs-dcl.h new file mode 100644 index 0000000..938560f --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size5/coeffs-dcl.h @@ -0,0 +1,25 @@ +fp coeff_m2_m2; +fp coeff_m1_m2; +fp coeff_0_m2; +fp coeff_p1_m2; +fp coeff_p2_m2; +fp coeff_m2_m1; +fp coeff_m1_m1; +fp coeff_0_m1; +fp coeff_p1_m1; +fp coeff_p2_m1; +fp coeff_m2_0; +fp coeff_m1_0; +fp coeff_0_0; +fp coeff_p1_0; +fp coeff_p2_0; +fp coeff_m2_p1; +fp coeff_m1_p1; +fp coeff_0_p1; +fp coeff_p1_p1; +fp coeff_p2_p1; +fp coeff_m2_p2; +fp coeff_m1_p2; +fp coeff_0_p2; +fp coeff_p1_p2; +fp coeff_p2_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size5/data-dcl.h b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size5/data-dcl.h new file mode 100644 index 0000000..1e44205 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size5/data-dcl.h @@ -0,0 +1,25 @@ +fp data_m2_m2; +fp data_m1_m2; +fp data_0_m2; +fp data_p1_m2; +fp data_p2_m2; +fp data_m2_m1; +fp data_m1_m1; +fp data_0_m1; +fp data_p1_m1; +fp data_p2_m1; +fp data_m2_0; +fp data_m1_0; +fp data_0_0; +fp data_p1_0; +fp data_p2_0; +fp data_m2_p1; +fp data_m1_p1; +fp data_0_p1; +fp data_p1_p1; +fp data_p2_p1; +fp data_m2_p2; +fp data_m1_p2; +fp data_0_p2; +fp data_p1_p2; +fp data_p2_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size5/evaluate-molecule.c b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size5/evaluate-molecule.c new file mode 100644 index 0000000..56cf50d --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size5/evaluate-molecule.c @@ -0,0 +1,25 @@ + coeffs->coeff_m2_m2*data->data_m2_m2 + + coeffs->coeff_m1_m2*data->data_m1_m2 + + coeffs->coeff_0_m2*data->data_0_m2 + + coeffs->coeff_p1_m2*data->data_p1_m2 + + coeffs->coeff_p2_m2*data->data_p2_m2 + + coeffs->coeff_m2_m1*data->data_m2_m1 + + coeffs->coeff_m1_m1*data->data_m1_m1 + + coeffs->coeff_0_m1*data->data_0_m1 + + coeffs->coeff_p1_m1*data->data_p1_m1 + + coeffs->coeff_p2_m1*data->data_p2_m1 + + coeffs->coeff_m2_0*data->data_m2_0 + + coeffs->coeff_m1_0*data->data_m1_0 + + coeffs->coeff_0_0*data->data_0_0 + + coeffs->coeff_p1_0*data->data_p1_0 + + coeffs->coeff_p2_0*data->data_p2_0 + + coeffs->coeff_m2_p1*data->data_m2_p1 + + coeffs->coeff_m1_p1*data->data_m1_p1 + + coeffs->coeff_0_p1*data->data_0_p1 + + coeffs->coeff_p1_p1*data->data_p1_p1 + + coeffs->coeff_p2_p1*data->data_p2_p1 + + coeffs->coeff_m2_p2*data->data_m2_p2 + + coeffs->coeff_m1_p2*data->data_m1_p2 + + coeffs->coeff_0_p2*data->data_0_p2 + + coeffs->coeff_p1_p2*data->data_p1_p2 + + coeffs->coeff_p2_p2*data->data_p2_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size5/fetch-data.c b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size5/fetch-data.c new file mode 100644 index 0000000..57bcf0e --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size5/fetch-data.c @@ -0,0 +1,25 @@ +data->data_m2_m2 = DATA(-2,-2); +data->data_m1_m2 = DATA(-1,-2); +data->data_0_m2 = DATA(0,-2); +data->data_p1_m2 = DATA(1,-2); +data->data_p2_m2 = DATA(2,-2); +data->data_m2_m1 = DATA(-2,-1); +data->data_m1_m1 = DATA(-1,-1); +data->data_0_m1 = DATA(0,-1); +data->data_p1_m1 = DATA(1,-1); +data->data_p2_m1 = DATA(2,-1); +data->data_m2_0 = DATA(-2,0); +data->data_m1_0 = DATA(-1,0); +data->data_0_0 = DATA(0,0); +data->data_p1_0 = DATA(1,0); +data->data_p2_0 = DATA(2,0); +data->data_m2_p1 = DATA(-2,1); +data->data_m1_p1 = DATA(-1,1); +data->data_0_p1 = DATA(0,1); +data->data_p1_p1 = DATA(1,1); +data->data_p2_p1 = DATA(2,1); +data->data_m2_p2 = DATA(-2,2); +data->data_m1_p2 = DATA(-1,2); +data->data_0_p2 = DATA(0,2); +data->data_p1_p2 = DATA(1,2); +data->data_p2_p2 = DATA(2,2); diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size5/store-coeffs.c b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size5/store-coeffs.c new file mode 100644 index 0000000..aef1c88 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size5/store-coeffs.c @@ -0,0 +1,25 @@ +COEFF(-2,-2) = factor * coeffs->coeff_m2_m2; +COEFF(-1,-2) = factor * coeffs->coeff_m1_m2; +COEFF(0,-2) = factor * coeffs->coeff_0_m2; +COEFF(1,-2) = factor * coeffs->coeff_p1_m2; +COEFF(2,-2) = factor * coeffs->coeff_p2_m2; +COEFF(-2,-1) = factor * coeffs->coeff_m2_m1; +COEFF(-1,-1) = factor * coeffs->coeff_m1_m1; +COEFF(0,-1) = factor * coeffs->coeff_0_m1; +COEFF(1,-1) = factor * coeffs->coeff_p1_m1; +COEFF(2,-1) = factor * coeffs->coeff_p2_m1; +COEFF(-2,0) = factor * coeffs->coeff_m2_0; +COEFF(-1,0) = factor * coeffs->coeff_m1_0; +COEFF(0,0) = factor * coeffs->coeff_0_0; +COEFF(1,0) = factor * coeffs->coeff_p1_0; +COEFF(2,0) = factor * coeffs->coeff_p2_0; +COEFF(-2,1) = factor * coeffs->coeff_m2_p1; +COEFF(-1,1) = factor * coeffs->coeff_m1_p1; +COEFF(0,1) = factor * coeffs->coeff_0_p1; +COEFF(1,1) = factor * coeffs->coeff_p1_p1; +COEFF(2,1) = factor * coeffs->coeff_p2_p1; +COEFF(-2,2) = factor * coeffs->coeff_m2_p2; +COEFF(-1,2) = factor * coeffs->coeff_m1_p2; +COEFF(0,2) = factor * coeffs->coeff_0_p2; +COEFF(1,2) = factor * coeffs->coeff_p1_p2; +COEFF(2,2) = factor * coeffs->coeff_p2_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size6/coeffs-dcl.h b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size6/coeffs-dcl.h new file mode 100644 index 0000000..4c4a072 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size6/coeffs-dcl.h @@ -0,0 +1,36 @@ +fp coeff_m2_m2; +fp coeff_m1_m2; +fp coeff_0_m2; +fp coeff_p1_m2; +fp coeff_p2_m2; +fp coeff_p3_m2; +fp coeff_m2_m1; +fp coeff_m1_m1; +fp coeff_0_m1; +fp coeff_p1_m1; +fp coeff_p2_m1; +fp coeff_p3_m1; +fp coeff_m2_0; +fp coeff_m1_0; +fp coeff_0_0; +fp coeff_p1_0; +fp coeff_p2_0; +fp coeff_p3_0; +fp coeff_m2_p1; +fp coeff_m1_p1; +fp coeff_0_p1; +fp coeff_p1_p1; +fp coeff_p2_p1; +fp coeff_p3_p1; +fp coeff_m2_p2; +fp coeff_m1_p2; +fp coeff_0_p2; +fp coeff_p1_p2; +fp coeff_p2_p2; +fp coeff_p3_p2; +fp coeff_m2_p3; +fp coeff_m1_p3; +fp coeff_0_p3; +fp coeff_p1_p3; +fp coeff_p2_p3; +fp coeff_p3_p3; diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size6/data-dcl.h b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size6/data-dcl.h new file mode 100644 index 0000000..ba435b4 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size6/data-dcl.h @@ -0,0 +1,36 @@ +fp data_m2_m2; +fp data_m1_m2; +fp data_0_m2; +fp data_p1_m2; +fp data_p2_m2; +fp data_p3_m2; +fp data_m2_m1; +fp data_m1_m1; +fp data_0_m1; +fp data_p1_m1; +fp data_p2_m1; +fp data_p3_m1; +fp data_m2_0; +fp data_m1_0; +fp data_0_0; +fp data_p1_0; +fp data_p2_0; +fp data_p3_0; +fp data_m2_p1; +fp data_m1_p1; +fp data_0_p1; +fp data_p1_p1; +fp data_p2_p1; +fp data_p3_p1; +fp data_m2_p2; +fp data_m1_p2; +fp data_0_p2; +fp data_p1_p2; +fp data_p2_p2; +fp data_p3_p2; +fp data_m2_p3; +fp data_m1_p3; +fp data_0_p3; +fp data_p1_p3; +fp data_p2_p3; +fp data_p3_p3; diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size6/evaluate-molecule.c b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size6/evaluate-molecule.c new file mode 100644 index 0000000..df0bde1 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size6/evaluate-molecule.c @@ -0,0 +1,36 @@ + coeffs->coeff_m2_m2*data->data_m2_m2 + + coeffs->coeff_m1_m2*data->data_m1_m2 + + coeffs->coeff_0_m2*data->data_0_m2 + + coeffs->coeff_p1_m2*data->data_p1_m2 + + coeffs->coeff_p2_m2*data->data_p2_m2 + + coeffs->coeff_p3_m2*data->data_p3_m2 + + coeffs->coeff_m2_m1*data->data_m2_m1 + + coeffs->coeff_m1_m1*data->data_m1_m1 + + coeffs->coeff_0_m1*data->data_0_m1 + + coeffs->coeff_p1_m1*data->data_p1_m1 + + coeffs->coeff_p2_m1*data->data_p2_m1 + + coeffs->coeff_p3_m1*data->data_p3_m1 + + coeffs->coeff_m2_0*data->data_m2_0 + + coeffs->coeff_m1_0*data->data_m1_0 + + coeffs->coeff_0_0*data->data_0_0 + + coeffs->coeff_p1_0*data->data_p1_0 + + coeffs->coeff_p2_0*data->data_p2_0 + + coeffs->coeff_p3_0*data->data_p3_0 + + coeffs->coeff_m2_p1*data->data_m2_p1 + + coeffs->coeff_m1_p1*data->data_m1_p1 + + coeffs->coeff_0_p1*data->data_0_p1 + + coeffs->coeff_p1_p1*data->data_p1_p1 + + coeffs->coeff_p2_p1*data->data_p2_p1 + + coeffs->coeff_p3_p1*data->data_p3_p1 + + coeffs->coeff_m2_p2*data->data_m2_p2 + + coeffs->coeff_m1_p2*data->data_m1_p2 + + coeffs->coeff_0_p2*data->data_0_p2 + + coeffs->coeff_p1_p2*data->data_p1_p2 + + coeffs->coeff_p2_p2*data->data_p2_p2 + + coeffs->coeff_p3_p2*data->data_p3_p2 + + coeffs->coeff_m2_p3*data->data_m2_p3 + + coeffs->coeff_m1_p3*data->data_m1_p3 + + coeffs->coeff_0_p3*data->data_0_p3 + + coeffs->coeff_p1_p3*data->data_p1_p3 + + coeffs->coeff_p2_p3*data->data_p2_p3 + + coeffs->coeff_p3_p3*data->data_p3_p3; diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size6/fetch-data.c b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size6/fetch-data.c new file mode 100644 index 0000000..fc23eb3 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size6/fetch-data.c @@ -0,0 +1,36 @@ +data->data_m2_m2 = DATA(-2,-2); +data->data_m1_m2 = DATA(-1,-2); +data->data_0_m2 = DATA(0,-2); +data->data_p1_m2 = DATA(1,-2); +data->data_p2_m2 = DATA(2,-2); +data->data_p3_m2 = DATA(3,-2); +data->data_m2_m1 = DATA(-2,-1); +data->data_m1_m1 = DATA(-1,-1); +data->data_0_m1 = DATA(0,-1); +data->data_p1_m1 = DATA(1,-1); +data->data_p2_m1 = DATA(2,-1); +data->data_p3_m1 = DATA(3,-1); +data->data_m2_0 = DATA(-2,0); +data->data_m1_0 = DATA(-1,0); +data->data_0_0 = DATA(0,0); +data->data_p1_0 = DATA(1,0); +data->data_p2_0 = DATA(2,0); +data->data_p3_0 = DATA(3,0); +data->data_m2_p1 = DATA(-2,1); +data->data_m1_p1 = DATA(-1,1); +data->data_0_p1 = DATA(0,1); +data->data_p1_p1 = DATA(1,1); +data->data_p2_p1 = DATA(2,1); +data->data_p3_p1 = DATA(3,1); +data->data_m2_p2 = DATA(-2,2); +data->data_m1_p2 = DATA(-1,2); +data->data_0_p2 = DATA(0,2); +data->data_p1_p2 = DATA(1,2); +data->data_p2_p2 = DATA(2,2); +data->data_p3_p2 = DATA(3,2); +data->data_m2_p3 = DATA(-2,3); +data->data_m1_p3 = DATA(-1,3); +data->data_0_p3 = DATA(0,3); +data->data_p1_p3 = DATA(1,3); +data->data_p2_p3 = DATA(2,3); +data->data_p3_p3 = DATA(3,3); diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.cube.size6/store-coeffs.c b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size6/store-coeffs.c new file mode 100644 index 0000000..235f10c --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/2d.cube.size6/store-coeffs.c @@ -0,0 +1,36 @@ +COEFF(-2,-2) = factor * coeffs->coeff_m2_m2; +COEFF(-1,-2) = factor * coeffs->coeff_m1_m2; +COEFF(0,-2) = factor * coeffs->coeff_0_m2; +COEFF(1,-2) = factor * coeffs->coeff_p1_m2; +COEFF(2,-2) = factor * coeffs->coeff_p2_m2; +COEFF(3,-2) = factor * coeffs->coeff_p3_m2; +COEFF(-2,-1) = factor * coeffs->coeff_m2_m1; +COEFF(-1,-1) = factor * coeffs->coeff_m1_m1; +COEFF(0,-1) = factor * coeffs->coeff_0_m1; +COEFF(1,-1) = factor * coeffs->coeff_p1_m1; +COEFF(2,-1) = factor * coeffs->coeff_p2_m1; +COEFF(3,-1) = factor * coeffs->coeff_p3_m1; +COEFF(-2,0) = factor * coeffs->coeff_m2_0; +COEFF(-1,0) = factor * coeffs->coeff_m1_0; +COEFF(0,0) = factor * coeffs->coeff_0_0; +COEFF(1,0) = factor * coeffs->coeff_p1_0; +COEFF(2,0) = factor * coeffs->coeff_p2_0; +COEFF(3,0) = factor * coeffs->coeff_p3_0; +COEFF(-2,1) = factor * coeffs->coeff_m2_p1; +COEFF(-1,1) = factor * coeffs->coeff_m1_p1; +COEFF(0,1) = factor * coeffs->coeff_0_p1; +COEFF(1,1) = factor * coeffs->coeff_p1_p1; +COEFF(2,1) = factor * coeffs->coeff_p2_p1; +COEFF(3,1) = factor * coeffs->coeff_p3_p1; +COEFF(-2,2) = factor * coeffs->coeff_m2_p2; +COEFF(-1,2) = factor * coeffs->coeff_m1_p2; +COEFF(0,2) = factor * coeffs->coeff_0_p2; +COEFF(1,2) = factor * coeffs->coeff_p1_p2; +COEFF(2,2) = factor * coeffs->coeff_p2_p2; +COEFF(3,2) = factor * coeffs->coeff_p3_p2; +COEFF(-2,3) = factor * coeffs->coeff_m2_p3; +COEFF(-1,3) = factor * coeffs->coeff_m1_p3; +COEFF(0,3) = factor * coeffs->coeff_0_p3; +COEFF(1,3) = factor * coeffs->coeff_p1_p3; +COEFF(2,3) = factor * coeffs->coeff_p2_p3; +COEFF(3,3) = factor * coeffs->coeff_p3_p3; diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.log b/src/GeneralizedPolynomial-Uniform/common/2d.log index a76f548..97833ab 100644 --- a/src/GeneralizedPolynomial-Uniform/common/2d.log +++ b/src/GeneralizedPolynomial-Uniform/common/2d.log @@ -10,7 +10,7 @@ # fix_rationals - convert numbers to RATIONAL() calls # nonmatching_names - find names in a list which *don't* have a specified prefix # sprint_numeric_list - convert a numeric list to a valid C identifier suffix -# print_name_list_dcl - print a C declaration for a list of names +# print_name_list_dcl - print C declarations for a list of names # # hypercube_points - compute all (integer) points in an N-dimensional hypercube # @@ -297,49 +297,42 @@ end proc ################################################################################ > # -# This function prints a C declaration for a list of names. +# This function prints a sequence of C declarations for a list of names. # # Argument: # name_list = A list of the names. -# name_type = The C type of the names, eg. "double". +# type_name = The C type of the names, eg. "double". # file_name = The file name to write the declaration to. This is # truncated before writing. # > print_name_list_dcl := > proc( name_list::list({name,string}), -> name_type::string, +> type_name::string, > file_name::string ) > local blanks, separator_string; > > ftruncate(file_name); > -# a sequence of blanks with the same length as name_type -> seq(" ", i=1..length(name_type)); -> -# string to separate names -> separator_string := cat(",\n", %, " "); -> -> map(convert, name_list, string); -> ListTools[Join](%, separator_string); -> cat(op(%)); -> -> fprintf(file_name, -> "%s %s;\n", -> name_type, %); +> map( +> proc(var::{name,string}) +> fprintf(file_name, +> "%s %s;\n", +> type_name, var); +> end proc +> , +> name_list +> ); > > fclose(file_name); > NULL; > end proc; print_name_list_dcl := proc( -name_list::list({name, string}), name_type::string, file_name::string) +name_list::list({name, string}), type_name::string, file_name::string) local blanks, separator_string; ftruncate(file_name); - seq(" ", i = 1 .. length(name_type)); - separator_string := cat(",\n", %, " "); - map(convert, name_list, string); - ListTools[Join](%, separator_string); - cat(op(%)); - fprintf(file_name, "%s %s;\n", name_type, %); + map(proc(var::{name, string}) + fprintf(file_name, "%s %s;\n", type_name, var) + end proc, name_list); fclose(file_name); NULL end proc @@ -445,7 +438,7 @@ ftruncate := proc(file_name::string) fopen(file_name, 'WRITE'); fclose(%); NULL end proc # interpolate.maple -- compute interpolation formulas/coefficients -# $Header: /cactusdevcvs/CactusBase/LocalInterp/src/GeneralizedPolynomial-Uniform/interpolate.maple,v 1.8 2002/08/20 16:46:05 jthorn Exp $ +# $Header: /cactusdevcvs/CactusBase/LocalInterp/src/GeneralizedPolynomial-Uniform/interpolate.maple,v 1.10 2002/08/28 11:31:09 jthorn Exp $ > # # <<>> @@ -454,8 +447,8 @@ ftruncate := # coeff_as_lc_of_data - coefficients of ... (linear combination of data) # # print_coeff__lc_of_data - print C code to compute coefficients -# print_data_var_assign - print C code to assign data-value variables -# print_interp_coeff_var_store - print C code to store coeff vars "somewhere" +# print_fetch_data - print C code to fetch input array chunk into struct data +# print_store_coeffs - print C code to store struct coeffs "somewhere" # print_interp_cmpt__lc_of_data - print C code for computation of interpolant # # coeff_name - name of coefficient of data at a given [m] coordinate @@ -543,7 +536,7 @@ end proc # # This function computes a Hermite polynomial interpolant in any # number of dimensions. This is a polynomial which -# has values which match the given data DATA() at a specified set of +# * has values which match the given data DATA() at a specified set of # points, and # * has derivatives which match the specified finite-difference derivatives # of the given data DATA() at a specified set of points @@ -562,50 +555,45 @@ end proc # + c01*y + c11*x*y + c21*x^2*y + c31*x^3*y # + c00 + c10*x + c20*x^2 + c30*x^3 # end proc; -# coeff_list = A set of the interpolation coefficients (coefficients in +# coeff_set = A set of the interpolation coefficients (coefficients in # the interpolation function), for example -# [ +# { # c03, c13, c23, c33, # c02, c12, c22, c32, # c01, c11, c21, c31, # c00, c10, c20, c30 -# ] +# } # coord_list = A list of the coordinates (independent variables in the # interpolation function), for example [x,y]. -# deriv_coord_list = A list of lists of coordinates specifying which -# derivatives are computed by the deriv_proc_list[] -# procedures, for example -# [[x], [y], [x,y]] -# deriv_proc_list = A list of procedures for computing finite-difference -# derivatives. Each procedure should take N_dims integer -# arguments specifying an evaluation point, and return -# a suitable linear combination of the DATA() for the -# derivative at that point. For example -# example, -# [ -# proc(i::integer, j::integer) -# - 1/2*DATA(i-1,j) + 1/2*DATA(i+1,j) -# end proc +# deriv_set = A set of equations of the form +# {coords} = proc +# giving the derivatives which are to be matched, and the +# procedures to compute their finite-difference approximations. +# Each procedure should take N_dims integer arguments specifying +# an evaluation point, and return a suitable linear combination +# of the DATA() for the derivative at that point. For example +# { +# {x} = proc(i::integer, j::integer) +# - 1/2*DATA(i-1,j) + 1/2*DATA(i+1,j) +# end proc # , -# proc(i::integer, j::integer) -# - 1/2*DATA(i,j-1) + 1/2*DATA(i,j+1) -# end proc +# {y} = proc(i::integer, j::integer) +# - 1/2*DATA(i,j-1) + 1/2*DATA(i,j+1) +# end proc # , -# proc(i::integer, j::integer) -# - 1/4*DATA(i-1,j+1) + 1/4*DATA(i+1,j+1) -# + 1/4*DATA(i-1,j-1) - 1/4*DATA(i+1,j-1) -# end proc -# ] -# fn_posn_list = A list of positions (each a list of numeric values) -# where the interpolant is to match the given data DATA(), -# for example -# [[0,0], [0,1], [1,0], [1,1]] -# deriv_posn_list = A list of positions (each a list of numeric values) -# where the interpolant is to match each possible product -# of 1st derivatives"1st" -# derivatives (actually all derivatives the given data DATA(), -# for example -# [[0,0], [0,1], [1,0], [1,1]] +# {x,y} = proc(i::integer, j::integer) +# - 1/4*DATA(i-1,j+1) + 1/4*DATA(i+1,j+1) +# + 1/4*DATA(i-1,j-1) - 1/4*DATA(i+1,j-1) +# end proc +# } +# fn_posn_set = A set of positions (each a list of numeric values) +# where the interpolant is to match the given data DATA(), +# for example +# {[0,0], [0,1], [1,0], [1,1]} +# deriv_posn_set = A list of positions (each a list of numeric values) +# where the interpolant is to match the derivatives +# specified by deriv_set , for example +# {[0,0], [0,1], [1,0], [1,1]} # # Results: # This function returns the interpolating polynomial, in the form of @@ -613,93 +601,123 @@ end proc # > Hermite_polynomial_interpolant := > proc( -> fn::procedure, coeff_list::list(name), coord_list::list(name), -> deriv_coord_list::list(list(name)), fd_deriv_proc_list::list(procedure), -> fn_posn_list::list(list(numeric)), deriv_posn_list::list(list(numeric)) +> fn::procedure, +> coeff_set::set(name), +> coord_list::list(name), +> deriv_set::set(set(name) = procedure), +> fn_posn_set::set(list(numeric)), +> deriv_posn_set::set(list(numeric)) > ) -> local fn_eset, -> fn_expr, deriv_eset; -> -# set of equations {fn(posn) = DATA(posn)} -> fn_eset := map( -> # return equation that fn(this point) = DATA(this point) -> proc(posn::list(integer)) -> fn(op(posn)) = 'DATA'(op(posn)); -> end proc -> , -> {op(fn_posn_list)} -> ); -> -# set of sets of equations -# { -# { deriv1(posn1) = fd_deriv1(posn1), -# deriv2(posn1) = fd_deriv2(posn1), -# ... }, -# { deriv1(posn2) = fd_deriv1(posn2), -# deriv2(posn2) = fd_deriv2(posn2), -# ... }, -# ... -# } -> fn_expr := fn(op(coord_list)); +> local fn_eqnset, deriv_eqnset, coeff_eqns, subs_eqnset; +> +> +# +# compute a set of equations +# {fn(posn) = DATA(posn)} +# giving the function values to be matched +# +> fn_eqnset := map( +> # return equation that fn(posn) = DATA(posn) +> proc(posn::list(integer)) +> fn(op(posn)) = 'DATA'(op(posn)); +> end proc +> , +> fn_posn_set +> ); +> +> +# +# compute a set of equations +# { diff(fn,coords)(posn) = DERIV(coords)(posn) } +# giving the derivative values to be matched, where DERIV(coords) +# is a placeholder for the appropriate derivative +# > map( -> # return set of equations -> # {deriv(posn) = fd_deriv(posn)} -> # for this point -> proc(posn::list(integer)) -> { -> op( -> zip( -> # return equation that -> # deriv(posn) = fd_deriv(posn) -> # for this deriv and this point -> proc(deriv_coords::list(name), fd_deriv_proc::procedure) -> local fn_deriv_proc; -> fn_deriv_proc := unapply( diff(fn_expr,deriv_coords), -> op(coord_list) ); -> fn_deriv_proc(op(posn)) = fd_deriv_proc(op(posn)); -> end proc -> , -> [op(deriv_coord_list)] -> , -> [op(fd_deriv_proc_list)] -> ) -> ) -> } +> # return set of equations for this particular derivative +> proc(deriv_coords::set(name)) +> local deriv_fn; +> fn(op(coord_list)); +> diff(%, op(deriv_coords)); +> deriv_fn := unapply(%, op(coord_list)); +> map( +> proc(posn::list(integer)) +> deriv_fn(op(posn)) = 'DERIV'(op(deriv_coords))(op(posn)); +> end proc +> , +> deriv_posn_set +> ); > end proc > , -> {op(deriv_posn_list)} +> map(lhs, deriv_set) > ); +> deriv_eqnset := `union`(op(%)); +> +> +# +# solve overall set of equations for coefficients +# in terms of DATA() and DERIV() values +# +> coeff_eqns := solve[linear](fn_eqnset union deriv_eqnset, coeff_set); +> if (indets(map(rhs,%)) <> {}) +> then error "no unique solution for coefficients -- %1 eqns for %2 coeffs", +> nops(fn_eqnset union deriv_eqnset), +> nops(coeff_set); +> fi; > -# set of equations {deriv-i(posn-j) = fd_deriv-i(posn-j)} -> deriv_eset := `union`(op(%)); > -# solve equations for coeffs -> solve(fn_eset union deriv_eset, {op(coeff_list)}); +# +# compute a set of substitution equations +# {'DERIV'(coords) = procedure} +# +> subs_eqnset := map( +> proc(eqn::set(name) = procedure) +> 'DERIV'(op(lhs(eqn))) = rhs(eqn); +> end proc +> , +> deriv_set +> ); +> > -# interpolant as a polynomial in the coordinates -> return subs(%, eval(fn))(op(coord_list)); +# +# compute the coefficients in terms of the DATA() values +# +> subs(subs_eqnset, coeff_eqns); +> eval(%); +> +# +# compute the interpolant as a polynomial in the coordinates +# +> subs(%, fn(op(coord_list))); > end proc; -Hermite_polynomial_interpolant := proc(fn::procedure, coeff_list::list(name), -coord_list::list(name), deriv_coord_list::list(list(name)), -fd_deriv_proc_list::list(procedure), fn_posn_list::list(list(numeric)), -deriv_posn_list::list(list(numeric))) -local fn_eset, fn_expr, deriv_eset; - fn_eset := map( +Hermite_polynomial_interpolant := proc(fn::procedure, coeff_set::set(name), +coord_list::list(name), deriv_set::set(set(name) = procedure), +fn_posn_set::set(list(numeric)), deriv_posn_set::set(list(numeric))) +local fn_eqnset, deriv_eqnset, coeff_eqns, subs_eqnset; + fn_eqnset := map( proc(posn::list(integer)) fn(op(posn)) = 'DATA'(op(posn)) end proc, - {op(fn_posn_list)}); - fn_expr := fn(op(coord_list)); - map(proc(posn::list(integer)) - {op(zip(proc(deriv_coords::list(name), fd_deriv_proc::procedure - ) - local fn_deriv_proc; - fn_deriv_proc := - unapply(diff(fn_expr, deriv_coords), op(coord_list)); - fn_deriv_proc(op(posn)) = fd_deriv_proc(op(posn)) - end proc, [op(deriv_coord_list)], [op(fd_deriv_proc_list)]))} - end proc, {op(deriv_posn_list)}); - deriv_eset := `union`(op(%)); - solve(fn_eset union deriv_eset, {op(coeff_list)}); - return subs(%, eval(fn))(op(coord_list)) + fn_posn_set); + map(proc(deriv_coords::set(name)) + local deriv_fn; + fn(op(coord_list)); + diff(%, op(deriv_coords)); + deriv_fn := unapply(%, op(coord_list)); + map(proc(posn::list(integer)) + deriv_fn(op(posn)) = + 'DERIV'(op(deriv_coords))(op(posn)) + end proc, deriv_posn_set) + end proc, map(lhs, deriv_set)); + deriv_eqnset := `union`(op(%)); + coeff_eqns := solve[linear](fn_eqnset union deriv_eqnset, coeff_set); + if indets(map(rhs, %)) <> {} then error + "no unique solution for coefficients -- %1 eqns for %2 coeffs", + nops(fn_eqnset union deriv_eqnset), nops(coeff_set) + end if; + subs_eqnset := map(proc(eqn::(set(name) = procedure)) + 'DERIV'(op(lhs(eqn))) = rhs(eqn) + end proc, deriv_set); + subs(subs_eqnset, coeff_eqns); + eval(%); + subs(%, fn(op(coord_list))) end proc > @@ -858,7 +876,7 @@ end proc # # This function prints a sequence of C expression to assign the data-value # variables, eg -# data_m1_p1 = DATA(-1,1); +# data->data_m1_p1 = DATA(-1,1); # # Arguments: # posn_list = The same list of positions as was used to compute the @@ -867,7 +885,7 @@ end proc # file_name = The file name to write the coefficients to. This is # truncated before writing. # -> print_data_var_assign := +> print_fetch_data := > proc( > posn_list::list(list(numeric)), > data_var_name_prefix::string, @@ -889,7 +907,7 @@ end proc > > NULL; > end proc; -print_data_var_assign := proc(posn_list::list(list(numeric)), +print_fetch_data := proc(posn_list::list(list(numeric)), data_var_name_prefix::string, file_name::string) ftruncate(file_name); map(proc(posn::list(numeric)) @@ -906,25 +924,18 @@ end proc # # This function prints a sequence of C expression to store the interpolation # coefficients in COEFF(...) expressions, eg -# COEFF(1,-1) = factor * coeff_dx_p1_m1; +# COEFF(1,-1) = factor * coeffs->coeff_p1_m1; # # Arguments: -# posn_list = The same list of positions as was used to compute the -# interpolating polynomial. -# RHS_factor_name = If this string is non-empty, then the coefficient is -# multiplied by this factor before being stored, eg -# setting this to "factor" would give the example above. -# If this string is empty (""), the multiplication is -# omitted, eg -# COEFF(1,-1) = coeff_dx_p1_m1; -# coeff_name_prefix = A prefix string for the coefficient names. +# posn_list = The list of positions in the molecule. +# coeff_name_prefix = A prefix string for the coefficient names, +# eg "factor * coeffs->coeff_" # file_name = The file name to write the coefficients to. This is # truncated before writing. # -> print_interp_coeff_var_store := +> print_store_coeffs := > proc( > posn_list::list(list(numeric)), -> RHS_factor_name::string, > coeff_name_prefix::string, > file_name::string > ) @@ -932,17 +943,10 @@ end proc > ftruncate(file_name); > map( > proc(posn::list(numeric)) -> if (length(RHS_factor_name) > 0) -> then fprintf(file_name, -> "%a = %s * %s;\n", -> 'COEFF'(op(posn)), -> RHS_factor_name, -> coeff_name(posn,coeff_name_prefix)); -> else fprintf(file_name, -> "%a = %s;\n", -> 'COEFF'(op(posn)), -> coeff_name(posn,coeff_name_prefix)); -> end if; +> fprintf(file_name, +> "%a = %s;\n", +> 'COEFF'(op(posn)), +> coeff_name(posn,coeff_name_prefix)); > end proc > , > posn_list @@ -951,16 +955,12 @@ end proc > > NULL; > end proc; -print_interp_coeff_var_store := proc(posn_list::list(list(numeric)), -RHS_factor_name::string, coeff_name_prefix::string, file_name::string) +print_store_coeffs := proc(posn_list::list(list(numeric)), +coeff_name_prefix::string, file_name::string) ftruncate(file_name); map(proc(posn::list(numeric)) - if 0 < length(RHS_factor_name) then fprintf(file_name, - "%a = %s * %s;\n", 'COEFF'(op(posn)), RHS_factor_name, - coeff_name(posn, coeff_name_prefix)) - else fprintf(file_name, "%a = %s;\n", 'COEFF'(op(posn)), - coeff_name(posn, coeff_name_prefix)) - end if + fprintf(file_name, "%a = %s;\n", 'COEFF'(op(posn)), + coeff_name(posn, coeff_name_prefix)) end proc, posn_list); fclose(file_name); NULL @@ -970,25 +970,19 @@ end proc ################################################################################ > # -# This function prints a C expression to compute the interpolant, -# using the coefficients computed by print_coeff__lc_of_data() -# (i.e. expressing the interpolant as a linear combination of the -# data values). +# This function prints a C expression to evaluate a molecule, i.e. +# to compute the molecule as a linear combination of the data values. # # Arguments: -# posn_list = The same list of positions as was used to compute the -# interpolating polynomial. -# result_var_name = The (string) name of the variable to which the -# result is to be assigned. +# posn_list = The list of positions in the molecule. # coeff_name_prefix = A prefix string for the coefficient names. # data_var_name_prefix = A prefix string for the data variable names. # file_name = The file name to write the coefficients to. This is # truncated before writing. # -> print_interp_cmpt__lc_of_data := +> print_evaluate_molecule := > proc( > posn_list::list(list(numeric)), -> result_var_name::string, > coeff_name_prefix::string, > data_var_name_prefix::string, > file_name::string @@ -996,8 +990,6 @@ end proc > > ftruncate(file_name); > -> fprintf(file_name, "%s =\n", result_var_name); -> # list of "coeff*data_var" terms > map( > proc(posn::list(numeric)) @@ -1009,26 +1001,24 @@ end proc > posn_list > ); > -> ListTools[Join](%, "\n\t+ "); +> ListTools[Join](%, "\n + "); > cat(op(%)); -> fprintf(file_name, "\t%s;\n", %); +> fprintf(file_name, " %s;\n", %); > > fclose(file_name); > > NULL; > end proc; -print_interp_cmpt__lc_of_data := proc(posn_list::list(list(numeric)), -result_var_name::string, coeff_name_prefix::string, -data_var_name_prefix::string, file_name::string) +print_evaluate_molecule := proc(posn_list::list(list(numeric)), +coeff_name_prefix::string, data_var_name_prefix::string, file_name::string) ftruncate(file_name); - fprintf(file_name, "%s =\n", result_var_name); map(proc(posn::list(numeric)) sprintf("%s*%s", coeff_name(posn, coeff_name_prefix), data_var_name(posn, data_var_name_prefix)) end proc, posn_list); - ListTools[Join](%, "\n\t+ "); + ListTools[Join](%, "\n + "); cat(op(%)); - fprintf(file_name, "\t%s;\n", %); + fprintf(file_name, " %s;\n", %); fclose(file_name); NULL end proc @@ -1331,38 +1321,28 @@ posn_list_3d_size6 := [[-2, -2, -2], [-1, -2, -2], [0, -2, -2], [1, -2, -2], # generic stuff for 2d, cube, size=2 # > -> data_var_list_2d_size2 := map(data_var_name, posn_list_2d_size2, "data_"); - data_var_list_2d_size2 := ["data_0_0", "data_p1_0", "data_0_p1", "data_p1_p1"] +> data_list_2d_size2 := map(data_var_name, posn_list_2d_size2, "data_"); + data_list_2d_size2 := ["data_0_0", "data_p1_0", "data_0_p1", "data_p1_p1"] + +> coeffs_list_2d_size2 := map(coeff_name, posn_list_2d_size2, "coeff_"); +coeffs_list_2d_size2 := + + ["coeff_0_0", "coeff_p1_0", "coeff_0_p1", "coeff_p1_p1"] > -> print_name_list_dcl(data_var_list_2d_size2, "fp", -> "2d.cube.size2/data-var.dcl.c"); -> print_data_var_assign(posn_list_2d_size2, "data_", -> "2d.cube.size2/data-var.assign.c"); -> -> print_interp_coeff_var_store(posn_list_2d_size2, "", "coeff_I_", -> "2d.cube.size2/coeff-I.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size2, "factor", "coeff_dx_", -> "2d.cube.size2/coeff-dx.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size2, "factor", "coeff_dy_", -> "2d.cube.size2/coeff-dy.store.c"); -> -> print_name_list_dcl(map(coeff_name, posn_list_2d_size2, "coeff_I_"), "fp", -> "2d.cube.size2/coeff-I.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size2, "coeff_dx_"), "fp", -> "2d.cube.size2/coeff-dx.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size2, "coeff_dy_"), "fp", -> "2d.cube.size2/coeff-dy.dcl.c"); +> print_name_list_dcl(data_list_2d_size2, "fp", +> "2d.cube.size2/data-dcl.h"); +> print_name_list_dcl(coeffs_list_2d_size2, "fp", +> "2d.cube.size2/coeffs-dcl.h"); > -> print_interp_cmpt__lc_of_data(posn_list_2d_size2, -> "result", "coeff_I_", "data_", -> "2d.cube.size2/interp-I.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size2, -> "result", "coeff_dx_", "data_", -> "2d.cube.size2/interp-dx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size2, -> "result", "coeff_dy_", "data_", -> "2d.cube.size2/interp-dy.compute.c"); +> print_fetch_data(posn_list_2d_size2, "data->data_", +> "2d.cube.size2/fetch-data.c"); +> print_evaluate_molecule(posn_list_2d_size2, +> "coeffs->coeff_", "data->data_", +> "2d.cube.size2/evaluate-molecule.c"); +> print_store_coeffs(posn_list_2d_size2, +> "factor * coeffs->coeff_", +> "2d.cube.size2/store-coeffs.c"); > ################################################################################ > @@ -1370,61 +1350,32 @@ posn_list_3d_size6 := [[-2, -2, -2], [-1, -2, -2], [0, -2, -2], [1, -2, -2], # generic stuff for 2d, cube, size=3 # > -> data_var_list_2d_size3 := map(data_var_name, posn_list_2d_size3, "data_"); -data_var_list_2d_size3 := ["data_m1_m1", "data_0_m1", "data_p1_m1", "data_m1_0", +> data_list_2d_size3 := map(data_var_name, posn_list_2d_size3, "data_"); +data_list_2d_size3 := ["data_m1_m1", "data_0_m1", "data_p1_m1", "data_m1_0", "data_0_0", "data_p1_0", "data_m1_p1", "data_0_p1", "data_p1_p1"] +> coeffs_list_2d_size3 := map(coeff_name, posn_list_2d_size3, "coeff_"); +coeffs_list_2d_size3 := ["coeff_m1_m1", "coeff_0_m1", "coeff_p1_m1", + + "coeff_m1_0", "coeff_0_0", "coeff_p1_0", "coeff_m1_p1", "coeff_0_p1", + + "coeff_p1_p1"] + +> +> print_name_list_dcl(data_list_2d_size3, "fp", +> "2d.cube.size3/data-dcl.h"); +> print_name_list_dcl(coeffs_list_2d_size3, "fp", +> "2d.cube.size3/coeffs-dcl.h"); > -> print_name_list_dcl(data_var_list_2d_size3, "fp", -> "2d.cube.size3/data-var.dcl.c"); -> print_data_var_assign(posn_list_2d_size3, "data_", -> "2d.cube.size3/data-var.assign.c"); -> -> print_interp_coeff_var_store(posn_list_2d_size3, "", "coeff_I_", -> "2d.cube.size3/coeff-I.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size3, "factor", "coeff_dx_", -> "2d.cube.size3/coeff-dx.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size3, "factor", "coeff_dy_", -> "2d.cube.size3/coeff-dy.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size3, "factor", "coeff_dxx_", -> "2d.cube.size3/coeff-dxx.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size3, "factor", "coeff_dxy_", -> "2d.cube.size3/coeff-dxy.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size3, "factor", "coeff_dyy_", -> "2d.cube.size3/coeff-dyy.store.c"); -> -> print_name_list_dcl(map(coeff_name, posn_list_2d_size3, "coeff_I_"), "fp", -> "2d.cube.size3/coeff-I.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size3, "coeff_dx_"), "fp", -> "2d.cube.size3/coeff-dx.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size3, "coeff_dy_"), "fp", -> "2d.cube.size3/coeff-dy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size3, "coeff_dxx_"), "fp", -> "2d.cube.size3/coeff-dxx.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size3, "coeff_dxy_"), "fp", -> "2d.cube.size3/coeff-dxy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size3, "coeff_dyy_"), "fp", -> "2d.cube.size3/coeff-dyy.dcl.c"); -> -> print_interp_cmpt__lc_of_data(posn_list_2d_size3, -> "result", "coeff_I_", "data_", -> "2d.cube.size3/interp-I.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size3, -> "result", "coeff_dx_", "data_", -> "2d.cube.size3/interp-dx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size3, -> "result", "coeff_dy_", "data_", -> "2d.cube.size3/interp-dy.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size3, -> "result", "coeff_dxx_", "data_", -> "2d.cube.size3/interp-dxx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size3, -> "result", "coeff_dxy_", "data_", -> "2d.cube.size3/interp-dxy.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size3, -> "result", "coeff_dyy_", "data_", -> "2d.cube.size3/interp-dyy.compute.c"); +> print_fetch_data(posn_list_2d_size3, "data->data_", +> "2d.cube.size3/fetch-data.c"); +> print_evaluate_molecule(posn_list_2d_size3, +> "coeffs->coeff_", "data->data_", +> "2d.cube.size3/evaluate-molecule.c"); +> print_store_coeffs(posn_list_2d_size3, +> "factor * coeffs->coeff_", +> "2d.cube.size3/store-coeffs.c"); > ################################################################################ > @@ -1432,66 +1383,38 @@ data_var_list_2d_size3 := ["data_m1_m1", "data_0_m1", "data_p1_m1", "data_m1_0", # generic stuff for 2d, cube, size=4 # > -> data_var_list_2d_size4 := map(data_var_name, posn_list_2d_size4, "data_"); -data_var_list_2d_size4 := ["data_m1_m1", "data_0_m1", "data_p1_m1", - - "data_p2_m1", "data_m1_0", "data_0_0", "data_p1_0", "data_p2_0", - - "data_m1_p1", "data_0_p1", "data_p1_p1", "data_p2_p1", "data_m1_p2", - - "data_0_p2", "data_p1_p2", "data_p2_p2"] - -> -> print_name_list_dcl(data_var_list_2d_size4, "fp", -> "2d.cube.size4/data-var.dcl.c"); -> print_data_var_assign(posn_list_2d_size4, "data_", -> "2d.cube.size4/data-var.assign.c"); -> -> print_interp_coeff_var_store(posn_list_2d_size4, "", "coeff_I_", -> "2d.cube.size4/coeff-I.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size4, "factor", "coeff_dx_", -> "2d.cube.size4/coeff-dx.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size4, "factor", "coeff_dy_", -> "2d.cube.size4/coeff-dy.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size4, "factor", "coeff_dxx_", -> "2d.cube.size4/coeff-dxx.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size4, "factor", "coeff_dxy_", -> "2d.cube.size4/coeff-dxy.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size4, "factor", "coeff_dyy_", -> "2d.cube.size4/coeff-dyy.store.c"); -> -> print_name_list_dcl(map(coeff_name, posn_list_2d_size4, "coeff_I_"), "fp", -> "2d.cube.size4/coeff-I.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size4, "coeff_dx_"), "fp", -> "2d.cube.size4/coeff-dx.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size4, "coeff_dy_"), "fp", -> "2d.cube.size4/coeff-dy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size4, "coeff_dxx_"), "fp", -> "2d.cube.size4/coeff-dxx.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size4, "coeff_dxy_"), "fp", -> "2d.cube.size4/coeff-dxy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size4, "coeff_dyy_"), "fp", -> "2d.cube.size4/coeff-dyy.dcl.c"); -bytes used=1000212, alloc=917336, time=0.18 -> -> print_interp_cmpt__lc_of_data(posn_list_2d_size4, -> "result", "coeff_I_", "data_", -> "2d.cube.size4/interp-I.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size4, -> "result", "coeff_dx_", "data_", -> "2d.cube.size4/interp-dx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size4, -> "result", "coeff_dy_", "data_", -> "2d.cube.size4/interp-dy.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size4, -> "result", "coeff_dxx_", "data_", -> "2d.cube.size4/interp-dxx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size4, -> "result", "coeff_dxy_", "data_", -> "2d.cube.size4/interp-dxy.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size4, -> "result", "coeff_dyy_", "data_", -> "2d.cube.size4/interp-dyy.compute.c"); +> data_list_2d_size4 := map(data_var_name, posn_list_2d_size4, "data_"); +data_list_2d_size4 := ["data_m1_m1", "data_0_m1", "data_p1_m1", "data_p2_m1", + + "data_m1_0", "data_0_0", "data_p1_0", "data_p2_0", "data_m1_p1", + + "data_0_p1", "data_p1_p1", "data_p2_p1", "data_m1_p2", "data_0_p2", + + "data_p1_p2", "data_p2_p2"] + +> coeffs_list_2d_size4 := map(coeff_name, posn_list_2d_size4, "coeff_"); +coeffs_list_2d_size4 := ["coeff_m1_m1", "coeff_0_m1", "coeff_p1_m1", + + "coeff_p2_m1", "coeff_m1_0", "coeff_0_0", "coeff_p1_0", "coeff_p2_0", + + "coeff_m1_p1", "coeff_0_p1", "coeff_p1_p1", "coeff_p2_p1", "coeff_m1_p2", + + "coeff_0_p2", "coeff_p1_p2", "coeff_p2_p2"] + +> +> print_name_list_dcl(data_list_2d_size4, "fp", +> "2d.cube.size4/data-dcl.h"); +> print_name_list_dcl(coeffs_list_2d_size4, "fp", +> "2d.cube.size4/coeffs-dcl.h"); +> +> print_fetch_data(posn_list_2d_size4, "data->data_", +> "2d.cube.size4/fetch-data.c"); +> print_evaluate_molecule(posn_list_2d_size4, +> "coeffs->coeff_", "data->data_", +> "2d.cube.size4/evaluate-molecule.c"); +> print_store_coeffs(posn_list_2d_size4, +> "factor * coeffs->coeff_", +> "2d.cube.size4/store-coeffs.c"); > ################################################################################ > @@ -1499,144 +1422,100 @@ bytes used=1000212, alloc=917336, time=0.18 # generic stuff for 2d, cube, size=5 # > -> data_var_list_2d_size5 := map(data_var_name, posn_list_2d_size5, "data_"); -data_var_list_2d_size5 := ["data_m2_m2", "data_m1_m2", "data_0_m2", +> data_list_2d_size5 := map(data_var_name, posn_list_2d_size5, "data_"); +data_list_2d_size5 := ["data_m2_m2", "data_m1_m2", "data_0_m2", "data_p1_m2", - "data_p1_m2", "data_p2_m2", "data_m2_m1", "data_m1_m1", "data_0_m1", + "data_p2_m2", "data_m2_m1", "data_m1_m1", "data_0_m1", "data_p1_m1", - "data_p1_m1", "data_p2_m1", "data_m2_0", "data_m1_0", "data_0_0", + "data_p2_m1", "data_m2_0", "data_m1_0", "data_0_0", "data_p1_0", - "data_p1_0", "data_p2_0", "data_m2_p1", "data_m1_p1", "data_0_p1", + "data_p2_0", "data_m2_p1", "data_m1_p1", "data_0_p1", "data_p1_p1", - "data_p1_p1", "data_p2_p1", "data_m2_p2", "data_m1_p2", "data_0_p2", + "data_p2_p1", "data_m2_p2", "data_m1_p2", "data_0_p2", "data_p1_p2", - "data_p1_p2", "data_p2_p2"] + "data_p2_p2"] + +> coeffs_list_2d_size5 := map(coeff_name, posn_list_2d_size5, "coeff_"); +coeffs_list_2d_size5 := ["coeff_m2_m2", "coeff_m1_m2", "coeff_0_m2", + + "coeff_p1_m2", "coeff_p2_m2", "coeff_m2_m1", "coeff_m1_m1", "coeff_0_m1", + + "coeff_p1_m1", "coeff_p2_m1", "coeff_m2_0", "coeff_m1_0", "coeff_0_0", + + "coeff_p1_0", "coeff_p2_0", "coeff_m2_p1", "coeff_m1_p1", "coeff_0_p1", + "coeff_p1_p1", "coeff_p2_p1", "coeff_m2_p2", "coeff_m1_p2", "coeff_0_p2", + + "coeff_p1_p2", "coeff_p2_p2"] + +> +> print_name_list_dcl(data_list_2d_size5, "fp", +> "2d.cube.size5/data-dcl.h"); +> print_name_list_dcl(coeffs_list_2d_size5, "fp", +> "2d.cube.size5/coeffs-dcl.h"); > -> print_name_list_dcl(data_var_list_2d_size5, "fp", -> "2d.cube.size5/data-var.dcl.c"); -> print_data_var_assign(posn_list_2d_size5, "data_", -> "2d.cube.size5/data-var.assign.c"); -> -> print_interp_coeff_var_store(posn_list_2d_size5, "", "coeff_I_", -> "2d.cube.size5/coeff-I.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size5, "factor", "coeff_dx_", -> "2d.cube.size5/coeff-dx.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size5, "factor", "coeff_dy_", -> "2d.cube.size5/coeff-dy.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size5, "factor", "coeff_dxx_", -> "2d.cube.size5/coeff-dxx.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size5, "factor", "coeff_dxy_", -> "2d.cube.size5/coeff-dxy.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size5, "factor", "coeff_dyy_", -> "2d.cube.size5/coeff-dyy.store.c"); -> -> print_name_list_dcl(map(coeff_name, posn_list_2d_size5, "coeff_I_"), "fp", -> "2d.cube.size5/coeff-I.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size5, "coeff_dx_"), "fp", -> "2d.cube.size5/coeff-dx.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size5, "coeff_dy_"), "fp", -> "2d.cube.size5/coeff-dy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size5, "coeff_dxx_"), "fp", -> "2d.cube.size5/coeff-dxx.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size5, "coeff_dxy_"), "fp", -> "2d.cube.size5/coeff-dxy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size5, "coeff_dyy_"), "fp", -> "2d.cube.size5/coeff-dyy.dcl.c"); -> -> print_interp_cmpt__lc_of_data(posn_list_2d_size5, -> "result", "coeff_I_", "data_", -> "2d.cube.size5/interp-I.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size5, -> "result", "coeff_dx_", "data_", -> "2d.cube.size5/interp-dx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size5, -> "result", "coeff_dy_", "data_", -> "2d.cube.size5/interp-dy.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size5, -> "result", "coeff_dxx_", "data_", -> "2d.cube.size5/interp-dxx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size5, -> "result", "coeff_dxy_", "data_", -> "2d.cube.size5/interp-dxy.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size5, -> "result", "coeff_dyy_", "data_", -> "2d.cube.size5/interp-dyy.compute.c"); +> print_fetch_data(posn_list_2d_size5, "data->data_", +> "2d.cube.size5/fetch-data.c"); +> print_evaluate_molecule(posn_list_2d_size5, +> "coeffs->coeff_", "data->data_", +> "2d.cube.size5/evaluate-molecule.c"); +> print_store_coeffs(posn_list_2d_size5, +> "factor * coeffs->coeff_", +> "2d.cube.size5/store-coeffs.c"); > ################################################################################ +> # -# generic stuff for 2d, cube, size=5 +# generic stuff for 2d, cube, size=6 # > -> data_var_list_2d_size6 := map(data_var_name, posn_list_2d_size6, "data_"); -data_var_list_2d_size6 := ["data_m2_m2", "data_m1_m2", "data_0_m2", - - "data_p1_m2", "data_p2_m2", "data_p3_m2", "data_m2_m1", "data_m1_m1", - - "data_0_m1", "data_p1_m1", "data_p2_m1", "data_p3_m1", "data_m2_0", - - "data_m1_0", "data_0_0", "data_p1_0", "data_p2_0", "data_p3_0", - - "data_m2_p1", "data_m1_p1", "data_0_p1", "data_p1_p1", "data_p2_p1", - - "data_p3_p1", "data_m2_p2", "data_m1_p2", "data_0_p2", "data_p1_p2", - - "data_p2_p2", "data_p3_p2", "data_m2_p3", "data_m1_p3", "data_0_p3", - - "data_p1_p3", "data_p2_p3", "data_p3_p3"] - -> -> print_name_list_dcl(data_var_list_2d_size6, "fp", -> "2d.cube.size6/data-var.dcl.c"); -> print_data_var_assign(posn_list_2d_size6, "data_", -> "2d.cube.size6/data-var.assign.c"); -> -> print_interp_coeff_var_store(posn_list_2d_size6, "", "coeff_I_", -> "2d.cube.size6/coeff-I.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size6, "factor", "coeff_dx_", -> "2d.cube.size6/coeff-dx.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size6, "factor", "coeff_dy_", -> "2d.cube.size6/coeff-dy.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size6, "factor", "coeff_dxx_", -> "2d.cube.size6/coeff-dxx.store.c"); -bytes used=2000440, alloc=1179432, time=0.32 -> print_interp_coeff_var_store(posn_list_2d_size6, "factor", "coeff_dxy_", -> "2d.cube.size6/coeff-dxy.store.c"); -> print_interp_coeff_var_store(posn_list_2d_size6, "factor", "coeff_dyy_", -> "2d.cube.size6/coeff-dyy.store.c"); -> -> print_name_list_dcl(map(coeff_name, posn_list_2d_size6, "coeff_I_"), "fp", -> "2d.cube.size6/coeff-I.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size6, "coeff_dx_"), "fp", -> "2d.cube.size6/coeff-dx.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size6, "coeff_dy_"), "fp", -> "2d.cube.size6/coeff-dy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size6, "coeff_dxx_"), "fp", -> "2d.cube.size6/coeff-dxx.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size6, "coeff_dxy_"), "fp", -> "2d.cube.size6/coeff-dxy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_2d_size6, "coeff_dyy_"), "fp", -> "2d.cube.size6/coeff-dyy.dcl.c"); -> -> print_interp_cmpt__lc_of_data(posn_list_2d_size6, -> "result", "coeff_I_", "data_", -> "2d.cube.size6/interp-I.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size6, -> "result", "coeff_dx_", "data_", -> "2d.cube.size6/interp-dx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size6, -> "result", "coeff_dy_", "data_", -> "2d.cube.size6/interp-dy.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size6, -> "result", "coeff_dxx_", "data_", -> "2d.cube.size6/interp-dxx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size6, -> "result", "coeff_dxy_", "data_", -> "2d.cube.size6/interp-dxy.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_2d_size6, -> "result", "coeff_dyy_", "data_", -> "2d.cube.size6/interp-dyy.compute.c"); +> data_list_2d_size6 := map(data_var_name, posn_list_2d_size6, "data_"); +data_list_2d_size6 := ["data_m2_m2", "data_m1_m2", "data_0_m2", "data_p1_m2", + + "data_p2_m2", "data_p3_m2", "data_m2_m1", "data_m1_m1", "data_0_m1", + + "data_p1_m1", "data_p2_m1", "data_p3_m1", "data_m2_0", "data_m1_0", + + "data_0_0", "data_p1_0", "data_p2_0", "data_p3_0", "data_m2_p1", + + "data_m1_p1", "data_0_p1", "data_p1_p1", "data_p2_p1", "data_p3_p1", + + "data_m2_p2", "data_m1_p2", "data_0_p2", "data_p1_p2", "data_p2_p2", + + "data_p3_p2", "data_m2_p3", "data_m1_p3", "data_0_p3", "data_p1_p3", + + "data_p2_p3", "data_p3_p3"] + +> coeffs_list_2d_size6 := map(coeff_name, posn_list_2d_size6, "coeff_"); +coeffs_list_2d_size6 := ["coeff_m2_m2", "coeff_m1_m2", "coeff_0_m2", + + "coeff_p1_m2", "coeff_p2_m2", "coeff_p3_m2", "coeff_m2_m1", "coeff_m1_m1", + + "coeff_0_m1", "coeff_p1_m1", "coeff_p2_m1", "coeff_p3_m1", "coeff_m2_0", + + "coeff_m1_0", "coeff_0_0", "coeff_p1_0", "coeff_p2_0", "coeff_p3_0", + + "coeff_m2_p1", "coeff_m1_p1", "coeff_0_p1", "coeff_p1_p1", "coeff_p2_p1", + + "coeff_p3_p1", "coeff_m2_p2", "coeff_m1_p2", "coeff_0_p2", "coeff_p1_p2", + + "coeff_p2_p2", "coeff_p3_p2", "coeff_m2_p3", "coeff_m1_p3", "coeff_0_p3", + + "coeff_p1_p3", "coeff_p2_p3", "coeff_p3_p3"] + > -################################################################################ +> print_name_list_dcl(data_list_2d_size6, "fp", +> "2d.cube.size6/data-dcl.h"); +> print_name_list_dcl(coeffs_list_2d_size6, "fp", +> "2d.cube.size6/coeffs-dcl.h"); +> +> print_fetch_data(posn_list_2d_size6, "data->data_", +> "2d.cube.size6/fetch-data.c"); +> print_evaluate_molecule(posn_list_2d_size6, +> "coeffs->coeff_", "data->data_", +> "2d.cube.size6/evaluate-molecule.c"); +> print_store_coeffs(posn_list_2d_size6, +> "factor * coeffs->coeff_", +> "2d.cube.size6/store-coeffs.c"); > quit -bytes used=2688044, alloc=1179432, time=0.40 +bytes used=976064, alloc=917336, time=0.08 diff --git a/src/GeneralizedPolynomial-Uniform/common/2d.maple b/src/GeneralizedPolynomial-Uniform/common/2d.maple index f4bd331..d52c914 100644 --- a/src/GeneralizedPolynomial-Uniform/common/2d.maple +++ b/src/GeneralizedPolynomial-Uniform/common/2d.maple @@ -7,36 +7,22 @@ # generic stuff for 2d, cube, size=2 # -data_var_list_2d_size2 := map(data_var_name, posn_list_2d_size2, "data_"); - -print_name_list_dcl(data_var_list_2d_size2, "fp", - "2d.cube.size2/data-var.dcl.c"); -print_data_var_assign(posn_list_2d_size2, "data_", - "2d.cube.size2/data-var.assign.c"); - -print_interp_coeff_var_store(posn_list_2d_size2, "", "coeff_I_", - "2d.cube.size2/coeff-I.store.c"); -print_interp_coeff_var_store(posn_list_2d_size2, "factor", "coeff_dx_", - "2d.cube.size2/coeff-dx.store.c"); -print_interp_coeff_var_store(posn_list_2d_size2, "factor", "coeff_dy_", - "2d.cube.size2/coeff-dy.store.c"); - -print_name_list_dcl(map(coeff_name, posn_list_2d_size2, "coeff_I_"), "fp", - "2d.cube.size2/coeff-I.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size2, "coeff_dx_"), "fp", - "2d.cube.size2/coeff-dx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size2, "coeff_dy_"), "fp", - "2d.cube.size2/coeff-dy.dcl.c"); - -print_interp_cmpt__lc_of_data(posn_list_2d_size2, - "result", "coeff_I_", "data_", - "2d.cube.size2/interp-I.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size2, - "result", "coeff_dx_", "data_", - "2d.cube.size2/interp-dx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size2, - "result", "coeff_dy_", "data_", - "2d.cube.size2/interp-dy.compute.c"); +data_list_2d_size2 := map(data_var_name, posn_list_2d_size2, "data_"); +coeffs_list_2d_size2 := map(coeff_name, posn_list_2d_size2, "coeff_"); + +print_name_list_dcl(data_list_2d_size2, "fp", + "2d.cube.size2/data-dcl.h"); +print_name_list_dcl(coeffs_list_2d_size2, "fp", + "2d.cube.size2/coeffs-dcl.h"); + +print_fetch_data(posn_list_2d_size2, "data->data_", + "2d.cube.size2/fetch-data.c"); +print_evaluate_molecule(posn_list_2d_size2, + "coeffs->coeff_", "data->data_", + "2d.cube.size2/evaluate-molecule.c"); +print_store_coeffs(posn_list_2d_size2, + "factor * coeffs->coeff_", + "2d.cube.size2/store-coeffs.c"); ################################################################################ @@ -44,57 +30,22 @@ print_interp_cmpt__lc_of_data(posn_list_2d_size2, # generic stuff for 2d, cube, size=3 # -data_var_list_2d_size3 := map(data_var_name, posn_list_2d_size3, "data_"); - -print_name_list_dcl(data_var_list_2d_size3, "fp", - "2d.cube.size3/data-var.dcl.c"); -print_data_var_assign(posn_list_2d_size3, "data_", - "2d.cube.size3/data-var.assign.c"); +data_list_2d_size3 := map(data_var_name, posn_list_2d_size3, "data_"); +coeffs_list_2d_size3 := map(coeff_name, posn_list_2d_size3, "coeff_"); -print_interp_coeff_var_store(posn_list_2d_size3, "", "coeff_I_", - "2d.cube.size3/coeff-I.store.c"); -print_interp_coeff_var_store(posn_list_2d_size3, "factor", "coeff_dx_", - "2d.cube.size3/coeff-dx.store.c"); -print_interp_coeff_var_store(posn_list_2d_size3, "factor", "coeff_dy_", - "2d.cube.size3/coeff-dy.store.c"); -print_interp_coeff_var_store(posn_list_2d_size3, "factor", "coeff_dxx_", - "2d.cube.size3/coeff-dxx.store.c"); -print_interp_coeff_var_store(posn_list_2d_size3, "factor", "coeff_dxy_", - "2d.cube.size3/coeff-dxy.store.c"); -print_interp_coeff_var_store(posn_list_2d_size3, "factor", "coeff_dyy_", - "2d.cube.size3/coeff-dyy.store.c"); +print_name_list_dcl(data_list_2d_size3, "fp", + "2d.cube.size3/data-dcl.h"); +print_name_list_dcl(coeffs_list_2d_size3, "fp", + "2d.cube.size3/coeffs-dcl.h"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size3, "coeff_I_"), "fp", - "2d.cube.size3/coeff-I.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size3, "coeff_dx_"), "fp", - "2d.cube.size3/coeff-dx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size3, "coeff_dy_"), "fp", - "2d.cube.size3/coeff-dy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size3, "coeff_dxx_"), "fp", - "2d.cube.size3/coeff-dxx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size3, "coeff_dxy_"), "fp", - "2d.cube.size3/coeff-dxy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size3, "coeff_dyy_"), "fp", - "2d.cube.size3/coeff-dyy.dcl.c"); - -print_interp_cmpt__lc_of_data(posn_list_2d_size3, - "result", "coeff_I_", "data_", - "2d.cube.size3/interp-I.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size3, - "result", "coeff_dx_", "data_", - "2d.cube.size3/interp-dx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size3, - "result", "coeff_dy_", "data_", - "2d.cube.size3/interp-dy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size3, - "result", "coeff_dxx_", "data_", - "2d.cube.size3/interp-dxx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size3, - "result", "coeff_dxy_", "data_", - "2d.cube.size3/interp-dxy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size3, - "result", "coeff_dyy_", "data_", - "2d.cube.size3/interp-dyy.compute.c"); +print_fetch_data(posn_list_2d_size3, "data->data_", + "2d.cube.size3/fetch-data.c"); +print_evaluate_molecule(posn_list_2d_size3, + "coeffs->coeff_", "data->data_", + "2d.cube.size3/evaluate-molecule.c"); +print_store_coeffs(posn_list_2d_size3, + "factor * coeffs->coeff_", + "2d.cube.size3/store-coeffs.c"); ################################################################################ @@ -102,57 +53,22 @@ print_interp_cmpt__lc_of_data(posn_list_2d_size3, # generic stuff for 2d, cube, size=4 # -data_var_list_2d_size4 := map(data_var_name, posn_list_2d_size4, "data_"); - -print_name_list_dcl(data_var_list_2d_size4, "fp", - "2d.cube.size4/data-var.dcl.c"); -print_data_var_assign(posn_list_2d_size4, "data_", - "2d.cube.size4/data-var.assign.c"); +data_list_2d_size4 := map(data_var_name, posn_list_2d_size4, "data_"); +coeffs_list_2d_size4 := map(coeff_name, posn_list_2d_size4, "coeff_"); -print_interp_coeff_var_store(posn_list_2d_size4, "", "coeff_I_", - "2d.cube.size4/coeff-I.store.c"); -print_interp_coeff_var_store(posn_list_2d_size4, "factor", "coeff_dx_", - "2d.cube.size4/coeff-dx.store.c"); -print_interp_coeff_var_store(posn_list_2d_size4, "factor", "coeff_dy_", - "2d.cube.size4/coeff-dy.store.c"); -print_interp_coeff_var_store(posn_list_2d_size4, "factor", "coeff_dxx_", - "2d.cube.size4/coeff-dxx.store.c"); -print_interp_coeff_var_store(posn_list_2d_size4, "factor", "coeff_dxy_", - "2d.cube.size4/coeff-dxy.store.c"); -print_interp_coeff_var_store(posn_list_2d_size4, "factor", "coeff_dyy_", - "2d.cube.size4/coeff-dyy.store.c"); +print_name_list_dcl(data_list_2d_size4, "fp", + "2d.cube.size4/data-dcl.h"); +print_name_list_dcl(coeffs_list_2d_size4, "fp", + "2d.cube.size4/coeffs-dcl.h"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size4, "coeff_I_"), "fp", - "2d.cube.size4/coeff-I.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size4, "coeff_dx_"), "fp", - "2d.cube.size4/coeff-dx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size4, "coeff_dy_"), "fp", - "2d.cube.size4/coeff-dy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size4, "coeff_dxx_"), "fp", - "2d.cube.size4/coeff-dxx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size4, "coeff_dxy_"), "fp", - "2d.cube.size4/coeff-dxy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size4, "coeff_dyy_"), "fp", - "2d.cube.size4/coeff-dyy.dcl.c"); - -print_interp_cmpt__lc_of_data(posn_list_2d_size4, - "result", "coeff_I_", "data_", - "2d.cube.size4/interp-I.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size4, - "result", "coeff_dx_", "data_", - "2d.cube.size4/interp-dx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size4, - "result", "coeff_dy_", "data_", - "2d.cube.size4/interp-dy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size4, - "result", "coeff_dxx_", "data_", - "2d.cube.size4/interp-dxx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size4, - "result", "coeff_dxy_", "data_", - "2d.cube.size4/interp-dxy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size4, - "result", "coeff_dyy_", "data_", - "2d.cube.size4/interp-dyy.compute.c"); +print_fetch_data(posn_list_2d_size4, "data->data_", + "2d.cube.size4/fetch-data.c"); +print_evaluate_molecule(posn_list_2d_size4, + "coeffs->coeff_", "data->data_", + "2d.cube.size4/evaluate-molecule.c"); +print_store_coeffs(posn_list_2d_size4, + "factor * coeffs->coeff_", + "2d.cube.size4/store-coeffs.c"); ################################################################################ @@ -160,113 +76,42 @@ print_interp_cmpt__lc_of_data(posn_list_2d_size4, # generic stuff for 2d, cube, size=5 # -data_var_list_2d_size5 := map(data_var_name, posn_list_2d_size5, "data_"); - -print_name_list_dcl(data_var_list_2d_size5, "fp", - "2d.cube.size5/data-var.dcl.c"); -print_data_var_assign(posn_list_2d_size5, "data_", - "2d.cube.size5/data-var.assign.c"); +data_list_2d_size5 := map(data_var_name, posn_list_2d_size5, "data_"); +coeffs_list_2d_size5 := map(coeff_name, posn_list_2d_size5, "coeff_"); -print_interp_coeff_var_store(posn_list_2d_size5, "", "coeff_I_", - "2d.cube.size5/coeff-I.store.c"); -print_interp_coeff_var_store(posn_list_2d_size5, "factor", "coeff_dx_", - "2d.cube.size5/coeff-dx.store.c"); -print_interp_coeff_var_store(posn_list_2d_size5, "factor", "coeff_dy_", - "2d.cube.size5/coeff-dy.store.c"); -print_interp_coeff_var_store(posn_list_2d_size5, "factor", "coeff_dxx_", - "2d.cube.size5/coeff-dxx.store.c"); -print_interp_coeff_var_store(posn_list_2d_size5, "factor", "coeff_dxy_", - "2d.cube.size5/coeff-dxy.store.c"); -print_interp_coeff_var_store(posn_list_2d_size5, "factor", "coeff_dyy_", - "2d.cube.size5/coeff-dyy.store.c"); +print_name_list_dcl(data_list_2d_size5, "fp", + "2d.cube.size5/data-dcl.h"); +print_name_list_dcl(coeffs_list_2d_size5, "fp", + "2d.cube.size5/coeffs-dcl.h"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size5, "coeff_I_"), "fp", - "2d.cube.size5/coeff-I.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size5, "coeff_dx_"), "fp", - "2d.cube.size5/coeff-dx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size5, "coeff_dy_"), "fp", - "2d.cube.size5/coeff-dy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size5, "coeff_dxx_"), "fp", - "2d.cube.size5/coeff-dxx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size5, "coeff_dxy_"), "fp", - "2d.cube.size5/coeff-dxy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size5, "coeff_dyy_"), "fp", - "2d.cube.size5/coeff-dyy.dcl.c"); - -print_interp_cmpt__lc_of_data(posn_list_2d_size5, - "result", "coeff_I_", "data_", - "2d.cube.size5/interp-I.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size5, - "result", "coeff_dx_", "data_", - "2d.cube.size5/interp-dx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size5, - "result", "coeff_dy_", "data_", - "2d.cube.size5/interp-dy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size5, - "result", "coeff_dxx_", "data_", - "2d.cube.size5/interp-dxx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size5, - "result", "coeff_dxy_", "data_", - "2d.cube.size5/interp-dxy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size5, - "result", "coeff_dyy_", "data_", - "2d.cube.size5/interp-dyy.compute.c"); +print_fetch_data(posn_list_2d_size5, "data->data_", + "2d.cube.size5/fetch-data.c"); +print_evaluate_molecule(posn_list_2d_size5, + "coeffs->coeff_", "data->data_", + "2d.cube.size5/evaluate-molecule.c"); +print_store_coeffs(posn_list_2d_size5, + "factor * coeffs->coeff_", + "2d.cube.size5/store-coeffs.c"); ################################################################################ + # -# generic stuff for 2d, cube, size=5 +# generic stuff for 2d, cube, size=6 # -data_var_list_2d_size6 := map(data_var_name, posn_list_2d_size6, "data_"); - -print_name_list_dcl(data_var_list_2d_size6, "fp", - "2d.cube.size6/data-var.dcl.c"); -print_data_var_assign(posn_list_2d_size6, "data_", - "2d.cube.size6/data-var.assign.c"); - -print_interp_coeff_var_store(posn_list_2d_size6, "", "coeff_I_", - "2d.cube.size6/coeff-I.store.c"); -print_interp_coeff_var_store(posn_list_2d_size6, "factor", "coeff_dx_", - "2d.cube.size6/coeff-dx.store.c"); -print_interp_coeff_var_store(posn_list_2d_size6, "factor", "coeff_dy_", - "2d.cube.size6/coeff-dy.store.c"); -print_interp_coeff_var_store(posn_list_2d_size6, "factor", "coeff_dxx_", - "2d.cube.size6/coeff-dxx.store.c"); -print_interp_coeff_var_store(posn_list_2d_size6, "factor", "coeff_dxy_", - "2d.cube.size6/coeff-dxy.store.c"); -print_interp_coeff_var_store(posn_list_2d_size6, "factor", "coeff_dyy_", - "2d.cube.size6/coeff-dyy.store.c"); - -print_name_list_dcl(map(coeff_name, posn_list_2d_size6, "coeff_I_"), "fp", - "2d.cube.size6/coeff-I.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size6, "coeff_dx_"), "fp", - "2d.cube.size6/coeff-dx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size6, "coeff_dy_"), "fp", - "2d.cube.size6/coeff-dy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size6, "coeff_dxx_"), "fp", - "2d.cube.size6/coeff-dxx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size6, "coeff_dxy_"), "fp", - "2d.cube.size6/coeff-dxy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_2d_size6, "coeff_dyy_"), "fp", - "2d.cube.size6/coeff-dyy.dcl.c"); - -print_interp_cmpt__lc_of_data(posn_list_2d_size6, - "result", "coeff_I_", "data_", - "2d.cube.size6/interp-I.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size6, - "result", "coeff_dx_", "data_", - "2d.cube.size6/interp-dx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size6, - "result", "coeff_dy_", "data_", - "2d.cube.size6/interp-dy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size6, - "result", "coeff_dxx_", "data_", - "2d.cube.size6/interp-dxx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size6, - "result", "coeff_dxy_", "data_", - "2d.cube.size6/interp-dxy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_2d_size6, - "result", "coeff_dyy_", "data_", - "2d.cube.size6/interp-dyy.compute.c"); - -################################################################################ +data_list_2d_size6 := map(data_var_name, posn_list_2d_size6, "data_"); +coeffs_list_2d_size6 := map(coeff_name, posn_list_2d_size6, "coeff_"); + +print_name_list_dcl(data_list_2d_size6, "fp", + "2d.cube.size6/data-dcl.h"); +print_name_list_dcl(coeffs_list_2d_size6, "fp", + "2d.cube.size6/coeffs-dcl.h"); + +print_fetch_data(posn_list_2d_size6, "data->data_", + "2d.cube.size6/fetch-data.c"); +print_evaluate_molecule(posn_list_2d_size6, + "coeffs->coeff_", "data->data_", + "2d.cube.size6/evaluate-molecule.c"); +print_store_coeffs(posn_list_2d_size6, + "factor * coeffs->coeff_", + "2d.cube.size6/store-coeffs.c"); diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size2/coeffs-dcl.h b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size2/coeffs-dcl.h new file mode 100644 index 0000000..fc144be --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size2/coeffs-dcl.h @@ -0,0 +1,8 @@ +fp coeff_0_0_0; +fp coeff_p1_0_0; +fp coeff_0_p1_0; +fp coeff_p1_p1_0; +fp coeff_0_0_p1; +fp coeff_p1_0_p1; +fp coeff_0_p1_p1; +fp coeff_p1_p1_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size2/data-dcl.h b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size2/data-dcl.h new file mode 100644 index 0000000..a45f786 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size2/data-dcl.h @@ -0,0 +1,8 @@ +fp data_0_0_0; +fp data_p1_0_0; +fp data_0_p1_0; +fp data_p1_p1_0; +fp data_0_0_p1; +fp data_p1_0_p1; +fp data_0_p1_p1; +fp data_p1_p1_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size2/evaluate-molecule.c b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size2/evaluate-molecule.c new file mode 100644 index 0000000..ca7209f --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size2/evaluate-molecule.c @@ -0,0 +1,8 @@ + coeffs->coeff_0_0_0*data->data_0_0_0 + + coeffs->coeff_p1_0_0*data->data_p1_0_0 + + coeffs->coeff_0_p1_0*data->data_0_p1_0 + + coeffs->coeff_p1_p1_0*data->data_p1_p1_0 + + coeffs->coeff_0_0_p1*data->data_0_0_p1 + + coeffs->coeff_p1_0_p1*data->data_p1_0_p1 + + coeffs->coeff_0_p1_p1*data->data_0_p1_p1 + + coeffs->coeff_p1_p1_p1*data->data_p1_p1_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size2/fetch-data.c b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size2/fetch-data.c new file mode 100644 index 0000000..7390485 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size2/fetch-data.c @@ -0,0 +1,8 @@ +data->data_0_0_0 = DATA(0,0,0); +data->data_p1_0_0 = DATA(1,0,0); +data->data_0_p1_0 = DATA(0,1,0); +data->data_p1_p1_0 = DATA(1,1,0); +data->data_0_0_p1 = DATA(0,0,1); +data->data_p1_0_p1 = DATA(1,0,1); +data->data_0_p1_p1 = DATA(0,1,1); +data->data_p1_p1_p1 = DATA(1,1,1); diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size2/store-coeffs.c b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size2/store-coeffs.c new file mode 100644 index 0000000..aa3d643 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size2/store-coeffs.c @@ -0,0 +1,8 @@ +COEFF(0,0,0) = factor * coeffs->coeff_0_0_0; +COEFF(1,0,0) = factor * coeffs->coeff_p1_0_0; +COEFF(0,1,0) = factor * coeffs->coeff_0_p1_0; +COEFF(1,1,0) = factor * coeffs->coeff_p1_p1_0; +COEFF(0,0,1) = factor * coeffs->coeff_0_0_p1; +COEFF(1,0,1) = factor * coeffs->coeff_p1_0_p1; +COEFF(0,1,1) = factor * coeffs->coeff_0_p1_p1; +COEFF(1,1,1) = factor * coeffs->coeff_p1_p1_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size3/coeffs-dcl.h b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size3/coeffs-dcl.h new file mode 100644 index 0000000..ea8a18a --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size3/coeffs-dcl.h @@ -0,0 +1,27 @@ +fp coeff_m1_m1_m1; +fp coeff_0_m1_m1; +fp coeff_p1_m1_m1; +fp coeff_m1_0_m1; +fp coeff_0_0_m1; +fp coeff_p1_0_m1; +fp coeff_m1_p1_m1; +fp coeff_0_p1_m1; +fp coeff_p1_p1_m1; +fp coeff_m1_m1_0; +fp coeff_0_m1_0; +fp coeff_p1_m1_0; +fp coeff_m1_0_0; +fp coeff_0_0_0; +fp coeff_p1_0_0; +fp coeff_m1_p1_0; +fp coeff_0_p1_0; +fp coeff_p1_p1_0; +fp coeff_m1_m1_p1; +fp coeff_0_m1_p1; +fp coeff_p1_m1_p1; +fp coeff_m1_0_p1; +fp coeff_0_0_p1; +fp coeff_p1_0_p1; +fp coeff_m1_p1_p1; +fp coeff_0_p1_p1; +fp coeff_p1_p1_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size3/data-dcl.h b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size3/data-dcl.h new file mode 100644 index 0000000..09dd175 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size3/data-dcl.h @@ -0,0 +1,27 @@ +fp data_m1_m1_m1; +fp data_0_m1_m1; +fp data_p1_m1_m1; +fp data_m1_0_m1; +fp data_0_0_m1; +fp data_p1_0_m1; +fp data_m1_p1_m1; +fp data_0_p1_m1; +fp data_p1_p1_m1; +fp data_m1_m1_0; +fp data_0_m1_0; +fp data_p1_m1_0; +fp data_m1_0_0; +fp data_0_0_0; +fp data_p1_0_0; +fp data_m1_p1_0; +fp data_0_p1_0; +fp data_p1_p1_0; +fp data_m1_m1_p1; +fp data_0_m1_p1; +fp data_p1_m1_p1; +fp data_m1_0_p1; +fp data_0_0_p1; +fp data_p1_0_p1; +fp data_m1_p1_p1; +fp data_0_p1_p1; +fp data_p1_p1_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size3/evaluate-molecule.c b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size3/evaluate-molecule.c new file mode 100644 index 0000000..9ed9280 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size3/evaluate-molecule.c @@ -0,0 +1,27 @@ + coeffs->coeff_m1_m1_m1*data->data_m1_m1_m1 + + coeffs->coeff_0_m1_m1*data->data_0_m1_m1 + + coeffs->coeff_p1_m1_m1*data->data_p1_m1_m1 + + coeffs->coeff_m1_0_m1*data->data_m1_0_m1 + + coeffs->coeff_0_0_m1*data->data_0_0_m1 + + coeffs->coeff_p1_0_m1*data->data_p1_0_m1 + + coeffs->coeff_m1_p1_m1*data->data_m1_p1_m1 + + coeffs->coeff_0_p1_m1*data->data_0_p1_m1 + + coeffs->coeff_p1_p1_m1*data->data_p1_p1_m1 + + coeffs->coeff_m1_m1_0*data->data_m1_m1_0 + + coeffs->coeff_0_m1_0*data->data_0_m1_0 + + coeffs->coeff_p1_m1_0*data->data_p1_m1_0 + + coeffs->coeff_m1_0_0*data->data_m1_0_0 + + coeffs->coeff_0_0_0*data->data_0_0_0 + + coeffs->coeff_p1_0_0*data->data_p1_0_0 + + coeffs->coeff_m1_p1_0*data->data_m1_p1_0 + + coeffs->coeff_0_p1_0*data->data_0_p1_0 + + coeffs->coeff_p1_p1_0*data->data_p1_p1_0 + + coeffs->coeff_m1_m1_p1*data->data_m1_m1_p1 + + coeffs->coeff_0_m1_p1*data->data_0_m1_p1 + + coeffs->coeff_p1_m1_p1*data->data_p1_m1_p1 + + coeffs->coeff_m1_0_p1*data->data_m1_0_p1 + + coeffs->coeff_0_0_p1*data->data_0_0_p1 + + coeffs->coeff_p1_0_p1*data->data_p1_0_p1 + + coeffs->coeff_m1_p1_p1*data->data_m1_p1_p1 + + coeffs->coeff_0_p1_p1*data->data_0_p1_p1 + + coeffs->coeff_p1_p1_p1*data->data_p1_p1_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size3/fetch-data.c b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size3/fetch-data.c new file mode 100644 index 0000000..5d22113 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size3/fetch-data.c @@ -0,0 +1,27 @@ +data->data_m1_m1_m1 = DATA(-1,-1,-1); +data->data_0_m1_m1 = DATA(0,-1,-1); +data->data_p1_m1_m1 = DATA(1,-1,-1); +data->data_m1_0_m1 = DATA(-1,0,-1); +data->data_0_0_m1 = DATA(0,0,-1); +data->data_p1_0_m1 = DATA(1,0,-1); +data->data_m1_p1_m1 = DATA(-1,1,-1); +data->data_0_p1_m1 = DATA(0,1,-1); +data->data_p1_p1_m1 = DATA(1,1,-1); +data->data_m1_m1_0 = DATA(-1,-1,0); +data->data_0_m1_0 = DATA(0,-1,0); +data->data_p1_m1_0 = DATA(1,-1,0); +data->data_m1_0_0 = DATA(-1,0,0); +data->data_0_0_0 = DATA(0,0,0); +data->data_p1_0_0 = DATA(1,0,0); +data->data_m1_p1_0 = DATA(-1,1,0); +data->data_0_p1_0 = DATA(0,1,0); +data->data_p1_p1_0 = DATA(1,1,0); +data->data_m1_m1_p1 = DATA(-1,-1,1); +data->data_0_m1_p1 = DATA(0,-1,1); +data->data_p1_m1_p1 = DATA(1,-1,1); +data->data_m1_0_p1 = DATA(-1,0,1); +data->data_0_0_p1 = DATA(0,0,1); +data->data_p1_0_p1 = DATA(1,0,1); +data->data_m1_p1_p1 = DATA(-1,1,1); +data->data_0_p1_p1 = DATA(0,1,1); +data->data_p1_p1_p1 = DATA(1,1,1); diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size3/store-coeffs.c b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size3/store-coeffs.c new file mode 100644 index 0000000..992d1b8 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size3/store-coeffs.c @@ -0,0 +1,27 @@ +COEFF(-1,-1,-1) = factor * coeffs->coeff_m1_m1_m1; +COEFF(0,-1,-1) = factor * coeffs->coeff_0_m1_m1; +COEFF(1,-1,-1) = factor * coeffs->coeff_p1_m1_m1; +COEFF(-1,0,-1) = factor * coeffs->coeff_m1_0_m1; +COEFF(0,0,-1) = factor * coeffs->coeff_0_0_m1; +COEFF(1,0,-1) = factor * coeffs->coeff_p1_0_m1; +COEFF(-1,1,-1) = factor * coeffs->coeff_m1_p1_m1; +COEFF(0,1,-1) = factor * coeffs->coeff_0_p1_m1; +COEFF(1,1,-1) = factor * coeffs->coeff_p1_p1_m1; +COEFF(-1,-1,0) = factor * coeffs->coeff_m1_m1_0; +COEFF(0,-1,0) = factor * coeffs->coeff_0_m1_0; +COEFF(1,-1,0) = factor * coeffs->coeff_p1_m1_0; +COEFF(-1,0,0) = factor * coeffs->coeff_m1_0_0; +COEFF(0,0,0) = factor * coeffs->coeff_0_0_0; +COEFF(1,0,0) = factor * coeffs->coeff_p1_0_0; +COEFF(-1,1,0) = factor * coeffs->coeff_m1_p1_0; +COEFF(0,1,0) = factor * coeffs->coeff_0_p1_0; +COEFF(1,1,0) = factor * coeffs->coeff_p1_p1_0; +COEFF(-1,-1,1) = factor * coeffs->coeff_m1_m1_p1; +COEFF(0,-1,1) = factor * coeffs->coeff_0_m1_p1; +COEFF(1,-1,1) = factor * coeffs->coeff_p1_m1_p1; +COEFF(-1,0,1) = factor * coeffs->coeff_m1_0_p1; +COEFF(0,0,1) = factor * coeffs->coeff_0_0_p1; +COEFF(1,0,1) = factor * coeffs->coeff_p1_0_p1; +COEFF(-1,1,1) = factor * coeffs->coeff_m1_p1_p1; +COEFF(0,1,1) = factor * coeffs->coeff_0_p1_p1; +COEFF(1,1,1) = factor * coeffs->coeff_p1_p1_p1; diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size4/coeffs-dcl.h b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size4/coeffs-dcl.h new file mode 100644 index 0000000..8c8d0bb --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size4/coeffs-dcl.h @@ -0,0 +1,64 @@ +fp coeff_m1_m1_m1; +fp coeff_0_m1_m1; +fp coeff_p1_m1_m1; +fp coeff_p2_m1_m1; +fp coeff_m1_0_m1; +fp coeff_0_0_m1; +fp coeff_p1_0_m1; +fp coeff_p2_0_m1; +fp coeff_m1_p1_m1; +fp coeff_0_p1_m1; +fp coeff_p1_p1_m1; +fp coeff_p2_p1_m1; +fp coeff_m1_p2_m1; +fp coeff_0_p2_m1; +fp coeff_p1_p2_m1; +fp coeff_p2_p2_m1; +fp coeff_m1_m1_0; +fp coeff_0_m1_0; +fp coeff_p1_m1_0; +fp coeff_p2_m1_0; +fp coeff_m1_0_0; +fp coeff_0_0_0; +fp coeff_p1_0_0; +fp coeff_p2_0_0; +fp coeff_m1_p1_0; +fp coeff_0_p1_0; +fp coeff_p1_p1_0; +fp coeff_p2_p1_0; +fp coeff_m1_p2_0; +fp coeff_0_p2_0; +fp coeff_p1_p2_0; +fp coeff_p2_p2_0; +fp coeff_m1_m1_p1; +fp coeff_0_m1_p1; +fp coeff_p1_m1_p1; +fp coeff_p2_m1_p1; +fp coeff_m1_0_p1; +fp coeff_0_0_p1; +fp coeff_p1_0_p1; +fp coeff_p2_0_p1; +fp coeff_m1_p1_p1; +fp coeff_0_p1_p1; +fp coeff_p1_p1_p1; +fp coeff_p2_p1_p1; +fp coeff_m1_p2_p1; +fp coeff_0_p2_p1; +fp coeff_p1_p2_p1; +fp coeff_p2_p2_p1; +fp coeff_m1_m1_p2; +fp coeff_0_m1_p2; +fp coeff_p1_m1_p2; +fp coeff_p2_m1_p2; +fp coeff_m1_0_p2; +fp coeff_0_0_p2; +fp coeff_p1_0_p2; +fp coeff_p2_0_p2; +fp coeff_m1_p1_p2; +fp coeff_0_p1_p2; +fp coeff_p1_p1_p2; +fp coeff_p2_p1_p2; +fp coeff_m1_p2_p2; +fp coeff_0_p2_p2; +fp coeff_p1_p2_p2; +fp coeff_p2_p2_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size4/data-dcl.h b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size4/data-dcl.h new file mode 100644 index 0000000..dada27a --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size4/data-dcl.h @@ -0,0 +1,64 @@ +fp data_m1_m1_m1; +fp data_0_m1_m1; +fp data_p1_m1_m1; +fp data_p2_m1_m1; +fp data_m1_0_m1; +fp data_0_0_m1; +fp data_p1_0_m1; +fp data_p2_0_m1; +fp data_m1_p1_m1; +fp data_0_p1_m1; +fp data_p1_p1_m1; +fp data_p2_p1_m1; +fp data_m1_p2_m1; +fp data_0_p2_m1; +fp data_p1_p2_m1; +fp data_p2_p2_m1; +fp data_m1_m1_0; +fp data_0_m1_0; +fp data_p1_m1_0; +fp data_p2_m1_0; +fp data_m1_0_0; +fp data_0_0_0; +fp data_p1_0_0; +fp data_p2_0_0; +fp data_m1_p1_0; +fp data_0_p1_0; +fp data_p1_p1_0; +fp data_p2_p1_0; +fp data_m1_p2_0; +fp data_0_p2_0; +fp data_p1_p2_0; +fp data_p2_p2_0; +fp data_m1_m1_p1; +fp data_0_m1_p1; +fp data_p1_m1_p1; +fp data_p2_m1_p1; +fp data_m1_0_p1; +fp data_0_0_p1; +fp data_p1_0_p1; +fp data_p2_0_p1; +fp data_m1_p1_p1; +fp data_0_p1_p1; +fp data_p1_p1_p1; +fp data_p2_p1_p1; +fp data_m1_p2_p1; +fp data_0_p2_p1; +fp data_p1_p2_p1; +fp data_p2_p2_p1; +fp data_m1_m1_p2; +fp data_0_m1_p2; +fp data_p1_m1_p2; +fp data_p2_m1_p2; +fp data_m1_0_p2; +fp data_0_0_p2; +fp data_p1_0_p2; +fp data_p2_0_p2; +fp data_m1_p1_p2; +fp data_0_p1_p2; +fp data_p1_p1_p2; +fp data_p2_p1_p2; +fp data_m1_p2_p2; +fp data_0_p2_p2; +fp data_p1_p2_p2; +fp data_p2_p2_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size4/evaluate-molecule.c b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size4/evaluate-molecule.c new file mode 100644 index 0000000..124a1b5 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size4/evaluate-molecule.c @@ -0,0 +1,64 @@ + coeffs->coeff_m1_m1_m1*data->data_m1_m1_m1 + + coeffs->coeff_0_m1_m1*data->data_0_m1_m1 + + coeffs->coeff_p1_m1_m1*data->data_p1_m1_m1 + + coeffs->coeff_p2_m1_m1*data->data_p2_m1_m1 + + coeffs->coeff_m1_0_m1*data->data_m1_0_m1 + + coeffs->coeff_0_0_m1*data->data_0_0_m1 + + coeffs->coeff_p1_0_m1*data->data_p1_0_m1 + + coeffs->coeff_p2_0_m1*data->data_p2_0_m1 + + coeffs->coeff_m1_p1_m1*data->data_m1_p1_m1 + + coeffs->coeff_0_p1_m1*data->data_0_p1_m1 + + coeffs->coeff_p1_p1_m1*data->data_p1_p1_m1 + + coeffs->coeff_p2_p1_m1*data->data_p2_p1_m1 + + coeffs->coeff_m1_p2_m1*data->data_m1_p2_m1 + + coeffs->coeff_0_p2_m1*data->data_0_p2_m1 + + coeffs->coeff_p1_p2_m1*data->data_p1_p2_m1 + + coeffs->coeff_p2_p2_m1*data->data_p2_p2_m1 + + coeffs->coeff_m1_m1_0*data->data_m1_m1_0 + + coeffs->coeff_0_m1_0*data->data_0_m1_0 + + coeffs->coeff_p1_m1_0*data->data_p1_m1_0 + + coeffs->coeff_p2_m1_0*data->data_p2_m1_0 + + coeffs->coeff_m1_0_0*data->data_m1_0_0 + + coeffs->coeff_0_0_0*data->data_0_0_0 + + coeffs->coeff_p1_0_0*data->data_p1_0_0 + + coeffs->coeff_p2_0_0*data->data_p2_0_0 + + coeffs->coeff_m1_p1_0*data->data_m1_p1_0 + + coeffs->coeff_0_p1_0*data->data_0_p1_0 + + coeffs->coeff_p1_p1_0*data->data_p1_p1_0 + + coeffs->coeff_p2_p1_0*data->data_p2_p1_0 + + coeffs->coeff_m1_p2_0*data->data_m1_p2_0 + + coeffs->coeff_0_p2_0*data->data_0_p2_0 + + coeffs->coeff_p1_p2_0*data->data_p1_p2_0 + + coeffs->coeff_p2_p2_0*data->data_p2_p2_0 + + coeffs->coeff_m1_m1_p1*data->data_m1_m1_p1 + + coeffs->coeff_0_m1_p1*data->data_0_m1_p1 + + coeffs->coeff_p1_m1_p1*data->data_p1_m1_p1 + + coeffs->coeff_p2_m1_p1*data->data_p2_m1_p1 + + coeffs->coeff_m1_0_p1*data->data_m1_0_p1 + + coeffs->coeff_0_0_p1*data->data_0_0_p1 + + coeffs->coeff_p1_0_p1*data->data_p1_0_p1 + + coeffs->coeff_p2_0_p1*data->data_p2_0_p1 + + coeffs->coeff_m1_p1_p1*data->data_m1_p1_p1 + + coeffs->coeff_0_p1_p1*data->data_0_p1_p1 + + coeffs->coeff_p1_p1_p1*data->data_p1_p1_p1 + + coeffs->coeff_p2_p1_p1*data->data_p2_p1_p1 + + coeffs->coeff_m1_p2_p1*data->data_m1_p2_p1 + + coeffs->coeff_0_p2_p1*data->data_0_p2_p1 + + coeffs->coeff_p1_p2_p1*data->data_p1_p2_p1 + + coeffs->coeff_p2_p2_p1*data->data_p2_p2_p1 + + coeffs->coeff_m1_m1_p2*data->data_m1_m1_p2 + + coeffs->coeff_0_m1_p2*data->data_0_m1_p2 + + coeffs->coeff_p1_m1_p2*data->data_p1_m1_p2 + + coeffs->coeff_p2_m1_p2*data->data_p2_m1_p2 + + coeffs->coeff_m1_0_p2*data->data_m1_0_p2 + + coeffs->coeff_0_0_p2*data->data_0_0_p2 + + coeffs->coeff_p1_0_p2*data->data_p1_0_p2 + + coeffs->coeff_p2_0_p2*data->data_p2_0_p2 + + coeffs->coeff_m1_p1_p2*data->data_m1_p1_p2 + + coeffs->coeff_0_p1_p2*data->data_0_p1_p2 + + coeffs->coeff_p1_p1_p2*data->data_p1_p1_p2 + + coeffs->coeff_p2_p1_p2*data->data_p2_p1_p2 + + coeffs->coeff_m1_p2_p2*data->data_m1_p2_p2 + + coeffs->coeff_0_p2_p2*data->data_0_p2_p2 + + coeffs->coeff_p1_p2_p2*data->data_p1_p2_p2 + + coeffs->coeff_p2_p2_p2*data->data_p2_p2_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size4/fetch-data.c b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size4/fetch-data.c new file mode 100644 index 0000000..b520c48 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size4/fetch-data.c @@ -0,0 +1,64 @@ +data->data_m1_m1_m1 = DATA(-1,-1,-1); +data->data_0_m1_m1 = DATA(0,-1,-1); +data->data_p1_m1_m1 = DATA(1,-1,-1); +data->data_p2_m1_m1 = DATA(2,-1,-1); +data->data_m1_0_m1 = DATA(-1,0,-1); +data->data_0_0_m1 = DATA(0,0,-1); +data->data_p1_0_m1 = DATA(1,0,-1); +data->data_p2_0_m1 = DATA(2,0,-1); +data->data_m1_p1_m1 = DATA(-1,1,-1); +data->data_0_p1_m1 = DATA(0,1,-1); +data->data_p1_p1_m1 = DATA(1,1,-1); +data->data_p2_p1_m1 = DATA(2,1,-1); +data->data_m1_p2_m1 = DATA(-1,2,-1); +data->data_0_p2_m1 = DATA(0,2,-1); +data->data_p1_p2_m1 = DATA(1,2,-1); +data->data_p2_p2_m1 = DATA(2,2,-1); +data->data_m1_m1_0 = DATA(-1,-1,0); +data->data_0_m1_0 = DATA(0,-1,0); +data->data_p1_m1_0 = DATA(1,-1,0); +data->data_p2_m1_0 = DATA(2,-1,0); +data->data_m1_0_0 = DATA(-1,0,0); +data->data_0_0_0 = DATA(0,0,0); +data->data_p1_0_0 = DATA(1,0,0); +data->data_p2_0_0 = DATA(2,0,0); +data->data_m1_p1_0 = DATA(-1,1,0); +data->data_0_p1_0 = DATA(0,1,0); +data->data_p1_p1_0 = DATA(1,1,0); +data->data_p2_p1_0 = DATA(2,1,0); +data->data_m1_p2_0 = DATA(-1,2,0); +data->data_0_p2_0 = DATA(0,2,0); +data->data_p1_p2_0 = DATA(1,2,0); +data->data_p2_p2_0 = DATA(2,2,0); +data->data_m1_m1_p1 = DATA(-1,-1,1); +data->data_0_m1_p1 = DATA(0,-1,1); +data->data_p1_m1_p1 = DATA(1,-1,1); +data->data_p2_m1_p1 = DATA(2,-1,1); +data->data_m1_0_p1 = DATA(-1,0,1); +data->data_0_0_p1 = DATA(0,0,1); +data->data_p1_0_p1 = DATA(1,0,1); +data->data_p2_0_p1 = DATA(2,0,1); +data->data_m1_p1_p1 = DATA(-1,1,1); +data->data_0_p1_p1 = DATA(0,1,1); +data->data_p1_p1_p1 = DATA(1,1,1); +data->data_p2_p1_p1 = DATA(2,1,1); +data->data_m1_p2_p1 = DATA(-1,2,1); +data->data_0_p2_p1 = DATA(0,2,1); +data->data_p1_p2_p1 = DATA(1,2,1); +data->data_p2_p2_p1 = DATA(2,2,1); +data->data_m1_m1_p2 = DATA(-1,-1,2); +data->data_0_m1_p2 = DATA(0,-1,2); +data->data_p1_m1_p2 = DATA(1,-1,2); +data->data_p2_m1_p2 = DATA(2,-1,2); +data->data_m1_0_p2 = DATA(-1,0,2); +data->data_0_0_p2 = DATA(0,0,2); +data->data_p1_0_p2 = DATA(1,0,2); +data->data_p2_0_p2 = DATA(2,0,2); +data->data_m1_p1_p2 = DATA(-1,1,2); +data->data_0_p1_p2 = DATA(0,1,2); +data->data_p1_p1_p2 = DATA(1,1,2); +data->data_p2_p1_p2 = DATA(2,1,2); +data->data_m1_p2_p2 = DATA(-1,2,2); +data->data_0_p2_p2 = DATA(0,2,2); +data->data_p1_p2_p2 = DATA(1,2,2); +data->data_p2_p2_p2 = DATA(2,2,2); diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size4/store-coeffs.c b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size4/store-coeffs.c new file mode 100644 index 0000000..9f06dff --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size4/store-coeffs.c @@ -0,0 +1,64 @@ +COEFF(-1,-1,-1) = factor * coeffs->coeff_m1_m1_m1; +COEFF(0,-1,-1) = factor * coeffs->coeff_0_m1_m1; +COEFF(1,-1,-1) = factor * coeffs->coeff_p1_m1_m1; +COEFF(2,-1,-1) = factor * coeffs->coeff_p2_m1_m1; +COEFF(-1,0,-1) = factor * coeffs->coeff_m1_0_m1; +COEFF(0,0,-1) = factor * coeffs->coeff_0_0_m1; +COEFF(1,0,-1) = factor * coeffs->coeff_p1_0_m1; +COEFF(2,0,-1) = factor * coeffs->coeff_p2_0_m1; +COEFF(-1,1,-1) = factor * coeffs->coeff_m1_p1_m1; +COEFF(0,1,-1) = factor * coeffs->coeff_0_p1_m1; +COEFF(1,1,-1) = factor * coeffs->coeff_p1_p1_m1; +COEFF(2,1,-1) = factor * coeffs->coeff_p2_p1_m1; +COEFF(-1,2,-1) = factor * coeffs->coeff_m1_p2_m1; +COEFF(0,2,-1) = factor * coeffs->coeff_0_p2_m1; +COEFF(1,2,-1) = factor * coeffs->coeff_p1_p2_m1; +COEFF(2,2,-1) = factor * coeffs->coeff_p2_p2_m1; +COEFF(-1,-1,0) = factor * coeffs->coeff_m1_m1_0; +COEFF(0,-1,0) = factor * coeffs->coeff_0_m1_0; +COEFF(1,-1,0) = factor * coeffs->coeff_p1_m1_0; +COEFF(2,-1,0) = factor * coeffs->coeff_p2_m1_0; +COEFF(-1,0,0) = factor * coeffs->coeff_m1_0_0; +COEFF(0,0,0) = factor * coeffs->coeff_0_0_0; +COEFF(1,0,0) = factor * coeffs->coeff_p1_0_0; +COEFF(2,0,0) = factor * coeffs->coeff_p2_0_0; +COEFF(-1,1,0) = factor * coeffs->coeff_m1_p1_0; +COEFF(0,1,0) = factor * coeffs->coeff_0_p1_0; +COEFF(1,1,0) = factor * coeffs->coeff_p1_p1_0; +COEFF(2,1,0) = factor * coeffs->coeff_p2_p1_0; +COEFF(-1,2,0) = factor * coeffs->coeff_m1_p2_0; +COEFF(0,2,0) = factor * coeffs->coeff_0_p2_0; +COEFF(1,2,0) = factor * coeffs->coeff_p1_p2_0; +COEFF(2,2,0) = factor * coeffs->coeff_p2_p2_0; +COEFF(-1,-1,1) = factor * coeffs->coeff_m1_m1_p1; +COEFF(0,-1,1) = factor * coeffs->coeff_0_m1_p1; +COEFF(1,-1,1) = factor * coeffs->coeff_p1_m1_p1; +COEFF(2,-1,1) = factor * coeffs->coeff_p2_m1_p1; +COEFF(-1,0,1) = factor * coeffs->coeff_m1_0_p1; +COEFF(0,0,1) = factor * coeffs->coeff_0_0_p1; +COEFF(1,0,1) = factor * coeffs->coeff_p1_0_p1; +COEFF(2,0,1) = factor * coeffs->coeff_p2_0_p1; +COEFF(-1,1,1) = factor * coeffs->coeff_m1_p1_p1; +COEFF(0,1,1) = factor * coeffs->coeff_0_p1_p1; +COEFF(1,1,1) = factor * coeffs->coeff_p1_p1_p1; +COEFF(2,1,1) = factor * coeffs->coeff_p2_p1_p1; +COEFF(-1,2,1) = factor * coeffs->coeff_m1_p2_p1; +COEFF(0,2,1) = factor * coeffs->coeff_0_p2_p1; +COEFF(1,2,1) = factor * coeffs->coeff_p1_p2_p1; +COEFF(2,2,1) = factor * coeffs->coeff_p2_p2_p1; +COEFF(-1,-1,2) = factor * coeffs->coeff_m1_m1_p2; +COEFF(0,-1,2) = factor * coeffs->coeff_0_m1_p2; +COEFF(1,-1,2) = factor * coeffs->coeff_p1_m1_p2; +COEFF(2,-1,2) = factor * coeffs->coeff_p2_m1_p2; +COEFF(-1,0,2) = factor * coeffs->coeff_m1_0_p2; +COEFF(0,0,2) = factor * coeffs->coeff_0_0_p2; +COEFF(1,0,2) = factor * coeffs->coeff_p1_0_p2; +COEFF(2,0,2) = factor * coeffs->coeff_p2_0_p2; +COEFF(-1,1,2) = factor * coeffs->coeff_m1_p1_p2; +COEFF(0,1,2) = factor * coeffs->coeff_0_p1_p2; +COEFF(1,1,2) = factor * coeffs->coeff_p1_p1_p2; +COEFF(2,1,2) = factor * coeffs->coeff_p2_p1_p2; +COEFF(-1,2,2) = factor * coeffs->coeff_m1_p2_p2; +COEFF(0,2,2) = factor * coeffs->coeff_0_p2_p2; +COEFF(1,2,2) = factor * coeffs->coeff_p1_p2_p2; +COEFF(2,2,2) = factor * coeffs->coeff_p2_p2_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size5/coeffs-dcl.h b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size5/coeffs-dcl.h new file mode 100644 index 0000000..94fdc84 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size5/coeffs-dcl.h @@ -0,0 +1,125 @@ +fp coeff_m2_m2_m2; +fp coeff_m1_m2_m2; +fp coeff_0_m2_m2; +fp coeff_p1_m2_m2; +fp coeff_p2_m2_m2; +fp coeff_m2_m1_m2; +fp coeff_m1_m1_m2; +fp coeff_0_m1_m2; +fp coeff_p1_m1_m2; +fp coeff_p2_m1_m2; +fp coeff_m2_0_m2; +fp coeff_m1_0_m2; +fp coeff_0_0_m2; +fp coeff_p1_0_m2; +fp coeff_p2_0_m2; +fp coeff_m2_p1_m2; +fp coeff_m1_p1_m2; +fp coeff_0_p1_m2; +fp coeff_p1_p1_m2; +fp coeff_p2_p1_m2; +fp coeff_m2_p2_m2; +fp coeff_m1_p2_m2; +fp coeff_0_p2_m2; +fp coeff_p1_p2_m2; +fp coeff_p2_p2_m2; +fp coeff_m2_m2_m1; +fp coeff_m1_m2_m1; +fp coeff_0_m2_m1; +fp coeff_p1_m2_m1; +fp coeff_p2_m2_m1; +fp coeff_m2_m1_m1; +fp coeff_m1_m1_m1; +fp coeff_0_m1_m1; +fp coeff_p1_m1_m1; +fp coeff_p2_m1_m1; +fp coeff_m2_0_m1; +fp coeff_m1_0_m1; +fp coeff_0_0_m1; +fp coeff_p1_0_m1; +fp coeff_p2_0_m1; +fp coeff_m2_p1_m1; +fp coeff_m1_p1_m1; +fp coeff_0_p1_m1; +fp coeff_p1_p1_m1; +fp coeff_p2_p1_m1; +fp coeff_m2_p2_m1; +fp coeff_m1_p2_m1; +fp coeff_0_p2_m1; +fp coeff_p1_p2_m1; +fp coeff_p2_p2_m1; +fp coeff_m2_m2_0; +fp coeff_m1_m2_0; +fp coeff_0_m2_0; +fp coeff_p1_m2_0; +fp coeff_p2_m2_0; +fp coeff_m2_m1_0; +fp coeff_m1_m1_0; +fp coeff_0_m1_0; +fp coeff_p1_m1_0; +fp coeff_p2_m1_0; +fp coeff_m2_0_0; +fp coeff_m1_0_0; +fp coeff_0_0_0; +fp coeff_p1_0_0; +fp coeff_p2_0_0; +fp coeff_m2_p1_0; +fp coeff_m1_p1_0; +fp coeff_0_p1_0; +fp coeff_p1_p1_0; +fp coeff_p2_p1_0; +fp coeff_m2_p2_0; +fp coeff_m1_p2_0; +fp coeff_0_p2_0; +fp coeff_p1_p2_0; +fp coeff_p2_p2_0; +fp coeff_m2_m2_p1; +fp coeff_m1_m2_p1; +fp coeff_0_m2_p1; +fp coeff_p1_m2_p1; +fp coeff_p2_m2_p1; +fp coeff_m2_m1_p1; +fp coeff_m1_m1_p1; +fp coeff_0_m1_p1; +fp coeff_p1_m1_p1; +fp coeff_p2_m1_p1; +fp coeff_m2_0_p1; +fp coeff_m1_0_p1; +fp coeff_0_0_p1; +fp coeff_p1_0_p1; +fp coeff_p2_0_p1; +fp coeff_m2_p1_p1; +fp coeff_m1_p1_p1; +fp coeff_0_p1_p1; +fp coeff_p1_p1_p1; +fp coeff_p2_p1_p1; +fp coeff_m2_p2_p1; +fp coeff_m1_p2_p1; +fp coeff_0_p2_p1; +fp coeff_p1_p2_p1; +fp coeff_p2_p2_p1; +fp coeff_m2_m2_p2; +fp coeff_m1_m2_p2; +fp coeff_0_m2_p2; +fp coeff_p1_m2_p2; +fp coeff_p2_m2_p2; +fp coeff_m2_m1_p2; +fp coeff_m1_m1_p2; +fp coeff_0_m1_p2; +fp coeff_p1_m1_p2; +fp coeff_p2_m1_p2; +fp coeff_m2_0_p2; +fp coeff_m1_0_p2; +fp coeff_0_0_p2; +fp coeff_p1_0_p2; +fp coeff_p2_0_p2; +fp coeff_m2_p1_p2; +fp coeff_m1_p1_p2; +fp coeff_0_p1_p2; +fp coeff_p1_p1_p2; +fp coeff_p2_p1_p2; +fp coeff_m2_p2_p2; +fp coeff_m1_p2_p2; +fp coeff_0_p2_p2; +fp coeff_p1_p2_p2; +fp coeff_p2_p2_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size5/data-dcl.h b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size5/data-dcl.h new file mode 100644 index 0000000..f47ae87 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size5/data-dcl.h @@ -0,0 +1,125 @@ +fp data_m2_m2_m2; +fp data_m1_m2_m2; +fp data_0_m2_m2; +fp data_p1_m2_m2; +fp data_p2_m2_m2; +fp data_m2_m1_m2; +fp data_m1_m1_m2; +fp data_0_m1_m2; +fp data_p1_m1_m2; +fp data_p2_m1_m2; +fp data_m2_0_m2; +fp data_m1_0_m2; +fp data_0_0_m2; +fp data_p1_0_m2; +fp data_p2_0_m2; +fp data_m2_p1_m2; +fp data_m1_p1_m2; +fp data_0_p1_m2; +fp data_p1_p1_m2; +fp data_p2_p1_m2; +fp data_m2_p2_m2; +fp data_m1_p2_m2; +fp data_0_p2_m2; +fp data_p1_p2_m2; +fp data_p2_p2_m2; +fp data_m2_m2_m1; +fp data_m1_m2_m1; +fp data_0_m2_m1; +fp data_p1_m2_m1; +fp data_p2_m2_m1; +fp data_m2_m1_m1; +fp data_m1_m1_m1; +fp data_0_m1_m1; +fp data_p1_m1_m1; +fp data_p2_m1_m1; +fp data_m2_0_m1; +fp data_m1_0_m1; +fp data_0_0_m1; +fp data_p1_0_m1; +fp data_p2_0_m1; +fp data_m2_p1_m1; +fp data_m1_p1_m1; +fp data_0_p1_m1; +fp data_p1_p1_m1; +fp data_p2_p1_m1; +fp data_m2_p2_m1; +fp data_m1_p2_m1; +fp data_0_p2_m1; +fp data_p1_p2_m1; +fp data_p2_p2_m1; +fp data_m2_m2_0; +fp data_m1_m2_0; +fp data_0_m2_0; +fp data_p1_m2_0; +fp data_p2_m2_0; +fp data_m2_m1_0; +fp data_m1_m1_0; +fp data_0_m1_0; +fp data_p1_m1_0; +fp data_p2_m1_0; +fp data_m2_0_0; +fp data_m1_0_0; +fp data_0_0_0; +fp data_p1_0_0; +fp data_p2_0_0; +fp data_m2_p1_0; +fp data_m1_p1_0; +fp data_0_p1_0; +fp data_p1_p1_0; +fp data_p2_p1_0; +fp data_m2_p2_0; +fp data_m1_p2_0; +fp data_0_p2_0; +fp data_p1_p2_0; +fp data_p2_p2_0; +fp data_m2_m2_p1; +fp data_m1_m2_p1; +fp data_0_m2_p1; +fp data_p1_m2_p1; +fp data_p2_m2_p1; +fp data_m2_m1_p1; +fp data_m1_m1_p1; +fp data_0_m1_p1; +fp data_p1_m1_p1; +fp data_p2_m1_p1; +fp data_m2_0_p1; +fp data_m1_0_p1; +fp data_0_0_p1; +fp data_p1_0_p1; +fp data_p2_0_p1; +fp data_m2_p1_p1; +fp data_m1_p1_p1; +fp data_0_p1_p1; +fp data_p1_p1_p1; +fp data_p2_p1_p1; +fp data_m2_p2_p1; +fp data_m1_p2_p1; +fp data_0_p2_p1; +fp data_p1_p2_p1; +fp data_p2_p2_p1; +fp data_m2_m2_p2; +fp data_m1_m2_p2; +fp data_0_m2_p2; +fp data_p1_m2_p2; +fp data_p2_m2_p2; +fp data_m2_m1_p2; +fp data_m1_m1_p2; +fp data_0_m1_p2; +fp data_p1_m1_p2; +fp data_p2_m1_p2; +fp data_m2_0_p2; +fp data_m1_0_p2; +fp data_0_0_p2; +fp data_p1_0_p2; +fp data_p2_0_p2; +fp data_m2_p1_p2; +fp data_m1_p1_p2; +fp data_0_p1_p2; +fp data_p1_p1_p2; +fp data_p2_p1_p2; +fp data_m2_p2_p2; +fp data_m1_p2_p2; +fp data_0_p2_p2; +fp data_p1_p2_p2; +fp data_p2_p2_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size5/evaluate-molecule.c b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size5/evaluate-molecule.c new file mode 100644 index 0000000..ec124a3 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size5/evaluate-molecule.c @@ -0,0 +1,125 @@ + coeffs->coeff_m2_m2_m2*data->data_m2_m2_m2 + + coeffs->coeff_m1_m2_m2*data->data_m1_m2_m2 + + coeffs->coeff_0_m2_m2*data->data_0_m2_m2 + + coeffs->coeff_p1_m2_m2*data->data_p1_m2_m2 + + coeffs->coeff_p2_m2_m2*data->data_p2_m2_m2 + + coeffs->coeff_m2_m1_m2*data->data_m2_m1_m2 + + coeffs->coeff_m1_m1_m2*data->data_m1_m1_m2 + + coeffs->coeff_0_m1_m2*data->data_0_m1_m2 + + coeffs->coeff_p1_m1_m2*data->data_p1_m1_m2 + + coeffs->coeff_p2_m1_m2*data->data_p2_m1_m2 + + coeffs->coeff_m2_0_m2*data->data_m2_0_m2 + + coeffs->coeff_m1_0_m2*data->data_m1_0_m2 + + coeffs->coeff_0_0_m2*data->data_0_0_m2 + + coeffs->coeff_p1_0_m2*data->data_p1_0_m2 + + coeffs->coeff_p2_0_m2*data->data_p2_0_m2 + + coeffs->coeff_m2_p1_m2*data->data_m2_p1_m2 + + coeffs->coeff_m1_p1_m2*data->data_m1_p1_m2 + + coeffs->coeff_0_p1_m2*data->data_0_p1_m2 + + coeffs->coeff_p1_p1_m2*data->data_p1_p1_m2 + + coeffs->coeff_p2_p1_m2*data->data_p2_p1_m2 + + coeffs->coeff_m2_p2_m2*data->data_m2_p2_m2 + + coeffs->coeff_m1_p2_m2*data->data_m1_p2_m2 + + coeffs->coeff_0_p2_m2*data->data_0_p2_m2 + + coeffs->coeff_p1_p2_m2*data->data_p1_p2_m2 + + coeffs->coeff_p2_p2_m2*data->data_p2_p2_m2 + + coeffs->coeff_m2_m2_m1*data->data_m2_m2_m1 + + coeffs->coeff_m1_m2_m1*data->data_m1_m2_m1 + + coeffs->coeff_0_m2_m1*data->data_0_m2_m1 + + coeffs->coeff_p1_m2_m1*data->data_p1_m2_m1 + + coeffs->coeff_p2_m2_m1*data->data_p2_m2_m1 + + coeffs->coeff_m2_m1_m1*data->data_m2_m1_m1 + + coeffs->coeff_m1_m1_m1*data->data_m1_m1_m1 + + coeffs->coeff_0_m1_m1*data->data_0_m1_m1 + + coeffs->coeff_p1_m1_m1*data->data_p1_m1_m1 + + coeffs->coeff_p2_m1_m1*data->data_p2_m1_m1 + + coeffs->coeff_m2_0_m1*data->data_m2_0_m1 + + coeffs->coeff_m1_0_m1*data->data_m1_0_m1 + + coeffs->coeff_0_0_m1*data->data_0_0_m1 + + coeffs->coeff_p1_0_m1*data->data_p1_0_m1 + + coeffs->coeff_p2_0_m1*data->data_p2_0_m1 + + coeffs->coeff_m2_p1_m1*data->data_m2_p1_m1 + + coeffs->coeff_m1_p1_m1*data->data_m1_p1_m1 + + coeffs->coeff_0_p1_m1*data->data_0_p1_m1 + + coeffs->coeff_p1_p1_m1*data->data_p1_p1_m1 + + coeffs->coeff_p2_p1_m1*data->data_p2_p1_m1 + + coeffs->coeff_m2_p2_m1*data->data_m2_p2_m1 + + coeffs->coeff_m1_p2_m1*data->data_m1_p2_m1 + + coeffs->coeff_0_p2_m1*data->data_0_p2_m1 + + coeffs->coeff_p1_p2_m1*data->data_p1_p2_m1 + + coeffs->coeff_p2_p2_m1*data->data_p2_p2_m1 + + coeffs->coeff_m2_m2_0*data->data_m2_m2_0 + + coeffs->coeff_m1_m2_0*data->data_m1_m2_0 + + coeffs->coeff_0_m2_0*data->data_0_m2_0 + + coeffs->coeff_p1_m2_0*data->data_p1_m2_0 + + coeffs->coeff_p2_m2_0*data->data_p2_m2_0 + + coeffs->coeff_m2_m1_0*data->data_m2_m1_0 + + coeffs->coeff_m1_m1_0*data->data_m1_m1_0 + + coeffs->coeff_0_m1_0*data->data_0_m1_0 + + coeffs->coeff_p1_m1_0*data->data_p1_m1_0 + + coeffs->coeff_p2_m1_0*data->data_p2_m1_0 + + coeffs->coeff_m2_0_0*data->data_m2_0_0 + + coeffs->coeff_m1_0_0*data->data_m1_0_0 + + coeffs->coeff_0_0_0*data->data_0_0_0 + + coeffs->coeff_p1_0_0*data->data_p1_0_0 + + coeffs->coeff_p2_0_0*data->data_p2_0_0 + + coeffs->coeff_m2_p1_0*data->data_m2_p1_0 + + coeffs->coeff_m1_p1_0*data->data_m1_p1_0 + + coeffs->coeff_0_p1_0*data->data_0_p1_0 + + coeffs->coeff_p1_p1_0*data->data_p1_p1_0 + + coeffs->coeff_p2_p1_0*data->data_p2_p1_0 + + coeffs->coeff_m2_p2_0*data->data_m2_p2_0 + + coeffs->coeff_m1_p2_0*data->data_m1_p2_0 + + coeffs->coeff_0_p2_0*data->data_0_p2_0 + + coeffs->coeff_p1_p2_0*data->data_p1_p2_0 + + coeffs->coeff_p2_p2_0*data->data_p2_p2_0 + + coeffs->coeff_m2_m2_p1*data->data_m2_m2_p1 + + coeffs->coeff_m1_m2_p1*data->data_m1_m2_p1 + + coeffs->coeff_0_m2_p1*data->data_0_m2_p1 + + coeffs->coeff_p1_m2_p1*data->data_p1_m2_p1 + + coeffs->coeff_p2_m2_p1*data->data_p2_m2_p1 + + coeffs->coeff_m2_m1_p1*data->data_m2_m1_p1 + + coeffs->coeff_m1_m1_p1*data->data_m1_m1_p1 + + coeffs->coeff_0_m1_p1*data->data_0_m1_p1 + + coeffs->coeff_p1_m1_p1*data->data_p1_m1_p1 + + coeffs->coeff_p2_m1_p1*data->data_p2_m1_p1 + + coeffs->coeff_m2_0_p1*data->data_m2_0_p1 + + coeffs->coeff_m1_0_p1*data->data_m1_0_p1 + + coeffs->coeff_0_0_p1*data->data_0_0_p1 + + coeffs->coeff_p1_0_p1*data->data_p1_0_p1 + + coeffs->coeff_p2_0_p1*data->data_p2_0_p1 + + coeffs->coeff_m2_p1_p1*data->data_m2_p1_p1 + + coeffs->coeff_m1_p1_p1*data->data_m1_p1_p1 + + coeffs->coeff_0_p1_p1*data->data_0_p1_p1 + + coeffs->coeff_p1_p1_p1*data->data_p1_p1_p1 + + coeffs->coeff_p2_p1_p1*data->data_p2_p1_p1 + + coeffs->coeff_m2_p2_p1*data->data_m2_p2_p1 + + coeffs->coeff_m1_p2_p1*data->data_m1_p2_p1 + + coeffs->coeff_0_p2_p1*data->data_0_p2_p1 + + coeffs->coeff_p1_p2_p1*data->data_p1_p2_p1 + + coeffs->coeff_p2_p2_p1*data->data_p2_p2_p1 + + coeffs->coeff_m2_m2_p2*data->data_m2_m2_p2 + + coeffs->coeff_m1_m2_p2*data->data_m1_m2_p2 + + coeffs->coeff_0_m2_p2*data->data_0_m2_p2 + + coeffs->coeff_p1_m2_p2*data->data_p1_m2_p2 + + coeffs->coeff_p2_m2_p2*data->data_p2_m2_p2 + + coeffs->coeff_m2_m1_p2*data->data_m2_m1_p2 + + coeffs->coeff_m1_m1_p2*data->data_m1_m1_p2 + + coeffs->coeff_0_m1_p2*data->data_0_m1_p2 + + coeffs->coeff_p1_m1_p2*data->data_p1_m1_p2 + + coeffs->coeff_p2_m1_p2*data->data_p2_m1_p2 + + coeffs->coeff_m2_0_p2*data->data_m2_0_p2 + + coeffs->coeff_m1_0_p2*data->data_m1_0_p2 + + coeffs->coeff_0_0_p2*data->data_0_0_p2 + + coeffs->coeff_p1_0_p2*data->data_p1_0_p2 + + coeffs->coeff_p2_0_p2*data->data_p2_0_p2 + + coeffs->coeff_m2_p1_p2*data->data_m2_p1_p2 + + coeffs->coeff_m1_p1_p2*data->data_m1_p1_p2 + + coeffs->coeff_0_p1_p2*data->data_0_p1_p2 + + coeffs->coeff_p1_p1_p2*data->data_p1_p1_p2 + + coeffs->coeff_p2_p1_p2*data->data_p2_p1_p2 + + coeffs->coeff_m2_p2_p2*data->data_m2_p2_p2 + + coeffs->coeff_m1_p2_p2*data->data_m1_p2_p2 + + coeffs->coeff_0_p2_p2*data->data_0_p2_p2 + + coeffs->coeff_p1_p2_p2*data->data_p1_p2_p2 + + coeffs->coeff_p2_p2_p2*data->data_p2_p2_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size5/fetch-data.c b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size5/fetch-data.c new file mode 100644 index 0000000..386ac90 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size5/fetch-data.c @@ -0,0 +1,125 @@ +data->data_m2_m2_m2 = DATA(-2,-2,-2); +data->data_m1_m2_m2 = DATA(-1,-2,-2); +data->data_0_m2_m2 = DATA(0,-2,-2); +data->data_p1_m2_m2 = DATA(1,-2,-2); +data->data_p2_m2_m2 = DATA(2,-2,-2); +data->data_m2_m1_m2 = DATA(-2,-1,-2); +data->data_m1_m1_m2 = DATA(-1,-1,-2); +data->data_0_m1_m2 = DATA(0,-1,-2); +data->data_p1_m1_m2 = DATA(1,-1,-2); +data->data_p2_m1_m2 = DATA(2,-1,-2); +data->data_m2_0_m2 = DATA(-2,0,-2); +data->data_m1_0_m2 = DATA(-1,0,-2); +data->data_0_0_m2 = DATA(0,0,-2); +data->data_p1_0_m2 = DATA(1,0,-2); +data->data_p2_0_m2 = DATA(2,0,-2); +data->data_m2_p1_m2 = DATA(-2,1,-2); +data->data_m1_p1_m2 = DATA(-1,1,-2); +data->data_0_p1_m2 = DATA(0,1,-2); +data->data_p1_p1_m2 = DATA(1,1,-2); +data->data_p2_p1_m2 = DATA(2,1,-2); +data->data_m2_p2_m2 = DATA(-2,2,-2); +data->data_m1_p2_m2 = DATA(-1,2,-2); +data->data_0_p2_m2 = DATA(0,2,-2); +data->data_p1_p2_m2 = DATA(1,2,-2); +data->data_p2_p2_m2 = DATA(2,2,-2); +data->data_m2_m2_m1 = DATA(-2,-2,-1); +data->data_m1_m2_m1 = DATA(-1,-2,-1); +data->data_0_m2_m1 = DATA(0,-2,-1); +data->data_p1_m2_m1 = DATA(1,-2,-1); +data->data_p2_m2_m1 = DATA(2,-2,-1); +data->data_m2_m1_m1 = DATA(-2,-1,-1); +data->data_m1_m1_m1 = DATA(-1,-1,-1); +data->data_0_m1_m1 = DATA(0,-1,-1); +data->data_p1_m1_m1 = DATA(1,-1,-1); +data->data_p2_m1_m1 = DATA(2,-1,-1); +data->data_m2_0_m1 = DATA(-2,0,-1); +data->data_m1_0_m1 = DATA(-1,0,-1); +data->data_0_0_m1 = DATA(0,0,-1); +data->data_p1_0_m1 = DATA(1,0,-1); +data->data_p2_0_m1 = DATA(2,0,-1); +data->data_m2_p1_m1 = DATA(-2,1,-1); +data->data_m1_p1_m1 = DATA(-1,1,-1); +data->data_0_p1_m1 = DATA(0,1,-1); +data->data_p1_p1_m1 = DATA(1,1,-1); +data->data_p2_p1_m1 = DATA(2,1,-1); +data->data_m2_p2_m1 = DATA(-2,2,-1); +data->data_m1_p2_m1 = DATA(-1,2,-1); +data->data_0_p2_m1 = DATA(0,2,-1); +data->data_p1_p2_m1 = DATA(1,2,-1); +data->data_p2_p2_m1 = DATA(2,2,-1); +data->data_m2_m2_0 = DATA(-2,-2,0); +data->data_m1_m2_0 = DATA(-1,-2,0); +data->data_0_m2_0 = DATA(0,-2,0); +data->data_p1_m2_0 = DATA(1,-2,0); +data->data_p2_m2_0 = DATA(2,-2,0); +data->data_m2_m1_0 = DATA(-2,-1,0); +data->data_m1_m1_0 = DATA(-1,-1,0); +data->data_0_m1_0 = DATA(0,-1,0); +data->data_p1_m1_0 = DATA(1,-1,0); +data->data_p2_m1_0 = DATA(2,-1,0); +data->data_m2_0_0 = DATA(-2,0,0); +data->data_m1_0_0 = DATA(-1,0,0); +data->data_0_0_0 = DATA(0,0,0); +data->data_p1_0_0 = DATA(1,0,0); +data->data_p2_0_0 = DATA(2,0,0); +data->data_m2_p1_0 = DATA(-2,1,0); +data->data_m1_p1_0 = DATA(-1,1,0); +data->data_0_p1_0 = DATA(0,1,0); +data->data_p1_p1_0 = DATA(1,1,0); +data->data_p2_p1_0 = DATA(2,1,0); +data->data_m2_p2_0 = DATA(-2,2,0); +data->data_m1_p2_0 = DATA(-1,2,0); +data->data_0_p2_0 = DATA(0,2,0); +data->data_p1_p2_0 = DATA(1,2,0); +data->data_p2_p2_0 = DATA(2,2,0); +data->data_m2_m2_p1 = DATA(-2,-2,1); +data->data_m1_m2_p1 = DATA(-1,-2,1); +data->data_0_m2_p1 = DATA(0,-2,1); +data->data_p1_m2_p1 = DATA(1,-2,1); +data->data_p2_m2_p1 = DATA(2,-2,1); +data->data_m2_m1_p1 = DATA(-2,-1,1); +data->data_m1_m1_p1 = DATA(-1,-1,1); +data->data_0_m1_p1 = DATA(0,-1,1); +data->data_p1_m1_p1 = DATA(1,-1,1); +data->data_p2_m1_p1 = DATA(2,-1,1); +data->data_m2_0_p1 = DATA(-2,0,1); +data->data_m1_0_p1 = DATA(-1,0,1); +data->data_0_0_p1 = DATA(0,0,1); +data->data_p1_0_p1 = DATA(1,0,1); +data->data_p2_0_p1 = DATA(2,0,1); +data->data_m2_p1_p1 = DATA(-2,1,1); +data->data_m1_p1_p1 = DATA(-1,1,1); +data->data_0_p1_p1 = DATA(0,1,1); +data->data_p1_p1_p1 = DATA(1,1,1); +data->data_p2_p1_p1 = DATA(2,1,1); +data->data_m2_p2_p1 = DATA(-2,2,1); +data->data_m1_p2_p1 = DATA(-1,2,1); +data->data_0_p2_p1 = DATA(0,2,1); +data->data_p1_p2_p1 = DATA(1,2,1); +data->data_p2_p2_p1 = DATA(2,2,1); +data->data_m2_m2_p2 = DATA(-2,-2,2); +data->data_m1_m2_p2 = DATA(-1,-2,2); +data->data_0_m2_p2 = DATA(0,-2,2); +data->data_p1_m2_p2 = DATA(1,-2,2); +data->data_p2_m2_p2 = DATA(2,-2,2); +data->data_m2_m1_p2 = DATA(-2,-1,2); +data->data_m1_m1_p2 = DATA(-1,-1,2); +data->data_0_m1_p2 = DATA(0,-1,2); +data->data_p1_m1_p2 = DATA(1,-1,2); +data->data_p2_m1_p2 = DATA(2,-1,2); +data->data_m2_0_p2 = DATA(-2,0,2); +data->data_m1_0_p2 = DATA(-1,0,2); +data->data_0_0_p2 = DATA(0,0,2); +data->data_p1_0_p2 = DATA(1,0,2); +data->data_p2_0_p2 = DATA(2,0,2); +data->data_m2_p1_p2 = DATA(-2,1,2); +data->data_m1_p1_p2 = DATA(-1,1,2); +data->data_0_p1_p2 = DATA(0,1,2); +data->data_p1_p1_p2 = DATA(1,1,2); +data->data_p2_p1_p2 = DATA(2,1,2); +data->data_m2_p2_p2 = DATA(-2,2,2); +data->data_m1_p2_p2 = DATA(-1,2,2); +data->data_0_p2_p2 = DATA(0,2,2); +data->data_p1_p2_p2 = DATA(1,2,2); +data->data_p2_p2_p2 = DATA(2,2,2); diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size5/store-coeffs.c b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size5/store-coeffs.c new file mode 100644 index 0000000..40c057c --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size5/store-coeffs.c @@ -0,0 +1,125 @@ +COEFF(-2,-2,-2) = factor * coeffs->coeff_m2_m2_m2; +COEFF(-1,-2,-2) = factor * coeffs->coeff_m1_m2_m2; +COEFF(0,-2,-2) = factor * coeffs->coeff_0_m2_m2; +COEFF(1,-2,-2) = factor * coeffs->coeff_p1_m2_m2; +COEFF(2,-2,-2) = factor * coeffs->coeff_p2_m2_m2; +COEFF(-2,-1,-2) = factor * coeffs->coeff_m2_m1_m2; +COEFF(-1,-1,-2) = factor * coeffs->coeff_m1_m1_m2; +COEFF(0,-1,-2) = factor * coeffs->coeff_0_m1_m2; +COEFF(1,-1,-2) = factor * coeffs->coeff_p1_m1_m2; +COEFF(2,-1,-2) = factor * coeffs->coeff_p2_m1_m2; +COEFF(-2,0,-2) = factor * coeffs->coeff_m2_0_m2; +COEFF(-1,0,-2) = factor * coeffs->coeff_m1_0_m2; +COEFF(0,0,-2) = factor * coeffs->coeff_0_0_m2; +COEFF(1,0,-2) = factor * coeffs->coeff_p1_0_m2; +COEFF(2,0,-2) = factor * coeffs->coeff_p2_0_m2; +COEFF(-2,1,-2) = factor * coeffs->coeff_m2_p1_m2; +COEFF(-1,1,-2) = factor * coeffs->coeff_m1_p1_m2; +COEFF(0,1,-2) = factor * coeffs->coeff_0_p1_m2; +COEFF(1,1,-2) = factor * coeffs->coeff_p1_p1_m2; +COEFF(2,1,-2) = factor * coeffs->coeff_p2_p1_m2; +COEFF(-2,2,-2) = factor * coeffs->coeff_m2_p2_m2; +COEFF(-1,2,-2) = factor * coeffs->coeff_m1_p2_m2; +COEFF(0,2,-2) = factor * coeffs->coeff_0_p2_m2; +COEFF(1,2,-2) = factor * coeffs->coeff_p1_p2_m2; +COEFF(2,2,-2) = factor * coeffs->coeff_p2_p2_m2; +COEFF(-2,-2,-1) = factor * coeffs->coeff_m2_m2_m1; +COEFF(-1,-2,-1) = factor * coeffs->coeff_m1_m2_m1; +COEFF(0,-2,-1) = factor * coeffs->coeff_0_m2_m1; +COEFF(1,-2,-1) = factor * coeffs->coeff_p1_m2_m1; +COEFF(2,-2,-1) = factor * coeffs->coeff_p2_m2_m1; +COEFF(-2,-1,-1) = factor * coeffs->coeff_m2_m1_m1; +COEFF(-1,-1,-1) = factor * coeffs->coeff_m1_m1_m1; +COEFF(0,-1,-1) = factor * coeffs->coeff_0_m1_m1; +COEFF(1,-1,-1) = factor * coeffs->coeff_p1_m1_m1; +COEFF(2,-1,-1) = factor * coeffs->coeff_p2_m1_m1; +COEFF(-2,0,-1) = factor * coeffs->coeff_m2_0_m1; +COEFF(-1,0,-1) = factor * coeffs->coeff_m1_0_m1; +COEFF(0,0,-1) = factor * coeffs->coeff_0_0_m1; +COEFF(1,0,-1) = factor * coeffs->coeff_p1_0_m1; +COEFF(2,0,-1) = factor * coeffs->coeff_p2_0_m1; +COEFF(-2,1,-1) = factor * coeffs->coeff_m2_p1_m1; +COEFF(-1,1,-1) = factor * coeffs->coeff_m1_p1_m1; +COEFF(0,1,-1) = factor * coeffs->coeff_0_p1_m1; +COEFF(1,1,-1) = factor * coeffs->coeff_p1_p1_m1; +COEFF(2,1,-1) = factor * coeffs->coeff_p2_p1_m1; +COEFF(-2,2,-1) = factor * coeffs->coeff_m2_p2_m1; +COEFF(-1,2,-1) = factor * coeffs->coeff_m1_p2_m1; +COEFF(0,2,-1) = factor * coeffs->coeff_0_p2_m1; +COEFF(1,2,-1) = factor * coeffs->coeff_p1_p2_m1; +COEFF(2,2,-1) = factor * coeffs->coeff_p2_p2_m1; +COEFF(-2,-2,0) = factor * coeffs->coeff_m2_m2_0; +COEFF(-1,-2,0) = factor * coeffs->coeff_m1_m2_0; +COEFF(0,-2,0) = factor * coeffs->coeff_0_m2_0; +COEFF(1,-2,0) = factor * coeffs->coeff_p1_m2_0; +COEFF(2,-2,0) = factor * coeffs->coeff_p2_m2_0; +COEFF(-2,-1,0) = factor * coeffs->coeff_m2_m1_0; +COEFF(-1,-1,0) = factor * coeffs->coeff_m1_m1_0; +COEFF(0,-1,0) = factor * coeffs->coeff_0_m1_0; +COEFF(1,-1,0) = factor * coeffs->coeff_p1_m1_0; +COEFF(2,-1,0) = factor * coeffs->coeff_p2_m1_0; +COEFF(-2,0,0) = factor * coeffs->coeff_m2_0_0; +COEFF(-1,0,0) = factor * coeffs->coeff_m1_0_0; +COEFF(0,0,0) = factor * coeffs->coeff_0_0_0; +COEFF(1,0,0) = factor * coeffs->coeff_p1_0_0; +COEFF(2,0,0) = factor * coeffs->coeff_p2_0_0; +COEFF(-2,1,0) = factor * coeffs->coeff_m2_p1_0; +COEFF(-1,1,0) = factor * coeffs->coeff_m1_p1_0; +COEFF(0,1,0) = factor * coeffs->coeff_0_p1_0; +COEFF(1,1,0) = factor * coeffs->coeff_p1_p1_0; +COEFF(2,1,0) = factor * coeffs->coeff_p2_p1_0; +COEFF(-2,2,0) = factor * coeffs->coeff_m2_p2_0; +COEFF(-1,2,0) = factor * coeffs->coeff_m1_p2_0; +COEFF(0,2,0) = factor * coeffs->coeff_0_p2_0; +COEFF(1,2,0) = factor * coeffs->coeff_p1_p2_0; +COEFF(2,2,0) = factor * coeffs->coeff_p2_p2_0; +COEFF(-2,-2,1) = factor * coeffs->coeff_m2_m2_p1; +COEFF(-1,-2,1) = factor * coeffs->coeff_m1_m2_p1; +COEFF(0,-2,1) = factor * coeffs->coeff_0_m2_p1; +COEFF(1,-2,1) = factor * coeffs->coeff_p1_m2_p1; +COEFF(2,-2,1) = factor * coeffs->coeff_p2_m2_p1; +COEFF(-2,-1,1) = factor * coeffs->coeff_m2_m1_p1; +COEFF(-1,-1,1) = factor * coeffs->coeff_m1_m1_p1; +COEFF(0,-1,1) = factor * coeffs->coeff_0_m1_p1; +COEFF(1,-1,1) = factor * coeffs->coeff_p1_m1_p1; +COEFF(2,-1,1) = factor * coeffs->coeff_p2_m1_p1; +COEFF(-2,0,1) = factor * coeffs->coeff_m2_0_p1; +COEFF(-1,0,1) = factor * coeffs->coeff_m1_0_p1; +COEFF(0,0,1) = factor * coeffs->coeff_0_0_p1; +COEFF(1,0,1) = factor * coeffs->coeff_p1_0_p1; +COEFF(2,0,1) = factor * coeffs->coeff_p2_0_p1; +COEFF(-2,1,1) = factor * coeffs->coeff_m2_p1_p1; +COEFF(-1,1,1) = factor * coeffs->coeff_m1_p1_p1; +COEFF(0,1,1) = factor * coeffs->coeff_0_p1_p1; +COEFF(1,1,1) = factor * coeffs->coeff_p1_p1_p1; +COEFF(2,1,1) = factor * coeffs->coeff_p2_p1_p1; +COEFF(-2,2,1) = factor * coeffs->coeff_m2_p2_p1; +COEFF(-1,2,1) = factor * coeffs->coeff_m1_p2_p1; +COEFF(0,2,1) = factor * coeffs->coeff_0_p2_p1; +COEFF(1,2,1) = factor * coeffs->coeff_p1_p2_p1; +COEFF(2,2,1) = factor * coeffs->coeff_p2_p2_p1; +COEFF(-2,-2,2) = factor * coeffs->coeff_m2_m2_p2; +COEFF(-1,-2,2) = factor * coeffs->coeff_m1_m2_p2; +COEFF(0,-2,2) = factor * coeffs->coeff_0_m2_p2; +COEFF(1,-2,2) = factor * coeffs->coeff_p1_m2_p2; +COEFF(2,-2,2) = factor * coeffs->coeff_p2_m2_p2; +COEFF(-2,-1,2) = factor * coeffs->coeff_m2_m1_p2; +COEFF(-1,-1,2) = factor * coeffs->coeff_m1_m1_p2; +COEFF(0,-1,2) = factor * coeffs->coeff_0_m1_p2; +COEFF(1,-1,2) = factor * coeffs->coeff_p1_m1_p2; +COEFF(2,-1,2) = factor * coeffs->coeff_p2_m1_p2; +COEFF(-2,0,2) = factor * coeffs->coeff_m2_0_p2; +COEFF(-1,0,2) = factor * coeffs->coeff_m1_0_p2; +COEFF(0,0,2) = factor * coeffs->coeff_0_0_p2; +COEFF(1,0,2) = factor * coeffs->coeff_p1_0_p2; +COEFF(2,0,2) = factor * coeffs->coeff_p2_0_p2; +COEFF(-2,1,2) = factor * coeffs->coeff_m2_p1_p2; +COEFF(-1,1,2) = factor * coeffs->coeff_m1_p1_p2; +COEFF(0,1,2) = factor * coeffs->coeff_0_p1_p2; +COEFF(1,1,2) = factor * coeffs->coeff_p1_p1_p2; +COEFF(2,1,2) = factor * coeffs->coeff_p2_p1_p2; +COEFF(-2,2,2) = factor * coeffs->coeff_m2_p2_p2; +COEFF(-1,2,2) = factor * coeffs->coeff_m1_p2_p2; +COEFF(0,2,2) = factor * coeffs->coeff_0_p2_p2; +COEFF(1,2,2) = factor * coeffs->coeff_p1_p2_p2; +COEFF(2,2,2) = factor * coeffs->coeff_p2_p2_p2; diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size6/coeffs-dcl.h b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size6/coeffs-dcl.h new file mode 100644 index 0000000..bb2ad77 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size6/coeffs-dcl.h @@ -0,0 +1,216 @@ +fp coeff_m2_m2_m2; +fp coeff_m1_m2_m2; +fp coeff_0_m2_m2; +fp coeff_p1_m2_m2; +fp coeff_p2_m2_m2; +fp coeff_p3_m2_m2; +fp coeff_m2_m1_m2; +fp coeff_m1_m1_m2; +fp coeff_0_m1_m2; +fp coeff_p1_m1_m2; +fp coeff_p2_m1_m2; +fp coeff_p3_m1_m2; +fp coeff_m2_0_m2; +fp coeff_m1_0_m2; +fp coeff_0_0_m2; +fp coeff_p1_0_m2; +fp coeff_p2_0_m2; +fp coeff_p3_0_m2; +fp coeff_m2_p1_m2; +fp coeff_m1_p1_m2; +fp coeff_0_p1_m2; +fp coeff_p1_p1_m2; +fp coeff_p2_p1_m2; +fp coeff_p3_p1_m2; +fp coeff_m2_p2_m2; +fp coeff_m1_p2_m2; +fp coeff_0_p2_m2; +fp coeff_p1_p2_m2; +fp coeff_p2_p2_m2; +fp coeff_p3_p2_m2; +fp coeff_m2_p3_m2; +fp coeff_m1_p3_m2; +fp coeff_0_p3_m2; +fp coeff_p1_p3_m2; +fp coeff_p2_p3_m2; +fp coeff_p3_p3_m2; +fp coeff_m2_m2_m1; +fp coeff_m1_m2_m1; +fp coeff_0_m2_m1; +fp coeff_p1_m2_m1; +fp coeff_p2_m2_m1; +fp coeff_p3_m2_m1; +fp coeff_m2_m1_m1; +fp coeff_m1_m1_m1; +fp coeff_0_m1_m1; +fp coeff_p1_m1_m1; +fp coeff_p2_m1_m1; +fp coeff_p3_m1_m1; +fp coeff_m2_0_m1; +fp coeff_m1_0_m1; +fp coeff_0_0_m1; +fp coeff_p1_0_m1; +fp coeff_p2_0_m1; +fp coeff_p3_0_m1; +fp coeff_m2_p1_m1; +fp coeff_m1_p1_m1; +fp coeff_0_p1_m1; +fp coeff_p1_p1_m1; +fp coeff_p2_p1_m1; +fp coeff_p3_p1_m1; +fp coeff_m2_p2_m1; +fp coeff_m1_p2_m1; +fp coeff_0_p2_m1; +fp coeff_p1_p2_m1; +fp coeff_p2_p2_m1; +fp coeff_p3_p2_m1; +fp coeff_m2_p3_m1; +fp coeff_m1_p3_m1; +fp coeff_0_p3_m1; +fp coeff_p1_p3_m1; +fp coeff_p2_p3_m1; +fp coeff_p3_p3_m1; +fp coeff_m2_m2_0; +fp coeff_m1_m2_0; +fp coeff_0_m2_0; +fp coeff_p1_m2_0; +fp coeff_p2_m2_0; +fp coeff_p3_m2_0; +fp coeff_m2_m1_0; +fp coeff_m1_m1_0; +fp coeff_0_m1_0; +fp coeff_p1_m1_0; +fp coeff_p2_m1_0; +fp coeff_p3_m1_0; +fp coeff_m2_0_0; +fp coeff_m1_0_0; +fp coeff_0_0_0; +fp coeff_p1_0_0; +fp coeff_p2_0_0; +fp coeff_p3_0_0; +fp coeff_m2_p1_0; +fp coeff_m1_p1_0; +fp coeff_0_p1_0; +fp coeff_p1_p1_0; +fp coeff_p2_p1_0; +fp coeff_p3_p1_0; +fp coeff_m2_p2_0; +fp coeff_m1_p2_0; +fp coeff_0_p2_0; +fp coeff_p1_p2_0; +fp coeff_p2_p2_0; +fp coeff_p3_p2_0; +fp coeff_m2_p3_0; +fp coeff_m1_p3_0; +fp coeff_0_p3_0; +fp coeff_p1_p3_0; +fp coeff_p2_p3_0; +fp coeff_p3_p3_0; +fp coeff_m2_m2_p1; +fp coeff_m1_m2_p1; +fp coeff_0_m2_p1; +fp coeff_p1_m2_p1; +fp coeff_p2_m2_p1; +fp coeff_p3_m2_p1; +fp coeff_m2_m1_p1; +fp coeff_m1_m1_p1; +fp coeff_0_m1_p1; +fp coeff_p1_m1_p1; +fp coeff_p2_m1_p1; +fp coeff_p3_m1_p1; +fp coeff_m2_0_p1; +fp coeff_m1_0_p1; +fp coeff_0_0_p1; +fp coeff_p1_0_p1; +fp coeff_p2_0_p1; +fp coeff_p3_0_p1; +fp coeff_m2_p1_p1; +fp coeff_m1_p1_p1; +fp coeff_0_p1_p1; +fp coeff_p1_p1_p1; +fp coeff_p2_p1_p1; +fp coeff_p3_p1_p1; +fp coeff_m2_p2_p1; +fp coeff_m1_p2_p1; +fp coeff_0_p2_p1; +fp coeff_p1_p2_p1; +fp coeff_p2_p2_p1; +fp coeff_p3_p2_p1; +fp coeff_m2_p3_p1; +fp coeff_m1_p3_p1; +fp coeff_0_p3_p1; +fp coeff_p1_p3_p1; +fp coeff_p2_p3_p1; +fp coeff_p3_p3_p1; +fp coeff_m2_m2_p2; +fp coeff_m1_m2_p2; +fp coeff_0_m2_p2; +fp coeff_p1_m2_p2; +fp coeff_p2_m2_p2; +fp coeff_p3_m2_p2; +fp coeff_m2_m1_p2; +fp coeff_m1_m1_p2; +fp coeff_0_m1_p2; +fp coeff_p1_m1_p2; +fp coeff_p2_m1_p2; +fp coeff_p3_m1_p2; +fp coeff_m2_0_p2; +fp coeff_m1_0_p2; +fp coeff_0_0_p2; +fp coeff_p1_0_p2; +fp coeff_p2_0_p2; +fp coeff_p3_0_p2; +fp coeff_m2_p1_p2; +fp coeff_m1_p1_p2; +fp coeff_0_p1_p2; +fp coeff_p1_p1_p2; +fp coeff_p2_p1_p2; +fp coeff_p3_p1_p2; +fp coeff_m2_p2_p2; +fp coeff_m1_p2_p2; +fp coeff_0_p2_p2; +fp coeff_p1_p2_p2; +fp coeff_p2_p2_p2; +fp coeff_p3_p2_p2; +fp coeff_m2_p3_p2; +fp coeff_m1_p3_p2; +fp coeff_0_p3_p2; +fp coeff_p1_p3_p2; +fp coeff_p2_p3_p2; +fp coeff_p3_p3_p2; +fp coeff_m2_m2_p3; +fp coeff_m1_m2_p3; +fp coeff_0_m2_p3; +fp coeff_p1_m2_p3; +fp coeff_p2_m2_p3; +fp coeff_p3_m2_p3; +fp coeff_m2_m1_p3; +fp coeff_m1_m1_p3; +fp coeff_0_m1_p3; +fp coeff_p1_m1_p3; +fp coeff_p2_m1_p3; +fp coeff_p3_m1_p3; +fp coeff_m2_0_p3; +fp coeff_m1_0_p3; +fp coeff_0_0_p3; +fp coeff_p1_0_p3; +fp coeff_p2_0_p3; +fp coeff_p3_0_p3; +fp coeff_m2_p1_p3; +fp coeff_m1_p1_p3; +fp coeff_0_p1_p3; +fp coeff_p1_p1_p3; +fp coeff_p2_p1_p3; +fp coeff_p3_p1_p3; +fp coeff_m2_p2_p3; +fp coeff_m1_p2_p3; +fp coeff_0_p2_p3; +fp coeff_p1_p2_p3; +fp coeff_p2_p2_p3; +fp coeff_p3_p2_p3; +fp coeff_m2_p3_p3; +fp coeff_m1_p3_p3; +fp coeff_0_p3_p3; +fp coeff_p1_p3_p3; +fp coeff_p2_p3_p3; +fp coeff_p3_p3_p3; diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size6/data-dcl.h b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size6/data-dcl.h new file mode 100644 index 0000000..839cd8e --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size6/data-dcl.h @@ -0,0 +1,216 @@ +fp data_m2_m2_m2; +fp data_m1_m2_m2; +fp data_0_m2_m2; +fp data_p1_m2_m2; +fp data_p2_m2_m2; +fp data_p3_m2_m2; +fp data_m2_m1_m2; +fp data_m1_m1_m2; +fp data_0_m1_m2; +fp data_p1_m1_m2; +fp data_p2_m1_m2; +fp data_p3_m1_m2; +fp data_m2_0_m2; +fp data_m1_0_m2; +fp data_0_0_m2; +fp data_p1_0_m2; +fp data_p2_0_m2; +fp data_p3_0_m2; +fp data_m2_p1_m2; +fp data_m1_p1_m2; +fp data_0_p1_m2; +fp data_p1_p1_m2; +fp data_p2_p1_m2; +fp data_p3_p1_m2; +fp data_m2_p2_m2; +fp data_m1_p2_m2; +fp data_0_p2_m2; +fp data_p1_p2_m2; +fp data_p2_p2_m2; +fp data_p3_p2_m2; +fp data_m2_p3_m2; +fp data_m1_p3_m2; +fp data_0_p3_m2; +fp data_p1_p3_m2; +fp data_p2_p3_m2; +fp data_p3_p3_m2; +fp data_m2_m2_m1; +fp data_m1_m2_m1; +fp data_0_m2_m1; +fp data_p1_m2_m1; +fp data_p2_m2_m1; +fp data_p3_m2_m1; +fp data_m2_m1_m1; +fp data_m1_m1_m1; +fp data_0_m1_m1; +fp data_p1_m1_m1; +fp data_p2_m1_m1; +fp data_p3_m1_m1; +fp data_m2_0_m1; +fp data_m1_0_m1; +fp data_0_0_m1; +fp data_p1_0_m1; +fp data_p2_0_m1; +fp data_p3_0_m1; +fp data_m2_p1_m1; +fp data_m1_p1_m1; +fp data_0_p1_m1; +fp data_p1_p1_m1; +fp data_p2_p1_m1; +fp data_p3_p1_m1; +fp data_m2_p2_m1; +fp data_m1_p2_m1; +fp data_0_p2_m1; +fp data_p1_p2_m1; +fp data_p2_p2_m1; +fp data_p3_p2_m1; +fp data_m2_p3_m1; +fp data_m1_p3_m1; +fp data_0_p3_m1; +fp data_p1_p3_m1; +fp data_p2_p3_m1; +fp data_p3_p3_m1; +fp data_m2_m2_0; +fp data_m1_m2_0; +fp data_0_m2_0; +fp data_p1_m2_0; +fp data_p2_m2_0; +fp data_p3_m2_0; +fp data_m2_m1_0; +fp data_m1_m1_0; +fp data_0_m1_0; +fp data_p1_m1_0; +fp data_p2_m1_0; +fp data_p3_m1_0; +fp data_m2_0_0; +fp data_m1_0_0; +fp data_0_0_0; +fp data_p1_0_0; +fp data_p2_0_0; +fp data_p3_0_0; +fp data_m2_p1_0; +fp data_m1_p1_0; +fp data_0_p1_0; +fp data_p1_p1_0; +fp data_p2_p1_0; +fp data_p3_p1_0; +fp data_m2_p2_0; +fp data_m1_p2_0; +fp data_0_p2_0; +fp data_p1_p2_0; +fp data_p2_p2_0; +fp data_p3_p2_0; +fp data_m2_p3_0; +fp data_m1_p3_0; +fp data_0_p3_0; +fp data_p1_p3_0; +fp data_p2_p3_0; +fp data_p3_p3_0; +fp data_m2_m2_p1; +fp data_m1_m2_p1; +fp data_0_m2_p1; +fp data_p1_m2_p1; +fp data_p2_m2_p1; +fp data_p3_m2_p1; +fp data_m2_m1_p1; +fp data_m1_m1_p1; +fp data_0_m1_p1; +fp data_p1_m1_p1; +fp data_p2_m1_p1; +fp data_p3_m1_p1; +fp data_m2_0_p1; +fp data_m1_0_p1; +fp data_0_0_p1; +fp data_p1_0_p1; +fp data_p2_0_p1; +fp data_p3_0_p1; +fp data_m2_p1_p1; +fp data_m1_p1_p1; +fp data_0_p1_p1; +fp data_p1_p1_p1; +fp data_p2_p1_p1; +fp data_p3_p1_p1; +fp data_m2_p2_p1; +fp data_m1_p2_p1; +fp data_0_p2_p1; +fp data_p1_p2_p1; +fp data_p2_p2_p1; +fp data_p3_p2_p1; +fp data_m2_p3_p1; +fp data_m1_p3_p1; +fp data_0_p3_p1; +fp data_p1_p3_p1; +fp data_p2_p3_p1; +fp data_p3_p3_p1; +fp data_m2_m2_p2; +fp data_m1_m2_p2; +fp data_0_m2_p2; +fp data_p1_m2_p2; +fp data_p2_m2_p2; +fp data_p3_m2_p2; +fp data_m2_m1_p2; +fp data_m1_m1_p2; +fp data_0_m1_p2; +fp data_p1_m1_p2; +fp data_p2_m1_p2; +fp data_p3_m1_p2; +fp data_m2_0_p2; +fp data_m1_0_p2; +fp data_0_0_p2; +fp data_p1_0_p2; +fp data_p2_0_p2; +fp data_p3_0_p2; +fp data_m2_p1_p2; +fp data_m1_p1_p2; +fp data_0_p1_p2; +fp data_p1_p1_p2; +fp data_p2_p1_p2; +fp data_p3_p1_p2; +fp data_m2_p2_p2; +fp data_m1_p2_p2; +fp data_0_p2_p2; +fp data_p1_p2_p2; +fp data_p2_p2_p2; +fp data_p3_p2_p2; +fp data_m2_p3_p2; +fp data_m1_p3_p2; +fp data_0_p3_p2; +fp data_p1_p3_p2; +fp data_p2_p3_p2; +fp data_p3_p3_p2; +fp data_m2_m2_p3; +fp data_m1_m2_p3; +fp data_0_m2_p3; +fp data_p1_m2_p3; +fp data_p2_m2_p3; +fp data_p3_m2_p3; +fp data_m2_m1_p3; +fp data_m1_m1_p3; +fp data_0_m1_p3; +fp data_p1_m1_p3; +fp data_p2_m1_p3; +fp data_p3_m1_p3; +fp data_m2_0_p3; +fp data_m1_0_p3; +fp data_0_0_p3; +fp data_p1_0_p3; +fp data_p2_0_p3; +fp data_p3_0_p3; +fp data_m2_p1_p3; +fp data_m1_p1_p3; +fp data_0_p1_p3; +fp data_p1_p1_p3; +fp data_p2_p1_p3; +fp data_p3_p1_p3; +fp data_m2_p2_p3; +fp data_m1_p2_p3; +fp data_0_p2_p3; +fp data_p1_p2_p3; +fp data_p2_p2_p3; +fp data_p3_p2_p3; +fp data_m2_p3_p3; +fp data_m1_p3_p3; +fp data_0_p3_p3; +fp data_p1_p3_p3; +fp data_p2_p3_p3; +fp data_p3_p3_p3; diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size6/evaluate-molecule.c b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size6/evaluate-molecule.c new file mode 100644 index 0000000..ccbfa3b --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size6/evaluate-molecule.c @@ -0,0 +1,216 @@ + coeffs->coeff_m2_m2_m2*data->data_m2_m2_m2 + + coeffs->coeff_m1_m2_m2*data->data_m1_m2_m2 + + coeffs->coeff_0_m2_m2*data->data_0_m2_m2 + + coeffs->coeff_p1_m2_m2*data->data_p1_m2_m2 + + coeffs->coeff_p2_m2_m2*data->data_p2_m2_m2 + + coeffs->coeff_p3_m2_m2*data->data_p3_m2_m2 + + coeffs->coeff_m2_m1_m2*data->data_m2_m1_m2 + + coeffs->coeff_m1_m1_m2*data->data_m1_m1_m2 + + coeffs->coeff_0_m1_m2*data->data_0_m1_m2 + + coeffs->coeff_p1_m1_m2*data->data_p1_m1_m2 + + coeffs->coeff_p2_m1_m2*data->data_p2_m1_m2 + + coeffs->coeff_p3_m1_m2*data->data_p3_m1_m2 + + coeffs->coeff_m2_0_m2*data->data_m2_0_m2 + + coeffs->coeff_m1_0_m2*data->data_m1_0_m2 + + coeffs->coeff_0_0_m2*data->data_0_0_m2 + + coeffs->coeff_p1_0_m2*data->data_p1_0_m2 + + coeffs->coeff_p2_0_m2*data->data_p2_0_m2 + + coeffs->coeff_p3_0_m2*data->data_p3_0_m2 + + coeffs->coeff_m2_p1_m2*data->data_m2_p1_m2 + + coeffs->coeff_m1_p1_m2*data->data_m1_p1_m2 + + coeffs->coeff_0_p1_m2*data->data_0_p1_m2 + + coeffs->coeff_p1_p1_m2*data->data_p1_p1_m2 + + coeffs->coeff_p2_p1_m2*data->data_p2_p1_m2 + + coeffs->coeff_p3_p1_m2*data->data_p3_p1_m2 + + coeffs->coeff_m2_p2_m2*data->data_m2_p2_m2 + + coeffs->coeff_m1_p2_m2*data->data_m1_p2_m2 + + coeffs->coeff_0_p2_m2*data->data_0_p2_m2 + + coeffs->coeff_p1_p2_m2*data->data_p1_p2_m2 + + coeffs->coeff_p2_p2_m2*data->data_p2_p2_m2 + + coeffs->coeff_p3_p2_m2*data->data_p3_p2_m2 + + coeffs->coeff_m2_p3_m2*data->data_m2_p3_m2 + + coeffs->coeff_m1_p3_m2*data->data_m1_p3_m2 + + coeffs->coeff_0_p3_m2*data->data_0_p3_m2 + + coeffs->coeff_p1_p3_m2*data->data_p1_p3_m2 + + coeffs->coeff_p2_p3_m2*data->data_p2_p3_m2 + + coeffs->coeff_p3_p3_m2*data->data_p3_p3_m2 + + coeffs->coeff_m2_m2_m1*data->data_m2_m2_m1 + + coeffs->coeff_m1_m2_m1*data->data_m1_m2_m1 + + coeffs->coeff_0_m2_m1*data->data_0_m2_m1 + + coeffs->coeff_p1_m2_m1*data->data_p1_m2_m1 + + coeffs->coeff_p2_m2_m1*data->data_p2_m2_m1 + + coeffs->coeff_p3_m2_m1*data->data_p3_m2_m1 + + coeffs->coeff_m2_m1_m1*data->data_m2_m1_m1 + + coeffs->coeff_m1_m1_m1*data->data_m1_m1_m1 + + coeffs->coeff_0_m1_m1*data->data_0_m1_m1 + + coeffs->coeff_p1_m1_m1*data->data_p1_m1_m1 + + coeffs->coeff_p2_m1_m1*data->data_p2_m1_m1 + + coeffs->coeff_p3_m1_m1*data->data_p3_m1_m1 + + coeffs->coeff_m2_0_m1*data->data_m2_0_m1 + + coeffs->coeff_m1_0_m1*data->data_m1_0_m1 + + coeffs->coeff_0_0_m1*data->data_0_0_m1 + + coeffs->coeff_p1_0_m1*data->data_p1_0_m1 + + coeffs->coeff_p2_0_m1*data->data_p2_0_m1 + + coeffs->coeff_p3_0_m1*data->data_p3_0_m1 + + coeffs->coeff_m2_p1_m1*data->data_m2_p1_m1 + + coeffs->coeff_m1_p1_m1*data->data_m1_p1_m1 + + coeffs->coeff_0_p1_m1*data->data_0_p1_m1 + + coeffs->coeff_p1_p1_m1*data->data_p1_p1_m1 + + coeffs->coeff_p2_p1_m1*data->data_p2_p1_m1 + + coeffs->coeff_p3_p1_m1*data->data_p3_p1_m1 + + coeffs->coeff_m2_p2_m1*data->data_m2_p2_m1 + + coeffs->coeff_m1_p2_m1*data->data_m1_p2_m1 + + coeffs->coeff_0_p2_m1*data->data_0_p2_m1 + + coeffs->coeff_p1_p2_m1*data->data_p1_p2_m1 + + coeffs->coeff_p2_p2_m1*data->data_p2_p2_m1 + + coeffs->coeff_p3_p2_m1*data->data_p3_p2_m1 + + coeffs->coeff_m2_p3_m1*data->data_m2_p3_m1 + + coeffs->coeff_m1_p3_m1*data->data_m1_p3_m1 + + coeffs->coeff_0_p3_m1*data->data_0_p3_m1 + + coeffs->coeff_p1_p3_m1*data->data_p1_p3_m1 + + coeffs->coeff_p2_p3_m1*data->data_p2_p3_m1 + + coeffs->coeff_p3_p3_m1*data->data_p3_p3_m1 + + coeffs->coeff_m2_m2_0*data->data_m2_m2_0 + + coeffs->coeff_m1_m2_0*data->data_m1_m2_0 + + coeffs->coeff_0_m2_0*data->data_0_m2_0 + + coeffs->coeff_p1_m2_0*data->data_p1_m2_0 + + coeffs->coeff_p2_m2_0*data->data_p2_m2_0 + + coeffs->coeff_p3_m2_0*data->data_p3_m2_0 + + coeffs->coeff_m2_m1_0*data->data_m2_m1_0 + + coeffs->coeff_m1_m1_0*data->data_m1_m1_0 + + coeffs->coeff_0_m1_0*data->data_0_m1_0 + + coeffs->coeff_p1_m1_0*data->data_p1_m1_0 + + coeffs->coeff_p2_m1_0*data->data_p2_m1_0 + + coeffs->coeff_p3_m1_0*data->data_p3_m1_0 + + coeffs->coeff_m2_0_0*data->data_m2_0_0 + + coeffs->coeff_m1_0_0*data->data_m1_0_0 + + coeffs->coeff_0_0_0*data->data_0_0_0 + + coeffs->coeff_p1_0_0*data->data_p1_0_0 + + coeffs->coeff_p2_0_0*data->data_p2_0_0 + + coeffs->coeff_p3_0_0*data->data_p3_0_0 + + coeffs->coeff_m2_p1_0*data->data_m2_p1_0 + + coeffs->coeff_m1_p1_0*data->data_m1_p1_0 + + coeffs->coeff_0_p1_0*data->data_0_p1_0 + + coeffs->coeff_p1_p1_0*data->data_p1_p1_0 + + coeffs->coeff_p2_p1_0*data->data_p2_p1_0 + + coeffs->coeff_p3_p1_0*data->data_p3_p1_0 + + coeffs->coeff_m2_p2_0*data->data_m2_p2_0 + + coeffs->coeff_m1_p2_0*data->data_m1_p2_0 + + coeffs->coeff_0_p2_0*data->data_0_p2_0 + + coeffs->coeff_p1_p2_0*data->data_p1_p2_0 + + coeffs->coeff_p2_p2_0*data->data_p2_p2_0 + + coeffs->coeff_p3_p2_0*data->data_p3_p2_0 + + coeffs->coeff_m2_p3_0*data->data_m2_p3_0 + + coeffs->coeff_m1_p3_0*data->data_m1_p3_0 + + coeffs->coeff_0_p3_0*data->data_0_p3_0 + + coeffs->coeff_p1_p3_0*data->data_p1_p3_0 + + coeffs->coeff_p2_p3_0*data->data_p2_p3_0 + + coeffs->coeff_p3_p3_0*data->data_p3_p3_0 + + coeffs->coeff_m2_m2_p1*data->data_m2_m2_p1 + + coeffs->coeff_m1_m2_p1*data->data_m1_m2_p1 + + coeffs->coeff_0_m2_p1*data->data_0_m2_p1 + + coeffs->coeff_p1_m2_p1*data->data_p1_m2_p1 + + coeffs->coeff_p2_m2_p1*data->data_p2_m2_p1 + + coeffs->coeff_p3_m2_p1*data->data_p3_m2_p1 + + coeffs->coeff_m2_m1_p1*data->data_m2_m1_p1 + + coeffs->coeff_m1_m1_p1*data->data_m1_m1_p1 + + coeffs->coeff_0_m1_p1*data->data_0_m1_p1 + + coeffs->coeff_p1_m1_p1*data->data_p1_m1_p1 + + coeffs->coeff_p2_m1_p1*data->data_p2_m1_p1 + + coeffs->coeff_p3_m1_p1*data->data_p3_m1_p1 + + coeffs->coeff_m2_0_p1*data->data_m2_0_p1 + + coeffs->coeff_m1_0_p1*data->data_m1_0_p1 + + coeffs->coeff_0_0_p1*data->data_0_0_p1 + + coeffs->coeff_p1_0_p1*data->data_p1_0_p1 + + coeffs->coeff_p2_0_p1*data->data_p2_0_p1 + + coeffs->coeff_p3_0_p1*data->data_p3_0_p1 + + coeffs->coeff_m2_p1_p1*data->data_m2_p1_p1 + + coeffs->coeff_m1_p1_p1*data->data_m1_p1_p1 + + coeffs->coeff_0_p1_p1*data->data_0_p1_p1 + + coeffs->coeff_p1_p1_p1*data->data_p1_p1_p1 + + coeffs->coeff_p2_p1_p1*data->data_p2_p1_p1 + + coeffs->coeff_p3_p1_p1*data->data_p3_p1_p1 + + coeffs->coeff_m2_p2_p1*data->data_m2_p2_p1 + + coeffs->coeff_m1_p2_p1*data->data_m1_p2_p1 + + coeffs->coeff_0_p2_p1*data->data_0_p2_p1 + + coeffs->coeff_p1_p2_p1*data->data_p1_p2_p1 + + coeffs->coeff_p2_p2_p1*data->data_p2_p2_p1 + + coeffs->coeff_p3_p2_p1*data->data_p3_p2_p1 + + coeffs->coeff_m2_p3_p1*data->data_m2_p3_p1 + + coeffs->coeff_m1_p3_p1*data->data_m1_p3_p1 + + coeffs->coeff_0_p3_p1*data->data_0_p3_p1 + + coeffs->coeff_p1_p3_p1*data->data_p1_p3_p1 + + coeffs->coeff_p2_p3_p1*data->data_p2_p3_p1 + + coeffs->coeff_p3_p3_p1*data->data_p3_p3_p1 + + coeffs->coeff_m2_m2_p2*data->data_m2_m2_p2 + + coeffs->coeff_m1_m2_p2*data->data_m1_m2_p2 + + coeffs->coeff_0_m2_p2*data->data_0_m2_p2 + + coeffs->coeff_p1_m2_p2*data->data_p1_m2_p2 + + coeffs->coeff_p2_m2_p2*data->data_p2_m2_p2 + + coeffs->coeff_p3_m2_p2*data->data_p3_m2_p2 + + coeffs->coeff_m2_m1_p2*data->data_m2_m1_p2 + + coeffs->coeff_m1_m1_p2*data->data_m1_m1_p2 + + coeffs->coeff_0_m1_p2*data->data_0_m1_p2 + + coeffs->coeff_p1_m1_p2*data->data_p1_m1_p2 + + coeffs->coeff_p2_m1_p2*data->data_p2_m1_p2 + + coeffs->coeff_p3_m1_p2*data->data_p3_m1_p2 + + coeffs->coeff_m2_0_p2*data->data_m2_0_p2 + + coeffs->coeff_m1_0_p2*data->data_m1_0_p2 + + coeffs->coeff_0_0_p2*data->data_0_0_p2 + + coeffs->coeff_p1_0_p2*data->data_p1_0_p2 + + coeffs->coeff_p2_0_p2*data->data_p2_0_p2 + + coeffs->coeff_p3_0_p2*data->data_p3_0_p2 + + coeffs->coeff_m2_p1_p2*data->data_m2_p1_p2 + + coeffs->coeff_m1_p1_p2*data->data_m1_p1_p2 + + coeffs->coeff_0_p1_p2*data->data_0_p1_p2 + + coeffs->coeff_p1_p1_p2*data->data_p1_p1_p2 + + coeffs->coeff_p2_p1_p2*data->data_p2_p1_p2 + + coeffs->coeff_p3_p1_p2*data->data_p3_p1_p2 + + coeffs->coeff_m2_p2_p2*data->data_m2_p2_p2 + + coeffs->coeff_m1_p2_p2*data->data_m1_p2_p2 + + coeffs->coeff_0_p2_p2*data->data_0_p2_p2 + + coeffs->coeff_p1_p2_p2*data->data_p1_p2_p2 + + coeffs->coeff_p2_p2_p2*data->data_p2_p2_p2 + + coeffs->coeff_p3_p2_p2*data->data_p3_p2_p2 + + coeffs->coeff_m2_p3_p2*data->data_m2_p3_p2 + + coeffs->coeff_m1_p3_p2*data->data_m1_p3_p2 + + coeffs->coeff_0_p3_p2*data->data_0_p3_p2 + + coeffs->coeff_p1_p3_p2*data->data_p1_p3_p2 + + coeffs->coeff_p2_p3_p2*data->data_p2_p3_p2 + + coeffs->coeff_p3_p3_p2*data->data_p3_p3_p2 + + coeffs->coeff_m2_m2_p3*data->data_m2_m2_p3 + + coeffs->coeff_m1_m2_p3*data->data_m1_m2_p3 + + coeffs->coeff_0_m2_p3*data->data_0_m2_p3 + + coeffs->coeff_p1_m2_p3*data->data_p1_m2_p3 + + coeffs->coeff_p2_m2_p3*data->data_p2_m2_p3 + + coeffs->coeff_p3_m2_p3*data->data_p3_m2_p3 + + coeffs->coeff_m2_m1_p3*data->data_m2_m1_p3 + + coeffs->coeff_m1_m1_p3*data->data_m1_m1_p3 + + coeffs->coeff_0_m1_p3*data->data_0_m1_p3 + + coeffs->coeff_p1_m1_p3*data->data_p1_m1_p3 + + coeffs->coeff_p2_m1_p3*data->data_p2_m1_p3 + + coeffs->coeff_p3_m1_p3*data->data_p3_m1_p3 + + coeffs->coeff_m2_0_p3*data->data_m2_0_p3 + + coeffs->coeff_m1_0_p3*data->data_m1_0_p3 + + coeffs->coeff_0_0_p3*data->data_0_0_p3 + + coeffs->coeff_p1_0_p3*data->data_p1_0_p3 + + coeffs->coeff_p2_0_p3*data->data_p2_0_p3 + + coeffs->coeff_p3_0_p3*data->data_p3_0_p3 + + coeffs->coeff_m2_p1_p3*data->data_m2_p1_p3 + + coeffs->coeff_m1_p1_p3*data->data_m1_p1_p3 + + coeffs->coeff_0_p1_p3*data->data_0_p1_p3 + + coeffs->coeff_p1_p1_p3*data->data_p1_p1_p3 + + coeffs->coeff_p2_p1_p3*data->data_p2_p1_p3 + + coeffs->coeff_p3_p1_p3*data->data_p3_p1_p3 + + coeffs->coeff_m2_p2_p3*data->data_m2_p2_p3 + + coeffs->coeff_m1_p2_p3*data->data_m1_p2_p3 + + coeffs->coeff_0_p2_p3*data->data_0_p2_p3 + + coeffs->coeff_p1_p2_p3*data->data_p1_p2_p3 + + coeffs->coeff_p2_p2_p3*data->data_p2_p2_p3 + + coeffs->coeff_p3_p2_p3*data->data_p3_p2_p3 + + coeffs->coeff_m2_p3_p3*data->data_m2_p3_p3 + + coeffs->coeff_m1_p3_p3*data->data_m1_p3_p3 + + coeffs->coeff_0_p3_p3*data->data_0_p3_p3 + + coeffs->coeff_p1_p3_p3*data->data_p1_p3_p3 + + coeffs->coeff_p2_p3_p3*data->data_p2_p3_p3 + + coeffs->coeff_p3_p3_p3*data->data_p3_p3_p3; diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size6/fetch-data.c b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size6/fetch-data.c new file mode 100644 index 0000000..7238ef9 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size6/fetch-data.c @@ -0,0 +1,216 @@ +data->data_m2_m2_m2 = DATA(-2,-2,-2); +data->data_m1_m2_m2 = DATA(-1,-2,-2); +data->data_0_m2_m2 = DATA(0,-2,-2); +data->data_p1_m2_m2 = DATA(1,-2,-2); +data->data_p2_m2_m2 = DATA(2,-2,-2); +data->data_p3_m2_m2 = DATA(3,-2,-2); +data->data_m2_m1_m2 = DATA(-2,-1,-2); +data->data_m1_m1_m2 = DATA(-1,-1,-2); +data->data_0_m1_m2 = DATA(0,-1,-2); +data->data_p1_m1_m2 = DATA(1,-1,-2); +data->data_p2_m1_m2 = DATA(2,-1,-2); +data->data_p3_m1_m2 = DATA(3,-1,-2); +data->data_m2_0_m2 = DATA(-2,0,-2); +data->data_m1_0_m2 = DATA(-1,0,-2); +data->data_0_0_m2 = DATA(0,0,-2); +data->data_p1_0_m2 = DATA(1,0,-2); +data->data_p2_0_m2 = DATA(2,0,-2); +data->data_p3_0_m2 = DATA(3,0,-2); +data->data_m2_p1_m2 = DATA(-2,1,-2); +data->data_m1_p1_m2 = DATA(-1,1,-2); +data->data_0_p1_m2 = DATA(0,1,-2); +data->data_p1_p1_m2 = DATA(1,1,-2); +data->data_p2_p1_m2 = DATA(2,1,-2); +data->data_p3_p1_m2 = DATA(3,1,-2); +data->data_m2_p2_m2 = DATA(-2,2,-2); +data->data_m1_p2_m2 = DATA(-1,2,-2); +data->data_0_p2_m2 = DATA(0,2,-2); +data->data_p1_p2_m2 = DATA(1,2,-2); +data->data_p2_p2_m2 = DATA(2,2,-2); +data->data_p3_p2_m2 = DATA(3,2,-2); +data->data_m2_p3_m2 = DATA(-2,3,-2); +data->data_m1_p3_m2 = DATA(-1,3,-2); +data->data_0_p3_m2 = DATA(0,3,-2); +data->data_p1_p3_m2 = DATA(1,3,-2); +data->data_p2_p3_m2 = DATA(2,3,-2); +data->data_p3_p3_m2 = DATA(3,3,-2); +data->data_m2_m2_m1 = DATA(-2,-2,-1); +data->data_m1_m2_m1 = DATA(-1,-2,-1); +data->data_0_m2_m1 = DATA(0,-2,-1); +data->data_p1_m2_m1 = DATA(1,-2,-1); +data->data_p2_m2_m1 = DATA(2,-2,-1); +data->data_p3_m2_m1 = DATA(3,-2,-1); +data->data_m2_m1_m1 = DATA(-2,-1,-1); +data->data_m1_m1_m1 = DATA(-1,-1,-1); +data->data_0_m1_m1 = DATA(0,-1,-1); +data->data_p1_m1_m1 = DATA(1,-1,-1); +data->data_p2_m1_m1 = DATA(2,-1,-1); +data->data_p3_m1_m1 = DATA(3,-1,-1); +data->data_m2_0_m1 = DATA(-2,0,-1); +data->data_m1_0_m1 = DATA(-1,0,-1); +data->data_0_0_m1 = DATA(0,0,-1); +data->data_p1_0_m1 = DATA(1,0,-1); +data->data_p2_0_m1 = DATA(2,0,-1); +data->data_p3_0_m1 = DATA(3,0,-1); +data->data_m2_p1_m1 = DATA(-2,1,-1); +data->data_m1_p1_m1 = DATA(-1,1,-1); +data->data_0_p1_m1 = DATA(0,1,-1); +data->data_p1_p1_m1 = DATA(1,1,-1); +data->data_p2_p1_m1 = DATA(2,1,-1); +data->data_p3_p1_m1 = DATA(3,1,-1); +data->data_m2_p2_m1 = DATA(-2,2,-1); +data->data_m1_p2_m1 = DATA(-1,2,-1); +data->data_0_p2_m1 = DATA(0,2,-1); +data->data_p1_p2_m1 = DATA(1,2,-1); +data->data_p2_p2_m1 = DATA(2,2,-1); +data->data_p3_p2_m1 = DATA(3,2,-1); +data->data_m2_p3_m1 = DATA(-2,3,-1); +data->data_m1_p3_m1 = DATA(-1,3,-1); +data->data_0_p3_m1 = DATA(0,3,-1); +data->data_p1_p3_m1 = DATA(1,3,-1); +data->data_p2_p3_m1 = DATA(2,3,-1); +data->data_p3_p3_m1 = DATA(3,3,-1); +data->data_m2_m2_0 = DATA(-2,-2,0); +data->data_m1_m2_0 = DATA(-1,-2,0); +data->data_0_m2_0 = DATA(0,-2,0); +data->data_p1_m2_0 = DATA(1,-2,0); +data->data_p2_m2_0 = DATA(2,-2,0); +data->data_p3_m2_0 = DATA(3,-2,0); +data->data_m2_m1_0 = DATA(-2,-1,0); +data->data_m1_m1_0 = DATA(-1,-1,0); +data->data_0_m1_0 = DATA(0,-1,0); +data->data_p1_m1_0 = DATA(1,-1,0); +data->data_p2_m1_0 = DATA(2,-1,0); +data->data_p3_m1_0 = DATA(3,-1,0); +data->data_m2_0_0 = DATA(-2,0,0); +data->data_m1_0_0 = DATA(-1,0,0); +data->data_0_0_0 = DATA(0,0,0); +data->data_p1_0_0 = DATA(1,0,0); +data->data_p2_0_0 = DATA(2,0,0); +data->data_p3_0_0 = DATA(3,0,0); +data->data_m2_p1_0 = DATA(-2,1,0); +data->data_m1_p1_0 = DATA(-1,1,0); +data->data_0_p1_0 = DATA(0,1,0); +data->data_p1_p1_0 = DATA(1,1,0); +data->data_p2_p1_0 = DATA(2,1,0); +data->data_p3_p1_0 = DATA(3,1,0); +data->data_m2_p2_0 = DATA(-2,2,0); +data->data_m1_p2_0 = DATA(-1,2,0); +data->data_0_p2_0 = DATA(0,2,0); +data->data_p1_p2_0 = DATA(1,2,0); +data->data_p2_p2_0 = DATA(2,2,0); +data->data_p3_p2_0 = DATA(3,2,0); +data->data_m2_p3_0 = DATA(-2,3,0); +data->data_m1_p3_0 = DATA(-1,3,0); +data->data_0_p3_0 = DATA(0,3,0); +data->data_p1_p3_0 = DATA(1,3,0); +data->data_p2_p3_0 = DATA(2,3,0); +data->data_p3_p3_0 = DATA(3,3,0); +data->data_m2_m2_p1 = DATA(-2,-2,1); +data->data_m1_m2_p1 = DATA(-1,-2,1); +data->data_0_m2_p1 = DATA(0,-2,1); +data->data_p1_m2_p1 = DATA(1,-2,1); +data->data_p2_m2_p1 = DATA(2,-2,1); +data->data_p3_m2_p1 = DATA(3,-2,1); +data->data_m2_m1_p1 = DATA(-2,-1,1); +data->data_m1_m1_p1 = DATA(-1,-1,1); +data->data_0_m1_p1 = DATA(0,-1,1); +data->data_p1_m1_p1 = DATA(1,-1,1); +data->data_p2_m1_p1 = DATA(2,-1,1); +data->data_p3_m1_p1 = DATA(3,-1,1); +data->data_m2_0_p1 = DATA(-2,0,1); +data->data_m1_0_p1 = DATA(-1,0,1); +data->data_0_0_p1 = DATA(0,0,1); +data->data_p1_0_p1 = DATA(1,0,1); +data->data_p2_0_p1 = DATA(2,0,1); +data->data_p3_0_p1 = DATA(3,0,1); +data->data_m2_p1_p1 = DATA(-2,1,1); +data->data_m1_p1_p1 = DATA(-1,1,1); +data->data_0_p1_p1 = DATA(0,1,1); +data->data_p1_p1_p1 = DATA(1,1,1); +data->data_p2_p1_p1 = DATA(2,1,1); +data->data_p3_p1_p1 = DATA(3,1,1); +data->data_m2_p2_p1 = DATA(-2,2,1); +data->data_m1_p2_p1 = DATA(-1,2,1); +data->data_0_p2_p1 = DATA(0,2,1); +data->data_p1_p2_p1 = DATA(1,2,1); +data->data_p2_p2_p1 = DATA(2,2,1); +data->data_p3_p2_p1 = DATA(3,2,1); +data->data_m2_p3_p1 = DATA(-2,3,1); +data->data_m1_p3_p1 = DATA(-1,3,1); +data->data_0_p3_p1 = DATA(0,3,1); +data->data_p1_p3_p1 = DATA(1,3,1); +data->data_p2_p3_p1 = DATA(2,3,1); +data->data_p3_p3_p1 = DATA(3,3,1); +data->data_m2_m2_p2 = DATA(-2,-2,2); +data->data_m1_m2_p2 = DATA(-1,-2,2); +data->data_0_m2_p2 = DATA(0,-2,2); +data->data_p1_m2_p2 = DATA(1,-2,2); +data->data_p2_m2_p2 = DATA(2,-2,2); +data->data_p3_m2_p2 = DATA(3,-2,2); +data->data_m2_m1_p2 = DATA(-2,-1,2); +data->data_m1_m1_p2 = DATA(-1,-1,2); +data->data_0_m1_p2 = DATA(0,-1,2); +data->data_p1_m1_p2 = DATA(1,-1,2); +data->data_p2_m1_p2 = DATA(2,-1,2); +data->data_p3_m1_p2 = DATA(3,-1,2); +data->data_m2_0_p2 = DATA(-2,0,2); +data->data_m1_0_p2 = DATA(-1,0,2); +data->data_0_0_p2 = DATA(0,0,2); +data->data_p1_0_p2 = DATA(1,0,2); +data->data_p2_0_p2 = DATA(2,0,2); +data->data_p3_0_p2 = DATA(3,0,2); +data->data_m2_p1_p2 = DATA(-2,1,2); +data->data_m1_p1_p2 = DATA(-1,1,2); +data->data_0_p1_p2 = DATA(0,1,2); +data->data_p1_p1_p2 = DATA(1,1,2); +data->data_p2_p1_p2 = DATA(2,1,2); +data->data_p3_p1_p2 = DATA(3,1,2); +data->data_m2_p2_p2 = DATA(-2,2,2); +data->data_m1_p2_p2 = DATA(-1,2,2); +data->data_0_p2_p2 = DATA(0,2,2); +data->data_p1_p2_p2 = DATA(1,2,2); +data->data_p2_p2_p2 = DATA(2,2,2); +data->data_p3_p2_p2 = DATA(3,2,2); +data->data_m2_p3_p2 = DATA(-2,3,2); +data->data_m1_p3_p2 = DATA(-1,3,2); +data->data_0_p3_p2 = DATA(0,3,2); +data->data_p1_p3_p2 = DATA(1,3,2); +data->data_p2_p3_p2 = DATA(2,3,2); +data->data_p3_p3_p2 = DATA(3,3,2); +data->data_m2_m2_p3 = DATA(-2,-2,3); +data->data_m1_m2_p3 = DATA(-1,-2,3); +data->data_0_m2_p3 = DATA(0,-2,3); +data->data_p1_m2_p3 = DATA(1,-2,3); +data->data_p2_m2_p3 = DATA(2,-2,3); +data->data_p3_m2_p3 = DATA(3,-2,3); +data->data_m2_m1_p3 = DATA(-2,-1,3); +data->data_m1_m1_p3 = DATA(-1,-1,3); +data->data_0_m1_p3 = DATA(0,-1,3); +data->data_p1_m1_p3 = DATA(1,-1,3); +data->data_p2_m1_p3 = DATA(2,-1,3); +data->data_p3_m1_p3 = DATA(3,-1,3); +data->data_m2_0_p3 = DATA(-2,0,3); +data->data_m1_0_p3 = DATA(-1,0,3); +data->data_0_0_p3 = DATA(0,0,3); +data->data_p1_0_p3 = DATA(1,0,3); +data->data_p2_0_p3 = DATA(2,0,3); +data->data_p3_0_p3 = DATA(3,0,3); +data->data_m2_p1_p3 = DATA(-2,1,3); +data->data_m1_p1_p3 = DATA(-1,1,3); +data->data_0_p1_p3 = DATA(0,1,3); +data->data_p1_p1_p3 = DATA(1,1,3); +data->data_p2_p1_p3 = DATA(2,1,3); +data->data_p3_p1_p3 = DATA(3,1,3); +data->data_m2_p2_p3 = DATA(-2,2,3); +data->data_m1_p2_p3 = DATA(-1,2,3); +data->data_0_p2_p3 = DATA(0,2,3); +data->data_p1_p2_p3 = DATA(1,2,3); +data->data_p2_p2_p3 = DATA(2,2,3); +data->data_p3_p2_p3 = DATA(3,2,3); +data->data_m2_p3_p3 = DATA(-2,3,3); +data->data_m1_p3_p3 = DATA(-1,3,3); +data->data_0_p3_p3 = DATA(0,3,3); +data->data_p1_p3_p3 = DATA(1,3,3); +data->data_p2_p3_p3 = DATA(2,3,3); +data->data_p3_p3_p3 = DATA(3,3,3); diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.cube.size6/store-coeffs.c b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size6/store-coeffs.c new file mode 100644 index 0000000..301292b --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/3d.cube.size6/store-coeffs.c @@ -0,0 +1,216 @@ +COEFF(-2,-2,-2) = factor * coeffs->coeff_m2_m2_m2; +COEFF(-1,-2,-2) = factor * coeffs->coeff_m1_m2_m2; +COEFF(0,-2,-2) = factor * coeffs->coeff_0_m2_m2; +COEFF(1,-2,-2) = factor * coeffs->coeff_p1_m2_m2; +COEFF(2,-2,-2) = factor * coeffs->coeff_p2_m2_m2; +COEFF(3,-2,-2) = factor * coeffs->coeff_p3_m2_m2; +COEFF(-2,-1,-2) = factor * coeffs->coeff_m2_m1_m2; +COEFF(-1,-1,-2) = factor * coeffs->coeff_m1_m1_m2; +COEFF(0,-1,-2) = factor * coeffs->coeff_0_m1_m2; +COEFF(1,-1,-2) = factor * coeffs->coeff_p1_m1_m2; +COEFF(2,-1,-2) = factor * coeffs->coeff_p2_m1_m2; +COEFF(3,-1,-2) = factor * coeffs->coeff_p3_m1_m2; +COEFF(-2,0,-2) = factor * coeffs->coeff_m2_0_m2; +COEFF(-1,0,-2) = factor * coeffs->coeff_m1_0_m2; +COEFF(0,0,-2) = factor * coeffs->coeff_0_0_m2; +COEFF(1,0,-2) = factor * coeffs->coeff_p1_0_m2; +COEFF(2,0,-2) = factor * coeffs->coeff_p2_0_m2; +COEFF(3,0,-2) = factor * coeffs->coeff_p3_0_m2; +COEFF(-2,1,-2) = factor * coeffs->coeff_m2_p1_m2; +COEFF(-1,1,-2) = factor * coeffs->coeff_m1_p1_m2; +COEFF(0,1,-2) = factor * coeffs->coeff_0_p1_m2; +COEFF(1,1,-2) = factor * coeffs->coeff_p1_p1_m2; +COEFF(2,1,-2) = factor * coeffs->coeff_p2_p1_m2; +COEFF(3,1,-2) = factor * coeffs->coeff_p3_p1_m2; +COEFF(-2,2,-2) = factor * coeffs->coeff_m2_p2_m2; +COEFF(-1,2,-2) = factor * coeffs->coeff_m1_p2_m2; +COEFF(0,2,-2) = factor * coeffs->coeff_0_p2_m2; +COEFF(1,2,-2) = factor * coeffs->coeff_p1_p2_m2; +COEFF(2,2,-2) = factor * coeffs->coeff_p2_p2_m2; +COEFF(3,2,-2) = factor * coeffs->coeff_p3_p2_m2; +COEFF(-2,3,-2) = factor * coeffs->coeff_m2_p3_m2; +COEFF(-1,3,-2) = factor * coeffs->coeff_m1_p3_m2; +COEFF(0,3,-2) = factor * coeffs->coeff_0_p3_m2; +COEFF(1,3,-2) = factor * coeffs->coeff_p1_p3_m2; +COEFF(2,3,-2) = factor * coeffs->coeff_p2_p3_m2; +COEFF(3,3,-2) = factor * coeffs->coeff_p3_p3_m2; +COEFF(-2,-2,-1) = factor * coeffs->coeff_m2_m2_m1; +COEFF(-1,-2,-1) = factor * coeffs->coeff_m1_m2_m1; +COEFF(0,-2,-1) = factor * coeffs->coeff_0_m2_m1; +COEFF(1,-2,-1) = factor * coeffs->coeff_p1_m2_m1; +COEFF(2,-2,-1) = factor * coeffs->coeff_p2_m2_m1; +COEFF(3,-2,-1) = factor * coeffs->coeff_p3_m2_m1; +COEFF(-2,-1,-1) = factor * coeffs->coeff_m2_m1_m1; +COEFF(-1,-1,-1) = factor * coeffs->coeff_m1_m1_m1; +COEFF(0,-1,-1) = factor * coeffs->coeff_0_m1_m1; +COEFF(1,-1,-1) = factor * coeffs->coeff_p1_m1_m1; +COEFF(2,-1,-1) = factor * coeffs->coeff_p2_m1_m1; +COEFF(3,-1,-1) = factor * coeffs->coeff_p3_m1_m1; +COEFF(-2,0,-1) = factor * coeffs->coeff_m2_0_m1; +COEFF(-1,0,-1) = factor * coeffs->coeff_m1_0_m1; +COEFF(0,0,-1) = factor * coeffs->coeff_0_0_m1; +COEFF(1,0,-1) = factor * coeffs->coeff_p1_0_m1; +COEFF(2,0,-1) = factor * coeffs->coeff_p2_0_m1; +COEFF(3,0,-1) = factor * coeffs->coeff_p3_0_m1; +COEFF(-2,1,-1) = factor * coeffs->coeff_m2_p1_m1; +COEFF(-1,1,-1) = factor * coeffs->coeff_m1_p1_m1; +COEFF(0,1,-1) = factor * coeffs->coeff_0_p1_m1; +COEFF(1,1,-1) = factor * coeffs->coeff_p1_p1_m1; +COEFF(2,1,-1) = factor * coeffs->coeff_p2_p1_m1; +COEFF(3,1,-1) = factor * coeffs->coeff_p3_p1_m1; +COEFF(-2,2,-1) = factor * coeffs->coeff_m2_p2_m1; +COEFF(-1,2,-1) = factor * coeffs->coeff_m1_p2_m1; +COEFF(0,2,-1) = factor * coeffs->coeff_0_p2_m1; +COEFF(1,2,-1) = factor * coeffs->coeff_p1_p2_m1; +COEFF(2,2,-1) = factor * coeffs->coeff_p2_p2_m1; +COEFF(3,2,-1) = factor * coeffs->coeff_p3_p2_m1; +COEFF(-2,3,-1) = factor * coeffs->coeff_m2_p3_m1; +COEFF(-1,3,-1) = factor * coeffs->coeff_m1_p3_m1; +COEFF(0,3,-1) = factor * coeffs->coeff_0_p3_m1; +COEFF(1,3,-1) = factor * coeffs->coeff_p1_p3_m1; +COEFF(2,3,-1) = factor * coeffs->coeff_p2_p3_m1; +COEFF(3,3,-1) = factor * coeffs->coeff_p3_p3_m1; +COEFF(-2,-2,0) = factor * coeffs->coeff_m2_m2_0; +COEFF(-1,-2,0) = factor * coeffs->coeff_m1_m2_0; +COEFF(0,-2,0) = factor * coeffs->coeff_0_m2_0; +COEFF(1,-2,0) = factor * coeffs->coeff_p1_m2_0; +COEFF(2,-2,0) = factor * coeffs->coeff_p2_m2_0; +COEFF(3,-2,0) = factor * coeffs->coeff_p3_m2_0; +COEFF(-2,-1,0) = factor * coeffs->coeff_m2_m1_0; +COEFF(-1,-1,0) = factor * coeffs->coeff_m1_m1_0; +COEFF(0,-1,0) = factor * coeffs->coeff_0_m1_0; +COEFF(1,-1,0) = factor * coeffs->coeff_p1_m1_0; +COEFF(2,-1,0) = factor * coeffs->coeff_p2_m1_0; +COEFF(3,-1,0) = factor * coeffs->coeff_p3_m1_0; +COEFF(-2,0,0) = factor * coeffs->coeff_m2_0_0; +COEFF(-1,0,0) = factor * coeffs->coeff_m1_0_0; +COEFF(0,0,0) = factor * coeffs->coeff_0_0_0; +COEFF(1,0,0) = factor * coeffs->coeff_p1_0_0; +COEFF(2,0,0) = factor * coeffs->coeff_p2_0_0; +COEFF(3,0,0) = factor * coeffs->coeff_p3_0_0; +COEFF(-2,1,0) = factor * coeffs->coeff_m2_p1_0; +COEFF(-1,1,0) = factor * coeffs->coeff_m1_p1_0; +COEFF(0,1,0) = factor * coeffs->coeff_0_p1_0; +COEFF(1,1,0) = factor * coeffs->coeff_p1_p1_0; +COEFF(2,1,0) = factor * coeffs->coeff_p2_p1_0; +COEFF(3,1,0) = factor * coeffs->coeff_p3_p1_0; +COEFF(-2,2,0) = factor * coeffs->coeff_m2_p2_0; +COEFF(-1,2,0) = factor * coeffs->coeff_m1_p2_0; +COEFF(0,2,0) = factor * coeffs->coeff_0_p2_0; +COEFF(1,2,0) = factor * coeffs->coeff_p1_p2_0; +COEFF(2,2,0) = factor * coeffs->coeff_p2_p2_0; +COEFF(3,2,0) = factor * coeffs->coeff_p3_p2_0; +COEFF(-2,3,0) = factor * coeffs->coeff_m2_p3_0; +COEFF(-1,3,0) = factor * coeffs->coeff_m1_p3_0; +COEFF(0,3,0) = factor * coeffs->coeff_0_p3_0; +COEFF(1,3,0) = factor * coeffs->coeff_p1_p3_0; +COEFF(2,3,0) = factor * coeffs->coeff_p2_p3_0; +COEFF(3,3,0) = factor * coeffs->coeff_p3_p3_0; +COEFF(-2,-2,1) = factor * coeffs->coeff_m2_m2_p1; +COEFF(-1,-2,1) = factor * coeffs->coeff_m1_m2_p1; +COEFF(0,-2,1) = factor * coeffs->coeff_0_m2_p1; +COEFF(1,-2,1) = factor * coeffs->coeff_p1_m2_p1; +COEFF(2,-2,1) = factor * coeffs->coeff_p2_m2_p1; +COEFF(3,-2,1) = factor * coeffs->coeff_p3_m2_p1; +COEFF(-2,-1,1) = factor * coeffs->coeff_m2_m1_p1; +COEFF(-1,-1,1) = factor * coeffs->coeff_m1_m1_p1; +COEFF(0,-1,1) = factor * coeffs->coeff_0_m1_p1; +COEFF(1,-1,1) = factor * coeffs->coeff_p1_m1_p1; +COEFF(2,-1,1) = factor * coeffs->coeff_p2_m1_p1; +COEFF(3,-1,1) = factor * coeffs->coeff_p3_m1_p1; +COEFF(-2,0,1) = factor * coeffs->coeff_m2_0_p1; +COEFF(-1,0,1) = factor * coeffs->coeff_m1_0_p1; +COEFF(0,0,1) = factor * coeffs->coeff_0_0_p1; +COEFF(1,0,1) = factor * coeffs->coeff_p1_0_p1; +COEFF(2,0,1) = factor * coeffs->coeff_p2_0_p1; +COEFF(3,0,1) = factor * coeffs->coeff_p3_0_p1; +COEFF(-2,1,1) = factor * coeffs->coeff_m2_p1_p1; +COEFF(-1,1,1) = factor * coeffs->coeff_m1_p1_p1; +COEFF(0,1,1) = factor * coeffs->coeff_0_p1_p1; +COEFF(1,1,1) = factor * coeffs->coeff_p1_p1_p1; +COEFF(2,1,1) = factor * coeffs->coeff_p2_p1_p1; +COEFF(3,1,1) = factor * coeffs->coeff_p3_p1_p1; +COEFF(-2,2,1) = factor * coeffs->coeff_m2_p2_p1; +COEFF(-1,2,1) = factor * coeffs->coeff_m1_p2_p1; +COEFF(0,2,1) = factor * coeffs->coeff_0_p2_p1; +COEFF(1,2,1) = factor * coeffs->coeff_p1_p2_p1; +COEFF(2,2,1) = factor * coeffs->coeff_p2_p2_p1; +COEFF(3,2,1) = factor * coeffs->coeff_p3_p2_p1; +COEFF(-2,3,1) = factor * coeffs->coeff_m2_p3_p1; +COEFF(-1,3,1) = factor * coeffs->coeff_m1_p3_p1; +COEFF(0,3,1) = factor * coeffs->coeff_0_p3_p1; +COEFF(1,3,1) = factor * coeffs->coeff_p1_p3_p1; +COEFF(2,3,1) = factor * coeffs->coeff_p2_p3_p1; +COEFF(3,3,1) = factor * coeffs->coeff_p3_p3_p1; +COEFF(-2,-2,2) = factor * coeffs->coeff_m2_m2_p2; +COEFF(-1,-2,2) = factor * coeffs->coeff_m1_m2_p2; +COEFF(0,-2,2) = factor * coeffs->coeff_0_m2_p2; +COEFF(1,-2,2) = factor * coeffs->coeff_p1_m2_p2; +COEFF(2,-2,2) = factor * coeffs->coeff_p2_m2_p2; +COEFF(3,-2,2) = factor * coeffs->coeff_p3_m2_p2; +COEFF(-2,-1,2) = factor * coeffs->coeff_m2_m1_p2; +COEFF(-1,-1,2) = factor * coeffs->coeff_m1_m1_p2; +COEFF(0,-1,2) = factor * coeffs->coeff_0_m1_p2; +COEFF(1,-1,2) = factor * coeffs->coeff_p1_m1_p2; +COEFF(2,-1,2) = factor * coeffs->coeff_p2_m1_p2; +COEFF(3,-1,2) = factor * coeffs->coeff_p3_m1_p2; +COEFF(-2,0,2) = factor * coeffs->coeff_m2_0_p2; +COEFF(-1,0,2) = factor * coeffs->coeff_m1_0_p2; +COEFF(0,0,2) = factor * coeffs->coeff_0_0_p2; +COEFF(1,0,2) = factor * coeffs->coeff_p1_0_p2; +COEFF(2,0,2) = factor * coeffs->coeff_p2_0_p2; +COEFF(3,0,2) = factor * coeffs->coeff_p3_0_p2; +COEFF(-2,1,2) = factor * coeffs->coeff_m2_p1_p2; +COEFF(-1,1,2) = factor * coeffs->coeff_m1_p1_p2; +COEFF(0,1,2) = factor * coeffs->coeff_0_p1_p2; +COEFF(1,1,2) = factor * coeffs->coeff_p1_p1_p2; +COEFF(2,1,2) = factor * coeffs->coeff_p2_p1_p2; +COEFF(3,1,2) = factor * coeffs->coeff_p3_p1_p2; +COEFF(-2,2,2) = factor * coeffs->coeff_m2_p2_p2; +COEFF(-1,2,2) = factor * coeffs->coeff_m1_p2_p2; +COEFF(0,2,2) = factor * coeffs->coeff_0_p2_p2; +COEFF(1,2,2) = factor * coeffs->coeff_p1_p2_p2; +COEFF(2,2,2) = factor * coeffs->coeff_p2_p2_p2; +COEFF(3,2,2) = factor * coeffs->coeff_p3_p2_p2; +COEFF(-2,3,2) = factor * coeffs->coeff_m2_p3_p2; +COEFF(-1,3,2) = factor * coeffs->coeff_m1_p3_p2; +COEFF(0,3,2) = factor * coeffs->coeff_0_p3_p2; +COEFF(1,3,2) = factor * coeffs->coeff_p1_p3_p2; +COEFF(2,3,2) = factor * coeffs->coeff_p2_p3_p2; +COEFF(3,3,2) = factor * coeffs->coeff_p3_p3_p2; +COEFF(-2,-2,3) = factor * coeffs->coeff_m2_m2_p3; +COEFF(-1,-2,3) = factor * coeffs->coeff_m1_m2_p3; +COEFF(0,-2,3) = factor * coeffs->coeff_0_m2_p3; +COEFF(1,-2,3) = factor * coeffs->coeff_p1_m2_p3; +COEFF(2,-2,3) = factor * coeffs->coeff_p2_m2_p3; +COEFF(3,-2,3) = factor * coeffs->coeff_p3_m2_p3; +COEFF(-2,-1,3) = factor * coeffs->coeff_m2_m1_p3; +COEFF(-1,-1,3) = factor * coeffs->coeff_m1_m1_p3; +COEFF(0,-1,3) = factor * coeffs->coeff_0_m1_p3; +COEFF(1,-1,3) = factor * coeffs->coeff_p1_m1_p3; +COEFF(2,-1,3) = factor * coeffs->coeff_p2_m1_p3; +COEFF(3,-1,3) = factor * coeffs->coeff_p3_m1_p3; +COEFF(-2,0,3) = factor * coeffs->coeff_m2_0_p3; +COEFF(-1,0,3) = factor * coeffs->coeff_m1_0_p3; +COEFF(0,0,3) = factor * coeffs->coeff_0_0_p3; +COEFF(1,0,3) = factor * coeffs->coeff_p1_0_p3; +COEFF(2,0,3) = factor * coeffs->coeff_p2_0_p3; +COEFF(3,0,3) = factor * coeffs->coeff_p3_0_p3; +COEFF(-2,1,3) = factor * coeffs->coeff_m2_p1_p3; +COEFF(-1,1,3) = factor * coeffs->coeff_m1_p1_p3; +COEFF(0,1,3) = factor * coeffs->coeff_0_p1_p3; +COEFF(1,1,3) = factor * coeffs->coeff_p1_p1_p3; +COEFF(2,1,3) = factor * coeffs->coeff_p2_p1_p3; +COEFF(3,1,3) = factor * coeffs->coeff_p3_p1_p3; +COEFF(-2,2,3) = factor * coeffs->coeff_m2_p2_p3; +COEFF(-1,2,3) = factor * coeffs->coeff_m1_p2_p3; +COEFF(0,2,3) = factor * coeffs->coeff_0_p2_p3; +COEFF(1,2,3) = factor * coeffs->coeff_p1_p2_p3; +COEFF(2,2,3) = factor * coeffs->coeff_p2_p2_p3; +COEFF(3,2,3) = factor * coeffs->coeff_p3_p2_p3; +COEFF(-2,3,3) = factor * coeffs->coeff_m2_p3_p3; +COEFF(-1,3,3) = factor * coeffs->coeff_m1_p3_p3; +COEFF(0,3,3) = factor * coeffs->coeff_0_p3_p3; +COEFF(1,3,3) = factor * coeffs->coeff_p1_p3_p3; +COEFF(2,3,3) = factor * coeffs->coeff_p2_p3_p3; +COEFF(3,3,3) = factor * coeffs->coeff_p3_p3_p3; diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.log b/src/GeneralizedPolynomial-Uniform/common/3d.log index 59f763a..500f53b 100644 --- a/src/GeneralizedPolynomial-Uniform/common/3d.log +++ b/src/GeneralizedPolynomial-Uniform/common/3d.log @@ -10,7 +10,7 @@ # fix_rationals - convert numbers to RATIONAL() calls # nonmatching_names - find names in a list which *don't* have a specified prefix # sprint_numeric_list - convert a numeric list to a valid C identifier suffix -# print_name_list_dcl - print a C declaration for a list of names +# print_name_list_dcl - print C declarations for a list of names # # hypercube_points - compute all (integer) points in an N-dimensional hypercube # @@ -297,49 +297,42 @@ end proc ################################################################################ > # -# This function prints a C declaration for a list of names. +# This function prints a sequence of C declarations for a list of names. # # Argument: # name_list = A list of the names. -# name_type = The C type of the names, eg. "double". +# type_name = The C type of the names, eg. "double". # file_name = The file name to write the declaration to. This is # truncated before writing. # > print_name_list_dcl := > proc( name_list::list({name,string}), -> name_type::string, +> type_name::string, > file_name::string ) > local blanks, separator_string; > > ftruncate(file_name); > -# a sequence of blanks with the same length as name_type -> seq(" ", i=1..length(name_type)); -> -# string to separate names -> separator_string := cat(",\n", %, " "); -> -> map(convert, name_list, string); -> ListTools[Join](%, separator_string); -> cat(op(%)); -> -> fprintf(file_name, -> "%s %s;\n", -> name_type, %); +> map( +> proc(var::{name,string}) +> fprintf(file_name, +> "%s %s;\n", +> type_name, var); +> end proc +> , +> name_list +> ); > > fclose(file_name); > NULL; > end proc; print_name_list_dcl := proc( -name_list::list({name, string}), name_type::string, file_name::string) +name_list::list({name, string}), type_name::string, file_name::string) local blanks, separator_string; ftruncate(file_name); - seq(" ", i = 1 .. length(name_type)); - separator_string := cat(",\n", %, " "); - map(convert, name_list, string); - ListTools[Join](%, separator_string); - cat(op(%)); - fprintf(file_name, "%s %s;\n", name_type, %); + map(proc(var::{name, string}) + fprintf(file_name, "%s %s;\n", type_name, var) + end proc, name_list); fclose(file_name); NULL end proc @@ -445,7 +438,7 @@ ftruncate := proc(file_name::string) fopen(file_name, 'WRITE'); fclose(%); NULL end proc # interpolate.maple -- compute interpolation formulas/coefficients -# $Header: /cactusdevcvs/CactusBase/LocalInterp/src/GeneralizedPolynomial-Uniform/interpolate.maple,v 1.8 2002/08/20 16:46:05 jthorn Exp $ +# $Header: /cactusdevcvs/CactusBase/LocalInterp/src/GeneralizedPolynomial-Uniform/interpolate.maple,v 1.10 2002/08/28 11:31:09 jthorn Exp $ > # # <<>> @@ -454,8 +447,8 @@ ftruncate := # coeff_as_lc_of_data - coefficients of ... (linear combination of data) # # print_coeff__lc_of_data - print C code to compute coefficients -# print_data_var_assign - print C code to assign data-value variables -# print_interp_coeff_var_store - print C code to store coeff vars "somewhere" +# print_fetch_data - print C code to fetch input array chunk into struct data +# print_store_coeffs - print C code to store struct coeffs "somewhere" # print_interp_cmpt__lc_of_data - print C code for computation of interpolant # # coeff_name - name of coefficient of data at a given [m] coordinate @@ -543,7 +536,7 @@ end proc # # This function computes a Hermite polynomial interpolant in any # number of dimensions. This is a polynomial which -# has values which match the given data DATA() at a specified set of +# * has values which match the given data DATA() at a specified set of # points, and # * has derivatives which match the specified finite-difference derivatives # of the given data DATA() at a specified set of points @@ -562,50 +555,45 @@ end proc # + c01*y + c11*x*y + c21*x^2*y + c31*x^3*y # + c00 + c10*x + c20*x^2 + c30*x^3 # end proc; -# coeff_list = A set of the interpolation coefficients (coefficients in +# coeff_set = A set of the interpolation coefficients (coefficients in # the interpolation function), for example -# [ +# { # c03, c13, c23, c33, # c02, c12, c22, c32, # c01, c11, c21, c31, # c00, c10, c20, c30 -# ] +# } # coord_list = A list of the coordinates (independent variables in the # interpolation function), for example [x,y]. -# deriv_coord_list = A list of lists of coordinates specifying which -# derivatives are computed by the deriv_proc_list[] -# procedures, for example -# [[x], [y], [x,y]] -# deriv_proc_list = A list of procedures for computing finite-difference -# derivatives. Each procedure should take N_dims integer -# arguments specifying an evaluation point, and return -# a suitable linear combination of the DATA() for the -# derivative at that point. For example -# example, -# [ -# proc(i::integer, j::integer) -# - 1/2*DATA(i-1,j) + 1/2*DATA(i+1,j) -# end proc +# deriv_set = A set of equations of the form +# {coords} = proc +# giving the derivatives which are to be matched, and the +# procedures to compute their finite-difference approximations. +# Each procedure should take N_dims integer arguments specifying +# an evaluation point, and return a suitable linear combination +# of the DATA() for the derivative at that point. For example +# { +# {x} = proc(i::integer, j::integer) +# - 1/2*DATA(i-1,j) + 1/2*DATA(i+1,j) +# end proc # , -# proc(i::integer, j::integer) -# - 1/2*DATA(i,j-1) + 1/2*DATA(i,j+1) -# end proc +# {y} = proc(i::integer, j::integer) +# - 1/2*DATA(i,j-1) + 1/2*DATA(i,j+1) +# end proc # , -# proc(i::integer, j::integer) -# - 1/4*DATA(i-1,j+1) + 1/4*DATA(i+1,j+1) -# + 1/4*DATA(i-1,j-1) - 1/4*DATA(i+1,j-1) -# end proc -# ] -# fn_posn_list = A list of positions (each a list of numeric values) -# where the interpolant is to match the given data DATA(), -# for example -# [[0,0], [0,1], [1,0], [1,1]] -# deriv_posn_list = A list of positions (each a list of numeric values) -# where the interpolant is to match each possible product -# of 1st derivatives"1st" -# derivatives (actually all derivatives the given data DATA(), -# for example -# [[0,0], [0,1], [1,0], [1,1]] +# {x,y} = proc(i::integer, j::integer) +# - 1/4*DATA(i-1,j+1) + 1/4*DATA(i+1,j+1) +# + 1/4*DATA(i-1,j-1) - 1/4*DATA(i+1,j-1) +# end proc +# } +# fn_posn_set = A set of positions (each a list of numeric values) +# where the interpolant is to match the given data DATA(), +# for example +# {[0,0], [0,1], [1,0], [1,1]} +# deriv_posn_set = A list of positions (each a list of numeric values) +# where the interpolant is to match the derivatives +# specified by deriv_set , for example +# {[0,0], [0,1], [1,0], [1,1]} # # Results: # This function returns the interpolating polynomial, in the form of @@ -613,93 +601,123 @@ end proc # > Hermite_polynomial_interpolant := > proc( -> fn::procedure, coeff_list::list(name), coord_list::list(name), -> deriv_coord_list::list(list(name)), fd_deriv_proc_list::list(procedure), -> fn_posn_list::list(list(numeric)), deriv_posn_list::list(list(numeric)) +> fn::procedure, +> coeff_set::set(name), +> coord_list::list(name), +> deriv_set::set(set(name) = procedure), +> fn_posn_set::set(list(numeric)), +> deriv_posn_set::set(list(numeric)) > ) -> local fn_eset, -> fn_expr, deriv_eset; -> -# set of equations {fn(posn) = DATA(posn)} -> fn_eset := map( -> # return equation that fn(this point) = DATA(this point) -> proc(posn::list(integer)) -> fn(op(posn)) = 'DATA'(op(posn)); -> end proc -> , -> {op(fn_posn_list)} -> ); -> -# set of sets of equations -# { -# { deriv1(posn1) = fd_deriv1(posn1), -# deriv2(posn1) = fd_deriv2(posn1), -# ... }, -# { deriv1(posn2) = fd_deriv1(posn2), -# deriv2(posn2) = fd_deriv2(posn2), -# ... }, -# ... -# } -> fn_expr := fn(op(coord_list)); +> local fn_eqnset, deriv_eqnset, coeff_eqns, subs_eqnset; +> +> +# +# compute a set of equations +# {fn(posn) = DATA(posn)} +# giving the function values to be matched +# +> fn_eqnset := map( +> # return equation that fn(posn) = DATA(posn) +> proc(posn::list(integer)) +> fn(op(posn)) = 'DATA'(op(posn)); +> end proc +> , +> fn_posn_set +> ); +> +> +# +# compute a set of equations +# { diff(fn,coords)(posn) = DERIV(coords)(posn) } +# giving the derivative values to be matched, where DERIV(coords) +# is a placeholder for the appropriate derivative +# > map( -> # return set of equations -> # {deriv(posn) = fd_deriv(posn)} -> # for this point -> proc(posn::list(integer)) -> { -> op( -> zip( -> # return equation that -> # deriv(posn) = fd_deriv(posn) -> # for this deriv and this point -> proc(deriv_coords::list(name), fd_deriv_proc::procedure) -> local fn_deriv_proc; -> fn_deriv_proc := unapply( diff(fn_expr,deriv_coords), -> op(coord_list) ); -> fn_deriv_proc(op(posn)) = fd_deriv_proc(op(posn)); -> end proc -> , -> [op(deriv_coord_list)] -> , -> [op(fd_deriv_proc_list)] -> ) -> ) -> } +> # return set of equations for this particular derivative +> proc(deriv_coords::set(name)) +> local deriv_fn; +> fn(op(coord_list)); +> diff(%, op(deriv_coords)); +> deriv_fn := unapply(%, op(coord_list)); +> map( +> proc(posn::list(integer)) +> deriv_fn(op(posn)) = 'DERIV'(op(deriv_coords))(op(posn)); +> end proc +> , +> deriv_posn_set +> ); > end proc > , -> {op(deriv_posn_list)} +> map(lhs, deriv_set) > ); +> deriv_eqnset := `union`(op(%)); +> > -# set of equations {deriv-i(posn-j) = fd_deriv-i(posn-j)} -> deriv_eset := `union`(op(%)); +# +# solve overall set of equations for coefficients +# in terms of DATA() and DERIV() values +# +> coeff_eqns := solve[linear](fn_eqnset union deriv_eqnset, coeff_set); +> if (indets(map(rhs,%)) <> {}) +> then error "no unique solution for coefficients -- %1 eqns for %2 coeffs", +> nops(fn_eqnset union deriv_eqnset), +> nops(coeff_set); +> fi; > -# solve equations for coeffs -> solve(fn_eset union deriv_eset, {op(coeff_list)}); > -# interpolant as a polynomial in the coordinates -> return subs(%, eval(fn))(op(coord_list)); +# +# compute a set of substitution equations +# {'DERIV'(coords) = procedure} +# +> subs_eqnset := map( +> proc(eqn::set(name) = procedure) +> 'DERIV'(op(lhs(eqn))) = rhs(eqn); +> end proc +> , +> deriv_set +> ); +> +> +# +# compute the coefficients in terms of the DATA() values +# +> subs(subs_eqnset, coeff_eqns); +> eval(%); +> +# +# compute the interpolant as a polynomial in the coordinates +# +> subs(%, fn(op(coord_list))); > end proc; -Hermite_polynomial_interpolant := proc(fn::procedure, coeff_list::list(name), -coord_list::list(name), deriv_coord_list::list(list(name)), -fd_deriv_proc_list::list(procedure), fn_posn_list::list(list(numeric)), -deriv_posn_list::list(list(numeric))) -local fn_eset, fn_expr, deriv_eset; - fn_eset := map( +Hermite_polynomial_interpolant := proc(fn::procedure, coeff_set::set(name), +coord_list::list(name), deriv_set::set(set(name) = procedure), +fn_posn_set::set(list(numeric)), deriv_posn_set::set(list(numeric))) +local fn_eqnset, deriv_eqnset, coeff_eqns, subs_eqnset; + fn_eqnset := map( proc(posn::list(integer)) fn(op(posn)) = 'DATA'(op(posn)) end proc, - {op(fn_posn_list)}); - fn_expr := fn(op(coord_list)); - map(proc(posn::list(integer)) - {op(zip(proc(deriv_coords::list(name), fd_deriv_proc::procedure - ) - local fn_deriv_proc; - fn_deriv_proc := - unapply(diff(fn_expr, deriv_coords), op(coord_list)); - fn_deriv_proc(op(posn)) = fd_deriv_proc(op(posn)) - end proc, [op(deriv_coord_list)], [op(fd_deriv_proc_list)]))} - end proc, {op(deriv_posn_list)}); - deriv_eset := `union`(op(%)); - solve(fn_eset union deriv_eset, {op(coeff_list)}); - return subs(%, eval(fn))(op(coord_list)) + fn_posn_set); + map(proc(deriv_coords::set(name)) + local deriv_fn; + fn(op(coord_list)); + diff(%, op(deriv_coords)); + deriv_fn := unapply(%, op(coord_list)); + map(proc(posn::list(integer)) + deriv_fn(op(posn)) = + 'DERIV'(op(deriv_coords))(op(posn)) + end proc, deriv_posn_set) + end proc, map(lhs, deriv_set)); + deriv_eqnset := `union`(op(%)); + coeff_eqns := solve[linear](fn_eqnset union deriv_eqnset, coeff_set); + if indets(map(rhs, %)) <> {} then error + "no unique solution for coefficients -- %1 eqns for %2 coeffs", + nops(fn_eqnset union deriv_eqnset), nops(coeff_set) + end if; + subs_eqnset := map(proc(eqn::(set(name) = procedure)) + 'DERIV'(op(lhs(eqn))) = rhs(eqn) + end proc, deriv_set); + subs(subs_eqnset, coeff_eqns); + eval(%); + subs(%, fn(op(coord_list))) end proc > @@ -858,7 +876,7 @@ end proc # # This function prints a sequence of C expression to assign the data-value # variables, eg -# data_m1_p1 = DATA(-1,1); +# data->data_m1_p1 = DATA(-1,1); # # Arguments: # posn_list = The same list of positions as was used to compute the @@ -867,7 +885,7 @@ end proc # file_name = The file name to write the coefficients to. This is # truncated before writing. # -> print_data_var_assign := +> print_fetch_data := > proc( > posn_list::list(list(numeric)), > data_var_name_prefix::string, @@ -889,7 +907,7 @@ end proc > > NULL; > end proc; -print_data_var_assign := proc(posn_list::list(list(numeric)), +print_fetch_data := proc(posn_list::list(list(numeric)), data_var_name_prefix::string, file_name::string) ftruncate(file_name); map(proc(posn::list(numeric)) @@ -906,25 +924,18 @@ end proc # # This function prints a sequence of C expression to store the interpolation # coefficients in COEFF(...) expressions, eg -# COEFF(1,-1) = factor * coeff_dx_p1_m1; +# COEFF(1,-1) = factor * coeffs->coeff_p1_m1; # # Arguments: -# posn_list = The same list of positions as was used to compute the -# interpolating polynomial. -# RHS_factor_name = If this string is non-empty, then the coefficient is -# multiplied by this factor before being stored, eg -# setting this to "factor" would give the example above. -# If this string is empty (""), the multiplication is -# omitted, eg -# COEFF(1,-1) = coeff_dx_p1_m1; -# coeff_name_prefix = A prefix string for the coefficient names. +# posn_list = The list of positions in the molecule. +# coeff_name_prefix = A prefix string for the coefficient names, +# eg "factor * coeffs->coeff_" # file_name = The file name to write the coefficients to. This is # truncated before writing. # -> print_interp_coeff_var_store := +> print_store_coeffs := > proc( > posn_list::list(list(numeric)), -> RHS_factor_name::string, > coeff_name_prefix::string, > file_name::string > ) @@ -932,17 +943,10 @@ end proc > ftruncate(file_name); > map( > proc(posn::list(numeric)) -> if (length(RHS_factor_name) > 0) -> then fprintf(file_name, -> "%a = %s * %s;\n", -> 'COEFF'(op(posn)), -> RHS_factor_name, -> coeff_name(posn,coeff_name_prefix)); -> else fprintf(file_name, -> "%a = %s;\n", -> 'COEFF'(op(posn)), -> coeff_name(posn,coeff_name_prefix)); -> end if; +> fprintf(file_name, +> "%a = %s;\n", +> 'COEFF'(op(posn)), +> coeff_name(posn,coeff_name_prefix)); > end proc > , > posn_list @@ -951,16 +955,12 @@ end proc > > NULL; > end proc; -print_interp_coeff_var_store := proc(posn_list::list(list(numeric)), -RHS_factor_name::string, coeff_name_prefix::string, file_name::string) +print_store_coeffs := proc(posn_list::list(list(numeric)), +coeff_name_prefix::string, file_name::string) ftruncate(file_name); map(proc(posn::list(numeric)) - if 0 < length(RHS_factor_name) then fprintf(file_name, - "%a = %s * %s;\n", 'COEFF'(op(posn)), RHS_factor_name, - coeff_name(posn, coeff_name_prefix)) - else fprintf(file_name, "%a = %s;\n", 'COEFF'(op(posn)), - coeff_name(posn, coeff_name_prefix)) - end if + fprintf(file_name, "%a = %s;\n", 'COEFF'(op(posn)), + coeff_name(posn, coeff_name_prefix)) end proc, posn_list); fclose(file_name); NULL @@ -970,25 +970,19 @@ end proc ################################################################################ > # -# This function prints a C expression to compute the interpolant, -# using the coefficients computed by print_coeff__lc_of_data() -# (i.e. expressing the interpolant as a linear combination of the -# data values). +# This function prints a C expression to evaluate a molecule, i.e. +# to compute the molecule as a linear combination of the data values. # # Arguments: -# posn_list = The same list of positions as was used to compute the -# interpolating polynomial. -# result_var_name = The (string) name of the variable to which the -# result is to be assigned. +# posn_list = The list of positions in the molecule. # coeff_name_prefix = A prefix string for the coefficient names. # data_var_name_prefix = A prefix string for the data variable names. # file_name = The file name to write the coefficients to. This is # truncated before writing. # -> print_interp_cmpt__lc_of_data := +> print_evaluate_molecule := > proc( > posn_list::list(list(numeric)), -> result_var_name::string, > coeff_name_prefix::string, > data_var_name_prefix::string, > file_name::string @@ -996,8 +990,6 @@ end proc > > ftruncate(file_name); > -> fprintf(file_name, "%s =\n", result_var_name); -> # list of "coeff*data_var" terms > map( > proc(posn::list(numeric)) @@ -1009,26 +1001,24 @@ end proc > posn_list > ); > -> ListTools[Join](%, "\n\t+ "); +> ListTools[Join](%, "\n + "); > cat(op(%)); -> fprintf(file_name, "\t%s;\n", %); +> fprintf(file_name, " %s;\n", %); > > fclose(file_name); > > NULL; > end proc; -print_interp_cmpt__lc_of_data := proc(posn_list::list(list(numeric)), -result_var_name::string, coeff_name_prefix::string, -data_var_name_prefix::string, file_name::string) +print_evaluate_molecule := proc(posn_list::list(list(numeric)), +coeff_name_prefix::string, data_var_name_prefix::string, file_name::string) ftruncate(file_name); - fprintf(file_name, "%s =\n", result_var_name); map(proc(posn::list(numeric)) sprintf("%s*%s", coeff_name(posn, coeff_name_prefix), data_var_name(posn, data_var_name_prefix)) end proc, posn_list); - ListTools[Join](%, "\n\t+ "); + ListTools[Join](%, "\n + "); cat(op(%)); - fprintf(file_name, "\t%s;\n", %); + fprintf(file_name, " %s;\n", %); fclose(file_name); NULL end proc @@ -1323,7 +1313,7 @@ posn_list_3d_size6 := [[-2, -2, -2], [-1, -2, -2], [0, -2, -2], [1, -2, -2], [-1, 3, 3], [0, 3, 3], [1, 3, 3], [2, 3, 3], [3, 3, 3]] # Maple code to compute common coefficients for all 3d interpolation schemes -# $Header: /cactusdevcvs/CactusBase/LocalInterp/src/GeneralizedPolynomial-Uniform/common/3d.maple,v 1.2 2002/08/20 16:56:41 jthorn Exp $ +# $Header:$ > ################################################################################ > @@ -1331,49 +1321,34 @@ posn_list_3d_size6 := [[-2, -2, -2], [-1, -2, -2], [0, -2, -2], [1, -2, -2], # generic stuff for 3d, cube, size=2 # > -> data_var_list_3d_size2 := map(data_var_name, posn_list_3d_size2, "data_"); -data_var_list_3d_size2 := ["data_0_0_0", "data_p1_0_0", "data_0_p1_0", +> data_list_3d_size2 := map(data_var_name, posn_list_3d_size2, "data_"); +data_list_3d_size2 := ["data_0_0_0", "data_p1_0_0", "data_0_p1_0", "data_p1_p1_0", "data_0_0_p1", "data_p1_0_p1", "data_0_p1_p1", "data_p1_p1_p1"] +> coeffs_list_3d_size2 := map(coeff_name, posn_list_3d_size2, "coeff_"); +coeffs_list_3d_size2 := ["coeff_0_0_0", "coeff_p1_0_0", "coeff_0_p1_0", + + "coeff_p1_p1_0", "coeff_0_0_p1", "coeff_p1_0_p1", "coeff_0_p1_p1", + + "coeff_p1_p1_p1"] + > -> print_name_list_dcl(data_var_list_3d_size2, "fp", -> "3d.cube.size2/data-var.dcl.c"); -> print_data_var_assign(posn_list_3d_size2, "data_", -> "3d.cube.size2/data-var.assign.c"); -> -> print_interp_coeff_var_store(posn_list_3d_size2, "", "coeff_I_", -> "3d.cube.size2/coeff-I.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size2, "factor", "coeff_dx_", -> "3d.cube.size2/coeff-dx.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size2, "factor", "coeff_dy_", -> "3d.cube.size2/coeff-dy.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size2, "factor", "coeff_dz_", -> "3d.cube.size2/coeff-dz.store.c"); -> -> print_name_list_dcl(map(coeff_name, posn_list_3d_size2, "coeff_I_"), "fp", -> "3d.cube.size2/coeff-I.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size2, "coeff_dx_"), "fp", -> "3d.cube.size2/coeff-dx.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size2, "coeff_dy_"), "fp", -> "3d.cube.size2/coeff-dy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size2, "coeff_dz_"), "fp", -> "3d.cube.size2/coeff-dz.dcl.c"); -> -> print_interp_cmpt__lc_of_data(posn_list_3d_size2, -> "result", "coeff_I_", "data_", -> "3d.cube.size2/interp-I.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size2, -> "result", "coeff_dx_", "data_", -> "3d.cube.size2/interp-dx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size2, -> "result", "coeff_dy_", "data_", -> "3d.cube.size2/interp-dy.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size2, -> "result", "coeff_dz_", "data_", -> "3d.cube.size2/interp-dz.compute.c"); +> 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_fetch_data(posn_list_3d_size2, "data->data_", +> "3d.cube.size2/fetch-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"); > ################################################################################ > @@ -1381,8 +1356,8 @@ data_var_list_3d_size2 := ["data_0_0_0", "data_p1_0_0", "data_0_p1_0", # generic stuff for 3d, cube, size=3 # > -> data_var_list_3d_size3 := map(data_var_name, posn_list_3d_size3, "data_"); -data_var_list_3d_size3 := ["data_m1_m1_m1", "data_0_m1_m1", "data_p1_m1_m1", +> data_list_3d_size3 := map(data_var_name, posn_list_3d_size3, "data_"); +data_list_3d_size3 := ["data_m1_m1_m1", "data_0_m1_m1", "data_p1_m1_m1", "data_m1_0_m1", "data_0_0_m1", "data_p1_0_m1", "data_m1_p1_m1", @@ -1396,85 +1371,35 @@ data_var_list_3d_size3 := ["data_m1_m1_m1", "data_0_m1_m1", "data_p1_m1_m1", "data_m1_p1_p1", "data_0_p1_p1", "data_p1_p1_p1"] +> coeffs_list_3d_size3 := map(coeff_name, posn_list_3d_size3, "coeff_"); +coeffs_list_3d_size3 := ["coeff_m1_m1_m1", "coeff_0_m1_m1", "coeff_p1_m1_m1", + + "coeff_m1_0_m1", "coeff_0_0_m1", "coeff_p1_0_m1", "coeff_m1_p1_m1", + + "coeff_0_p1_m1", "coeff_p1_p1_m1", "coeff_m1_m1_0", "coeff_0_m1_0", + + "coeff_p1_m1_0", "coeff_m1_0_0", "coeff_0_0_0", "coeff_p1_0_0", + + "coeff_m1_p1_0", "coeff_0_p1_0", "coeff_p1_p1_0", "coeff_m1_m1_p1", + + "coeff_0_m1_p1", "coeff_p1_m1_p1", "coeff_m1_0_p1", "coeff_0_0_p1", + + "coeff_p1_0_p1", "coeff_m1_p1_p1", "coeff_0_p1_p1", "coeff_p1_p1_p1"] + +> +> 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_name_list_dcl(data_var_list_3d_size3, "fp", -> "3d.cube.size3/data-var.dcl.c"); -> print_data_var_assign(posn_list_3d_size3, "data_", -> "3d.cube.size3/data-var.assign.c"); -> -> print_interp_coeff_var_store(posn_list_3d_size3, "", "coeff_I_", -> "3d.cube.size3/coeff-I.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size3, "factor", "coeff_dx_", -> "3d.cube.size3/coeff-dx.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size3, "factor", "coeff_dy_", -> "3d.cube.size3/coeff-dy.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size3, "factor", "coeff_dz_", -> "3d.cube.size3/coeff-dz.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size3, "factor", "coeff_dxx_", -> "3d.cube.size3/coeff-dxx.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size3, "factor", "coeff_dxy_", -> "3d.cube.size3/coeff-dxy.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size3, "factor", "coeff_dxz_", -> "3d.cube.size3/coeff-dxz.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size3, "factor", "coeff_dyy_", -> "3d.cube.size3/coeff-dyy.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size3, "factor", "coeff_dyz_", -> "3d.cube.size3/coeff-dyz.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size3, "factor", "coeff_dzz_", -> "3d.cube.size3/coeff-dzz.store.c"); -bytes used=1000020, alloc=917336, time=0.09 -> -> print_name_list_dcl(map(coeff_name, posn_list_3d_size3, "coeff_I_"), "fp", -> "3d.cube.size3/coeff-I.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size3, "coeff_dx_"), "fp", -> "3d.cube.size3/coeff-dx.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size3, "coeff_dy_"), "fp", -> "3d.cube.size3/coeff-dy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size3, "coeff_dz_"), "fp", -> "3d.cube.size3/coeff-dz.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size3, "coeff_dxx_"), "fp", -> "3d.cube.size3/coeff-dxx.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size3, "coeff_dxy_"), "fp", -> "3d.cube.size3/coeff-dxy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size3, "coeff_dxz_"), "fp", -> "3d.cube.size3/coeff-dxz.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size3, "coeff_dyy_"), "fp", -> "3d.cube.size3/coeff-dyy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size3, "coeff_dyz_"), "fp", -> "3d.cube.size3/coeff-dyz.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size3, "coeff_dzz_"), "fp", -> "3d.cube.size3/coeff-dzz.dcl.c"); -> -> print_interp_cmpt__lc_of_data(posn_list_3d_size3, -> "result", "coeff_I_", "data_", -> "3d.cube.size3/interp-I.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size3, -> "result", "coeff_dx_", "data_", -> "3d.cube.size3/interp-dx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size3, -> "result", "coeff_dy_", "data_", -> "3d.cube.size3/interp-dy.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size3, -> "result", "coeff_dz_", "data_", -> "3d.cube.size3/interp-dz.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size3, -> "result", "coeff_dxx_", "data_", -> "3d.cube.size3/interp-dxx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size3, -> "result", "coeff_dxy_", "data_", -> "3d.cube.size3/interp-dxy.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size3, -> "result", "coeff_dxz_", "data_", -> "3d.cube.size3/interp-dxz.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size3, -> "result", "coeff_dyy_", "data_", -> "3d.cube.size3/interp-dyy.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size3, -> "result", "coeff_dyz_", "data_", -> "3d.cube.size3/interp-dyz.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size3, -> "result", "coeff_dzz_", "data_", -> "3d.cube.size3/interp-dzz.compute.c"); +> print_fetch_data(posn_list_3d_size3, "data->data_", +> "3d.cube.size3/fetch-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"); > ################################################################################ > @@ -1482,9 +1407,8 @@ bytes used=1000020, alloc=917336, time=0.09 # generic stuff for 3d, cube, size=4 # > -> data_var_list_3d_size4 := map(data_var_name, posn_list_3d_size4, "data_"); -bytes used=2000272, alloc=1179432, time=0.18 -data_var_list_3d_size4 := ["data_m1_m1_m1", "data_0_m1_m1", "data_p1_m1_m1", +> data_list_3d_size4 := map(data_var_name, posn_list_3d_size4, "data_"); +data_list_3d_size4 := ["data_m1_m1_m1", "data_0_m1_m1", "data_p1_m1_m1", "data_p2_m1_m1", "data_m1_0_m1", "data_0_0_m1", "data_p1_0_m1", @@ -1516,87 +1440,56 @@ data_var_list_3d_size4 := ["data_m1_m1_m1", "data_0_m1_m1", "data_p1_m1_m1", "data_m1_p2_p2", "data_0_p2_p2", "data_p1_p2_p2", "data_p2_p2_p2"] +> coeffs_list_3d_size4 := map(coeff_name, posn_list_3d_size4, "coeff_"); +coeffs_list_3d_size4 := ["coeff_m1_m1_m1", "coeff_0_m1_m1", "coeff_p1_m1_m1", + + "coeff_p2_m1_m1", "coeff_m1_0_m1", "coeff_0_0_m1", "coeff_p1_0_m1", + + "coeff_p2_0_m1", "coeff_m1_p1_m1", "coeff_0_p1_m1", "coeff_p1_p1_m1", + + "coeff_p2_p1_m1", "coeff_m1_p2_m1", "coeff_0_p2_m1", "coeff_p1_p2_m1", + + "coeff_p2_p2_m1", "coeff_m1_m1_0", "coeff_0_m1_0", "coeff_p1_m1_0", + + "coeff_p2_m1_0", "coeff_m1_0_0", "coeff_0_0_0", "coeff_p1_0_0", + + "coeff_p2_0_0", "coeff_m1_p1_0", "coeff_0_p1_0", "coeff_p1_p1_0", + + "coeff_p2_p1_0", "coeff_m1_p2_0", "coeff_0_p2_0", "coeff_p1_p2_0", + + "coeff_p2_p2_0", "coeff_m1_m1_p1", "coeff_0_m1_p1", "coeff_p1_m1_p1", + + "coeff_p2_m1_p1", "coeff_m1_0_p1", "coeff_0_0_p1", "coeff_p1_0_p1", + + "coeff_p2_0_p1", "coeff_m1_p1_p1", "coeff_0_p1_p1", "coeff_p1_p1_p1", + + "coeff_p2_p1_p1", "coeff_m1_p2_p1", "coeff_0_p2_p1", "coeff_p1_p2_p1", + + "coeff_p2_p2_p1", "coeff_m1_m1_p2", "coeff_0_m1_p2", "coeff_p1_m1_p2", + + "coeff_p2_m1_p2", "coeff_m1_0_p2", "coeff_0_0_p2", "coeff_p1_0_p2", + + "coeff_p2_0_p2", "coeff_m1_p1_p2", "coeff_0_p1_p2", "coeff_p1_p1_p2", + + "coeff_p2_p1_p2", "coeff_m1_p2_p2", "coeff_0_p2_p2", "coeff_p1_p2_p2", + + "coeff_p2_p2_p2"] + > -> print_name_list_dcl(data_var_list_3d_size4, "fp", -> "3d.cube.size4/data-var.dcl.c"); -> print_data_var_assign(posn_list_3d_size4, "data_", -> "3d.cube.size4/data-var.assign.c"); -> -> print_interp_coeff_var_store(posn_list_3d_size4, "", "coeff_I_", -> "3d.cube.size4/coeff-I.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size4, "factor", "coeff_dx_", -> "3d.cube.size4/coeff-dx.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size4, "factor", "coeff_dy_", -> "3d.cube.size4/coeff-dy.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size4, "factor", "coeff_dz_", -> "3d.cube.size4/coeff-dz.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size4, "factor", "coeff_dxx_", -> "3d.cube.size4/coeff-dxx.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size4, "factor", "coeff_dxy_", -> "3d.cube.size4/coeff-dxy.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size4, "factor", "coeff_dxz_", -> "3d.cube.size4/coeff-dxz.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size4, "factor", "coeff_dyy_", -> "3d.cube.size4/coeff-dyy.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size4, "factor", "coeff_dyz_", -> "3d.cube.size4/coeff-dyz.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size4, "factor", "coeff_dzz_", -> "3d.cube.size4/coeff-dzz.store.c"); -> -> print_name_list_dcl(map(coeff_name, posn_list_3d_size4, "coeff_I_"), "fp", -> "3d.cube.size4/coeff-I.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size4, "coeff_dx_"), "fp", -> "3d.cube.size4/coeff-dx.dcl.c"); -bytes used=3000488, alloc=1244956, time=0.34 -> print_name_list_dcl(map(coeff_name, posn_list_3d_size4, "coeff_dy_"), "fp", -> "3d.cube.size4/coeff-dy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size4, "coeff_dz_"), "fp", -> "3d.cube.size4/coeff-dz.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size4, "coeff_dxx_"), "fp", -> "3d.cube.size4/coeff-dxx.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size4, "coeff_dxy_"), "fp", -> "3d.cube.size4/coeff-dxy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size4, "coeff_dxz_"), "fp", -> "3d.cube.size4/coeff-dxz.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size4, "coeff_dyy_"), "fp", -> "3d.cube.size4/coeff-dyy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size4, "coeff_dyz_"), "fp", -> "3d.cube.size4/coeff-dyz.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size4, "coeff_dzz_"), "fp", -> "3d.cube.size4/coeff-dzz.dcl.c"); -> -> print_interp_cmpt__lc_of_data(posn_list_3d_size4, -> "result", "coeff_I_", "data_", -> "3d.cube.size4/interp-I.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size4, -> "result", "coeff_dx_", "data_", -> "3d.cube.size4/interp-dx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size4, -> "result", "coeff_dy_", "data_", -> "3d.cube.size4/interp-dy.compute.c"); -bytes used=4000992, alloc=1310480, time=0.40 -> print_interp_cmpt__lc_of_data(posn_list_3d_size4, -> "result", "coeff_dz_", "data_", -> "3d.cube.size4/interp-dz.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size4, -> "result", "coeff_dxx_", "data_", -> "3d.cube.size4/interp-dxx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size4, -> "result", "coeff_dxy_", "data_", -> "3d.cube.size4/interp-dxy.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size4, -> "result", "coeff_dxz_", "data_", -> "3d.cube.size4/interp-dxz.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size4, -> "result", "coeff_dyy_", "data_", -> "3d.cube.size4/interp-dyy.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size4, -> "result", "coeff_dyz_", "data_", -> "3d.cube.size4/interp-dyz.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size4, -> "result", "coeff_dzz_", "data_", -> "3d.cube.size4/interp-dzz.compute.c"); -bytes used=5001188, alloc=1310480, time=0.50 +> 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_fetch_data(posn_list_3d_size4, "data->data_", +> "3d.cube.size4/fetch-data.c"); +> print_evaluate_molecule(posn_list_3d_size4, +> "coeffs->coeff_", "data->data_", +> "3d.cube.size4/evaluate-molecule.c"); +bytes used=1000080, alloc=917336, time=0.12 +> print_store_coeffs(posn_list_3d_size4, +> "factor * coeffs->coeff_", +> "3d.cube.size4/store-coeffs.c"); > ################################################################################ > @@ -1604,8 +1497,8 @@ bytes used=5001188, alloc=1310480, time=0.50 # generic stuff for 3d, cube, size=5 # > -> data_var_list_3d_size5 := map(data_var_name, posn_list_3d_size5, "data_"); -data_var_list_3d_size5 := ["data_m2_m2_m2", "data_m1_m2_m2", "data_0_m2_m2", +> data_list_3d_size5 := map(data_var_name, posn_list_3d_size5, "data_"); +data_list_3d_size5 := ["data_m2_m2_m2", "data_m1_m2_m2", "data_0_m2_m2", "data_p1_m2_m2", "data_p2_m2_m2", "data_m2_m1_m2", "data_m1_m1_m2", @@ -1669,99 +1562,95 @@ data_var_list_3d_size5 := ["data_m2_m2_m2", "data_m1_m2_m2", "data_0_m2_m2", "data_p2_p2_p2"] +> coeffs_list_3d_size5 := map(coeff_name, posn_list_3d_size5, "coeff_"); +coeffs_list_3d_size5 := ["coeff_m2_m2_m2", "coeff_m1_m2_m2", "coeff_0_m2_m2", + + "coeff_p1_m2_m2", "coeff_p2_m2_m2", "coeff_m2_m1_m2", "coeff_m1_m1_m2", + + "coeff_0_m1_m2", "coeff_p1_m1_m2", "coeff_p2_m1_m2", "coeff_m2_0_m2", + + "coeff_m1_0_m2", "coeff_0_0_m2", "coeff_p1_0_m2", "coeff_p2_0_m2", + + "coeff_m2_p1_m2", "coeff_m1_p1_m2", "coeff_0_p1_m2", "coeff_p1_p1_m2", + + "coeff_p2_p1_m2", "coeff_m2_p2_m2", "coeff_m1_p2_m2", "coeff_0_p2_m2", + + "coeff_p1_p2_m2", "coeff_p2_p2_m2", "coeff_m2_m2_m1", "coeff_m1_m2_m1", + + "coeff_0_m2_m1", "coeff_p1_m2_m1", "coeff_p2_m2_m1", "coeff_m2_m1_m1", + + "coeff_m1_m1_m1", "coeff_0_m1_m1", "coeff_p1_m1_m1", "coeff_p2_m1_m1", + + "coeff_m2_0_m1", "coeff_m1_0_m1", "coeff_0_0_m1", "coeff_p1_0_m1", + + "coeff_p2_0_m1", "coeff_m2_p1_m1", "coeff_m1_p1_m1", "coeff_0_p1_m1", + + "coeff_p1_p1_m1", "coeff_p2_p1_m1", "coeff_m2_p2_m1", "coeff_m1_p2_m1", + + "coeff_0_p2_m1", "coeff_p1_p2_m1", "coeff_p2_p2_m1", "coeff_m2_m2_0", + + "coeff_m1_m2_0", "coeff_0_m2_0", "coeff_p1_m2_0", "coeff_p2_m2_0", + + "coeff_m2_m1_0", "coeff_m1_m1_0", "coeff_0_m1_0", "coeff_p1_m1_0", + + "coeff_p2_m1_0", "coeff_m2_0_0", "coeff_m1_0_0", "coeff_0_0_0", + + "coeff_p1_0_0", "coeff_p2_0_0", "coeff_m2_p1_0", "coeff_m1_p1_0", + + "coeff_0_p1_0", "coeff_p1_p1_0", "coeff_p2_p1_0", "coeff_m2_p2_0", + + "coeff_m1_p2_0", "coeff_0_p2_0", "coeff_p1_p2_0", "coeff_p2_p2_0", + + "coeff_m2_m2_p1", "coeff_m1_m2_p1", "coeff_0_m2_p1", "coeff_p1_m2_p1", + + "coeff_p2_m2_p1", "coeff_m2_m1_p1", "coeff_m1_m1_p1", "coeff_0_m1_p1", + + "coeff_p1_m1_p1", "coeff_p2_m1_p1", "coeff_m2_0_p1", "coeff_m1_0_p1", + + "coeff_0_0_p1", "coeff_p1_0_p1", "coeff_p2_0_p1", "coeff_m2_p1_p1", + + "coeff_m1_p1_p1", "coeff_0_p1_p1", "coeff_p1_p1_p1", "coeff_p2_p1_p1", + + "coeff_m2_p2_p1", "coeff_m1_p2_p1", "coeff_0_p2_p1", "coeff_p1_p2_p1", + + "coeff_p2_p2_p1", "coeff_m2_m2_p2", "coeff_m1_m2_p2", "coeff_0_m2_p2", + + "coeff_p1_m2_p2", "coeff_p2_m2_p2", "coeff_m2_m1_p2", "coeff_m1_m1_p2", + + "coeff_0_m1_p2", "coeff_p1_m1_p2", "coeff_p2_m1_p2", "coeff_m2_0_p2", + + "coeff_m1_0_p2", "coeff_0_0_p2", "coeff_p1_0_p2", "coeff_p2_0_p2", + + "coeff_m2_p1_p2", "coeff_m1_p1_p2", "coeff_0_p1_p2", "coeff_p1_p1_p2", + + "coeff_p2_p1_p2", "coeff_m2_p2_p2", "coeff_m1_p2_p2", "coeff_0_p2_p2", + + "coeff_p1_p2_p2", "coeff_p2_p2_p2"] + +> +> 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_name_list_dcl(data_var_list_3d_size5, "fp", -> "3d.cube.size5/data-var.dcl.c"); -> print_data_var_assign(posn_list_3d_size5, "data_", -> "3d.cube.size5/data-var.assign.c"); -> -> print_interp_coeff_var_store(posn_list_3d_size5, "", "coeff_I_", -> "3d.cube.size5/coeff-I.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size5, "factor", "coeff_dx_", -> "3d.cube.size5/coeff-dx.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size5, "factor", "coeff_dy_", -> "3d.cube.size5/coeff-dy.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size5, "factor", "coeff_dz_", -> "3d.cube.size5/coeff-dz.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size5, "factor", "coeff_dxx_", -> "3d.cube.size5/coeff-dxx.store.c"); -bytes used=6001348, alloc=1376004, time=0.63 -> print_interp_coeff_var_store(posn_list_3d_size5, "factor", "coeff_dxy_", -> "3d.cube.size5/coeff-dxy.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size5, "factor", "coeff_dxz_", -> "3d.cube.size5/coeff-dxz.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size5, "factor", "coeff_dyy_", -> "3d.cube.size5/coeff-dyy.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size5, "factor", "coeff_dyz_", -> "3d.cube.size5/coeff-dyz.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size5, "factor", "coeff_dzz_", -> "3d.cube.size5/coeff-dzz.store.c"); -> -> print_name_list_dcl(map(coeff_name, posn_list_3d_size5, "coeff_I_"), "fp", -> "3d.cube.size5/coeff-I.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size5, "coeff_dx_"), "fp", -> "3d.cube.size5/coeff-dx.dcl.c"); -bytes used=7001692, alloc=1376004, time=0.78 -> print_name_list_dcl(map(coeff_name, posn_list_3d_size5, "coeff_dy_"), "fp", -> "3d.cube.size5/coeff-dy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size5, "coeff_dz_"), "fp", -> "3d.cube.size5/coeff-dz.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size5, "coeff_dxx_"), "fp", -> "3d.cube.size5/coeff-dxx.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size5, "coeff_dxy_"), "fp", -> "3d.cube.size5/coeff-dxy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size5, "coeff_dxz_"), "fp", -> "3d.cube.size5/coeff-dxz.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size5, "coeff_dyy_"), "fp", -> "3d.cube.size5/coeff-dyy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size5, "coeff_dyz_"), "fp", -> "3d.cube.size5/coeff-dyz.dcl.c"); -bytes used=8002072, alloc=1441528, time=0.87 -> print_name_list_dcl(map(coeff_name, posn_list_3d_size5, "coeff_dzz_"), "fp", -> "3d.cube.size5/coeff-dzz.dcl.c"); -> -> print_interp_cmpt__lc_of_data(posn_list_3d_size5, -> "result", "coeff_I_", "data_", -> "3d.cube.size5/interp-I.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size5, -> "result", "coeff_dx_", "data_", -> "3d.cube.size5/interp-dx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size5, -> "result", "coeff_dy_", "data_", -> "3d.cube.size5/interp-dy.compute.c"); -bytes used=9002344, alloc=1441528, time=0.97 -> print_interp_cmpt__lc_of_data(posn_list_3d_size5, -> "result", "coeff_dz_", "data_", -> "3d.cube.size5/interp-dz.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size5, -> "result", "coeff_dxx_", "data_", -> "3d.cube.size5/interp-dxx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size5, -> "result", "coeff_dxy_", "data_", -> "3d.cube.size5/interp-dxy.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size5, -> "result", "coeff_dxz_", "data_", -> "3d.cube.size5/interp-dxz.compute.c"); -bytes used=10002504, alloc=1441528, time=1.10 -> print_interp_cmpt__lc_of_data(posn_list_3d_size5, -> "result", "coeff_dyy_", "data_", -> "3d.cube.size5/interp-dyy.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size5, -> "result", "coeff_dyz_", "data_", -> "3d.cube.size5/interp-dyz.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size5, -> "result", "coeff_dzz_", "data_", -> "3d.cube.size5/interp-dzz.compute.c"); +> print_fetch_data(posn_list_3d_size5, "data->data_", +> "3d.cube.size5/fetch-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"); +bytes used=2000360, alloc=1244956, time=0.21 > ################################################################################ > # -# generic stuff for 3d, cube, size=5 +# generic stuff for 3d, cube, size=6 # > -> data_var_list_3d_size6 := map(data_var_name, posn_list_3d_size6, "data_"); -bytes used=11002752, alloc=1441528, time=1.19 -data_var_list_3d_size6 := ["data_m2_m2_m2", "data_m1_m2_m2", "data_0_m2_m2", +> data_list_3d_size6 := map(data_var_name, posn_list_3d_size6, "data_"); +data_list_3d_size6 := ["data_m2_m2_m2", "data_m1_m2_m2", "data_0_m2_m2", "data_p1_m2_m2", "data_p2_m2_m2", "data_p3_m2_m2", "data_m2_m1_m2", @@ -1869,94 +1758,131 @@ data_var_list_3d_size6 := ["data_m2_m2_m2", "data_m1_m2_m2", "data_0_m2_m2", "data_p1_p3_p3", "data_p2_p3_p3", "data_p3_p3_p3"] +> coeffs_list_3d_size6 := map(coeff_name, posn_list_3d_size6, "coeff_"); +coeffs_list_3d_size6 := ["coeff_m2_m2_m2", "coeff_m1_m2_m2", "coeff_0_m2_m2", + + "coeff_p1_m2_m2", "coeff_p2_m2_m2", "coeff_p3_m2_m2", "coeff_m2_m1_m2", + + "coeff_m1_m1_m2", "coeff_0_m1_m2", "coeff_p1_m1_m2", "coeff_p2_m1_m2", + + "coeff_p3_m1_m2", "coeff_m2_0_m2", "coeff_m1_0_m2", "coeff_0_0_m2", + + "coeff_p1_0_m2", "coeff_p2_0_m2", "coeff_p3_0_m2", "coeff_m2_p1_m2", + + "coeff_m1_p1_m2", "coeff_0_p1_m2", "coeff_p1_p1_m2", "coeff_p2_p1_m2", + + "coeff_p3_p1_m2", "coeff_m2_p2_m2", "coeff_m1_p2_m2", "coeff_0_p2_m2", + + "coeff_p1_p2_m2", "coeff_p2_p2_m2", "coeff_p3_p2_m2", "coeff_m2_p3_m2", + + "coeff_m1_p3_m2", "coeff_0_p3_m2", "coeff_p1_p3_m2", "coeff_p2_p3_m2", + + "coeff_p3_p3_m2", "coeff_m2_m2_m1", "coeff_m1_m2_m1", "coeff_0_m2_m1", + + "coeff_p1_m2_m1", "coeff_p2_m2_m1", "coeff_p3_m2_m1", "coeff_m2_m1_m1", + + "coeff_m1_m1_m1", "coeff_0_m1_m1", "coeff_p1_m1_m1", "coeff_p2_m1_m1", + + "coeff_p3_m1_m1", "coeff_m2_0_m1", "coeff_m1_0_m1", "coeff_0_0_m1", + + "coeff_p1_0_m1", "coeff_p2_0_m1", "coeff_p3_0_m1", "coeff_m2_p1_m1", + + "coeff_m1_p1_m1", "coeff_0_p1_m1", "coeff_p1_p1_m1", "coeff_p2_p1_m1", + + "coeff_p3_p1_m1", "coeff_m2_p2_m1", "coeff_m1_p2_m1", "coeff_0_p2_m1", + + "coeff_p1_p2_m1", "coeff_p2_p2_m1", "coeff_p3_p2_m1", "coeff_m2_p3_m1", + + "coeff_m1_p3_m1", "coeff_0_p3_m1", "coeff_p1_p3_m1", "coeff_p2_p3_m1", + + "coeff_p3_p3_m1", "coeff_m2_m2_0", "coeff_m1_m2_0", "coeff_0_m2_0", + + "coeff_p1_m2_0", "coeff_p2_m2_0", "coeff_p3_m2_0", "coeff_m2_m1_0", + + "coeff_m1_m1_0", "coeff_0_m1_0", "coeff_p1_m1_0", "coeff_p2_m1_0", + + "coeff_p3_m1_0", "coeff_m2_0_0", "coeff_m1_0_0", "coeff_0_0_0", + + "coeff_p1_0_0", "coeff_p2_0_0", "coeff_p3_0_0", "coeff_m2_p1_0", + + "coeff_m1_p1_0", "coeff_0_p1_0", "coeff_p1_p1_0", "coeff_p2_p1_0", + + "coeff_p3_p1_0", "coeff_m2_p2_0", "coeff_m1_p2_0", "coeff_0_p2_0", + + "coeff_p1_p2_0", "coeff_p2_p2_0", "coeff_p3_p2_0", "coeff_m2_p3_0", + + "coeff_m1_p3_0", "coeff_0_p3_0", "coeff_p1_p3_0", "coeff_p2_p3_0", + + "coeff_p3_p3_0", "coeff_m2_m2_p1", "coeff_m1_m2_p1", "coeff_0_m2_p1", + + "coeff_p1_m2_p1", "coeff_p2_m2_p1", "coeff_p3_m2_p1", "coeff_m2_m1_p1", + + "coeff_m1_m1_p1", "coeff_0_m1_p1", "coeff_p1_m1_p1", "coeff_p2_m1_p1", + + "coeff_p3_m1_p1", "coeff_m2_0_p1", "coeff_m1_0_p1", "coeff_0_0_p1", + + "coeff_p1_0_p1", "coeff_p2_0_p1", "coeff_p3_0_p1", "coeff_m2_p1_p1", + + "coeff_m1_p1_p1", "coeff_0_p1_p1", "coeff_p1_p1_p1", "coeff_p2_p1_p1", + + "coeff_p3_p1_p1", "coeff_m2_p2_p1", "coeff_m1_p2_p1", "coeff_0_p2_p1", + + "coeff_p1_p2_p1", "coeff_p2_p2_p1", "coeff_p3_p2_p1", "coeff_m2_p3_p1", + + "coeff_m1_p3_p1", "coeff_0_p3_p1", "coeff_p1_p3_p1", "coeff_p2_p3_p1", + + "coeff_p3_p3_p1", "coeff_m2_m2_p2", "coeff_m1_m2_p2", "coeff_0_m2_p2", + + "coeff_p1_m2_p2", "coeff_p2_m2_p2", "coeff_p3_m2_p2", "coeff_m2_m1_p2", + + "coeff_m1_m1_p2", "coeff_0_m1_p2", "coeff_p1_m1_p2", "coeff_p2_m1_p2", + + "coeff_p3_m1_p2", "coeff_m2_0_p2", "coeff_m1_0_p2", "coeff_0_0_p2", + + "coeff_p1_0_p2", "coeff_p2_0_p2", "coeff_p3_0_p2", "coeff_m2_p1_p2", + + "coeff_m1_p1_p2", "coeff_0_p1_p2", "coeff_p1_p1_p2", "coeff_p2_p1_p2", + + "coeff_p3_p1_p2", "coeff_m2_p2_p2", "coeff_m1_p2_p2", "coeff_0_p2_p2", + + "coeff_p1_p2_p2", "coeff_p2_p2_p2", "coeff_p3_p2_p2", "coeff_m2_p3_p2", + + "coeff_m1_p3_p2", "coeff_0_p3_p2", "coeff_p1_p3_p2", "coeff_p2_p3_p2", + + "coeff_p3_p3_p2", "coeff_m2_m2_p3", "coeff_m1_m2_p3", "coeff_0_m2_p3", + + "coeff_p1_m2_p3", "coeff_p2_m2_p3", "coeff_p3_m2_p3", "coeff_m2_m1_p3", + + "coeff_m1_m1_p3", "coeff_0_m1_p3", "coeff_p1_m1_p3", "coeff_p2_m1_p3", + + "coeff_p3_m1_p3", "coeff_m2_0_p3", "coeff_m1_0_p3", "coeff_0_0_p3", + + "coeff_p1_0_p3", "coeff_p2_0_p3", "coeff_p3_0_p3", "coeff_m2_p1_p3", + + "coeff_m1_p1_p3", "coeff_0_p1_p3", "coeff_p1_p1_p3", "coeff_p2_p1_p3", + + "coeff_p3_p1_p3", "coeff_m2_p2_p3", "coeff_m1_p2_p3", "coeff_0_p2_p3", + + "coeff_p1_p2_p3", "coeff_p2_p2_p3", "coeff_p3_p2_p3", "coeff_m2_p3_p3", + + "coeff_m1_p3_p3", "coeff_0_p3_p3", "coeff_p1_p3_p3", "coeff_p2_p3_p3", + + "coeff_p3_p3_p3"] + > -> print_name_list_dcl(data_var_list_3d_size6, "fp", -> "3d.cube.size6/data-var.dcl.c"); -> print_data_var_assign(posn_list_3d_size6, "data_", -> "3d.cube.size6/data-var.assign.c"); -> -> print_interp_coeff_var_store(posn_list_3d_size6, "", "coeff_I_", -> "3d.cube.size6/coeff-I.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size6, "factor", "coeff_dx_", -> "3d.cube.size6/coeff-dx.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size6, "factor", "coeff_dy_", -> "3d.cube.size6/coeff-dy.store.c"); -bytes used=12003012, alloc=1441528, time=1.32 -> print_interp_coeff_var_store(posn_list_3d_size6, "factor", "coeff_dz_", -> "3d.cube.size6/coeff-dz.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size6, "factor", "coeff_dxx_", -> "3d.cube.size6/coeff-dxx.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size6, "factor", "coeff_dxy_", -> "3d.cube.size6/coeff-dxy.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size6, "factor", "coeff_dxz_", -> "3d.cube.size6/coeff-dxz.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size6, "factor", "coeff_dyy_", -> "3d.cube.size6/coeff-dyy.store.c"); -bytes used=13003236, alloc=1441528, time=1.46 -> print_interp_coeff_var_store(posn_list_3d_size6, "factor", "coeff_dyz_", -> "3d.cube.size6/coeff-dyz.store.c"); -> print_interp_coeff_var_store(posn_list_3d_size6, "factor", "coeff_dzz_", -> "3d.cube.size6/coeff-dzz.store.c"); -> -> print_name_list_dcl(map(coeff_name, posn_list_3d_size6, "coeff_I_"), "fp", -> "3d.cube.size6/coeff-I.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size6, "coeff_dx_"), "fp", -> "3d.cube.size6/coeff-dx.dcl.c"); -bytes used=14003676, alloc=1441528, time=1.56 -> print_name_list_dcl(map(coeff_name, posn_list_3d_size6, "coeff_dy_"), "fp", -> "3d.cube.size6/coeff-dy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size6, "coeff_dz_"), "fp", -> "3d.cube.size6/coeff-dz.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size6, "coeff_dxx_"), "fp", -> "3d.cube.size6/coeff-dxx.dcl.c"); -bytes used=15003832, alloc=1507052, time=1.66 -> print_name_list_dcl(map(coeff_name, posn_list_3d_size6, "coeff_dxy_"), "fp", -> "3d.cube.size6/coeff-dxy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size6, "coeff_dxz_"), "fp", -> "3d.cube.size6/coeff-dxz.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size6, "coeff_dyy_"), "fp", -> "3d.cube.size6/coeff-dyy.dcl.c"); -> print_name_list_dcl(map(coeff_name, posn_list_3d_size6, "coeff_dyz_"), "fp", -> "3d.cube.size6/coeff-dyz.dcl.c"); -bytes used=16004056, alloc=1507052, time=1.75 -> print_name_list_dcl(map(coeff_name, posn_list_3d_size6, "coeff_dzz_"), "fp", -> "3d.cube.size6/coeff-dzz.dcl.c"); -> -> print_interp_cmpt__lc_of_data(posn_list_3d_size6, -> "result", "coeff_I_", "data_", -> "3d.cube.size6/interp-I.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size6, -> "result", "coeff_dx_", "data_", -> "3d.cube.size6/interp-dx.compute.c"); -bytes used=17004252, alloc=1507052, time=1.87 -> print_interp_cmpt__lc_of_data(posn_list_3d_size6, -> "result", "coeff_dy_", "data_", -> "3d.cube.size6/interp-dy.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size6, -> "result", "coeff_dz_", "data_", -> "3d.cube.size6/interp-dz.compute.c"); -bytes used=18004412, alloc=1507052, time=1.96 -> print_interp_cmpt__lc_of_data(posn_list_3d_size6, -> "result", "coeff_dxx_", "data_", -> "3d.cube.size6/interp-dxx.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size6, -> "result", "coeff_dxy_", "data_", -> "3d.cube.size6/interp-dxy.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size6, -> "result", "coeff_dxz_", "data_", -> "3d.cube.size6/interp-dxz.compute.c"); -bytes used=19004640, alloc=1572576, time=2.08 -> print_interp_cmpt__lc_of_data(posn_list_3d_size6, -> "result", "coeff_dyy_", "data_", -> "3d.cube.size6/interp-dyy.compute.c"); -> print_interp_cmpt__lc_of_data(posn_list_3d_size6, -> "result", "coeff_dyz_", "data_", -> "3d.cube.size6/interp-dyz.compute.c"); -bytes used=20004924, alloc=1572576, time=2.21 -> print_interp_cmpt__lc_of_data(posn_list_3d_size6, -> "result", "coeff_dzz_", "data_", -> "3d.cube.size6/interp-dzz.compute.c"); +> 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_fetch_data(posn_list_3d_size6, "data->data_", +> "3d.cube.size6/fetch-data.c"); +> print_evaluate_molecule(posn_list_3d_size6, +> "coeffs->coeff_", "data->data_", +> "3d.cube.size6/evaluate-molecule.c"); +bytes used=3000572, alloc=1310480, time=0.30 +> print_store_coeffs(posn_list_3d_size6, +> "factor * coeffs->coeff_", +> "3d.cube.size6/store-coeffs.c"); > quit -bytes used=20694964, alloc=1572576, time=2.28 +bytes used=3528664, alloc=1310480, time=0.36 diff --git a/src/GeneralizedPolynomial-Uniform/common/3d.maple b/src/GeneralizedPolynomial-Uniform/common/3d.maple index 62f82ea..b18be68 100644 --- a/src/GeneralizedPolynomial-Uniform/common/3d.maple +++ b/src/GeneralizedPolynomial-Uniform/common/3d.maple @@ -7,43 +7,22 @@ # generic stuff for 3d, cube, size=2 # -data_var_list_3d_size2 := map(data_var_name, posn_list_3d_size2, "data_"); - -print_name_list_dcl(data_var_list_3d_size2, "fp", - "3d.cube.size2/data-var.dcl.c"); -print_data_var_assign(posn_list_3d_size2, "data_", - "3d.cube.size2/data-var.assign.c"); - -print_interp_coeff_var_store(posn_list_3d_size2, "", "coeff_I_", - "3d.cube.size2/coeff-I.store.c"); -print_interp_coeff_var_store(posn_list_3d_size2, "factor", "coeff_dx_", - "3d.cube.size2/coeff-dx.store.c"); -print_interp_coeff_var_store(posn_list_3d_size2, "factor", "coeff_dy_", - "3d.cube.size2/coeff-dy.store.c"); -print_interp_coeff_var_store(posn_list_3d_size2, "factor", "coeff_dz_", - "3d.cube.size2/coeff-dz.store.c"); - -print_name_list_dcl(map(coeff_name, posn_list_3d_size2, "coeff_I_"), "fp", - "3d.cube.size2/coeff-I.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size2, "coeff_dx_"), "fp", - "3d.cube.size2/coeff-dx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size2, "coeff_dy_"), "fp", - "3d.cube.size2/coeff-dy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size2, "coeff_dz_"), "fp", - "3d.cube.size2/coeff-dz.dcl.c"); - -print_interp_cmpt__lc_of_data(posn_list_3d_size2, - "result", "coeff_I_", "data_", - "3d.cube.size2/interp-I.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size2, - "result", "coeff_dx_", "data_", - "3d.cube.size2/interp-dx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size2, - "result", "coeff_dy_", "data_", - "3d.cube.size2/interp-dy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size2, - "result", "coeff_dz_", "data_", - "3d.cube.size2/interp-dz.compute.c"); +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_fetch_data(posn_list_3d_size2, "data->data_", + "3d.cube.size2/fetch-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"); ################################################################################ @@ -51,85 +30,22 @@ print_interp_cmpt__lc_of_data(posn_list_3d_size2, # generic stuff for 3d, cube, size=3 # -data_var_list_3d_size3 := map(data_var_name, posn_list_3d_size3, "data_"); - -print_name_list_dcl(data_var_list_3d_size3, "fp", - "3d.cube.size3/data-var.dcl.c"); -print_data_var_assign(posn_list_3d_size3, "data_", - "3d.cube.size3/data-var.assign.c"); +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_interp_coeff_var_store(posn_list_3d_size3, "", "coeff_I_", - "3d.cube.size3/coeff-I.store.c"); -print_interp_coeff_var_store(posn_list_3d_size3, "factor", "coeff_dx_", - "3d.cube.size3/coeff-dx.store.c"); -print_interp_coeff_var_store(posn_list_3d_size3, "factor", "coeff_dy_", - "3d.cube.size3/coeff-dy.store.c"); -print_interp_coeff_var_store(posn_list_3d_size3, "factor", "coeff_dz_", - "3d.cube.size3/coeff-dz.store.c"); -print_interp_coeff_var_store(posn_list_3d_size3, "factor", "coeff_dxx_", - "3d.cube.size3/coeff-dxx.store.c"); -print_interp_coeff_var_store(posn_list_3d_size3, "factor", "coeff_dxy_", - "3d.cube.size3/coeff-dxy.store.c"); -print_interp_coeff_var_store(posn_list_3d_size3, "factor", "coeff_dxz_", - "3d.cube.size3/coeff-dxz.store.c"); -print_interp_coeff_var_store(posn_list_3d_size3, "factor", "coeff_dyy_", - "3d.cube.size3/coeff-dyy.store.c"); -print_interp_coeff_var_store(posn_list_3d_size3, "factor", "coeff_dyz_", - "3d.cube.size3/coeff-dyz.store.c"); -print_interp_coeff_var_store(posn_list_3d_size3, "factor", "coeff_dzz_", - "3d.cube.size3/coeff-dzz.store.c"); +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_name_list_dcl(map(coeff_name, posn_list_3d_size3, "coeff_I_"), "fp", - "3d.cube.size3/coeff-I.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size3, "coeff_dx_"), "fp", - "3d.cube.size3/coeff-dx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size3, "coeff_dy_"), "fp", - "3d.cube.size3/coeff-dy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size3, "coeff_dz_"), "fp", - "3d.cube.size3/coeff-dz.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size3, "coeff_dxx_"), "fp", - "3d.cube.size3/coeff-dxx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size3, "coeff_dxy_"), "fp", - "3d.cube.size3/coeff-dxy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size3, "coeff_dxz_"), "fp", - "3d.cube.size3/coeff-dxz.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size3, "coeff_dyy_"), "fp", - "3d.cube.size3/coeff-dyy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size3, "coeff_dyz_"), "fp", - "3d.cube.size3/coeff-dyz.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size3, "coeff_dzz_"), "fp", - "3d.cube.size3/coeff-dzz.dcl.c"); - -print_interp_cmpt__lc_of_data(posn_list_3d_size3, - "result", "coeff_I_", "data_", - "3d.cube.size3/interp-I.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size3, - "result", "coeff_dx_", "data_", - "3d.cube.size3/interp-dx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size3, - "result", "coeff_dy_", "data_", - "3d.cube.size3/interp-dy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size3, - "result", "coeff_dz_", "data_", - "3d.cube.size3/interp-dz.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size3, - "result", "coeff_dxx_", "data_", - "3d.cube.size3/interp-dxx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size3, - "result", "coeff_dxy_", "data_", - "3d.cube.size3/interp-dxy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size3, - "result", "coeff_dxz_", "data_", - "3d.cube.size3/interp-dxz.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size3, - "result", "coeff_dyy_", "data_", - "3d.cube.size3/interp-dyy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size3, - "result", "coeff_dyz_", "data_", - "3d.cube.size3/interp-dyz.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size3, - "result", "coeff_dzz_", "data_", - "3d.cube.size3/interp-dzz.compute.c"); +print_fetch_data(posn_list_3d_size3, "data->data_", + "3d.cube.size3/fetch-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"); ################################################################################ @@ -137,85 +53,22 @@ print_interp_cmpt__lc_of_data(posn_list_3d_size3, # generic stuff for 3d, cube, size=4 # -data_var_list_3d_size4 := map(data_var_name, posn_list_3d_size4, "data_"); - -print_name_list_dcl(data_var_list_3d_size4, "fp", - "3d.cube.size4/data-var.dcl.c"); -print_data_var_assign(posn_list_3d_size4, "data_", - "3d.cube.size4/data-var.assign.c"); +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_interp_coeff_var_store(posn_list_3d_size4, "", "coeff_I_", - "3d.cube.size4/coeff-I.store.c"); -print_interp_coeff_var_store(posn_list_3d_size4, "factor", "coeff_dx_", - "3d.cube.size4/coeff-dx.store.c"); -print_interp_coeff_var_store(posn_list_3d_size4, "factor", "coeff_dy_", - "3d.cube.size4/coeff-dy.store.c"); -print_interp_coeff_var_store(posn_list_3d_size4, "factor", "coeff_dz_", - "3d.cube.size4/coeff-dz.store.c"); -print_interp_coeff_var_store(posn_list_3d_size4, "factor", "coeff_dxx_", - "3d.cube.size4/coeff-dxx.store.c"); -print_interp_coeff_var_store(posn_list_3d_size4, "factor", "coeff_dxy_", - "3d.cube.size4/coeff-dxy.store.c"); -print_interp_coeff_var_store(posn_list_3d_size4, "factor", "coeff_dxz_", - "3d.cube.size4/coeff-dxz.store.c"); -print_interp_coeff_var_store(posn_list_3d_size4, "factor", "coeff_dyy_", - "3d.cube.size4/coeff-dyy.store.c"); -print_interp_coeff_var_store(posn_list_3d_size4, "factor", "coeff_dyz_", - "3d.cube.size4/coeff-dyz.store.c"); -print_interp_coeff_var_store(posn_list_3d_size4, "factor", "coeff_dzz_", - "3d.cube.size4/coeff-dzz.store.c"); +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_name_list_dcl(map(coeff_name, posn_list_3d_size4, "coeff_I_"), "fp", - "3d.cube.size4/coeff-I.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size4, "coeff_dx_"), "fp", - "3d.cube.size4/coeff-dx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size4, "coeff_dy_"), "fp", - "3d.cube.size4/coeff-dy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size4, "coeff_dz_"), "fp", - "3d.cube.size4/coeff-dz.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size4, "coeff_dxx_"), "fp", - "3d.cube.size4/coeff-dxx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size4, "coeff_dxy_"), "fp", - "3d.cube.size4/coeff-dxy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size4, "coeff_dxz_"), "fp", - "3d.cube.size4/coeff-dxz.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size4, "coeff_dyy_"), "fp", - "3d.cube.size4/coeff-dyy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size4, "coeff_dyz_"), "fp", - "3d.cube.size4/coeff-dyz.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size4, "coeff_dzz_"), "fp", - "3d.cube.size4/coeff-dzz.dcl.c"); - -print_interp_cmpt__lc_of_data(posn_list_3d_size4, - "result", "coeff_I_", "data_", - "3d.cube.size4/interp-I.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size4, - "result", "coeff_dx_", "data_", - "3d.cube.size4/interp-dx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size4, - "result", "coeff_dy_", "data_", - "3d.cube.size4/interp-dy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size4, - "result", "coeff_dz_", "data_", - "3d.cube.size4/interp-dz.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size4, - "result", "coeff_dxx_", "data_", - "3d.cube.size4/interp-dxx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size4, - "result", "coeff_dxy_", "data_", - "3d.cube.size4/interp-dxy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size4, - "result", "coeff_dxz_", "data_", - "3d.cube.size4/interp-dxz.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size4, - "result", "coeff_dyy_", "data_", - "3d.cube.size4/interp-dyy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size4, - "result", "coeff_dyz_", "data_", - "3d.cube.size4/interp-dyz.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size4, - "result", "coeff_dzz_", "data_", - "3d.cube.size4/interp-dzz.compute.c"); +print_fetch_data(posn_list_3d_size4, "data->data_", + "3d.cube.size4/fetch-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"); ################################################################################ @@ -223,170 +76,42 @@ print_interp_cmpt__lc_of_data(posn_list_3d_size4, # generic stuff for 3d, cube, size=5 # -data_var_list_3d_size5 := map(data_var_name, posn_list_3d_size5, "data_"); - -print_name_list_dcl(data_var_list_3d_size5, "fp", - "3d.cube.size5/data-var.dcl.c"); -print_data_var_assign(posn_list_3d_size5, "data_", - "3d.cube.size5/data-var.assign.c"); +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_interp_coeff_var_store(posn_list_3d_size5, "", "coeff_I_", - "3d.cube.size5/coeff-I.store.c"); -print_interp_coeff_var_store(posn_list_3d_size5, "factor", "coeff_dx_", - "3d.cube.size5/coeff-dx.store.c"); -print_interp_coeff_var_store(posn_list_3d_size5, "factor", "coeff_dy_", - "3d.cube.size5/coeff-dy.store.c"); -print_interp_coeff_var_store(posn_list_3d_size5, "factor", "coeff_dz_", - "3d.cube.size5/coeff-dz.store.c"); -print_interp_coeff_var_store(posn_list_3d_size5, "factor", "coeff_dxx_", - "3d.cube.size5/coeff-dxx.store.c"); -print_interp_coeff_var_store(posn_list_3d_size5, "factor", "coeff_dxy_", - "3d.cube.size5/coeff-dxy.store.c"); -print_interp_coeff_var_store(posn_list_3d_size5, "factor", "coeff_dxz_", - "3d.cube.size5/coeff-dxz.store.c"); -print_interp_coeff_var_store(posn_list_3d_size5, "factor", "coeff_dyy_", - "3d.cube.size5/coeff-dyy.store.c"); -print_interp_coeff_var_store(posn_list_3d_size5, "factor", "coeff_dyz_", - "3d.cube.size5/coeff-dyz.store.c"); -print_interp_coeff_var_store(posn_list_3d_size5, "factor", "coeff_dzz_", - "3d.cube.size5/coeff-dzz.store.c"); +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_name_list_dcl(map(coeff_name, posn_list_3d_size5, "coeff_I_"), "fp", - "3d.cube.size5/coeff-I.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size5, "coeff_dx_"), "fp", - "3d.cube.size5/coeff-dx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size5, "coeff_dy_"), "fp", - "3d.cube.size5/coeff-dy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size5, "coeff_dz_"), "fp", - "3d.cube.size5/coeff-dz.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size5, "coeff_dxx_"), "fp", - "3d.cube.size5/coeff-dxx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size5, "coeff_dxy_"), "fp", - "3d.cube.size5/coeff-dxy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size5, "coeff_dxz_"), "fp", - "3d.cube.size5/coeff-dxz.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size5, "coeff_dyy_"), "fp", - "3d.cube.size5/coeff-dyy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size5, "coeff_dyz_"), "fp", - "3d.cube.size5/coeff-dyz.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size5, "coeff_dzz_"), "fp", - "3d.cube.size5/coeff-dzz.dcl.c"); - -print_interp_cmpt__lc_of_data(posn_list_3d_size5, - "result", "coeff_I_", "data_", - "3d.cube.size5/interp-I.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size5, - "result", "coeff_dx_", "data_", - "3d.cube.size5/interp-dx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size5, - "result", "coeff_dy_", "data_", - "3d.cube.size5/interp-dy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size5, - "result", "coeff_dz_", "data_", - "3d.cube.size5/interp-dz.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size5, - "result", "coeff_dxx_", "data_", - "3d.cube.size5/interp-dxx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size5, - "result", "coeff_dxy_", "data_", - "3d.cube.size5/interp-dxy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size5, - "result", "coeff_dxz_", "data_", - "3d.cube.size5/interp-dxz.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size5, - "result", "coeff_dyy_", "data_", - "3d.cube.size5/interp-dyy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size5, - "result", "coeff_dyz_", "data_", - "3d.cube.size5/interp-dyz.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size5, - "result", "coeff_dzz_", "data_", - "3d.cube.size5/interp-dzz.compute.c"); +print_fetch_data(posn_list_3d_size5, "data->data_", + "3d.cube.size5/fetch-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=5 +# generic stuff for 3d, cube, size=6 # -data_var_list_3d_size6 := map(data_var_name, posn_list_3d_size6, "data_"); - -print_name_list_dcl(data_var_list_3d_size6, "fp", - "3d.cube.size6/data-var.dcl.c"); -print_data_var_assign(posn_list_3d_size6, "data_", - "3d.cube.size6/data-var.assign.c"); - -print_interp_coeff_var_store(posn_list_3d_size6, "", "coeff_I_", - "3d.cube.size6/coeff-I.store.c"); -print_interp_coeff_var_store(posn_list_3d_size6, "factor", "coeff_dx_", - "3d.cube.size6/coeff-dx.store.c"); -print_interp_coeff_var_store(posn_list_3d_size6, "factor", "coeff_dy_", - "3d.cube.size6/coeff-dy.store.c"); -print_interp_coeff_var_store(posn_list_3d_size6, "factor", "coeff_dz_", - "3d.cube.size6/coeff-dz.store.c"); -print_interp_coeff_var_store(posn_list_3d_size6, "factor", "coeff_dxx_", - "3d.cube.size6/coeff-dxx.store.c"); -print_interp_coeff_var_store(posn_list_3d_size6, "factor", "coeff_dxy_", - "3d.cube.size6/coeff-dxy.store.c"); -print_interp_coeff_var_store(posn_list_3d_size6, "factor", "coeff_dxz_", - "3d.cube.size6/coeff-dxz.store.c"); -print_interp_coeff_var_store(posn_list_3d_size6, "factor", "coeff_dyy_", - "3d.cube.size6/coeff-dyy.store.c"); -print_interp_coeff_var_store(posn_list_3d_size6, "factor", "coeff_dyz_", - "3d.cube.size6/coeff-dyz.store.c"); -print_interp_coeff_var_store(posn_list_3d_size6, "factor", "coeff_dzz_", - "3d.cube.size6/coeff-dzz.store.c"); - -print_name_list_dcl(map(coeff_name, posn_list_3d_size6, "coeff_I_"), "fp", - "3d.cube.size6/coeff-I.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size6, "coeff_dx_"), "fp", - "3d.cube.size6/coeff-dx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size6, "coeff_dy_"), "fp", - "3d.cube.size6/coeff-dy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size6, "coeff_dz_"), "fp", - "3d.cube.size6/coeff-dz.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size6, "coeff_dxx_"), "fp", - "3d.cube.size6/coeff-dxx.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size6, "coeff_dxy_"), "fp", - "3d.cube.size6/coeff-dxy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size6, "coeff_dxz_"), "fp", - "3d.cube.size6/coeff-dxz.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size6, "coeff_dyy_"), "fp", - "3d.cube.size6/coeff-dyy.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size6, "coeff_dyz_"), "fp", - "3d.cube.size6/coeff-dyz.dcl.c"); -print_name_list_dcl(map(coeff_name, posn_list_3d_size6, "coeff_dzz_"), "fp", - "3d.cube.size6/coeff-dzz.dcl.c"); - -print_interp_cmpt__lc_of_data(posn_list_3d_size6, - "result", "coeff_I_", "data_", - "3d.cube.size6/interp-I.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size6, - "result", "coeff_dx_", "data_", - "3d.cube.size6/interp-dx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size6, - "result", "coeff_dy_", "data_", - "3d.cube.size6/interp-dy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size6, - "result", "coeff_dz_", "data_", - "3d.cube.size6/interp-dz.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size6, - "result", "coeff_dxx_", "data_", - "3d.cube.size6/interp-dxx.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size6, - "result", "coeff_dxy_", "data_", - "3d.cube.size6/interp-dxy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size6, - "result", "coeff_dxz_", "data_", - "3d.cube.size6/interp-dxz.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size6, - "result", "coeff_dyy_", "data_", - "3d.cube.size6/interp-dyy.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size6, - "result", "coeff_dyz_", "data_", - "3d.cube.size6/interp-dyz.compute.c"); -print_interp_cmpt__lc_of_data(posn_list_3d_size6, - "result", "coeff_dzz_", "data_", - "3d.cube.size6/interp-dzz.compute.c"); - -################################################################################ +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_fetch_data(posn_list_3d_size6, "data->data_", + "3d.cube.size6/fetch-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"); diff --git a/src/GeneralizedPolynomial-Uniform/common/evaluate.c b/src/GeneralizedPolynomial-Uniform/common/evaluate.c new file mode 100644 index 0000000..166cfdf --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/evaluate.c @@ -0,0 +1,135 @@ +/* evaluate.c -- evaluate a molecule (as a linear combination of the data) */ +/* $Header$ */ + +#include "cctk.h" +#include "../InterpLocalUniform.h" + +#include "structs.h" +#include "evaluate.h" + +/******************************************************************************/ + +/* + * 1-D routines + */ + +fp LocalInterp_eval_1d_cube2(const struct coeffs_struct_1d_cube_size2 *coeffs, + const struct data_struct_1d_cube_size2 *data) +{ +return + #include "1d.cube.size2/evaluate-molecule.c" +} + +fp LocalInterp_eval_1d_cube3(const struct coeffs_struct_1d_cube_size3 *coeffs, + const struct data_struct_1d_cube_size3 *data) +{ +#include "1d.cube.size3/evaluate-molecule.c" +} + +fp LocalInterp_eval_1d_cube4(const struct coeffs_struct_1d_cube_size4 *coeffs, + const struct data_struct_1d_cube_size4 *data) +{ +return + #include "1d.cube.size4/evaluate-molecule.c" +} + +fp LocalInterp_eval_1d_cube5(const struct coeffs_struct_1d_cube_size5 *coeffs, + const struct data_struct_1d_cube_size5 *data) +{ +return + #include "1d.cube.size5/evaluate-molecule.c" +} + +fp LocalInterp_eval_1d_cube6(const struct coeffs_struct_1d_cube_size6 *coeffs, + const struct data_struct_1d_cube_size6 *data) +{ +return + #include "1d.cube.size6/evaluate-molecule.c" +} + +fp LocalInterp_eval_1d_cube7(const struct coeffs_struct_1d_cube_size7 *coeffs, + const struct data_struct_1d_cube_size7 *data) +{ +return + #include "1d.cube.size7/evaluate-molecule.c" +} + +/******************************************************************************/ + +/* + * 2-D routines + */ + +fp LocalInterp_eval_2d_cube2(const struct coeffs_struct_2d_cube_size2 *coeffs, + const struct data_struct_2d_cube_size2 *data) +{ +return + #include "2d.cube.size2/evaluate-molecule.c" +} + +fp LocalInterp_eval_2d_cube3(const struct coeffs_struct_2d_cube_size3 *coeffs, + const struct data_struct_2d_cube_size3 *data) +{ +#include "2d.cube.size3/evaluate-molecule.c" +} + +fp LocalInterp_eval_2d_cube4(const struct coeffs_struct_2d_cube_size4 *coeffs, + const struct data_struct_2d_cube_size4 *data) +{ +return + #include "2d.cube.size4/evaluate-molecule.c" +} + +fp LocalInterp_eval_2d_cube5(const struct coeffs_struct_2d_cube_size5 *coeffs, + const struct data_struct_2d_cube_size5 *data) +{ +return + #include "2d.cube.size5/evaluate-molecule.c" +} + +fp LocalInterp_eval_2d_cube6(const struct coeffs_struct_2d_cube_size6 *coeffs, + const struct data_struct_2d_cube_size6 *data) +{ +return + #include "2d.cube.size6/evaluate-molecule.c" +} + +/******************************************************************************/ + +/* + * 3-D routines + */ + +fp LocalInterp_eval_3d_cube2(const struct coeffs_struct_3d_cube_size2 *coeffs, + const struct data_struct_3d_cube_size2 *data) +{ +return + #include "3d.cube.size2/evaluate-molecule.c" +} + +fp LocalInterp_eval_3d_cube3(const struct coeffs_struct_3d_cube_size3 *coeffs, + const struct data_struct_3d_cube_size3 *data) +{ +#include "3d.cube.size3/evaluate-molecule.c" +} + +fp LocalInterp_eval_3d_cube4(const struct coeffs_struct_3d_cube_size4 *coeffs, + const struct data_struct_3d_cube_size4 *data) +{ +return + #include "3d.cube.size4/evaluate-molecule.c" +} + +fp LocalInterp_eval_3d_cube5(const struct coeffs_struct_3d_cube_size5 *coeffs, + const struct data_struct_3d_cube_size5 *data) +{ +return + #include "3d.cube.size5/evaluate-molecule.c" +} + +fp LocalInterp_eval_3d_cube6(const struct coeffs_struct_3d_cube_size6 *coeffs, + const struct data_struct_3d_cube_size6 *data) +{ +return + #include "3d.cube.size6/evaluate-molecule.c" +} diff --git a/src/GeneralizedPolynomial-Uniform/common/evaluate.h b/src/GeneralizedPolynomial-Uniform/common/evaluate.h new file mode 100644 index 0000000..fa8c252 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/evaluate.h @@ -0,0 +1,44 @@ +/* evaluate.h -- evaluate a molecule (as a linear combination of the data) */ +/* $Header$ */ + +/* + * prerequisite headers: + * "cctk.h" + * "../InterpLocalUniform.h" + * "structs.h" + */ + +fp LocalInterp_eval_1d_cube2(const struct coeffs_struct_1d_cube_size2 *coeffs, + const struct data_struct_1d_cube_size2 *data); +fp LocalInterp_eval_1d_cube3(const struct coeffs_struct_1d_cube_size3 *coeffs, + const struct data_struct_1d_cube_size3 *data); +fp LocalInterp_eval_1d_cube4(const struct coeffs_struct_1d_cube_size4 *coeffs, + const struct data_struct_1d_cube_size4 *data); +fp LocalInterp_eval_1d_cube5(const struct coeffs_struct_1d_cube_size5 *coeffs, + const struct data_struct_1d_cube_size5 *data); +fp LocalInterp_eval_1d_cube6(const struct coeffs_struct_1d_cube_size6 *coeffs, + const struct data_struct_1d_cube_size6 *data); +fp LocalInterp_eval_1d_cube7(const struct coeffs_struct_1d_cube_size7 *coeffs, + const struct data_struct_1d_cube_size7 *data); + +fp LocalInterp_eval_2d_cube2(const struct coeffs_struct_2d_cube_size2 *coeffs, + const struct data_struct_2d_cube_size2 *data); +fp LocalInterp_eval_2d_cube3(const struct coeffs_struct_2d_cube_size3 *coeffs, + const struct data_struct_2d_cube_size3 *data); +fp LocalInterp_eval_2d_cube4(const struct coeffs_struct_2d_cube_size4 *coeffs, + const struct data_struct_2d_cube_size4 *data); +fp LocalInterp_eval_2d_cube5(const struct coeffs_struct_2d_cube_size5 *coeffs, + const struct data_struct_2d_cube_size5 *data); +fp LocalInterp_eval_2d_cube6(const struct coeffs_struct_2d_cube_size6 *coeffs, + const struct data_struct_2d_cube_size6 *data); + +fp LocalInterp_eval_3d_cube2(const struct coeffs_struct_3d_cube_size2 *coeffs, + const struct data_struct_3d_cube_size2 *data); +fp LocalInterp_eval_3d_cube3(const struct coeffs_struct_3d_cube_size3 *coeffs, + const struct data_struct_3d_cube_size3 *data); +fp LocalInterp_eval_3d_cube4(const struct coeffs_struct_3d_cube_size4 *coeffs, + const struct data_struct_3d_cube_size4 *data); +fp LocalInterp_eval_3d_cube5(const struct coeffs_struct_3d_cube_size5 *coeffs, + const struct data_struct_3d_cube_size5 *data); +fp LocalInterp_eval_3d_cube6(const struct coeffs_struct_3d_cube_size6 *coeffs, + const struct data_struct_3d_cube_size6 *data); diff --git a/src/GeneralizedPolynomial-Uniform/common/fetch-template.c b/src/GeneralizedPolynomial-Uniform/common/fetch-template.c new file mode 100644 index 0000000..5da0b01 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/fetch-template.c @@ -0,0 +1,94 @@ +/* fetch-template.c -- template for fetch functions */ +/* $Header$ */ + +/* + * Each of the functions defined in this file fetches a molecule-sized + * piece of an input array into a data struct. There is one function for + * each combination of molecule size and input array datatype. + */ + +/******************************************************************************/ + +/* + * fetch-data routines for real datatypes + */ + +#undef DATA +#define DATA DATA_REAL + +void FETCH_FUNCTION_NAME(r)(const CCTK_REAL *ptr, + INT_STRIDE_IJK, + struct DATA_STRUCT *data) +{ +#include FETCH_DATA_FILE_NAME +} + +#ifdef HAVE_CCTK_REAL4 + void FETCH_FUNCTION_NAME(r4)(const CCTK_REAL4 *ptr, + INT_STRIDE_IJK, + struct DATA_STRUCT *data) + { + #include FETCH_DATA_FILE_NAME + } +#endif + +#ifdef HAVE_CCTK_REAL8 + void FETCH_FUNCTION_NAME(r8)(const CCTK_REAL8 *ptr, + INT_STRIDE_IJK, + struct DATA_STRUCT *data) + { + #include FETCH_DATA_FILE_NAME + } +#endif + +#ifdef HAVE_CCTK_REAL16 + void FETCH_FUNCTION_NAME(r16)(const CCTK_REAL16 *ptr, + INT_STRIDE_IJK, + struct DATA_STRUCT *data) + { + #include FETCH_DATA_FILE_NAME + } +#endif + +/******************************************************************************/ + +/* + * fetch-data routines for complex datatypes + */ + +#undef DATA +#define DATA DATA_COMPLEX + +void FETCH_FUNCTION_NAME(c)(const CCTK_REAL (*ptr)[COMPLEX_N_PARTS], + INT_STRIDE_IJK, int part, + struct DATA_STRUCT *data) +{ +#include FETCH_DATA_FILE_NAME +} + +#ifdef HAVE_CCTK_COMPLEX8 + void FETCH_FUNCTION_NAME(c8)(const CCTK_REAL4 (*ptr)[COMPLEX_N_PARTS], + INT_STRIDE_IJK, int part, + struct DATA_STRUCT *data) + { + #include FETCH_DATA_FILE_NAME + } +#endif + +#ifdef HAVE_CCTK_COMPLEX16 + void FETCH_FUNCTION_NAME(c16)(const CCTK_REAL8 (*ptr)[COMPLEX_N_PARTS], + INT_STRIDE_IJK, int part, + struct DATA_STRUCT *data) + { + #include FETCH_DATA_FILE_NAME + } +#endif + +#ifdef HAVE_CCTK_COMPLEX32 + void FETCH_FUNCTION_NAME(c32)(const CCTK_REAL16 (*ptr)[COMPLEX_N_PARTS], + INT_STRIDE_IJK, int part, + struct DATA_STRUCT *data) + { + #include FETCH_DATA_FILE_NAME + } +#endif diff --git a/src/GeneralizedPolynomial-Uniform/common/fetch-template.h b/src/GeneralizedPolynomial-Uniform/common/fetch-template.h new file mode 100644 index 0000000..1fc89e0 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/fetch-template.h @@ -0,0 +1,64 @@ +/* fetch-template.h -- prototype template for fetch functions */ +/* $Header$ */ + +/* + * Each of the functions defined in this file fetches a molecule-sized + * piece of an input array into a data struct. There is one function for + * each combination of molecule size and input array datatype. + */ + +/******************************************************************************/ + +/* + * fetch-data routines for real datatypes + */ + +void FETCH_FUNCTION_NAME(r)(const CCTK_REAL *ptr, + INT_STRIDE_IJK, + struct DATA_STRUCT *data); + +#ifdef HAVE_CCTK_REAL4 + void FETCH_FUNCTION_NAME(r4)(const CCTK_REAL4 *ptr, + INT_STRIDE_IJK, + struct DATA_STRUCT *data); +#endif + +#ifdef HAVE_CCTK_REAL8 + void FETCH_FUNCTION_NAME(r8)(const CCTK_REAL8 *ptr, + INT_STRIDE_IJK, + struct DATA_STRUCT *data); +#endif + +#ifdef HAVE_CCTK_REAL16 + void FETCH_FUNCTION_NAME(r16)(const CCTK_REAL16 *ptr, + INT_STRIDE_IJK, + struct DATA_STRUCT *data); +#endif + +/******************************************************************************/ + +/* + * fetch-data routines for complex datatypes + */ + +void FETCH_FUNCTION_NAME(c)(const CCTK_REAL (*ptr)[COMPLEX_N_PARTS], + INT_STRIDE_IJK, int part, + struct DATA_STRUCT *data); + +#ifdef HAVE_CCTK_COMPLEX8 + void FETCH_FUNCTION_NAME(c8)(const CCTK_REAL4 (*ptr)[COMPLEX_N_PARTS], + INT_STRIDE_IJK, int part, + struct DATA_STRUCT *data); +#endif + +#ifdef HAVE_CCTK_COMPLEX16 + void FETCH_FUNCTION_NAME(c16)(const CCTK_REAL8 (*ptr)[COMPLEX_N_PARTS], + INT_STRIDE_IJK, int part, + struct DATA_STRUCT *data); +#endif + +#ifdef HAVE_CCTK_COMPLEX32 + void FETCH_FUNCTION_NAME(c32)(const CCTK_REAL16 (*ptr)[COMPLEX_N_PARTS], + INT_STRIDE_IJK, int part, + struct DATA_STRUCT *data); +#endif diff --git a/src/GeneralizedPolynomial-Uniform/common/fetch.c b/src/GeneralizedPolynomial-Uniform/common/fetch.c new file mode 100644 index 0000000..ee4e5a1 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/fetch.c @@ -0,0 +1,179 @@ +/* fetch.c -- fetch molecule-sized piece of input array into struct data */ +/* $Header$ */ + +#include "cctk.h" +#include "../InterpLocalUniform.h" + +#include "structs.h" +#include "fetch.h" + +/******************************************************************************/ + +/* + * 1-D routines + */ + +#undef INT_STRIDE_IJK +#define INT_STRIDE_IJK int stride_i +#undef DATA_REAL +#define DATA_REAL(mi) ptr[stride_i*mi] +#undef DATA_COMPLEX +#define DATA_COMPLEX(mi) ptr[stride_i*mi][part] + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_1d_cube2_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_1d_cube_size2 +#undef FETCH_DATA_FILE_NAME +#define FETCH_DATA_FILE_NAME "1d.cube.size2/fetch-data.c" +#include "fetch-template.c" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_1d_cube3_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_1d_cube_size3 +#undef FETCH_DATA_FILE_NAME +#define FETCH_DATA_FILE_NAME "1d.cube.size3/fetch-data.c" +#include "fetch-template.c" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_1d_cube4_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_1d_cube_size4 +#undef FETCH_DATA_FILE_NAME +#define FETCH_DATA_FILE_NAME "1d.cube.size4/fetch-data.c" +#include "fetch-template.c" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_1d_cube5_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_1d_cube_size5 +#undef FETCH_DATA_FILE_NAME +#define FETCH_DATA_FILE_NAME "1d.cube.size5/fetch-data.c" +#include "fetch-template.c" +#undef FETCH_FUNCTION_NAME_PREFIX + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_1d_cube6_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_1d_cube_size6 +#undef FETCH_DATA_FILE_NAME +#define FETCH_DATA_FILE_NAME "1d.cube.size6/fetch-data.c" +#include "fetch-template.c" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_1d_cube7_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_1d_cube_size7 +#undef FETCH_DATA_FILE_NAME +#define FETCH_DATA_FILE_NAME "1d.cube.size7/fetch-data.c" +#include "fetch-template.c" + +/******************************************************************************/ + +/* + * 2-D routines + */ + +#undef INT_STRIDE_IJK +#define INT_STRIDE_IJK int stride_i, int stride_j +#undef DATA_REAL +#define DATA_REAL(mi,mj) ptr[stride_i*mi + stride_j*mj] +#undef DATA_COMPLEX +#define DATA_COMPLEX(mi,mj) ptr[stride_i*mi + stride_j*mj][part] + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_2d_cube2_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_2d_cube_size2 +#undef FETCH_DATA_FILE_NAME +#define FETCH_DATA_FILE_NAME "2d.cube.size2/fetch-data.c" +#include "fetch-template.c" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_2d_cube3_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_2d_cube_size3 +#undef FETCH_DATA_FILE_NAME +#define FETCH_DATA_FILE_NAME "2d.cube.size3/fetch-data.c" +#include "fetch-template.c" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_2d_cube4_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_2d_cube_size4 +#undef FETCH_DATA_FILE_NAME +#define FETCH_DATA_FILE_NAME "2d.cube.size4/fetch-data.c" +#include "fetch-template.c" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_2d_cube5_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_2d_cube_size5 +#undef FETCH_DATA_FILE_NAME +#define FETCH_DATA_FILE_NAME "2d.cube.size5/fetch-data.c" +#include "fetch-template.c" +#undef FETCH_FUNCTION_NAME_PREFIX + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_2d_cube6_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_2d_cube_size6 +#undef FETCH_DATA_FILE_NAME +#define FETCH_DATA_FILE_NAME "2d.cube.size6/fetch-data.c" +#include "fetch-template.c" + +/******************************************************************************/ + +/* + * 3-D routines + */ + +#undef INT_STRIDE_IJK +#define INT_STRIDE_IJK int stride_i, int stride_j, int stride_k +#undef DATA_REAL +#define DATA_REAL(mi,mj,mk) ptr[stride_i*mi + stride_j*mj + stride_k*mk] +#undef DATA_COMPLEX +#define DATA_COMPLEX(mi,mj,mk) ptr[stride_i*mi + stride_j*mj + stride_k*mk] \ + [part] + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_3d_cube2_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_3d_cube_size2 +#undef FETCH_DATA_FILE_NAME +#define FETCH_DATA_FILE_NAME "3d.cube.size2/fetch-data.c" +#include "fetch-template.c" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_3d_cube3_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_3d_cube_size3 +#undef FETCH_DATA_FILE_NAME +#define FETCH_DATA_FILE_NAME "3d.cube.size3/fetch-data.c" +#include "fetch-template.c" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_3d_cube4_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_3d_cube_size4 +#undef FETCH_DATA_FILE_NAME +#define FETCH_DATA_FILE_NAME "3d.cube.size4/fetch-data.c" +#include "fetch-template.c" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_3d_cube5_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_3d_cube_size5 +#undef FETCH_DATA_FILE_NAME +#define FETCH_DATA_FILE_NAME "3d.cube.size5/fetch-data.c" +#include "fetch-template.c" +#undef FETCH_FUNCTION_NAME_PREFIX + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_3d_cube6_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_3d_cube_size6 +#undef FETCH_DATA_FILE_NAME +#define FETCH_DATA_FILE_NAME "3d.cube.size6/fetch-data.c" +#include "fetch-template.c" diff --git a/src/GeneralizedPolynomial-Uniform/common/fetch.h b/src/GeneralizedPolynomial-Uniform/common/fetch.h new file mode 100644 index 0000000..04fa3e2 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/fetch.h @@ -0,0 +1,141 @@ +/* fetch.h -- fetch molecule-sized piece of input array into struct data */ +/* $Header$ */ + +/* + * prerequisite headers: + * "cctk.h" + * "../InterpLocalUniform.h" + * "structs.h" + */ + +/******************************************************************************/ + +/* + * 1-D fetch routines + */ + +#undef INT_STRIDE_IJK +#define INT_STRIDE_IJK int stride_i + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_1d_cube2_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_1d_cube_size2 +#include "fetch-template.h" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_1d_cube3_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_1d_cube_size3 +#include "fetch-template.h" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_1d_cube4_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_1d_cube_size4 +#include "fetch-template.h" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_1d_cube5_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_1d_cube_size5 +#include "fetch-template.h" +#undef FETCH_FUNCTION_NAME_PREFIX + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_1d_cube6_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_1d_cube_size6 +#include "fetch-template.h" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_1d_cube7_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_1d_cube_size7 +#include "fetch-template.h" + +/******************************************************************************/ + +/* + * 2-D fetch routines + */ + +#undef INT_STRIDE_IJK +#define INT_STRIDE_IJK int stride_i, int stride_j + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_2d_cube2_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_2d_cube_size2 +#include "fetch-template.h" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_2d_cube3_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_2d_cube_size3 +#include "fetch-template.h" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_2d_cube4_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_2d_cube_size4 +#include "fetch-template.h" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_2d_cube5_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_2d_cube_size5 +#include "fetch-template.h" +#undef FETCH_FUNCTION_NAME_PREFIX + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_2d_cube6_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_2d_cube_size6 +#include "fetch-template.h" + +/******************************************************************************/ + +/* + * 3-D fetch routines + */ + +#undef INT_STRIDE_IJK +#define INT_STRIDE_IJK int stride_i, int stride_j, int stride_k + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_3d_cube2_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_3d_cube_size2 +#include "fetch-template.h" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_3d_cube3_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_3d_cube_size3 +#include "fetch-template.h" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_3d_cube3_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_3d_cube_size3 +#include "fetch-template.h" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_3d_cube4_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_3d_cube_size4 +#include "fetch-template.h" + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_3d_cube5_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_3d_cube_size5 +#include "fetch-template.h" +#undef FETCH_FUNCTION_NAME_PREFIX + +#undef FETCH_FUNCTION_NAME +#define FETCH_FUNCTION_NAME(type) LocalInterp_fetch_3d_cube6_ ## type +#undef DATA_STRUCT +#define DATA_STRUCT data_struct_3d_cube_size6 +#include "fetch-template.h" diff --git a/src/GeneralizedPolynomial-Uniform/common/makefile b/src/GeneralizedPolynomial-Uniform/common/makefile index 77f2ead..03b634d 100644 --- a/src/GeneralizedPolynomial-Uniform/common/makefile +++ b/src/GeneralizedPolynomial-Uniform/common/makefile @@ -7,21 +7,21 @@ dirs : 1d.dirs 2d.dirs 3d.dirs .PHONY : 1d 1d : - -rm 1d.cube.size*/*.c + -rm -f 1d.cube.size*/*.c 1d.cube.size*/*.h cat ../util.maple ../interpolate.maple \ cube_posns.maple 1d.maple \ | maple 2>&1 >1d.log .PHONY : 2d 2d : - -rm 2d.cube.size*/*.c + -rm -f 2d.cube.size*/*.c 2d.cube.size*/*.h cat ../util.maple ../interpolate.maple \ cube_posns.maple 2d.maple \ | maple 2>&2 >2d.log .PHONY : 3d 3d : - -rm 3d.cube.size*/*.c + -rm -f 3d.cube.size*/*.c 3d.cube.size*/*.h cat ../util.maple ../interpolate.maple \ cube_posns.maple 3d.maple \ | maple 2>&2 >3d.log diff --git a/src/GeneralizedPolynomial-Uniform/common/store.c b/src/GeneralizedPolynomial-Uniform/common/store.c new file mode 100644 index 0000000..d074b34 --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/store.c @@ -0,0 +1,166 @@ +/* store.c -- store molecule coefficients in Jacobian */ +/* $Header$ */ + +#include "cctk.h" +#include "../InterpLocalUniform.h" + +#include "structs.h" +#include "store.h" + +/******************************************************************************/ + +/* + * 1-D routines + */ + +#undef COEFF +#define COEFF(mi) Jacobian_ptr[Jacobian_mi_stride*mi] + +void LocalInterp_store_1d_cube2 + (fp factor, const struct coeffs_struct_1d_cube_size2 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride) +{ +#include "1d.cube.size2/store-coeffs.c" +} + +void LocalInterp_store_1d_cube3 + (fp factor, const struct coeffs_struct_1d_cube_size3 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride) +{ +#include "1d.cube.size3/store-coeffs.c" +} + +void LocalInterp_store_1d_cube4 + (fp factor, const struct coeffs_struct_1d_cube_size4 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride) +{ +#include "1d.cube.size4/store-coeffs.c" +} + +void LocalInterp_store_1d_cube5 + (fp factor, const struct coeffs_struct_1d_cube_size5 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride) +{ +#include "1d.cube.size5/store-coeffs.c" +} + +void LocalInterp_store_1d_cube6 + (fp factor, const struct coeffs_struct_1d_cube_size6 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride) +{ +#include "1d.cube.size6/store-coeffs.c" +} + +void LocalInterp_store_1d_cube7 + (fp factor, const struct coeffs_struct_1d_cube_size7 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride) +{ +#include "1d.cube.size7/store-coeffs.c" +} + +/******************************************************************************/ + +/* + * 2-D routines + */ + +#undef COEFF +#define COEFF(mi,mj) Jacobian_ptr[ Jacobian_mi_stride*mi \ + + Jacobian_mj_stride*mj ] + +void LocalInterp_store_2d_cube2 + (fp factor, const struct coeffs_struct_2d_cube_size2 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride) +{ +#include "2d.cube.size2/store-coeffs.c" +} + +void LocalInterp_store_2d_cube3 + (fp factor, const struct coeffs_struct_2d_cube_size3 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride) +{ +#include "2d.cube.size3/store-coeffs.c" +} + +void LocalInterp_store_2d_cube4 + (fp factor, const struct coeffs_struct_2d_cube_size4 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride) +{ +#include "2d.cube.size4/store-coeffs.c" +} + +void LocalInterp_store_2d_cube5 + (fp factor, const struct coeffs_struct_2d_cube_size5 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride) +{ +#include "2d.cube.size5/store-coeffs.c" +} + +void LocalInterp_store_2d_cube6 + (fp factor, const struct coeffs_struct_2d_cube_size6 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride) +{ +#include "2d.cube.size6/store-coeffs.c" +} + +/******************************************************************************/ + +/* + * 3-D routines + */ + +#undef COEFF +#define COEFF(mi,mj,mk) Jacobian_ptr[ Jacobian_mi_stride*mi \ + + Jacobian_mj_stride*mj \ + + Jacobian_mk_stride*mk ] + +void LocalInterp_store_3d_cube2 + (fp factor, const struct coeffs_struct_3d_cube_size2 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride, int Jacobian_mk_stride) +{ +#include "3d.cube.size2/store-coeffs.c" +} + +void LocalInterp_store_3d_cube3 + (fp factor, const struct coeffs_struct_3d_cube_size3 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride, int Jacobian_mk_stride) +{ +#include "3d.cube.size3/store-coeffs.c" +} + +void LocalInterp_store_3d_cube4 + (fp factor, const struct coeffs_struct_3d_cube_size4 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride, int Jacobian_mk_stride) +{ +#include "3d.cube.size4/store-coeffs.c" +} + +void LocalInterp_store_3d_cube5 + (fp factor, const struct coeffs_struct_3d_cube_size5 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride, int Jacobian_mk_stride) +{ +#include "3d.cube.size5/store-coeffs.c" +} + +void LocalInterp_store_3d_cube6 + (fp factor, const struct coeffs_struct_3d_cube_size6 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride, int Jacobian_mk_stride) +{ +#include "3d.cube.size6/store-coeffs.c" +} diff --git a/src/GeneralizedPolynomial-Uniform/common/store.h b/src/GeneralizedPolynomial-Uniform/common/store.h new file mode 100644 index 0000000..e0911af --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/common/store.h @@ -0,0 +1,76 @@ +/* store.h -- store molecule coefficients in Jacobian */ +/* $Header$ */ + +/* + * prerequisite headers: + * "cctk.h" + * "../InterpLocalUniform.h" + * "structs.h" + */ + +void LocalInterp_store_1d_cube2 + (fp factor, const struct coeffs_struct_1d_cube_size2 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride); +void LocalInterp_store_1d_cube3 + (fp factor, const struct coeffs_struct_1d_cube_size3 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride); +void LocalInterp_store_1d_cube4 + (fp factor, const struct coeffs_struct_1d_cube_size4 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride); +void LocalInterp_store_1d_cube5 + (fp factor, const struct coeffs_struct_1d_cube_size5 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride); +void LocalInterp_store_1d_cube6 + (fp factor, const struct coeffs_struct_1d_cube_size6 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride); +void LocalInterp_store_1d_cube7 + (fp factor, const struct coeffs_struct_1d_cube_size7 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride); + +void LocalInterp_store_2d_cube2 + (fp factor, const struct coeffs_struct_2d_cube_size2 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride); +void LocalInterp_store_2d_cube3 + (fp factor, const struct coeffs_struct_2d_cube_size3 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride); +void LocalInterp_store_2d_cube4 + (fp factor, const struct coeffs_struct_2d_cube_size4 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride); +void LocalInterp_store_2d_cube5 + (fp factor, const struct coeffs_struct_2d_cube_size5 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride); +void LocalInterp_store_2d_cube6 + (fp factor, const struct coeffs_struct_2d_cube_size6 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride); + +void LocalInterp_store_3d_cube2 + (fp factor, const struct coeffs_struct_3d_cube_size2 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride, int Jacobian_mk_stride); +void LocalInterp_store_3d_cube3 + (fp factor, const struct coeffs_struct_3d_cube_size3 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride, int Jacobian_mk_stride); +void LocalInterp_store_3d_cube4 + (fp factor, const struct coeffs_struct_3d_cube_size4 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride, int Jacobian_mk_stride); +void LocalInterp_store_3d_cube5 + (fp factor, const struct coeffs_struct_3d_cube_size5 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride, int Jacobian_mk_stride); +void LocalInterp_store_3d_cube6 + (fp factor, const struct coeffs_struct_3d_cube_size6 *coeffs, + fp Jacobian_ptr[], + int Jacobian_mi_stride, int Jacobian_mj_stride, int Jacobian_mk_stride); diff --git a/src/GeneralizedPolynomial-Uniform/common/structs.h b/src/GeneralizedPolynomial-Uniform/common/structs.h index 39daf12..07481ca 100644 --- a/src/GeneralizedPolynomial-Uniform/common/structs.h +++ b/src/GeneralizedPolynomial-Uniform/common/structs.h @@ -1,6 +1,12 @@ /* structs.h -- definitions of data/coeffsicient structures */ /* $Header$ */ +/* + * prerequisite headers: + * "cctk.h" + * "../InterpLocalUniform.h" + */ + /******************************************************************************/ /* @@ -11,69 +17,69 @@ struct data_struct_1d_cube_size2 { - #include "1d.cube.size2/data-dcl.h"; - } + #include "1d.cube.size2/data-dcl.h" + }; struct data_struct_1d_cube_size3 { - #include "1d.cube.size3/data-dcl.h"; + #include "1d.cube.size3/data-dcl.h" }; struct data_struct_1d_cube_size4 { - #include "1d.cube.size4/data-dcl.h"; + #include "1d.cube.size4/data-dcl.h" }; struct data_struct_1d_cube_size5 { - #include "1d.cube.size5/data-dcl.h"; + #include "1d.cube.size5/data-dcl.h" }; struct data_struct_1d_cube_size6 { - #include "1d.cube.size6/data-dcl.h"; + #include "1d.cube.size6/data-dcl.h" }; struct data_struct_1d_cube_size7 { - #include "1d.cube.size7/data-dcl.h"; + #include "1d.cube.size7/data-dcl.h" }; struct data_struct_2d_cube_size2 { - #include "2d.cube.size2/data-dcl.h"; - } + #include "2d.cube.size2/data-dcl.h" + }; struct data_struct_2d_cube_size3 { - #include "2d.cube.size3/data-dcl.h"; + #include "2d.cube.size3/data-dcl.h" }; struct data_struct_2d_cube_size4 { - #include "2d.cube.size4/data-dcl.h"; + #include "2d.cube.size4/data-dcl.h" }; struct data_struct_2d_cube_size5 { - #include "2d.cube.size5/data-dcl.h"; + #include "2d.cube.size5/data-dcl.h" }; struct data_struct_2d_cube_size6 { - #include "2d.cube.size6/data-dcl.h"; + #include "2d.cube.size6/data-dcl.h" }; struct data_struct_3d_cube_size2 { - #include "3d.cube.size2/data-dcl.h"; - } + #include "3d.cube.size2/data-dcl.h" + }; struct data_struct_3d_cube_size3 { - #include "3d.cube.size3/data-dcl.h"; + #include "3d.cube.size3/data-dcl.h" }; struct data_struct_3d_cube_size4 { - #include "3d.cube.size4/data-dcl.h"; + #include "3d.cube.size4/data-dcl.h" }; struct data_struct_3d_cube_size5 { - #include "3d.cube.size5/data-dcl.h"; + #include "3d.cube.size5/data-dcl.h" }; struct data_struct_3d_cube_size6 { - #include "3d.cube.size6/data-dcl.h"; + #include "3d.cube.size6/data-dcl.h" }; /******************************************************************************/ @@ -85,67 +91,67 @@ struct data_struct_3d_cube_size6 struct coeffs_struct_1d_cube_size2 { - #include "1d.cube.size2/coeffs-dcl.h"; - } + #include "1d.cube.size2/coeffs-dcl.h" + }; struct coeffs_struct_1d_cube_size3 { - #include "1d.cube.size3/coeffs-dcl.h"; + #include "1d.cube.size3/coeffs-dcl.h" }; struct coeffs_struct_1d_cube_size4 { - #include "1d.cube.size4/coeffs-dcl.h"; + #include "1d.cube.size4/coeffs-dcl.h" }; struct coeffs_struct_1d_cube_size5 { - #include "1d.cube.size5/coeffs-dcl.h"; + #include "1d.cube.size5/coeffs-dcl.h" }; struct coeffs_struct_1d_cube_size6 { - #include "1d.cube.size6/coeffs-dcl.h"; + #include "1d.cube.size6/coeffs-dcl.h" }; struct coeffs_struct_1d_cube_size7 { - #include "1d.cube.size7/coeffs-dcl.h"; + #include "1d.cube.size7/coeffs-dcl.h" }; struct coeffs_struct_2d_cube_size2 { - #include "2d.cube.size2/coeffs-dcl.h"; - } + #include "2d.cube.size2/coeffs-dcl.h" + }; struct coeffs_struct_2d_cube_size3 { - #include "2d.cube.size3/coeffs-dcl.h"; + #include "2d.cube.size3/coeffs-dcl.h" }; struct coeffs_struct_2d_cube_size4 { - #include "2d.cube.size4/coeffs-dcl.h"; + #include "2d.cube.size4/coeffs-dcl.h" }; struct coeffs_struct_2d_cube_size5 { - #include "2d.cube.size5/coeffs-dcl.h"; + #include "2d.cube.size5/coeffs-dcl.h" }; struct coeffs_struct_2d_cube_size6 { - #include "2d.cube.size6/coeffs-dcl.h"; + #include "2d.cube.size6/coeffs-dcl.h" }; struct coeffs_struct_3d_cube_size2 { - #include "3d.cube.size2/coeffs-dcl.h"; - } + #include "3d.cube.size2/coeffs-dcl.h" + }; struct coeffs_struct_3d_cube_size3 { - #include "3d.cube.size3/coeffs-dcl.h"; + #include "3d.cube.size3/coeffs-dcl.h" }; struct coeffs_struct_3d_cube_size4 { - #include "3d.cube.size4/coeffs-dcl.h"; + #include "3d.cube.size4/coeffs-dcl.h" }; struct coeffs_struct_3d_cube_size5 { - #include "3d.cube.size5/coeffs-dcl.h"; + #include "3d.cube.size5/coeffs-dcl.h" }; struct coeffs_struct_3d_cube_size6 { - #include "3d.cube.size6/coeffs-dcl.h"; + #include "3d.cube.size6/coeffs-dcl.h" }; -- cgit v1.2.3