From 10c5f8a1e34cc1f1e5d3b4f406512dcdfcd5979b Mon Sep 17 00:00:00 2001 From: Matthew Scroggs Date: Thu, 25 Jan 2024 11:15:02 +0000 Subject: [PATCH] comments --- bem/tests/fmm.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bem/tests/fmm.rs b/bem/tests/fmm.rs index 54bb44fd..802da702 100644 --- a/bem/tests/fmm.rs +++ b/bem/tests/fmm.rs @@ -38,8 +38,6 @@ fn test_fmm_prototype_dp0_dp0() { batched::assemble::<128>(&mut matrix, &kernel, &space, &space); // Compute using FMM method - let mut matrix2 = rlst_dynamic_array2!(f64, [ndofs, ndofs]); - const NPTS: usize = 16; let all_points = fmm_tools::get_all_quadrature_points::(&space); @@ -59,13 +57,16 @@ fn test_fmm_prototype_dp0_dp0() { k.data_mut(), ); - batched::assemble_singular_into_dense::<4, 128>(&mut matrix2, &kernel, &space, &space); let correction = batched::assemble_singular_correction_into_csr::(&kernel, &space, &space); let p_t = fmm_tools::transpose_basis_to_quadrature_into_csr::(&space); let p = fmm_tools::basis_to_quadrature_into_csr::(&space); + // matrix 2 = p_t @ k @ p - c + singular + let mut matrix2 = rlst_dynamic_array2!(f64, [ndofs, ndofs]); + batched::assemble_singular_into_dense::<4, 128>(&mut matrix2, &kernel, &space, &space); + let mut temp = rlst_dynamic_array2!(f64, [p_t.shape()[0], k.shape()[1]]); // temp = p_t @ k let mut row = 0; @@ -98,6 +99,7 @@ fn test_fmm_prototype_dp0_dp0() { *matrix2.get_mut([row, *j]).unwrap() -= correction.data()[i]; } + // Check two matrices are equal for i in 0..ndofs { for j in 0..ndofs { assert_relative_eq!(