19 #ifndef DH_CELL_ACCESSOR_HH_ 20 #define DH_CELL_ACCESSOR_HH_ 79 unsigned int n_dofs()
const;
88 inline unsigned int dim()
const {
95 template<
unsigned int dim>
121 unsigned int elem_idx = this->
elm_idx();
123 unsigned int ndofs = 0;
125 for (
unsigned int k=0; k<ndofs; k++)
134 unsigned int elem_idx = this->
elm_idx();
135 unsigned int ndofs = 0;
137 for (
unsigned int k=0; k<ndofs; k++)
146 switch (this->
dim()) {
165 return fe<1>()->dof(idof);
168 return fe<2>()->dof(idof);
171 return fe<3>()->dof(idof);
const Dof & cell_dof(unsigned int idof) const
Return dof on a given cell.
Declaration of class which handles the ordering of degrees of freedom (dof) and mappings between loca...
unsigned int elm_idx() const
Return serial idx to element of loc_ele_idx_.
void inc()
Iterates to next local element.
unsigned int get_loc_dof_indices(std::vector< LongIdx > &indices) const
Returns the indices of dofs associated to the cell on the local process.
Distribution * el_ds_
Distribution of elements.
unsigned int dim() const
Return dimension of element appropriate to cell.
unsigned int local_idx() const
Return local index to element (index of DOF handler).
FiniteElement< dim > * fe() const
Returns finite element object for given space dimension.
const DOFHandlerMultiDim * dof_handler_
Pointer to the DOF handler owning the element.
int el_index(int loc_el) const
Returns the global index of local element.
Mesh * mesh() const
Returns the mesh.
unsigned int n_dofs() const
Return number of dofs on given cell.
virtual ElementAccessor< 3 > element_accessor(unsigned int idx) const
Create and return ElementAccessor to element of given idx.
std::vector< LongIdx > cell_starts
Starting indices for element dofs.
const ElementAccessor< 3 > elm() const
Return ElementAccessor to element of loc_ele_idx_.
std::vector< LongIdx > dof_indices
Dof numbers on local and ghost elements.
Provides the numbering of the finite element degrees of freedom on the computational mesh...
DHCellAccessor(const DOFHandlerMultiDim *dof_handler, unsigned int loc_idx)
vector< LongIdx > ghost_4_loc
Indices of ghost cells (neighbouring with local elements).
#define ASSERT_LT(a, b)
Definition of comparative assert macro (Less Than)
std::shared_ptr< DiscreteSpace > ds_
Pointer to the discrete space for which the handler distributes dofs.
Abstract class for the description of a general finite element on a reference simplex in dim dimensio...
bool operator==(const DHCellAccessor &other)
Comparison of accessors.
unsigned int get_dof_indices(std::vector< int > &indices) const
Fill vector of the global indices of dofs associated to the cell.
LongIdx * row_4_el
Global element index -> index according to partitioning.
unsigned int loc_ele_idx_
Index into DOFHandler::el_4_loc array.
#define ASSERT_LT_DBG(a, b)
Definition of comparative assert macro (Less Than) only for debug mode.
unsigned int lsize(int proc) const
get local size