bempp::function

Trait FunctionSpaceTrait

Source
pub trait FunctionSpaceTrait {
    type C: Communicator;
    type T: RlstScalar;
    type Grid: Grid<T = <Self::T as RlstScalar>::Real, EntityDescriptor = ReferenceCellType> + ParallelGrid<Self::C>;
    type FiniteElement: FiniteElement<T = Self::T> + Sync;

    // Required methods
    fn comm(&self) -> &Self::C;
    fn grid(&self) -> &Self::Grid;
    fn element(&self, cell_type: ReferenceCellType) -> &Self::FiniteElement;
    fn is_serial(&self) -> bool;
    fn get_local_dof_numbers(
        &self,
        entity_dim: usize,
        entity_number: usize,
    ) -> &[usize];
    fn local_size(&self) -> usize;
    fn global_size(&self) -> usize;
    fn cell_dofs(&self, cell: usize) -> Option<&[usize]>;
    unsafe fn cell_dofs_unchecked(&self, cell: usize) -> &[usize];
    fn cell_colouring(&self) -> HashMap<ReferenceCellType, Vec<Vec<usize>>>;
    fn global_dof_index(&self, local_dof_index: usize) -> usize;
    fn ownership(&self, local_dof_index: usize) -> Ownership;
}
Expand description

A function space

Required Associated Types§

Source

type C: Communicator

Communicator

Source

type T: RlstScalar

Scalar type

Source

type Grid: Grid<T = <Self::T as RlstScalar>::Real, EntityDescriptor = ReferenceCellType> + ParallelGrid<Self::C>

The grid type

Source

type FiniteElement: FiniteElement<T = Self::T> + Sync

The finite element type

Required Methods§

Source

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

Get the communicator

Source

fn grid(&self) -> &Self::Grid

Get the grid that the element is defined on

Source

fn element(&self, cell_type: ReferenceCellType) -> &Self::FiniteElement

Get the finite element used to define this function space

Source

fn is_serial(&self) -> bool

Check if the function space is stored in serial

Source

fn get_local_dof_numbers( &self, entity_dim: usize, entity_number: usize, ) -> &[usize]

Get the DOF numbers on the local process associated with the given entity

Source

fn local_size(&self) -> usize

Get the number of DOFs associated with the local process

Source

fn global_size(&self) -> usize

Get the number of DOFs on all processes

Source

fn cell_dofs(&self, cell: usize) -> Option<&[usize]>

Get the local DOF numbers associated with a cell

Source

unsafe fn cell_dofs_unchecked(&self, cell: usize) -> &[usize]

Get the local DOF numbers associated with a cell

§Safety

The function uses unchecked array access

Source

fn cell_colouring(&self) -> HashMap<ReferenceCellType, Vec<Vec<usize>>>

Compute a colouring of the cells so that no two cells that share an entity with DOFs associated with it are assigned the same colour

Source

fn global_dof_index(&self, local_dof_index: usize) -> usize

Get the global DOF index associated with a local DOF index

Source

fn ownership(&self, local_dof_index: usize) -> Ownership

Get ownership of a local DOF

Implementors§

Source§

impl<C: Communicator, T: RlstScalar + MatrixInverse, GridImpl: ParallelGrid<C> + Grid<T = T::Real, EntityDescriptor = ReferenceCellType>> FunctionSpaceTrait for FunctionSpace<'_, C, T, GridImpl>

Source§

type T = T

Source§

type Grid = GridImpl

Source§

type FiniteElement = CiarletElement<T>

Source§

type C = C