pub fn unit_cube_distributed<T: Scalar + Equivalence, C: Communicator>(
comm: &C,
partitioner: GraphPartitioner,
nx: usize,
ny: usize,
nz: usize,
cell_type: ReferenceCellType,
) -> ParallelGridImpl<'_, C, SingleElementGrid<T, CiarletElement<T, IdentityMap, T>>>Expand description
Create a unit cube grid distributed in parallel
Examples found in repository?
ndfunctionspace/examples/test_parallel_space.rs (lines 17-24)
16fn test_parallel_function_space<C: Communicator>(comm: &C) {
17 let grid = unit_cube_distributed::<f64, _>(
18 comm,
19 GraphPartitioner::None,
20 4,
21 4,
22 4,
23 ReferenceCellType::Tetrahedron,
24 );
25
26 let family = LagrangeElementFamily::<f64>::new(2, Continuity::Standard);
27 let space = ParallelFunctionSpaceImpl::new(&grid, &family);
28 let serial_grid = unit_cube::<f64>(4, 4, 4, ReferenceCellType::Tetrahedron);
29 let serial_space = FunctionSpaceImpl::new(&serial_grid, &family);
30
31 assert_eq!(space.global_size(), serial_space.global_size());
32}