Trait bempp::traits::FunctionSpace

source ·
pub trait FunctionSpace {
    type T: RlstScalar;
    type Grid: Grid<T = <Self::T as RlstScalar>::Real, EntityDescriptor = ReferenceCellType>;
    type FiniteElement: FiniteElement<T = Self::T> + Sync;

    // Required methods
    fn grid(&self) -> &Self::Grid;
    fn element(&self, cell_type: ReferenceCellType) -> &Self::FiniteElement;
    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;

    // Provided method
    fn is_serial(&self) -> bool { ... }
}
Expand description

A function space

Required Associated Types§

source

type T: RlstScalar

Scalar type

source

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

The grid type

source

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

The finite element type

Required Methods§

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 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

Provided Methods§

source

fn is_serial(&self) -> bool

Check if the function space is stored in serial

Implementors§

source§

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

source§

type T = T

source§

type Grid = GridImpl

source§

type FiniteElement = CiarletElement<T>

source§

impl<'a, T: RlstScalar + MatrixInverse, GridImpl: Grid<T = T::Real, EntityDescriptor = ReferenceCellType> + Sync> FunctionSpace for SerialFunctionSpace<'a, T, GridImpl>

source§

type T = T

source§

type Grid = GridImpl

source§

type FiniteElement = CiarletElement<T>