diff options
author | jthorn <jthorn@df1f8a13-aa1d-4dd4-9681-27ded5b42416> | 2002-09-01 18:10:41 +0000 |
---|---|---|
committer | jthorn <jthorn@df1f8a13-aa1d-4dd4-9681-27ded5b42416> | 2002-09-01 18:10:41 +0000 |
commit | f66e9bbb167e3e3e98b0647e30fa22139d6f28f0 (patch) | |
tree | 01b5d8d23679ef302f5df71c1a62fe1bb1b6628e /src/GeneralizedPolynomial-Uniform/common/2d.cube.size3 | |
parent | 5ae03060c304e68a184efaf4d77a6d46d3bd24ce (diff) |
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
Diffstat (limited to 'src/GeneralizedPolynomial-Uniform/common/2d.cube.size3')
5 files changed, 45 insertions, 0 deletions
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; |