diff options
Diffstat (limited to 'src/GeneralizedPolynomial-Uniform/Lagrange/3d.maple')
-rw-r--r-- | src/GeneralizedPolynomial-Uniform/Lagrange/3d.maple | 248 |
1 files changed, 248 insertions, 0 deletions
diff --git a/src/GeneralizedPolynomial-Uniform/Lagrange/3d.maple b/src/GeneralizedPolynomial-Uniform/Lagrange/3d.maple new file mode 100644 index 0000000..615387d --- /dev/null +++ b/src/GeneralizedPolynomial-Uniform/Lagrange/3d.maple @@ -0,0 +1,248 @@ +# 3d.maple -- compute Lagrange interpolation coefficients in 3-D +# $Id$ + +################################################################################ + +# +# 3d, cube, order=1, smoothing=0 (size=2) +# + +# interpolating polynomial +interp_3d_cube_order1_smooth0 + := Lagrange_polynomial_interpolant(fn_3d_order1, coeff_list_3d_order1, + coord_list_3d, posn_list_3d_size2); + +# I +coeff_as_lc_of_data(%, posn_list_3d_size2); +print_coeff__lc_of_data(%, "coeff_I_", "fp", + "3d.coeffs/3d.cube.order1.smooth0/coeff-I.compute.c"); + +# d/dx +simplify( diff(interp_3d_cube_order1_smooth0,x) ); +coeff_as_lc_of_data(%, posn_list_3d_size2); +print_coeff__lc_of_data(%, "coeff_dx_", "fp", + "3d.coeffs/3d.cube.order1.smooth0/coeff-dx.compute.c"); + +# d/dy +simplify( diff(interp_3d_cube_order1_smooth0,y) ); +coeff_as_lc_of_data(%, posn_list_3d_size2); +print_coeff__lc_of_data(%, "coeff_dy_", "fp", + "3d.coeffs/3d.cube.order1.smooth0/coeff-dy.compute.c"); + +# d/dz +simplify( diff(interp_3d_cube_order1_smooth0,z) ); +coeff_as_lc_of_data(%, posn_list_3d_size2); +print_coeff__lc_of_data(%, "coeff_dz_", "fp", + "3d.coeffs/3d.cube.order1.smooth0/coeff-dz.compute.c"); + +################################################################################ + +# +# 3d, cube, order=2, smoothing=0 (size=3) +# + +# interpolating polynomial +interp_3d_cube_order2_smooth0 + := Lagrange_polynomial_interpolant(fn_3d_order2, coeff_list_3d_order2, + coord_list_3d, posn_list_3d_size3); + +# I +coeff_as_lc_of_data(%, posn_list_3d_size3); +print_coeff__lc_of_data(%, "coeff_I_", "fp", + "3d.coeffs/3d.cube.order2.smooth0/coeff-I.compute.c"); + +# d/dx +simplify( diff(interp_3d_cube_order2_smooth0,x) ); +coeff_as_lc_of_data(%, posn_list_3d_size3); +print_coeff__lc_of_data(%, "coeff_dx_", "fp", + "3d.coeffs/3d.cube.order2.smooth0/coeff-dx.compute.c"); + +# d/dy +simplify( diff(interp_3d_cube_order2_smooth0,y) ); +coeff_as_lc_of_data(%, posn_list_3d_size3); +print_coeff__lc_of_data(%, "coeff_dy_", "fp", + "3d.coeffs/3d.cube.order2.smooth0/coeff-dy.compute.c"); + +# d/dz +simplify( diff(interp_3d_cube_order2_smooth0,z) ); +coeff_as_lc_of_data(%, posn_list_3d_size3); +print_coeff__lc_of_data(%, "coeff_dz_", "fp", + "3d.coeffs/3d.cube.order2.smooth0/coeff-dz.compute.c"); + +# d^2/dx^2 +simplify( diff(interp_3d_cube_order2_smooth0,x,x) ); +coeff_as_lc_of_data(%, posn_list_3d_size3); +print_coeff__lc_of_data(%, "coeff_dxx_", "fp", + "3d.coeffs/3d.cube.order2.smooth0/coeff-dxx.compute.c"); + +# d^2/dxdy +simplify( diff(interp_3d_cube_order2_smooth0,x,y) ); +coeff_as_lc_of_data(%, posn_list_3d_size3); +print_coeff__lc_of_data(%, "coeff_dxy_", "fp", + "3d.coeffs/3d.cube.order2.smooth0/coeff-dxy.compute.c"); + +# d^2/dxdz +simplify( diff(interp_3d_cube_order2_smooth0,x,z) ); +coeff_as_lc_of_data(%, posn_list_3d_size3); +print_coeff__lc_of_data(%, "coeff_dxz_", "fp", + "3d.coeffs/3d.cube.order2.smooth0/coeff-dxz.compute.c"); + +# d^2/dy^2 +simplify( diff(interp_3d_cube_order2_smooth0,y,y) ); +coeff_as_lc_of_data(%, posn_list_3d_size3); +print_coeff__lc_of_data(%, "coeff_dyy_", "fp", + "3d.coeffs/3d.cube.order2.smooth0/coeff-dyy.compute.c"); + +# d^2/dydz +simplify( diff(interp_3d_cube_order2_smooth0,y,z) ); +coeff_as_lc_of_data(%, posn_list_3d_size3); +print_coeff__lc_of_data(%, "coeff_dyz_", "fp", + "3d.coeffs/3d.cube.order2.smooth0/coeff-dyz.compute.c"); + +# d^2/dz^2 +simplify( diff(interp_3d_cube_order2_smooth0,z,z) ); +coeff_as_lc_of_data(%, posn_list_3d_size3); +print_coeff__lc_of_data(%, "coeff_dzz_", "fp", + "3d.coeffs/3d.cube.order2.smooth0/coeff-dzz.compute.c"); + +################################################################################ + +# +# 3d, cube, order=3, smoothing=0 (size=4) +# + +# interpolating polynomial +interp_3d_cube_order3_smooth0 + := Lagrange_polynomial_interpolant(fn_3d_order3, coeff_list_3d_order3, + coord_list_3d, posn_list_3d_size4); + +# I +coeff_as_lc_of_data(%, posn_list_3d_size4); +print_coeff__lc_of_data(%, "coeff_I_", "fp", + "3d.coeffs/3d.cube.order3.smooth0/coeff-I.compute.c"); + +# d/dx +simplify( diff(interp_3d_cube_order3_smooth0,x) ); +coeff_as_lc_of_data(%, posn_list_3d_size4); +print_coeff__lc_of_data(%, "coeff_dx_", "fp", + "3d.coeffs/3d.cube.order3.smooth0/coeff-dx.compute.c"); + +# d/dy +simplify( diff(interp_3d_cube_order3_smooth0,y) ); +coeff_as_lc_of_data(%, posn_list_3d_size4); +print_coeff__lc_of_data(%, "coeff_dy_", "fp", + "3d.coeffs/3d.cube.order3.smooth0/coeff-dy.compute.c"); + +# d/dz +simplify( diff(interp_3d_cube_order3_smooth0,z) ); +coeff_as_lc_of_data(%, posn_list_3d_size4); +print_coeff__lc_of_data(%, "coeff_dz_", "fp", + "3d.coeffs/3d.cube.order3.smooth0/coeff-dz.compute.c"); + +# d^2/dx^2 +simplify( diff(interp_3d_cube_order3_smooth0,x,x) ); +coeff_as_lc_of_data(%, posn_list_3d_size4); +print_coeff__lc_of_data(%, "coeff_dxx_", "fp", + "3d.coeffs/3d.cube.order3.smooth0/coeff-dxx.compute.c"); + +# d^2/dxdy +simplify( diff(interp_3d_cube_order3_smooth0,x,y) ); +coeff_as_lc_of_data(%, posn_list_3d_size4); +print_coeff__lc_of_data(%, "coeff_dxy_", "fp", + "3d.coeffs/3d.cube.order3.smooth0/coeff-dxy.compute.c"); + +# d^2/dxdz +simplify( diff(interp_3d_cube_order3_smooth0,x,z) ); +coeff_as_lc_of_data(%, posn_list_3d_size4); +print_coeff__lc_of_data(%, "coeff_dxz_", "fp", + "3d.coeffs/3d.cube.order3.smooth0/coeff-dxz.compute.c"); + +# d^2/dy^2 +simplify( diff(interp_3d_cube_order3_smooth0,y,y) ); +coeff_as_lc_of_data(%, posn_list_3d_size4); +print_coeff__lc_of_data(%, "coeff_dyy_", "fp", + "3d.coeffs/3d.cube.order3.smooth0/coeff-dyy.compute.c"); + +# d^2/dydz +simplify( diff(interp_3d_cube_order3_smooth0,y,z) ); +coeff_as_lc_of_data(%, posn_list_3d_size4); +print_coeff__lc_of_data(%, "coeff_dyz_", "fp", + "3d.coeffs/3d.cube.order3.smooth0/coeff-dyz.compute.c"); + +# d^2/dz^2 +simplify( diff(interp_3d_cube_order3_smooth0,z,z) ); +coeff_as_lc_of_data(%, posn_list_3d_size4); +print_coeff__lc_of_data(%, "coeff_dzz_", "fp", + "3d.coeffs/3d.cube.order3.smooth0/coeff-dzz.compute.c"); + +################################################################################ + +# +# 3d, cube, order=4, smoothing=0 (size=5) +# + +# interpolating polynomial +interp_3d_cube_order4_smooth0 + := Lagrange_polynomial_interpolant(fn_3d_order4, coeff_list_3d_order4, + coord_list_3d, posn_list_3d_size5); + +# I +coeff_as_lc_of_data(%, posn_list_3d_size5); +print_coeff__lc_of_data(%, "coeff_I_", "fp", + "3d.coeffs/3d.cube.order4.smooth0/coeff-I.compute.c"); + +# d/dx +simplify( diff(interp_3d_cube_order4_smooth0,x) ); +coeff_as_lc_of_data(%, posn_list_3d_size5); +print_coeff__lc_of_data(%, "coeff_dx_", "fp", + "3d.coeffs/3d.cube.order4.smooth0/coeff-dx.compute.c"); + +# d/dy +simplify( diff(interp_3d_cube_order4_smooth0,y) ); +coeff_as_lc_of_data(%, posn_list_3d_size5); +print_coeff__lc_of_data(%, "coeff_dy_", "fp", + "3d.coeffs/3d.cube.order4.smooth0/coeff-dy.compute.c"); + +# d/dz +simplify( diff(interp_3d_cube_order4_smooth0,z) ); +coeff_as_lc_of_data(%, posn_list_3d_size5); +print_coeff__lc_of_data(%, "coeff_dz_", "fp", + "3d.coeffs/3d.cube.order4.smooth0/coeff-dz.compute.c"); + +# d^2/dx^2 +simplify( diff(interp_3d_cube_order4_smooth0,x,x) ); +coeff_as_lc_of_data(%, posn_list_3d_size5); +print_coeff__lc_of_data(%, "coeff_dxx_", "fp", + "3d.coeffs/3d.cube.order4.smooth0/coeff-dxx.compute.c"); + +# d^2/dxdy +simplify( diff(interp_3d_cube_order4_smooth0,x,y) ); +coeff_as_lc_of_data(%, posn_list_3d_size5); +print_coeff__lc_of_data(%, "coeff_dxy_", "fp", + "3d.coeffs/3d.cube.order4.smooth0/coeff-dxy.compute.c"); + +# d^2/dxdz +simplify( diff(interp_3d_cube_order4_smooth0,x,z) ); +coeff_as_lc_of_data(%, posn_list_3d_size5); +print_coeff__lc_of_data(%, "coeff_dxz_", "fp", + "3d.coeffs/3d.cube.order4.smooth0/coeff-dxz.compute.c"); + +# d^2/dy^2 +simplify( diff(interp_3d_cube_order4_smooth0,y,y) ); +coeff_as_lc_of_data(%, posn_list_3d_size5); +print_coeff__lc_of_data(%, "coeff_dyy_", "fp", + "3d.coeffs/3d.cube.order4.smooth0/coeff-dyy.compute.c"); + +# d^2/dydz +simplify( diff(interp_3d_cube_order4_smooth0,y,z) ); +coeff_as_lc_of_data(%, posn_list_3d_size5); +print_coeff__lc_of_data(%, "coeff_dyz_", "fp", + "3d.coeffs/3d.cube.order4.smooth0/coeff-dyz.compute.c"); + +# d^2/dz^2 +simplify( diff(interp_3d_cube_order4_smooth0,z,z) ); +coeff_as_lc_of_data(%, posn_list_3d_size5); +print_coeff__lc_of_data(%, "coeff_dzz_", "fp", + "3d.coeffs/3d.cube.order4.smooth0/coeff-dzz.compute.c"); + +################################################################################ |