mpi_global_bounding_box/
mpi_global_bounding_box.rsuse bempp_octree::{
geometry::PhysicalBox,
octree::compute_global_bounding_box,
tools::{gather_to_root, generate_random_points},
};
use rand::prelude::*;
use rand_chacha::ChaCha8Rng;
pub fn main() {
let universe = mpi::initialize().unwrap();
let comm = universe.world();
let mut rng = ChaCha8Rng::seed_from_u64(2);
let npoints = 10;
let points = generate_random_points(npoints, &mut rng, &comm);
let bounding_box = compute_global_bounding_box(&points, &comm);
if let Some(points_root) = gather_to_root(&points, &comm) {
let expected = PhysicalBox::from_points(&points_root);
assert_eq!(expected.coordinates(), bounding_box.coordinates());
}
}