diff --git a/fmm/src/field_translation/source_to_target.rs b/fmm/src/field_translation/source_to_target.rs index 4fd5aa98..9cdebbcc 100644 --- a/fmm/src/field_translation/source_to_target.rs +++ b/fmm/src/field_translation/source_to_target.rs @@ -464,7 +464,7 @@ pub mod uniform { let level_locals = self.level_locals[level as usize] .iter() - .map(|l| Mutex::new(l)) + .map(Mutex::new) .collect_vec(); (0..316).into_par_iter().for_each(|c_idx| { @@ -619,7 +619,7 @@ pub mod uniform { let level_locals = self.level_locals[level as usize] .iter() - .map(|inner_vec| Mutex::new(inner_vec)) + .map(Mutex::new) .collect_vec(); (0..316).into_par_iter().for_each(|c_idx| { @@ -652,8 +652,6 @@ pub mod uniform { if save_idx > -1 { let save_idx = save_idx as usize; for charge_vec_idx in 0..self.ncharge_vectors { - // let local_ptr = - // self.level_locals[level as usize][save_idx][charge_vec_idx].raw; let local_lock = level_locals[save_idx].lock().unwrap(); let local_send_ptr = local_lock[charge_vec_idx]; let local_ptr = local_send_ptr.raw; diff --git a/fmm/src/fmm.rs b/fmm/src/fmm.rs index 8b16df4c..8235081e 100644 --- a/fmm/src/fmm.rs +++ b/fmm/src/fmm.rs @@ -818,7 +818,7 @@ mod test { test_idx_vec.push(idx); } } - let leaf = &datatree.fmm.tree().get_all_leaves().unwrap()[test_idx_vec[3]]; + let leaf = &datatree.fmm.tree().get_all_leaves().unwrap()[test_idx_vec[0]]; let leaf_idx = datatree.fmm.tree().get_leaf_index(leaf).unwrap(); @@ -907,7 +907,7 @@ mod test { test_idx_vec.push(idx); } } - let leaf = &datatree.fmm.tree().get_all_leaves().unwrap()[test_idx_vec[3]]; + let leaf = &datatree.fmm.tree().get_all_leaves().unwrap()[test_idx_vec[0]]; let leaf_idx = datatree.fmm.tree().get_leaf_index(leaf).unwrap(); @@ -950,7 +950,7 @@ mod test { "rel_error = {rel_error} = {abs_error} / {}", direct.iter().sum::() ); - assert!(rel_error <= 1e-3); + assert!(rel_error <= 1e-5); } #[allow(clippy::too_many_arguments)] @@ -1169,7 +1169,7 @@ mod test { test_idx_vec.push(idx); } } - let leaf = &datatree.fmm.tree().get_all_leaves().unwrap()[test_idx_vec[3]]; + let leaf = &datatree.fmm.tree().get_all_leaves().unwrap()[test_idx_vec[0]]; let &leaf_idx = datatree.fmm.tree().get_leaf_index(leaf).unwrap(); let (l, r) = datatree.charge_index_pointer[leaf_idx];