From ab4a074ab4b7d1a0deea7188001f958674a2e2f0 Mon Sep 17 00:00:00 2001 From: Matthew Scroggs Date: Fri, 29 Sep 2023 13:53:26 +0100 Subject: [PATCH] format data from bempp-cl to take up less space --- bem/src/assembly/dense.rs | 692 +------------------------------------- 1 file changed, 18 insertions(+), 674 deletions(-) diff --git a/bem/src/assembly/dense.rs b/bem/src/assembly/dense.rs index 3f9e6c36..3a5e2685 100644 --- a/bem/src/assembly/dense.rs +++ b/bem/src/assembly/dense.rs @@ -526,88 +526,8 @@ mod test { ); // Compare to result from bempp-cl - let from_cl = vec![ - vec![ - 0.1854538822982487, - 0.08755414595678074, - 0.05963897421514472, - 0.08755414595678074, - 0.08755414595678074, - 0.05963897421514473, - 0.04670742127454548, - 0.05963897421514472, - ], - vec![ - 0.08755414595678074, - 0.1854538822982487, - 0.08755414595678074, - 0.05963897421514472, - 0.05963897421514472, - 0.08755414595678074, - 0.05963897421514473, - 0.04670742127454548, - ], - vec![ - 0.05963897421514472, - 0.08755414595678074, - 0.1854538822982487, - 0.08755414595678074, - 0.04670742127454548, - 0.05963897421514472, - 0.08755414595678074, - 0.05963897421514473, - ], - vec![ - 0.08755414595678074, - 0.05963897421514472, - 0.08755414595678074, - 0.1854538822982487, - 0.05963897421514473, - 0.04670742127454548, - 0.05963897421514472, - 0.08755414595678074, - ], - vec![ - 0.08755414595678074, - 0.05963897421514472, - 0.046707421274545476, - 0.05963897421514473, - 0.1854538822982487, - 0.08755414595678074, - 0.05963897421514472, - 0.08755414595678074, - ], - vec![ - 0.05963897421514473, - 0.08755414595678074, - 0.05963897421514472, - 0.046707421274545476, - 0.08755414595678074, - 0.1854538822982487, - 0.08755414595678074, - 0.05963897421514472, - ], - vec![ - 0.046707421274545476, - 0.05963897421514473, - 0.08755414595678074, - 0.05963897421514472, - 0.05963897421514472, - 0.08755414595678074, - 0.1854538822982487, - 0.08755414595678074, - ], - vec![ - 0.05963897421514472, - 0.046707421274545476, - 0.05963897421514473, - 0.08755414595678074, - 0.08755414595678074, - 0.05963897421514472, - 0.08755414595678074, - 0.1854538822982487, - ], - ]; + #[rustfmt::skip] + let from_cl = vec![vec![0.1854538822982487, 0.08755414595678074, 0.05963897421514472, 0.08755414595678074, 0.08755414595678074, 0.05963897421514473, 0.04670742127454548, 0.05963897421514472], vec![0.08755414595678074, 0.1854538822982487, 0.08755414595678074, 0.05963897421514472, 0.05963897421514472, 0.08755414595678074, 0.05963897421514473, 0.04670742127454548], vec![0.05963897421514472, 0.08755414595678074, 0.1854538822982487, 0.08755414595678074, 0.04670742127454548, 0.05963897421514472, 0.08755414595678074, 0.05963897421514473], vec![0.08755414595678074, 0.05963897421514472, 0.08755414595678074, 0.1854538822982487, 0.05963897421514473, 0.04670742127454548, 0.05963897421514472, 0.08755414595678074], vec![0.08755414595678074, 0.05963897421514472, 0.046707421274545476, 0.05963897421514473, 0.1854538822982487, 0.08755414595678074, 0.05963897421514472, 0.08755414595678074], vec![0.05963897421514473, 0.08755414595678074, 0.05963897421514472, 0.046707421274545476, 0.08755414595678074, 0.1854538822982487, 0.08755414595678074, 0.05963897421514472], vec![0.046707421274545476, 0.05963897421514473, 0.08755414595678074, 0.05963897421514472, 0.05963897421514472, 0.08755414595678074, 0.1854538822982487, 0.08755414595678074], vec![0.05963897421514472, 0.046707421274545476, 0.05963897421514473, 0.08755414595678074, 0.08755414595678074, 0.05963897421514472, 0.08755414595678074, 0.1854538822982487]]; for (i, row) in from_cl.iter().enumerate() { for (j, entry) in row.iter().enumerate() { @@ -640,88 +560,8 @@ mod test { ); // Compare to result from bempp-cl - let from_cl = vec![ - vec![ - -1.9658941517361406e-33, - -0.08477786720045567, - -0.048343860959178774, - -0.08477786720045567, - -0.08477786720045566, - -0.048343860959178774, - -0.033625570841778946, - -0.04834386095917877, - ], - vec![ - -0.08477786720045567, - -1.9658941517361406e-33, - -0.08477786720045567, - -0.048343860959178774, - -0.04834386095917877, - -0.08477786720045566, - -0.048343860959178774, - -0.033625570841778946, - ], - vec![ - -0.048343860959178774, - -0.08477786720045567, - -1.9658941517361406e-33, - -0.08477786720045567, - -0.033625570841778946, - -0.04834386095917877, - -0.08477786720045566, - -0.048343860959178774, - ], - vec![ - -0.08477786720045567, - -0.048343860959178774, - -0.08477786720045567, - -1.9658941517361406e-33, - -0.048343860959178774, - -0.033625570841778946, - -0.04834386095917877, - -0.08477786720045566, - ], - vec![ - -0.08477786720045566, - -0.04834386095917877, - -0.033625570841778946, - -0.04834386095917877, - 4.910045345075783e-33, - -0.08477786720045566, - -0.048343860959178774, - -0.08477786720045566, - ], - vec![ - -0.04834386095917877, - -0.08477786720045566, - -0.04834386095917877, - -0.033625570841778946, - -0.08477786720045566, - 4.910045345075783e-33, - -0.08477786720045566, - -0.048343860959178774, - ], - vec![ - -0.033625570841778946, - -0.04834386095917877, - -0.08477786720045566, - -0.04834386095917877, - -0.048343860959178774, - -0.08477786720045566, - 4.910045345075783e-33, - -0.08477786720045566, - ], - vec![ - -0.04834386095917877, - -0.033625570841778946, - -0.04834386095917877, - -0.08477786720045566, - -0.08477786720045566, - -0.048343860959178774, - -0.08477786720045566, - 4.910045345075783e-33, - ], - ]; + #[rustfmt::skip] + let from_cl = vec![vec![-1.9658941517361406e-33, -0.08477786720045567, -0.048343860959178774, -0.08477786720045567, -0.08477786720045566, -0.048343860959178774, -0.033625570841778946, -0.04834386095917877], vec![-0.08477786720045567, -1.9658941517361406e-33, -0.08477786720045567, -0.048343860959178774, -0.04834386095917877, -0.08477786720045566, -0.048343860959178774, -0.033625570841778946], vec![-0.048343860959178774, -0.08477786720045567, -1.9658941517361406e-33, -0.08477786720045567, -0.033625570841778946, -0.04834386095917877, -0.08477786720045566, -0.048343860959178774], vec![-0.08477786720045567, -0.048343860959178774, -0.08477786720045567, -1.9658941517361406e-33, -0.048343860959178774, -0.033625570841778946, -0.04834386095917877, -0.08477786720045566], vec![-0.08477786720045566, -0.04834386095917877, -0.033625570841778946, -0.04834386095917877, 4.910045345075783e-33, -0.08477786720045566, -0.048343860959178774, -0.08477786720045566], vec![-0.04834386095917877, -0.08477786720045566, -0.04834386095917877, -0.033625570841778946, -0.08477786720045566, 4.910045345075783e-33, -0.08477786720045566, -0.048343860959178774], vec![-0.033625570841778946, -0.04834386095917877, -0.08477786720045566, -0.04834386095917877, -0.048343860959178774, -0.08477786720045566, 4.910045345075783e-33, -0.08477786720045566], vec![-0.04834386095917877, -0.033625570841778946, -0.04834386095917877, -0.08477786720045566, -0.08477786720045566, -0.048343860959178774, -0.08477786720045566, 4.910045345075783e-33]]; for (i, row) in from_cl.iter().enumerate() { for (j, entry) in row.iter().enumerate() { @@ -754,88 +594,8 @@ mod test { ); // Compare to result from bempp-cl - let from_cl = vec![ - vec![ - 1.9658941517361406e-33, - -0.08478435261011981, - -0.048343860959178774, - -0.0847843526101198, - -0.08478435261011981, - -0.04834386095917877, - -0.033625570841778946, - -0.048343860959178774, - ], - vec![ - -0.0847843526101198, - 1.9658941517361406e-33, - -0.08478435261011981, - -0.048343860959178774, - -0.048343860959178774, - -0.08478435261011981, - -0.04834386095917877, - -0.033625570841778946, - ], - vec![ - -0.048343860959178774, - -0.0847843526101198, - 1.9658941517361406e-33, - -0.08478435261011981, - -0.033625570841778946, - -0.048343860959178774, - -0.08478435261011981, - -0.04834386095917877, - ], - vec![ - -0.08478435261011981, - -0.048343860959178774, - -0.0847843526101198, - 1.9658941517361406e-33, - -0.04834386095917877, - -0.033625570841778946, - -0.048343860959178774, - -0.08478435261011981, - ], - vec![ - -0.0847843526101198, - -0.04834386095917877, - -0.033625570841778946, - -0.04834386095917877, - -4.910045345075783e-33, - -0.0847843526101198, - -0.048343860959178774, - -0.08478435261011981, - ], - vec![ - -0.04834386095917877, - -0.0847843526101198, - -0.04834386095917877, - -0.033625570841778946, - -0.08478435261011981, - -4.910045345075783e-33, - -0.0847843526101198, - -0.048343860959178774, - ], - vec![ - -0.033625570841778946, - -0.04834386095917877, - -0.0847843526101198, - -0.04834386095917877, - -0.048343860959178774, - -0.08478435261011981, - -4.910045345075783e-33, - -0.0847843526101198, - ], - vec![ - -0.04834386095917877, - -0.033625570841778946, - -0.04834386095917877, - -0.0847843526101198, - -0.0847843526101198, - -0.048343860959178774, - -0.08478435261011981, - -4.910045345075783e-33, - ], - ]; + #[rustfmt::skip] + let from_cl = vec![vec![1.9658941517361406e-33, -0.08478435261011981, -0.048343860959178774, -0.0847843526101198, -0.08478435261011981, -0.04834386095917877, -0.033625570841778946, -0.048343860959178774], vec![-0.0847843526101198, 1.9658941517361406e-33, -0.08478435261011981, -0.048343860959178774, -0.048343860959178774, -0.08478435261011981, -0.04834386095917877, -0.033625570841778946], vec![-0.048343860959178774, -0.0847843526101198, 1.9658941517361406e-33, -0.08478435261011981, -0.033625570841778946, -0.048343860959178774, -0.08478435261011981, -0.04834386095917877], vec![-0.08478435261011981, -0.048343860959178774, -0.0847843526101198, 1.9658941517361406e-33, -0.04834386095917877, -0.033625570841778946, -0.048343860959178774, -0.08478435261011981], vec![-0.0847843526101198, -0.04834386095917877, -0.033625570841778946, -0.04834386095917877, -4.910045345075783e-33, -0.0847843526101198, -0.048343860959178774, -0.08478435261011981], vec![-0.04834386095917877, -0.0847843526101198, -0.04834386095917877, -0.033625570841778946, -0.08478435261011981, -4.910045345075783e-33, -0.0847843526101198, -0.048343860959178774], vec![-0.033625570841778946, -0.04834386095917877, -0.0847843526101198, -0.04834386095917877, -0.048343860959178774, -0.08478435261011981, -4.910045345075783e-33, -0.0847843526101198], vec![-0.04834386095917877, -0.033625570841778946, -0.04834386095917877, -0.0847843526101198, -0.0847843526101198, -0.048343860959178774, -0.08478435261011981, -4.910045345075783e-33]]; for (i, row) in from_cl.iter().enumerate() { for (j, entry) in row.iter().enumerate() { @@ -885,56 +645,8 @@ mod test { laplace_hypersingular_assemble(&mut matrix, &space, &space); // Compare to result from bempp-cl - let from_cl = vec![ - vec![ - 0.33550642155494004, - -0.10892459915262698, - -0.05664545560057827, - -0.05664545560057828, - -0.0566454556005783, - -0.05664545560057828, - ], - vec![ - -0.10892459915262698, - 0.33550642155494004, - -0.05664545560057828, - -0.05664545560057827, - -0.05664545560057828, - -0.05664545560057829, - ], - vec![ - -0.05664545560057828, - -0.05664545560057827, - 0.33550642155494004, - -0.10892459915262698, - -0.056645455600578286, - -0.05664545560057829, - ], - vec![ - -0.05664545560057827, - -0.05664545560057828, - -0.10892459915262698, - 0.33550642155494004, - -0.05664545560057828, - -0.056645455600578286, - ], - vec![ - -0.05664545560057829, - -0.0566454556005783, - -0.05664545560057829, - -0.05664545560057829, - 0.33550642155494004, - -0.10892459915262698, - ], - vec![ - -0.05664545560057829, - -0.05664545560057831, - -0.05664545560057829, - -0.05664545560057829, - -0.10892459915262698, - 0.33550642155494004, - ], - ]; + #[rustfmt::skip] + let from_cl = vec![vec![0.33550642155494004, -0.10892459915262698, -0.05664545560057827, -0.05664545560057828, -0.0566454556005783, -0.05664545560057828], vec![-0.10892459915262698, 0.33550642155494004, -0.05664545560057828, -0.05664545560057827, -0.05664545560057828, -0.05664545560057829], vec![-0.05664545560057828, -0.05664545560057827, 0.33550642155494004, -0.10892459915262698, -0.056645455600578286, -0.05664545560057829], vec![-0.05664545560057827, -0.05664545560057828, -0.10892459915262698, 0.33550642155494004, -0.05664545560057828, -0.056645455600578286], vec![-0.05664545560057829, -0.0566454556005783, -0.05664545560057829, -0.05664545560057829, 0.33550642155494004, -0.10892459915262698], vec![-0.05664545560057829, -0.05664545560057831, -0.05664545560057829, -0.05664545560057829, -0.10892459915262698, 0.33550642155494004]]; let perm = [0, 5, 2, 4, 3, 1]; @@ -973,88 +685,8 @@ mod test { ); // Compare to result from bempp-cl - let from_cl = vec![ - vec![ - 0.08742460357596939, - -0.02332791148192136, - -0.04211947809894265, - -0.02332791148192136, - -0.023327911481921364, - -0.042119478098942634, - -0.03447046598405515, - -0.04211947809894265, - ], - vec![ - -0.023327911481921364, - 0.08742460357596939, - -0.02332791148192136, - -0.04211947809894265, - -0.04211947809894265, - -0.02332791148192136, - -0.042119478098942634, - -0.03447046598405515, - ], - vec![ - -0.04211947809894265, - -0.02332791148192136, - 0.08742460357596939, - -0.02332791148192136, - -0.03447046598405515, - -0.04211947809894265, - -0.023327911481921364, - -0.042119478098942634, - ], - vec![ - -0.02332791148192136, - -0.04211947809894265, - -0.023327911481921364, - 0.08742460357596939, - -0.042119478098942634, - -0.03447046598405515, - -0.04211947809894265, - -0.02332791148192136, - ], - vec![ - -0.023327911481921364, - -0.04211947809894265, - -0.03447046598405515, - -0.042119478098942634, - 0.08742460357596939, - -0.02332791148192136, - -0.04211947809894265, - -0.023327911481921364, - ], - vec![ - -0.042119478098942634, - -0.02332791148192136, - -0.04211947809894265, - -0.034470465984055156, - -0.02332791148192136, - 0.08742460357596939, - -0.023327911481921364, - -0.04211947809894265, - ], - vec![ - -0.03447046598405515, - -0.042119478098942634, - -0.023327911481921364, - -0.04211947809894265, - -0.04211947809894265, - -0.023327911481921364, - 0.08742460357596939, - -0.02332791148192136, - ], - vec![ - -0.04211947809894265, - -0.034470465984055156, - -0.042119478098942634, - -0.02332791148192136, - -0.023327911481921364, - -0.04211947809894265, - -0.02332791148192136, - 0.08742460357596939, - ], - ]; + #[rustfmt::skip] + let from_cl = vec![vec![0.08742460357596939, -0.02332791148192136, -0.04211947809894265, -0.02332791148192136, -0.023327911481921364, -0.042119478098942634, -0.03447046598405515, -0.04211947809894265], vec![-0.023327911481921364, 0.08742460357596939, -0.02332791148192136, -0.04211947809894265, -0.04211947809894265, -0.02332791148192136, -0.042119478098942634, -0.03447046598405515], vec![-0.04211947809894265, -0.02332791148192136, 0.08742460357596939, -0.02332791148192136, -0.03447046598405515, -0.04211947809894265, -0.023327911481921364, -0.042119478098942634], vec![-0.02332791148192136, -0.04211947809894265, -0.023327911481921364, 0.08742460357596939, -0.042119478098942634, -0.03447046598405515, -0.04211947809894265, -0.02332791148192136], vec![-0.023327911481921364, -0.04211947809894265, -0.03447046598405515, -0.042119478098942634, 0.08742460357596939, -0.02332791148192136, -0.04211947809894265, -0.023327911481921364], vec![-0.042119478098942634, -0.02332791148192136, -0.04211947809894265, -0.034470465984055156, -0.02332791148192136, 0.08742460357596939, -0.023327911481921364, -0.04211947809894265], vec![-0.03447046598405515, -0.042119478098942634, -0.023327911481921364, -0.04211947809894265, -0.04211947809894265, -0.023327911481921364, 0.08742460357596939, -0.02332791148192136], vec![-0.04211947809894265, -0.034470465984055156, -0.042119478098942634, -0.02332791148192136, -0.023327911481921364, -0.04211947809894265, -0.02332791148192136, 0.08742460357596939]]; for (i, row) in from_cl.iter().enumerate() { for (j, entry) in row.iter().enumerate() { @@ -1086,88 +718,8 @@ mod test { ); // Compare to result from bempp-cl - let from_cl = vec![ - vec![ - Complex::new(0.08742460357596939, 0.11004203436820102), - Complex::new(-0.02332791148192136, 0.04919102584271124), - Complex::new(-0.04211947809894265, 0.003720159902487029), - Complex::new(-0.02332791148192136, 0.04919102584271125), - Complex::new(-0.023327911481921364, 0.04919102584271124), - Complex::new(-0.042119478098942634, 0.003720159902487025), - Complex::new(-0.03447046598405515, -0.02816544680626108), - Complex::new(-0.04211947809894265, 0.0037201599024870254), - ], - vec![ - Complex::new(-0.023327911481921364, 0.04919102584271125), - Complex::new(0.08742460357596939, 0.11004203436820104), - Complex::new(-0.02332791148192136, 0.04919102584271124), - Complex::new(-0.04211947809894265, 0.0037201599024870263), - Complex::new(-0.04211947809894265, 0.0037201599024870254), - Complex::new(-0.02332791148192136, 0.04919102584271125), - Complex::new(-0.042119478098942634, 0.003720159902487025), - Complex::new(-0.03447046598405515, -0.028165446806261072), - ], - vec![ - Complex::new(-0.04211947809894265, 0.003720159902487029), - Complex::new(-0.02332791148192136, 0.04919102584271125), - Complex::new(0.08742460357596939, 0.11004203436820102), - Complex::new(-0.02332791148192136, 0.04919102584271124), - Complex::new(-0.03447046598405515, -0.02816544680626108), - Complex::new(-0.04211947809894265, 0.0037201599024870254), - Complex::new(-0.023327911481921364, 0.04919102584271124), - Complex::new(-0.042119478098942634, 0.003720159902487025), - ], - vec![ - Complex::new(-0.02332791148192136, 0.04919102584271124), - Complex::new(-0.04211947809894265, 0.0037201599024870263), - Complex::new(-0.023327911481921364, 0.04919102584271125), - Complex::new(0.08742460357596939, 0.11004203436820104), - Complex::new(-0.042119478098942634, 0.003720159902487025), - Complex::new(-0.03447046598405515, -0.028165446806261072), - Complex::new(-0.04211947809894265, 0.0037201599024870254), - Complex::new(-0.02332791148192136, 0.04919102584271125), - ], - vec![ - Complex::new(-0.023327911481921364, 0.04919102584271125), - Complex::new(-0.04211947809894265, 0.0037201599024870263), - Complex::new(-0.03447046598405515, -0.02816544680626108), - Complex::new(-0.042119478098942634, 0.003720159902487025), - Complex::new(0.08742460357596939, 0.11004203436820104), - Complex::new(-0.02332791148192136, 0.04919102584271124), - Complex::new(-0.04211947809894265, 0.0037201599024870267), - Complex::new(-0.023327911481921364, 0.04919102584271125), - ], - vec![ - Complex::new(-0.042119478098942634, 0.003720159902487025), - Complex::new(-0.02332791148192136, 0.04919102584271125), - Complex::new(-0.04211947809894265, 0.0037201599024870263), - Complex::new(-0.034470465984055156, -0.028165446806261075), - Complex::new(-0.02332791148192136, 0.04919102584271124), - Complex::new(0.08742460357596939, 0.11004203436820104), - Complex::new(-0.023327911481921364, 0.04919102584271125), - Complex::new(-0.04211947809894265, 0.0037201599024870237), - ], - vec![ - Complex::new(-0.03447046598405515, -0.02816544680626108), - Complex::new(-0.042119478098942634, 0.003720159902487025), - Complex::new(-0.023327911481921364, 0.04919102584271125), - Complex::new(-0.04211947809894265, 0.0037201599024870263), - Complex::new(-0.04211947809894265, 0.0037201599024870267), - Complex::new(-0.023327911481921364, 0.04919102584271125), - Complex::new(0.08742460357596939, 0.11004203436820104), - Complex::new(-0.02332791148192136, 0.04919102584271124), - ], - vec![ - Complex::new(-0.04211947809894265, 0.0037201599024870263), - Complex::new(-0.034470465984055156, -0.028165446806261075), - Complex::new(-0.042119478098942634, 0.003720159902487025), - Complex::new(-0.02332791148192136, 0.04919102584271125), - Complex::new(-0.023327911481921364, 0.04919102584271125), - Complex::new(-0.04211947809894265, 0.0037201599024870237), - Complex::new(-0.02332791148192136, 0.04919102584271124), - Complex::new(0.08742460357596939, 0.11004203436820104), - ], - ]; + #[rustfmt::skip] + let from_cl = vec![vec![Complex::new(0.08742460357596939, 0.11004203436820102), Complex::new(-0.02332791148192136, 0.04919102584271124), Complex::new(-0.04211947809894265, 0.003720159902487029), Complex::new(-0.02332791148192136, 0.04919102584271125), Complex::new(-0.023327911481921364, 0.04919102584271124), Complex::new(-0.042119478098942634, 0.003720159902487025), Complex::new(-0.03447046598405515, -0.02816544680626108), Complex::new(-0.04211947809894265, 0.0037201599024870254)], vec![Complex::new(-0.023327911481921364, 0.04919102584271125), Complex::new(0.08742460357596939, 0.11004203436820104), Complex::new(-0.02332791148192136, 0.04919102584271124), Complex::new(-0.04211947809894265, 0.0037201599024870263), Complex::new(-0.04211947809894265, 0.0037201599024870254), Complex::new(-0.02332791148192136, 0.04919102584271125), Complex::new(-0.042119478098942634, 0.003720159902487025), Complex::new(-0.03447046598405515, -0.028165446806261072)], vec![Complex::new(-0.04211947809894265, 0.003720159902487029), Complex::new(-0.02332791148192136, 0.04919102584271125), Complex::new(0.08742460357596939, 0.11004203436820102), Complex::new(-0.02332791148192136, 0.04919102584271124), Complex::new(-0.03447046598405515, -0.02816544680626108), Complex::new(-0.04211947809894265, 0.0037201599024870254), Complex::new(-0.023327911481921364, 0.04919102584271124), Complex::new(-0.042119478098942634, 0.003720159902487025)], vec![Complex::new(-0.02332791148192136, 0.04919102584271124), Complex::new(-0.04211947809894265, 0.0037201599024870263), Complex::new(-0.023327911481921364, 0.04919102584271125), Complex::new(0.08742460357596939, 0.11004203436820104), Complex::new(-0.042119478098942634, 0.003720159902487025), Complex::new(-0.03447046598405515, -0.028165446806261072), Complex::new(-0.04211947809894265, 0.0037201599024870254), Complex::new(-0.02332791148192136, 0.04919102584271125)], vec![Complex::new(-0.023327911481921364, 0.04919102584271125), Complex::new(-0.04211947809894265, 0.0037201599024870263), Complex::new(-0.03447046598405515, -0.02816544680626108), Complex::new(-0.042119478098942634, 0.003720159902487025), Complex::new(0.08742460357596939, 0.11004203436820104), Complex::new(-0.02332791148192136, 0.04919102584271124), Complex::new(-0.04211947809894265, 0.0037201599024870267), Complex::new(-0.023327911481921364, 0.04919102584271125)], vec![Complex::new(-0.042119478098942634, 0.003720159902487025), Complex::new(-0.02332791148192136, 0.04919102584271125), Complex::new(-0.04211947809894265, 0.0037201599024870263), Complex::new(-0.034470465984055156, -0.028165446806261075), Complex::new(-0.02332791148192136, 0.04919102584271124), Complex::new(0.08742460357596939, 0.11004203436820104), Complex::new(-0.023327911481921364, 0.04919102584271125), Complex::new(-0.04211947809894265, 0.0037201599024870237)], vec![Complex::new(-0.03447046598405515, -0.02816544680626108), Complex::new(-0.042119478098942634, 0.003720159902487025), Complex::new(-0.023327911481921364, 0.04919102584271125), Complex::new(-0.04211947809894265, 0.0037201599024870263), Complex::new(-0.04211947809894265, 0.0037201599024870267), Complex::new(-0.023327911481921364, 0.04919102584271125), Complex::new(0.08742460357596939, 0.11004203436820104), Complex::new(-0.02332791148192136, 0.04919102584271124)], vec![Complex::new(-0.04211947809894265, 0.0037201599024870263), Complex::new(-0.034470465984055156, -0.028165446806261075), Complex::new(-0.042119478098942634, 0.003720159902487025), Complex::new(-0.02332791148192136, 0.04919102584271125), Complex::new(-0.023327911481921364, 0.04919102584271125), Complex::new(-0.04211947809894265, 0.0037201599024870237), Complex::new(-0.02332791148192136, 0.04919102584271124), Complex::new(0.08742460357596939, 0.11004203436820104)]]; for (i, row) in from_cl.iter().enumerate() { for (j, entry) in row.iter().enumerate() { assert_relative_eq!(matrix.get(i, j).unwrap().re, entry.re, epsilon = 1e-4); @@ -1200,88 +752,8 @@ mod test { ); // Compare to result from bempp-cl - let from_cl = vec![ - vec![ - Complex::new(-1.025266688854119e-33, -7.550086433767158e-36), - Complex::new(-0.07902626473768169, -0.08184681047051735), - Complex::new(0.01906923918000321, -0.10276858786959298), - Complex::new(-0.07902626473768172, -0.08184681047051737), - Complex::new(-0.07902626473768169, -0.08184681047051737), - Complex::new(0.01906923918000323, -0.10276858786959302), - Complex::new(0.10089706509966115, -0.07681163409722505), - Complex::new(0.019069239180003215, -0.10276858786959299), - ], - vec![ - Complex::new(-0.07902626473768172, -0.08184681047051737), - Complex::new(-1.025266688854119e-33, 1.0291684702482414e-35), - Complex::new(-0.0790262647376817, -0.08184681047051737), - Complex::new(0.019069239180003212, -0.10276858786959299), - Complex::new(0.019069239180003212, -0.10276858786959298), - Complex::new(-0.07902626473768168, -0.08184681047051737), - Complex::new(0.01906923918000323, -0.10276858786959299), - Complex::new(0.10089706509966115, -0.07681163409722506), - ], - vec![ - Complex::new(0.01906923918000321, -0.10276858786959298), - Complex::new(-0.07902626473768172, -0.08184681047051737), - Complex::new(-1.025266688854119e-33, -7.550086433767158e-36), - Complex::new(-0.07902626473768169, -0.08184681047051735), - Complex::new(0.10089706509966115, -0.07681163409722505), - Complex::new(0.019069239180003215, -0.10276858786959299), - Complex::new(-0.07902626473768169, -0.08184681047051737), - Complex::new(0.01906923918000323, -0.10276858786959302), - ], - vec![ - Complex::new(-0.0790262647376817, -0.08184681047051737), - Complex::new(0.019069239180003212, -0.10276858786959299), - Complex::new(-0.07902626473768172, -0.08184681047051737), - Complex::new(-1.025266688854119e-33, 1.0291684702482414e-35), - Complex::new(0.01906923918000323, -0.10276858786959299), - Complex::new(0.10089706509966115, -0.07681163409722506), - Complex::new(0.019069239180003212, -0.10276858786959298), - Complex::new(-0.07902626473768168, -0.08184681047051737), - ], - vec![ - Complex::new(-0.07902626473768172, -0.08184681047051737), - Complex::new(0.019069239180003215, -0.10276858786959298), - Complex::new(0.10089706509966115, -0.07681163409722505), - Complex::new(0.01906923918000323, -0.10276858786959299), - Complex::new(5.00373588753262e-33, -1.8116810507789718e-36), - Complex::new(-0.07902626473768169, -0.08184681047051735), - Complex::new(0.019069239180003212, -0.10276858786959299), - Complex::new(-0.07902626473768169, -0.08184681047051737), - ], - vec![ - Complex::new(0.019069239180003222, -0.10276858786959299), - Complex::new(-0.07902626473768173, -0.08184681047051737), - Complex::new(0.01906923918000322, -0.10276858786959299), - Complex::new(0.10089706509966115, -0.07681163409722506), - Complex::new(-0.07902626473768169, -0.08184681047051735), - Complex::new(7.314851820797302e-33, -1.088140415641433e-35), - Complex::new(-0.07902626473768169, -0.08184681047051737), - Complex::new(0.01906923918000322, -0.10276858786959299), - ], - vec![ - Complex::new(0.10089706509966115, -0.07681163409722505), - Complex::new(0.01906923918000323, -0.10276858786959299), - Complex::new(-0.07902626473768172, -0.08184681047051737), - Complex::new(0.019069239180003215, -0.10276858786959298), - Complex::new(0.019069239180003212, -0.10276858786959299), - Complex::new(-0.07902626473768169, -0.08184681047051737), - Complex::new(5.00373588753262e-33, -1.8116810507789718e-36), - Complex::new(-0.07902626473768169, -0.08184681047051735), - ], - vec![ - Complex::new(0.01906923918000322, -0.10276858786959299), - Complex::new(0.10089706509966115, -0.07681163409722506), - Complex::new(0.019069239180003222, -0.10276858786959299), - Complex::new(-0.07902626473768173, -0.08184681047051737), - Complex::new(-0.07902626473768169, -0.08184681047051737), - Complex::new(0.01906923918000322, -0.10276858786959299), - Complex::new(-0.07902626473768169, -0.08184681047051735), - Complex::new(7.314851820797302e-33, -1.088140415641433e-35), - ], - ]; + #[rustfmt::skip] + let from_cl = vec![vec![Complex::new(-1.025266688854119e-33, -7.550086433767158e-36), Complex::new(-0.07902626473768169, -0.08184681047051735), Complex::new(0.01906923918000321, -0.10276858786959298), Complex::new(-0.07902626473768172, -0.08184681047051737), Complex::new(-0.07902626473768169, -0.08184681047051737), Complex::new(0.01906923918000323, -0.10276858786959302), Complex::new(0.10089706509966115, -0.07681163409722505), Complex::new(0.019069239180003215, -0.10276858786959299)], vec![Complex::new(-0.07902626473768172, -0.08184681047051737), Complex::new(-1.025266688854119e-33, 1.0291684702482414e-35), Complex::new(-0.0790262647376817, -0.08184681047051737), Complex::new(0.019069239180003212, -0.10276858786959299), Complex::new(0.019069239180003212, -0.10276858786959298), Complex::new(-0.07902626473768168, -0.08184681047051737), Complex::new(0.01906923918000323, -0.10276858786959299), Complex::new(0.10089706509966115, -0.07681163409722506)], vec![Complex::new(0.01906923918000321, -0.10276858786959298), Complex::new(-0.07902626473768172, -0.08184681047051737), Complex::new(-1.025266688854119e-33, -7.550086433767158e-36), Complex::new(-0.07902626473768169, -0.08184681047051735), Complex::new(0.10089706509966115, -0.07681163409722505), Complex::new(0.019069239180003215, -0.10276858786959299), Complex::new(-0.07902626473768169, -0.08184681047051737), Complex::new(0.01906923918000323, -0.10276858786959302)], vec![Complex::new(-0.0790262647376817, -0.08184681047051737), Complex::new(0.019069239180003212, -0.10276858786959299), Complex::new(-0.07902626473768172, -0.08184681047051737), Complex::new(-1.025266688854119e-33, 1.0291684702482414e-35), Complex::new(0.01906923918000323, -0.10276858786959299), Complex::new(0.10089706509966115, -0.07681163409722506), Complex::new(0.019069239180003212, -0.10276858786959298), Complex::new(-0.07902626473768168, -0.08184681047051737)], vec![Complex::new(-0.07902626473768172, -0.08184681047051737), Complex::new(0.019069239180003215, -0.10276858786959298), Complex::new(0.10089706509966115, -0.07681163409722505), Complex::new(0.01906923918000323, -0.10276858786959299), Complex::new(5.00373588753262e-33, -1.8116810507789718e-36), Complex::new(-0.07902626473768169, -0.08184681047051735), Complex::new(0.019069239180003212, -0.10276858786959299), Complex::new(-0.07902626473768169, -0.08184681047051737)], vec![Complex::new(0.019069239180003222, -0.10276858786959299), Complex::new(-0.07902626473768173, -0.08184681047051737), Complex::new(0.01906923918000322, -0.10276858786959299), Complex::new(0.10089706509966115, -0.07681163409722506), Complex::new(-0.07902626473768169, -0.08184681047051735), Complex::new(7.314851820797302e-33, -1.088140415641433e-35), Complex::new(-0.07902626473768169, -0.08184681047051737), Complex::new(0.01906923918000322, -0.10276858786959299)], vec![Complex::new(0.10089706509966115, -0.07681163409722505), Complex::new(0.01906923918000323, -0.10276858786959299), Complex::new(-0.07902626473768172, -0.08184681047051737), Complex::new(0.019069239180003215, -0.10276858786959298), Complex::new(0.019069239180003212, -0.10276858786959299), Complex::new(-0.07902626473768169, -0.08184681047051737), Complex::new(5.00373588753262e-33, -1.8116810507789718e-36), Complex::new(-0.07902626473768169, -0.08184681047051735)], vec![Complex::new(0.01906923918000322, -0.10276858786959299), Complex::new(0.10089706509966115, -0.07681163409722506), Complex::new(0.019069239180003222, -0.10276858786959299), Complex::new(-0.07902626473768173, -0.08184681047051737), Complex::new(-0.07902626473768169, -0.08184681047051737), Complex::new(0.01906923918000322, -0.10276858786959299), Complex::new(-0.07902626473768169, -0.08184681047051735), Complex::new(7.314851820797302e-33, -1.088140415641433e-35)]]; for (i, row) in from_cl.iter().enumerate() { for (j, entry) in row.iter().enumerate() { @@ -1315,88 +787,8 @@ mod test { ); // Compare to result from bempp-cl - let from_cl = vec![ - vec![ - Complex::new(1.025266688854119e-33, 7.550086433767158e-36), - Complex::new(-0.079034545070751, -0.08184700030244885), - Complex::new(0.019069239180003205, -0.10276858786959298), - Complex::new(-0.07903454507075097, -0.08184700030244886), - Complex::new(-0.07903454507075099, -0.08184700030244887), - Complex::new(0.01906923918000323, -0.10276858786959299), - Complex::new(0.10089706509966115, -0.07681163409722505), - Complex::new(0.019069239180003212, -0.10276858786959298), - ], - vec![ - Complex::new(-0.07903454507075097, -0.08184700030244885), - Complex::new(1.025266688854119e-33, -1.0291684702482414e-35), - Complex::new(-0.079034545070751, -0.08184700030244887), - Complex::new(0.01906923918000321, -0.10276858786959298), - Complex::new(0.01906923918000321, -0.10276858786959298), - Complex::new(-0.07903454507075099, -0.08184700030244887), - Complex::new(0.019069239180003233, -0.10276858786959299), - Complex::new(0.10089706509966115, -0.07681163409722506), - ], - vec![ - Complex::new(0.019069239180003205, -0.10276858786959298), - Complex::new(-0.07903454507075097, -0.08184700030244886), - Complex::new(1.025266688854119e-33, 7.550086433767158e-36), - Complex::new(-0.079034545070751, -0.08184700030244885), - Complex::new(0.10089706509966115, -0.07681163409722505), - Complex::new(0.019069239180003212, -0.10276858786959298), - Complex::new(-0.07903454507075099, -0.08184700030244887), - Complex::new(0.01906923918000323, -0.10276858786959299), - ], - vec![ - Complex::new(-0.079034545070751, -0.08184700030244887), - Complex::new(0.01906923918000321, -0.10276858786959298), - Complex::new(-0.07903454507075097, -0.08184700030244885), - Complex::new(1.025266688854119e-33, -1.0291684702482414e-35), - Complex::new(0.019069239180003233, -0.10276858786959299), - Complex::new(0.10089706509966115, -0.07681163409722506), - Complex::new(0.01906923918000321, -0.10276858786959298), - Complex::new(-0.07903454507075099, -0.08184700030244887), - ], - vec![ - Complex::new(-0.07903454507075099, -0.08184700030244887), - Complex::new(0.01906923918000321, -0.10276858786959298), - Complex::new(0.10089706509966115, -0.07681163409722505), - Complex::new(0.01906923918000323, -0.10276858786959302), - Complex::new(-5.00373588753262e-33, 1.8116810507789718e-36), - Complex::new(-0.07903454507075099, -0.08184700030244885), - Complex::new(0.01906923918000321, -0.10276858786959298), - Complex::new(-0.07903454507075099, -0.08184700030244886), - ], - vec![ - Complex::new(0.019069239180003233, -0.10276858786959302), - Complex::new(-0.07903454507075099, -0.08184700030244886), - Complex::new(0.019069239180003212, -0.10276858786959298), - Complex::new(0.10089706509966115, -0.07681163409722506), - Complex::new(-0.07903454507075099, -0.08184700030244885), - Complex::new(-7.314851820797302e-33, 1.088140415641433e-35), - Complex::new(-0.07903454507075099, -0.08184700030244886), - Complex::new(0.019069239180003215, -0.10276858786959298), - ], - vec![ - Complex::new(0.10089706509966115, -0.07681163409722505), - Complex::new(0.01906923918000323, -0.10276858786959302), - Complex::new(-0.07903454507075099, -0.08184700030244887), - Complex::new(0.01906923918000321, -0.10276858786959298), - Complex::new(0.01906923918000321, -0.10276858786959298), - Complex::new(-0.07903454507075099, -0.08184700030244886), - Complex::new(-5.00373588753262e-33, 1.8116810507789718e-36), - Complex::new(-0.07903454507075099, -0.08184700030244885), - ], - vec![ - Complex::new(0.019069239180003212, -0.10276858786959298), - Complex::new(0.10089706509966115, -0.07681163409722506), - Complex::new(0.019069239180003233, -0.10276858786959302), - Complex::new(-0.07903454507075099, -0.08184700030244886), - Complex::new(-0.07903454507075099, -0.08184700030244886), - Complex::new(0.019069239180003215, -0.10276858786959298), - Complex::new(-0.07903454507075099, -0.08184700030244885), - Complex::new(-7.314851820797302e-33, 1.088140415641433e-35), - ], - ]; + #[rustfmt::skip] + let from_cl = vec![vec![Complex::new(1.025266688854119e-33, 7.550086433767158e-36), Complex::new(-0.079034545070751, -0.08184700030244885), Complex::new(0.019069239180003205, -0.10276858786959298), Complex::new(-0.07903454507075097, -0.08184700030244886), Complex::new(-0.07903454507075099, -0.08184700030244887), Complex::new(0.01906923918000323, -0.10276858786959299), Complex::new(0.10089706509966115, -0.07681163409722505), Complex::new(0.019069239180003212, -0.10276858786959298)], vec![Complex::new(-0.07903454507075097, -0.08184700030244885), Complex::new(1.025266688854119e-33, -1.0291684702482414e-35), Complex::new(-0.079034545070751, -0.08184700030244887), Complex::new(0.01906923918000321, -0.10276858786959298), Complex::new(0.01906923918000321, -0.10276858786959298), Complex::new(-0.07903454507075099, -0.08184700030244887), Complex::new(0.019069239180003233, -0.10276858786959299), Complex::new(0.10089706509966115, -0.07681163409722506)], vec![Complex::new(0.019069239180003205, -0.10276858786959298), Complex::new(-0.07903454507075097, -0.08184700030244886), Complex::new(1.025266688854119e-33, 7.550086433767158e-36), Complex::new(-0.079034545070751, -0.08184700030244885), Complex::new(0.10089706509966115, -0.07681163409722505), Complex::new(0.019069239180003212, -0.10276858786959298), Complex::new(-0.07903454507075099, -0.08184700030244887), Complex::new(0.01906923918000323, -0.10276858786959299)], vec![Complex::new(-0.079034545070751, -0.08184700030244887), Complex::new(0.01906923918000321, -0.10276858786959298), Complex::new(-0.07903454507075097, -0.08184700030244885), Complex::new(1.025266688854119e-33, -1.0291684702482414e-35), Complex::new(0.019069239180003233, -0.10276858786959299), Complex::new(0.10089706509966115, -0.07681163409722506), Complex::new(0.01906923918000321, -0.10276858786959298), Complex::new(-0.07903454507075099, -0.08184700030244887)], vec![Complex::new(-0.07903454507075099, -0.08184700030244887), Complex::new(0.01906923918000321, -0.10276858786959298), Complex::new(0.10089706509966115, -0.07681163409722505), Complex::new(0.01906923918000323, -0.10276858786959302), Complex::new(-5.00373588753262e-33, 1.8116810507789718e-36), Complex::new(-0.07903454507075099, -0.08184700030244885), Complex::new(0.01906923918000321, -0.10276858786959298), Complex::new(-0.07903454507075099, -0.08184700030244886)], vec![Complex::new(0.019069239180003233, -0.10276858786959302), Complex::new(-0.07903454507075099, -0.08184700030244886), Complex::new(0.019069239180003212, -0.10276858786959298), Complex::new(0.10089706509966115, -0.07681163409722506), Complex::new(-0.07903454507075099, -0.08184700030244885), Complex::new(-7.314851820797302e-33, 1.088140415641433e-35), Complex::new(-0.07903454507075099, -0.08184700030244886), Complex::new(0.019069239180003215, -0.10276858786959298)], vec![Complex::new(0.10089706509966115, -0.07681163409722505), Complex::new(0.01906923918000323, -0.10276858786959302), Complex::new(-0.07903454507075099, -0.08184700030244887), Complex::new(0.01906923918000321, -0.10276858786959298), Complex::new(0.01906923918000321, -0.10276858786959298), Complex::new(-0.07903454507075099, -0.08184700030244886), Complex::new(-5.00373588753262e-33, 1.8116810507789718e-36), Complex::new(-0.07903454507075099, -0.08184700030244885)], vec![Complex::new(0.019069239180003212, -0.10276858786959298), Complex::new(0.10089706509966115, -0.07681163409722506), Complex::new(0.019069239180003233, -0.10276858786959302), Complex::new(-0.07903454507075099, -0.08184700030244886), Complex::new(-0.07903454507075099, -0.08184700030244886), Complex::new(0.019069239180003215, -0.10276858786959298), Complex::new(-0.07903454507075099, -0.08184700030244885), Complex::new(-7.314851820797302e-33, 1.088140415641433e-35)]]; for (i, row) in from_cl.iter().enumerate() { for (j, entry) in row.iter().enumerate() { @@ -1424,56 +816,8 @@ mod test { helmholtz_hypersingular_assemble(&mut matrix, &space, &space, 3.0); // Compare to result from bempp-cl - let from_cl = vec![ - vec![ - Complex::new(-0.24054975187128322, -0.37234907871793793), - Complex::new(-0.2018803657726846, -0.3708486980714607), - Complex::new(-0.31151549914430937, -0.36517694339435425), - Complex::new(-0.31146604913280734, -0.3652407688678574), - Complex::new(-0.3114620814217625, -0.36524076431695807), - Complex::new(-0.311434147468966, -0.36530056813389983), - ], - vec![ - Complex::new(-0.2018803657726846, -0.3708486980714607), - Complex::new(-0.24054975187128322, -0.3723490787179379), - Complex::new(-0.31146604913280734, -0.3652407688678574), - Complex::new(-0.31151549914430937, -0.36517694339435425), - Complex::new(-0.3114620814217625, -0.36524076431695807), - Complex::new(-0.311434147468966, -0.36530056813389983), - ], - vec![ - Complex::new(-0.31146604913280734, -0.3652407688678574), - Complex::new(-0.31151549914430937, -0.36517694339435425), - Complex::new(-0.24054975187128322, -0.3723490787179379), - Complex::new(-0.2018803657726846, -0.3708486980714607), - Complex::new(-0.31146208142176246, -0.36524076431695807), - Complex::new(-0.31143414746896597, -0.36530056813389983), - ], - vec![ - Complex::new(-0.31151549914430937, -0.36517694339435425), - Complex::new(-0.31146604913280734, -0.3652407688678574), - Complex::new(-0.2018803657726846, -0.3708486980714607), - Complex::new(-0.24054975187128322, -0.3723490787179379), - Complex::new(-0.3114620814217625, -0.36524076431695807), - Complex::new(-0.311434147468966, -0.36530056813389983), - ], - vec![ - Complex::new(-0.31146208142176257, -0.36524076431695807), - Complex::new(-0.3114620814217625, -0.3652407643169581), - Complex::new(-0.3114620814217625, -0.3652407643169581), - Complex::new(-0.3114620814217625, -0.3652407643169581), - Complex::new(-0.24056452443903534, -0.37231826606213236), - Complex::new(-0.20188036577268464, -0.37084869807146076), - ], - vec![ - Complex::new(-0.3114335658086867, -0.36530052927274986), - Complex::new(-0.31143356580868675, -0.36530052927274986), - Complex::new(-0.3114335658086867, -0.36530052927274986), - Complex::new(-0.3114335658086867, -0.36530052927274986), - Complex::new(-0.2018803657726846, -0.37084869807146076), - Complex::new(-0.2402983805938184, -0.37203286968364935), - ], - ]; + #[rustfmt::skip] + let from_cl = vec![vec![Complex::new(-0.24054975187128322, -0.37234907871793793), Complex::new(-0.2018803657726846, -0.3708486980714607), Complex::new(-0.31151549914430937, -0.36517694339435425), Complex::new(-0.31146604913280734, -0.3652407688678574), Complex::new(-0.3114620814217625, -0.36524076431695807), Complex::new(-0.311434147468966, -0.36530056813389983)], vec![Complex::new(-0.2018803657726846, -0.3708486980714607), Complex::new(-0.24054975187128322, -0.3723490787179379), Complex::new(-0.31146604913280734, -0.3652407688678574), Complex::new(-0.31151549914430937, -0.36517694339435425), Complex::new(-0.3114620814217625, -0.36524076431695807), Complex::new(-0.311434147468966, -0.36530056813389983)], vec![Complex::new(-0.31146604913280734, -0.3652407688678574), Complex::new(-0.31151549914430937, -0.36517694339435425), Complex::new(-0.24054975187128322, -0.3723490787179379), Complex::new(-0.2018803657726846, -0.3708486980714607), Complex::new(-0.31146208142176246, -0.36524076431695807), Complex::new(-0.31143414746896597, -0.36530056813389983)], vec![Complex::new(-0.31151549914430937, -0.36517694339435425), Complex::new(-0.31146604913280734, -0.3652407688678574), Complex::new(-0.2018803657726846, -0.3708486980714607), Complex::new(-0.24054975187128322, -0.3723490787179379), Complex::new(-0.3114620814217625, -0.36524076431695807), Complex::new(-0.311434147468966, -0.36530056813389983)], vec![Complex::new(-0.31146208142176257, -0.36524076431695807), Complex::new(-0.3114620814217625, -0.3652407643169581), Complex::new(-0.3114620814217625, -0.3652407643169581), Complex::new(-0.3114620814217625, -0.3652407643169581), Complex::new(-0.24056452443903534, -0.37231826606213236), Complex::new(-0.20188036577268464, -0.37084869807146076)], vec![Complex::new(-0.3114335658086867, -0.36530052927274986), Complex::new(-0.31143356580868675, -0.36530052927274986), Complex::new(-0.3114335658086867, -0.36530052927274986), Complex::new(-0.3114335658086867, -0.36530052927274986), Complex::new(-0.2018803657726846, -0.37084869807146076), Complex::new(-0.2402983805938184, -0.37203286968364935)]]; let perm = [0, 5, 2, 4, 3, 1];