ParallelGrid

Trait ParallelGrid 

Source
pub trait ParallelGrid {
    type T: Scalar;
    type LocalGrid: Grid<T = Self::T>;
    type C: Communicator;

    // Required methods
    fn comm(&self) -> &Self::C;
    fn local_grid(&self) -> &Self::LocalGrid;
    fn cell_layout(&self) -> Rc<IndexLayout<'_, Self::C>>;

    // Provided method
    fn global_cell_count(&self) -> usize { ... }
}
Expand description

Definition of an MPI parallel grid

Required Associated Types§

Source

type T: Scalar

Type of the Grid

Source

type LocalGrid: Grid<T = Self::T>

Local grid type

Source

type C: Communicator

Communicator

Required Methods§

Source

fn comm(&self) -> &Self::C

MPI communicator

Source

fn local_grid(&self) -> &Self::LocalGrid

Local grid on the current process

Source

fn cell_layout(&self) -> Rc<IndexLayout<'_, Self::C>>

Return the cell index layout that describes where each global cell lives

Provided Methods§

Source

fn global_cell_count(&self) -> usize

Return the global number of cells

Implementors§

Source§

impl<T: Scalar, C: Communicator, G: Grid<T = T> + Sync> ParallelGrid for ParallelGridImpl<'_, C, G>