pub fn unit_cube<T: Scalar>(
nx: usize,
ny: usize,
nz: usize,
cell_type: ReferenceCellType,
) -> SingleElementGrid<T, CiarletElement<T, IdentityMap, T>>Expand description
Create a unit cube grid
The unit cube is the cube with corners at (0,0,0), (1,0,0), (0,1,0), (1,1,0), (0,0,1), (1,0,1), (0,1,1) and (1,1,1)
Examples found in repository?
ndfunctionspace/examples/test_parallel_space.rs (line 28)
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}