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§
sourcetype Grid: Grid<T = <Self::T as RlstScalar>::Real, EntityDescriptor = ReferenceCellType>
type Grid: Grid<T = <Self::T as RlstScalar>::Real, EntityDescriptor = ReferenceCellType>
The grid type
sourcetype FiniteElement: FiniteElement<T = Self::T> + Sync
type FiniteElement: FiniteElement<T = Self::T> + Sync
The finite element type
Required Methods§
sourcefn element(&self, cell_type: ReferenceCellType) -> &Self::FiniteElement
fn element(&self, cell_type: ReferenceCellType) -> &Self::FiniteElement
Get the finite element used to define this function space
sourcefn get_local_dof_numbers(
&self,
entity_dim: usize,
entity_number: usize,
) -> &[usize]
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
sourcefn local_size(&self) -> usize
fn local_size(&self) -> usize
Get the number of DOFs associated with the local process
sourcefn global_size(&self) -> usize
fn global_size(&self) -> usize
Get the number of DOFs on all processes
sourcefn cell_dofs(&self, cell: usize) -> Option<&[usize]>
fn cell_dofs(&self, cell: usize) -> Option<&[usize]>
Get the local DOF numbers associated with a cell
sourceunsafe fn cell_dofs_unchecked(&self, cell: usize) -> &[usize]
unsafe fn cell_dofs_unchecked(&self, cell: usize) -> &[usize]
sourcefn cell_colouring(&self) -> HashMap<ReferenceCellType, Vec<Vec<usize>>>
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
sourcefn global_dof_index(&self, local_dof_index: usize) -> usize
fn global_dof_index(&self, local_dof_index: usize) -> usize
Get the global DOF index associated with a local DOF index