Flow123d  JS_before_hm-1011-g79d7237
Public Member Functions | Private Attributes | Friends | List of all members
DHCellAccessor Class Reference

Cell accessor allow iterate over DOF handler cells. More...

#include <dh_cell_accessor.hh>

Collaboration diagram for DHCellAccessor:
Collaboration graph
[legend]

Public Member Functions

 DHCellAccessor ()
 Default invalid accessor. More...
 
 DHCellAccessor (const DOFHandlerMultiDim *dof_handler, unsigned int loc_idx)
 
unsigned int local_idx () const
 Return local index to element (index of DOF handler). More...
 
unsigned int elm_idx () const
 Return serial idx to element of loc_ele_idx_. More...
 
const ElementAccessor< 3 > elm () const
 Return ElementAccessor to element of loc_ele_idx_. More...
 
unsigned int get_dof_indices (std::vector< LongIdx > &indices) const
 Fill vector of the global indices of dofs associated to the cell. More...
 
LocDofVec get_loc_dof_indices () const
 Returns the local indices of dofs associated to the cell on the local process. More...
 
unsigned int n_dofs () const
 Return number of dofs on given cell. More...
 
const Dofcell_dof (unsigned int idof) const
 Return dof on a given cell. More...
 
unsigned int dim () const
 Return dimension of element appropriate to cell. More...
 
const DOFHandlerMultiDimdh () const
 Return DOF handler. More...
 
template<unsigned int dim>
FEPtr< dimfe () const
 Returns finite element object for given space dimension. More...
 
bool is_valid () const
 Check validity of accessor (see default constructor) More...
 
unsigned int element_cache_index () const
 Getter of elm_cache_index_. More...
 
void set_element_cache_index (unsigned int idx) const
 Setter of elm_cache_index_. More...
 
Range< DHCellSideside_range () const
 Returns range of cell sides. More...
 
RangeConvert< DHNeighbSide, DHCellSideneighb_sides () const
 Returns range of neighbour cell of lower dimension corresponding to cell of higher dimension. More...
 
bool is_own () const
 Return true if accessor represents own element (false for ghost element) More...
 
DHCellAccessor cell_with_other_dh (const DOFHandlerMultiDim *dh) const
 Create new accessor with same local idx and given DOF handler. Actual and given DOF handler must be create on same Mesh. More...
 
void inc ()
 Iterates to next local element. More...
 
bool operator== (const DHCellAccessor &other) const
 Comparison of accessors. More...
 
bool operator!= (const DHCellAccessor &other) const
 Comparison of accessors. More...
 

Private Attributes

const DOFHandlerMultiDimdof_handler_
 Pointer to the DOF handler owning the element. More...
 
unsigned int loc_ele_idx_
 Index into DOFHandler::el_4_loc array. More...
 
unsigned int elm_cache_index_
 Optional member used in field evaluation, holds index of cell in field data cache. More...
 

Friends

class DHCellSide
 
class DHEdgeSide
 
class DHNeighbSide
 

Detailed Description

Cell accessor allow iterate over DOF handler cells.

Iterating is possible over different ranges of local and ghost elements.

Iterator is defined by:

Definition at line 43 of file dh_cell_accessor.hh.

Constructor & Destructor Documentation

DHCellAccessor::DHCellAccessor ( )
inline

Default invalid accessor.

Definition at line 46 of file dh_cell_accessor.hh.

Here is the caller graph for this function:

DHCellAccessor::DHCellAccessor ( const DOFHandlerMultiDim dof_handler,
unsigned int  loc_idx 
)
inline

DOF cell accessor.

Definition at line 53 of file dh_cell_accessor.hh.

Member Function Documentation

const Dof & DHCellAccessor::cell_dof ( unsigned int  idof) const
inline

Return dof on a given cell.

Parameters
idofNumber of dof on the cell.

Definition at line 451 of file dh_cell_accessor.hh.

Here is the caller graph for this function:

DHCellAccessor DHCellAccessor::cell_with_other_dh ( const DOFHandlerMultiDim dh) const
inline

Create new accessor with same local idx and given DOF handler. Actual and given DOF handler must be create on same Mesh.

Definition at line 146 of file dh_cell_accessor.hh.

Here is the caller graph for this function:

const DOFHandlerMultiDim* DHCellAccessor::dh ( ) const
inline

Return DOF handler.

Definition at line 106 of file dh_cell_accessor.hh.

Here is the caller graph for this function:

unsigned int DHCellAccessor::dim ( ) const
inline

Return dimension of element appropriate to cell.

Definition at line 101 of file dh_cell_accessor.hh.

unsigned int DHCellAccessor::element_cache_index ( ) const
inline

Getter of elm_cache_index_.

Definition at line 125 of file dh_cell_accessor.hh.

Here is the caller graph for this function:

const ElementAccessor<3> DHCellAccessor::elm ( ) const
inline

Return ElementAccessor to element of loc_ele_idx_.

Definition at line 71 of file dh_cell_accessor.hh.

unsigned int DHCellAccessor::elm_idx ( ) const
inline

Return serial idx to element of loc_ele_idx_.

Definition at line 64 of file dh_cell_accessor.hh.

Here is the caller graph for this function:

template<unsigned int dim>
FEPtr<dim> DHCellAccessor::fe ( ) const
inline

Returns finite element object for given space dimension.

Definition at line 114 of file dh_cell_accessor.hh.

unsigned int DHCellAccessor::get_dof_indices ( std::vector< LongIdx > &  indices) const
inline

Fill vector of the global indices of dofs associated to the cell.

Parameters
indicesVector of dof indices on the cell.

Definition at line 80 of file dh_cell_accessor.hh.

LocDofVec DHCellAccessor::get_loc_dof_indices ( ) const
inline

Returns the local indices of dofs associated to the cell on the local process.

Parameters
indicesArray of dof indices on the cell.

Definition at line 88 of file dh_cell_accessor.hh.

Here is the caller graph for this function:

void DHCellAccessor::inc ( )
inline

Iterates to next local element.

Definition at line 153 of file dh_cell_accessor.hh.

Here is the caller graph for this function:

bool DHCellAccessor::is_own ( ) const
inline

Return true if accessor represents own element (false for ghost element)

Definition at line 141 of file dh_cell_accessor.hh.

Here is the caller graph for this function:

bool DHCellAccessor::is_valid ( ) const
inline

Check validity of accessor (see default constructor)

Definition at line 120 of file dh_cell_accessor.hh.

Here is the caller graph for this function:

unsigned int DHCellAccessor::local_idx ( ) const
inline

Return local index to element (index of DOF handler).

Definition at line 58 of file dh_cell_accessor.hh.

Here is the caller graph for this function:

unsigned int DHCellAccessor::n_dofs ( ) const
inline

Return number of dofs on given cell.

Definition at line 434 of file dh_cell_accessor.hh.

Here is the caller graph for this function:

RangeConvert< DHNeighbSide, DHCellSide > DHCellAccessor::neighb_sides ( ) const
inline

Returns range of neighbour cell of lower dimension corresponding to cell of higher dimension.

Definition at line 479 of file dh_cell_accessor.hh.

Here is the caller graph for this function:

bool DHCellAccessor::operator!= ( const DHCellAccessor other) const
inline

Comparison of accessors.

Definition at line 163 of file dh_cell_accessor.hh.

bool DHCellAccessor::operator== ( const DHCellAccessor other) const
inline

Comparison of accessors.

Definition at line 158 of file dh_cell_accessor.hh.

void DHCellAccessor::set_element_cache_index ( unsigned int  idx) const
inline

Setter of elm_cache_index_.

Definition at line 130 of file dh_cell_accessor.hh.

Here is the caller graph for this function:

Range< DHCellSide > DHCellAccessor::side_range ( ) const
inline

Returns range of cell sides.

Definition at line 472 of file dh_cell_accessor.hh.

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class DHCellSide
friend

Definition at line 177 of file dh_cell_accessor.hh.

friend class DHEdgeSide
friend

Definition at line 178 of file dh_cell_accessor.hh.

friend class DHNeighbSide
friend

Definition at line 179 of file dh_cell_accessor.hh.

Member Data Documentation

const DOFHandlerMultiDim* DHCellAccessor::dof_handler_
private

Pointer to the DOF handler owning the element.

Definition at line 170 of file dh_cell_accessor.hh.

unsigned int DHCellAccessor::elm_cache_index_
mutableprivate

Optional member used in field evaluation, holds index of cell in field data cache.

Definition at line 175 of file dh_cell_accessor.hh.

unsigned int DHCellAccessor::loc_ele_idx_
private

Index into DOFHandler::el_4_loc array.

Definition at line 172 of file dh_cell_accessor.hh.


The documentation for this class was generated from the following file: