diff --git a/field/src/fft.rs b/field/src/fft.rs index 8137216c..39f9bdf7 100644 --- a/field/src/fft.rs +++ b/field/src/fft.rs @@ -3,7 +3,6 @@ use fftw::{plan::*, types::*}; use num::Complex; use rayon::prelude::*; -use crate::types::{FftMatrixc32, FftMatrixc64, FftMatrixf32, FftMatrixf64}; pub trait Fft where diff --git a/field/src/field.rs b/field/src/field.rs index 8bb7047b..c9076073 100644 --- a/field/src/field.rs +++ b/field/src/field.rs @@ -30,7 +30,7 @@ use crate::{ fft::Fft, transfer_vector::compute_transfer_vectors, types::{ - FftFieldTranslationKiFmm, FftM2lOperatorData, FftMatrix, SvdFieldTranslationKiFmm, + FftFieldTranslationKiFmm, FftM2lOperatorData, SvdFieldTranslationKiFmm, SvdM2lOperatorData, TransferVector, }, }; diff --git a/field/src/types.rs b/field/src/types.rs index 5c1a3cda..64fadf38 100644 --- a/field/src/types.rs +++ b/field/src/types.rs @@ -127,22 +127,3 @@ where } } -/// Type alias for real coefficients for into FFTW wrappers -// pub type FftMatrixf64 = Matrix, Dynamic>, Dynamic>; -pub type FftMatrixf64 = Vec; - -/// Type alias for real coefficients for into FFTW wrappers -// pub type FftMatrixf32 = Matrix, Dynamic>, Dynamic>; -pub type FftMatrixf32 = Vec; - -/// Type alias for complex coefficients for FFTW wrappers -// pub type FftMatrixc64 = Matrix, Dynamic>, Dynamic>; -pub type FftMatrixc64 = Vec; - -/// Type alias for complex coefficients for FFTW wrappers -// pub type FftMatrixc32 = Matrix, Dynamic>, Dynamic>; -pub type FftMatrixc32 = Vec; - -/// Type alias for real coefficients for into FFTW wrappers -// pub type FftMatrix = Matrix, Dynamic>, Dynamic>; -pub type FftMatrix = Vec; diff --git a/fmm/src/field_translation/hashmap/source_to_target.rs b/fmm/src/field_translation/hashmap/source_to_target.rs index 650556b2..84c7144f 100644 --- a/fmm/src/field_translation/hashmap/source_to_target.rs +++ b/fmm/src/field_translation/hashmap/source_to_target.rs @@ -13,7 +13,7 @@ use rayon::prelude::*; use bempp_field::{ array::pad3, fft::Fft, - types::{FftFieldTranslationKiFmm, FftMatrix, SvdFieldTranslationKiFmm}, + types::{FftFieldTranslationKiFmm, SvdFieldTranslationKiFmm}, }; use bempp_traits::{ diff --git a/fmm/src/field_translation/linear/source_to_target.rs b/fmm/src/field_translation/linear/source_to_target.rs index 6ad2510d..66d6c2cb 100644 --- a/fmm/src/field_translation/linear/source_to_target.rs +++ b/fmm/src/field_translation/linear/source_to_target.rs @@ -16,7 +16,7 @@ use std::{ use bempp_field::{ array::pad3, fft::Fft, - types::{FftFieldTranslationKiFmm, FftMatrix, SvdFieldTranslationKiFmm}, + types::{FftFieldTranslationKiFmm, SvdFieldTranslationKiFmm}, }; use bempp_traits::{ @@ -338,7 +338,7 @@ where let Some(targets) = self.fmm.tree().get_keys(level) else { return; }; - let s = Instant::now(); + // let s = Instant::now(); // Form signals to use for convolution first let n = 2 * self.fmm.order - 1; let ntargets = targets.len(); @@ -449,7 +449,7 @@ where let ptr = check_potentials_hat_f_buffer.as_mut_ptr() as *mut Complex; check_potentials_hat_f = std::slice::from_raw_parts_mut(ptr, size_real * ntargets); } - println!("l={:?} Pre processing time {:?}", level, s.elapsed()); + // println!("l={:?} Pre processing time {:?}", level, s.elapsed()); // // Test that the signals in frequency order are correct // if level == 3 { @@ -461,7 +461,7 @@ where //////////////////////////////////////////////////////////////////////////////////// let zeros = vec![Complex::::zero(); nsiblings]; let scale = Complex::from(self.m2l_scale(level)); - let s = Instant::now(); + // let s = Instant::now(); let kernel_data_halo = &self.fmm.m2l.operator_data.kernel_data_rearranged; (0..size_real) .into_par_iter() @@ -498,14 +498,12 @@ where // if level == 2 { // println!("check_potentials_hat_f {:?}", &check_potentials_hat_f[ntargets..2*ntargets]); // } - println!("l={:?} kernel time {:?}", level, s.elapsed()); + // println!("l={:?} kernel time {:?}", level, s.elapsed()); //////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////// - let s = Instant::now(); + // let s = Instant::now(); - let level_locals = &self.level_locals[level as usize]; - // First step is to get check potentials back into target order from frequency order let mut check_potential_hat = vec![U::zero(); size_real * ntargets * 2]; let mut check_potential = vec![U::zero(); size * ntargets]; @@ -568,7 +566,7 @@ where }); - println!("l={:?} post processing time {:?}", level, s.elapsed()); + // println!("l={:?} post processing time {:?}", level, s.elapsed()); //////////////////////////////////////////////////////////////////////////////////// } diff --git a/fmm/src/fmm/linear.rs b/fmm/src/fmm/linear.rs index c261dd9f..1633f399 100644 --- a/fmm/src/fmm/linear.rs +++ b/fmm/src/fmm/linear.rs @@ -711,7 +711,9 @@ mod test { let datatree = FmmDataLinear::new(fmm, &charge_dict).unwrap(); - datatree.run(false); + let s = Instant::now(); + let times = datatree.run(true); + println!("runtime {:?}, operator times {:?}", s.elapsed(), times); // Test that direct computation is close to the FMM. let leaf = &datatree.fmm.tree.get_all_leaves().unwrap()[0];