Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor boundary assembly into better traits #279

Merged
merged 13 commits into from
Aug 21, 2024
2 changes: 1 addition & 1 deletion benches/assembly_benchmark.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use bempp::assembly::{boundary, boundary::BoundaryAssembler};
use bempp::function::SerialFunctionSpace;
use bempp::traits::FunctionSpace;
use bempp::traits::{BoundaryAssembly, FunctionSpace};
use criterion::{criterion_group, criterion_main, Criterion};
use ndelement::ciarlet::LagrangeElementFamily;
use ndelement::types::{Continuity, ReferenceCellType};
Expand Down
2 changes: 1 addition & 1 deletion examples/assembly.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use bempp::assembly::{boundary, boundary::BoundaryAssembler};
use bempp::function::SerialFunctionSpace;
use bempp::traits::FunctionSpace;
use bempp::traits::{BoundaryAssembly, FunctionSpace};
use ndelement::ciarlet::LagrangeElementFamily;
use ndelement::types::{Continuity, ReferenceCellType};
use ndgrid::shapes::regular_sphere;
Expand Down
3 changes: 1 addition & 2 deletions examples/test_parallel_assembly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ use approx::assert_relative_eq;
#[cfg(feature = "mpi")]
use bempp::{
assembly::boundary,
assembly::boundary::BoundaryAssembler,
function::{ParallelFunctionSpace, SerialFunctionSpace},
traits::FunctionSpace,
traits::{BoundaryAssembly, FunctionSpace, ParallelBoundaryAssembly},
};
#[cfg(feature = "mpi")]
use itertools::izip;
Expand Down
14 changes: 12 additions & 2 deletions src/assembly.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
pub mod boundary;
pub(crate) mod common;
pub mod fmm_tools;
pub mod kernels;
pub mod potential;

#[cfg(test)]
mod test {
use super::boundary::BoundaryAssembler;
use super::*;
use crate::function::SerialFunctionSpace;
use crate::traits::FunctionSpace;
use crate::traits::{BoundaryAssembly, FunctionSpace};
use cauchy::{c32, c64};
use ndelement::ciarlet::CiarletElement;
use ndelement::ciarlet::LagrangeElementFamily;
Expand Down Expand Up @@ -121,6 +121,16 @@ mod test {
//};
}
macro_rules! create_assembler {
(Laplace, Hypersingular, $dtype:ident) => {
paste! {
boundary::HypersingularAssembler::<[<$dtype>], _, _>::new_laplace()
}
};
(Helmholtz, Hypersingular, $dtype:ident) => {
paste! {
boundary::HypersingularAssembler::<[<$dtype>], _, _>::new_helmholtz(3.0)
}
};
(Laplace, $operator:ident, $dtype:ident) => {
paste! {
boundary::[<$operator Assembler>]::<[<$dtype>], _>::new_laplace()
Expand Down
117 changes: 0 additions & 117 deletions src/assembly/batched.rs

This file was deleted.

Loading
Loading