# 2d.maple -- compute Hermite interpolation coefficients in 2-D # $Header$ ################################################################################ # # 2d, cube, polynomial order=3, derivatives via 3-point order=2 formula # ==> overall order=2, 4-point molecule # # interpolating polynomial interp_2d_cube_order2 := Hermite_polynomial_interpolant(fn_2d_order3, coeff_set_2d_order3, [x,y], { {x} = deriv_2d_dx_3point, {y} = deriv_2d_dy_3point, {x,y} = deriv_2d_dxy_3point }, {op(posn_list_2d_size2)}, {op(posn_list_2d_size2)}); # I coeff_as_lc_of_data(%, posn_list_2d_size4); print_coeff__lc_of_data(%, "coeff_I_", "fp", "2d.coeffs/2d.cube.order2/coeff-I.compute.c"); # d/dx simplify( diff(interp_2d_cube_order2,x) ); coeff_as_lc_of_data(%, posn_list_2d_size4); print_coeff__lc_of_data(%, "coeff_dx_", "fp", "2d.coeffs/2d.cube.order2/coeff-dx.compute.c"); # d/dy simplify( diff(interp_2d_cube_order2,y) ); coeff_as_lc_of_data(%, posn_list_2d_size4); print_coeff__lc_of_data(%, "coeff_dy_", "fp", "2d.coeffs/2d.cube.order2/coeff-dy.compute.c"); # d^2/dx^2 simplify( diff(interp_2d_cube_order2,x,x) ); coeff_as_lc_of_data(%, posn_list_2d_size4); print_coeff__lc_of_data(%, "coeff_dxx_", "fp", "2d.coeffs/2d.cube.order2/coeff-dxx.compute.c"); # d^2/dxdy simplify( diff(interp_2d_cube_order2,x,y) ); coeff_as_lc_of_data(%, posn_list_2d_size4); print_coeff__lc_of_data(%, "coeff_dxy_", "fp", "2d.coeffs/2d.cube.order2/coeff-dxy.compute.c"); # d^2/dy^2 simplify( diff(interp_2d_cube_order2,y,y) ); coeff_as_lc_of_data(%, posn_list_2d_size4); print_coeff__lc_of_data(%, "coeff_dyy_", "fp", "2d.coeffs/2d.cube.order2/coeff-dyy.compute.c"); ################################################################################ # # 2d, cube, polynomial order=3, derivatives via 5-point order=4 formula # ==> overall order=3, 6-point molecule # # interpolating polynomial interp_2d_cube_order3 := Hermite_polynomial_interpolant(fn_2d_order3, coeff_set_2d_order3, [x,y], { {x} = deriv_2d_dx_5point, {y} = deriv_2d_dy_5point, {x,y} = deriv_2d_dxy_5point }, {op(posn_list_2d_size2)}, {op(posn_list_2d_size2)}); # I coeff_as_lc_of_data(%, posn_list_2d_size6); print_coeff__lc_of_data(%, "coeff_I_", "fp", "2d.coeffs/2d.cube.order3/coeff-I.compute.c"); # d/dx simplify( diff(interp_2d_cube_order3,x) ); coeff_as_lc_of_data(%, posn_list_2d_size6); print_coeff__lc_of_data(%, "coeff_dx_", "fp", "2d.coeffs/2d.cube.order3/coeff-dx.compute.c"); # d/dy simplify( diff(interp_2d_cube_order3,y) ); coeff_as_lc_of_data(%, posn_list_2d_size6); print_coeff__lc_of_data(%, "coeff_dy_", "fp", "2d.coeffs/2d.cube.order3/coeff-dy.compute.c"); # d^2/dx^2 simplify( diff(interp_2d_cube_order3,x,x) ); coeff_as_lc_of_data(%, posn_list_2d_size6); print_coeff__lc_of_data(%, "coeff_dxx_", "fp", "2d.coeffs/2d.cube.order3/coeff-dxx.compute.c"); # d^2/dxdy simplify( diff(interp_2d_cube_order3,x,y) ); coeff_as_lc_of_data(%, posn_list_2d_size6); print_coeff__lc_of_data(%, "coeff_dxy_", "fp", "2d.coeffs/2d.cube.order3/coeff-dxy.compute.c"); # d^2/dy^2 simplify( diff(interp_2d_cube_order3,y,y) ); coeff_as_lc_of_data(%, posn_list_2d_size6); print_coeff__lc_of_data(%, "coeff_dyy_", "fp", "2d.coeffs/2d.cube.order3/coeff-dyy.compute.c"); ################################################################################