X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=src%2FFEM%2FR1.hs;h=4794a3c939af6ac9a31624c04300d3e63c7ca274;hb=326e005a2deb8ed325df6408b6fbc2ca5ea38938;hp=57e2412c83af938f736200bee0ce2b83299cff5f;hpb=7882858773939371a684749f7a6c1e5eaf6ef9b2;p=numerical-analysis.git diff --git a/src/FEM/R1.hs b/src/FEM/R1.hs index 57e2412..4794a3c 100644 --- a/src/FEM/R1.hs +++ b/src/FEM/R1.hs @@ -599,7 +599,7 @@ solution pde params = mesh_with_ptr_rows = zip2 (mesh params) (rows2 ptr) make_local_coeffs :: (Interval a, Row (S n) Int) -> Row (S n) a - make_local_coeffs (interval, ptr_row) = + make_local_coeffs (_, ptr_row) = construct lambda where lambda _ j = if (ptr_row !!! (0,j)) == zero @@ -623,12 +623,11 @@ solution pde params = solved_column = map2 solve_piece $ mesh_with_coeffs solve_piece :: (Interval a, Row (S n) a) -> (Interval a, (a -> a)) - solve_piece (interval, coeffs_row) = (interval, f) + solve_piece (interval, coeffs_row) = (interval, g) where coeffs_col = transpose coeffs_row - f x = element_sum2 $ zipwith2 combine coeffs_col global_basis_functions + g x = element_sum2 $ zipwith2 combine coeffs_col global_basis_functions where xi = (affine interval) x combine ci ni = ci*(ni xi) -