Flow123d
release_3.0.0-973-g92f55e826
|
Go to the documentation of this file.
19 #ifndef DH_CELL_ACCESSOR_HH_
20 #define DH_CELL_ACCESSOR_HH_
85 unsigned int n_dofs()
const;
94 inline unsigned int dim()
const {
101 template<
unsigned int dim>
180 inline unsigned int dim()
const {
188 inline virtual void inc() {
312 unsigned int ndofs = 0;
314 for (
unsigned int k=0; k<ndofs; k++)
323 unsigned int ndofs = 0;
325 for (
unsigned int k=0; k<ndofs; k++)
334 switch (this->
dim()) {
336 return fe<1>()->n_dofs();
339 return fe<2>()->n_dofs();
342 return fe<3>()->n_dofs();
354 return fe<1>()->dof(idof);
357 return fe<2>()->dof(idof);
360 return fe<3>()->dof(idof);
367 auto bgn_it = make_iter<DHCellSide>(
DHCellSide(*
this, 0) );
368 auto end_it = make_iter<DHCellSide>(
DHCellSide(*
this,
dim()+1) );
374 auto bgn_it = make_iter<DHNeighbSide>(
DHNeighbSide(*
this, 0) );
375 auto end_it = make_iter<DHNeighbSide>(
DHNeighbSide(*
this, this->
elm()->n_neighs_vb()) );
std::vector< LongIdx > dof_indices
Dof numbers on local and ghost elements.
void inc()
Iterates to next edge side.
DHCellSide cell_side_
Appropriate side accessor.
unsigned int edge_idx_
Pointer to the DOF handler owning the element.
bool is_valid() const
Check validity of accessor (see default constructor)
void inc()
Iterates to next local element.
unsigned int lsize(int proc) const
get local size
FiniteElement< dim > * fe() const
Returns finite element object for given space dimension.
bool is_valid() const
Check validity of accessor (see default constructor)
virtual void inc()
Iterates to next local element.
#define ASSERT(expr)
Allow use shorter versions of macro names if these names is not used with external library.
unsigned int get_loc_dof_indices(std::vector< LongIdx > &indices) const
Returns the indices of dofs associated to the cell on the local process.
virtual const Side * side() const
Return Side of given cell and side_idx.
bool operator==(const DHNeighbSide &other)
Comparison of accessors.
bool operator==(const DHCellAccessor &other)
Comparison of accessors.
DHEdgeSide(const DHCellSide &cell_side, unsigned int side_idx)
Range< DHNeighbSide > neighb_sides() const
Returns range of neighbour cells of higher dimension.
bool is_valid() const
Check validity of accessor (see default constructor)
vector< LongIdx > ghost_4_loc
Indices of ghost cells (neighbouring with local elements).
unsigned int dim() const
Return dimension of element appropriate to cell.
Distribution * el_ds_
Distribution of elements.
unsigned int side_idx_
Index of side.
DHCellAccessor dh_cell_
Appropriate cell accessor.
Declaration of class which handles the ordering of degrees of freedom (dof) and mappings between loca...
unsigned int dim() const
Return dimension of element appropriate to the side.
void inc()
Iterates to next edge side.
#define ASSERT_LT(a, b)
Definition of comparative assert macro (Less Than)
Range< DHCellSide > side_range() const
Returns range of cell sides.
DHCellSide cell_side() const
Return DHCellSide according to this object.
bool operator==(const DHEdgeSide &other)
Comparison of accessors.
Provides the numbering of the finite element degrees of freedom on the computational mesh.
unsigned int local_idx() const
Return local index to element (index of DOF handler).
Mesh * mesh() const
Returns the mesh.
const ElementAccessor< 3 > elm() const
Return ElementAccessor to element of loc_ele_idx_.
DHCellSide(const DHCellAccessor &dh_cell_accessor, unsigned int side_idx)
unsigned int n_dofs() const
Return number of dofs on given cell.
unsigned int elm_idx() const
Return serial idx to element of loc_ele_idx_.
unsigned int side_idx() const
Abstract class for the description of a general finite element on a reference simplex in dim dimensio...
std::vector< Edge > edges
Vector of MH edges, this should not be part of the geometrical mesh.
unsigned int edge_idx(unsigned int edg_idx) const
Return edge_idx of given index.
DHCellSide cell_side() const
Return DHCellSide according to this object.
const DHCellAccessor cell_accessor_from_element(unsigned int elm_idx) const
Return DHCellAccessor appropriate to ElementAccessor of given idx.
unsigned int get_dof_indices(std::vector< int > &indices) const
Fill vector of the global indices of dofs associated to the cell.
Range< DHEdgeSide > edge_sides() const
Returns range of all sides looped over common Edge.
std::shared_ptr< DiscreteSpace > ds_
Pointer to the discrete space for which the handler distributes dofs.
std::vector< LongIdx > cell_starts
Starting indices for element dofs.
DHCellAccessor(const DOFHandlerMultiDim *dof_handler, unsigned int loc_idx)
virtual bool is_valid() const
Check validity of accessor (see default constructor)
DHCellAccessor dh_cell_accessor_
Appropriate DHCellAccessor.
#define ASSERT_LT_DBG(a, b)
Definition of comparative assert macro (Less Than) only for debug mode.
const DHCellAccessor cell() const
Return DHCellAccessor appropriate to the side.
bool operator==(const DHCellSide &other)
Comparison of accessors.
unsigned int side_idx_
Index of side owned by Edge.
const DOFHandlerMultiDim * dof_handler_
Pointer to the DOF handler owning the element.
unsigned int loc_ele_idx_
Index into DOFHandler::el_4_loc array.
virtual ElementAccessor< 3 > element_accessor(unsigned int idx) const
Create and return ElementAccessor to element of given idx.
const Dof & cell_dof(unsigned int idof) const
Return dof on a given cell.
DHNeighbSide(const DHCellAccessor &dh_cell, unsigned int neighb_idx)
unsigned int neighb_idx_
Index into neigh_vb array.
LongIdx * get_el_4_loc() const