Flow123d  release_2.2.0-914-gf1a3a4f
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
ElementAccessor< spacedim > Class Template Reference

#include <output_element.hh>

Collaboration diagram for ElementAccessor< spacedim >:
Collaboration graph
[legend]

Public Member Functions

 ElementAccessor ()
 
 ElementAccessor (const Mesh *mesh, RegionIdx r_idx)
 
 ElementAccessor (const Mesh *mesh, unsigned int idx, bool boundary)
 
bool is_regional () const
 
bool is_elemental () const
 
bool is_valid () const
 
unsigned int dim () const
 
const Elementelement () const
 
arma::vec::fixed< spacedim > centre () const
 
Region region () const
 
RegionIdx region_idx () const
 
bool is_boundary () const
 We need this method after replacing Region by RegionIdx, and movinf RegionDB instance into particular mesh. More...
 
unsigned int idx () const
 

Private Attributes

unsigned int dim_
 Dimension of reference element. More...
 
const Meshmesh_
 Pointer to the mesh owning the element. More...
 
bool boundary_
 True if the element is boundary, i.e. stored in Mesh::bc_elements, bulk elements are stored in Mesh::element. More...
 
unsigned int element_idx_
 Index into Mesh::bc_elements or Mesh::element array. More...
 
RegionIdx r_idx_
 Region index. More...
 

Static Private Attributes

static const unsigned int undefined_dim_ = 100
 

Detailed Description

template<int spacedim>
class ElementAccessor< spacedim >

Element accessor templated just by dimension of the embedding space, used by Fields. This should allow algorithms over elements where dimension of particular element is runtime parameter.

This class suites as interface of Fields to the mesh elements, in particular this accessor knows directly the region, and also can be used as an accessor that works on the whole region if used by Fields that do not depend on particular elements as FieldConstant, FiledFormula, and FieldPython.

TODO:

Ideas: need function to calculate intersection (object) of two ElementAccessors, but this definitely should be templated by dimension of the ref. element (or rather shape of ref. element), here we can have case dispatch

Definition at line 25 of file output_element.hh.

Constructor & Destructor Documentation

template<int spacedim>
ElementAccessor< spacedim >::ElementAccessor ( )
inline

Default invalid accessor.

Definition at line 51 of file accessors.hh.

template<int spacedim>
ElementAccessor< spacedim >::ElementAccessor ( const Mesh mesh,
RegionIdx  r_idx 
)
inline

Regional accessor.

Definition at line 58 of file accessors.hh.

template<int spacedim>
ElementAccessor< spacedim >::ElementAccessor ( const Mesh mesh,
unsigned int  idx,
bool  boundary 
)
inline

Element accessor.

Definition at line 65 of file accessors.hh.

Member Function Documentation

template<int spacedim>
arma::vec::fixed<spacedim> ElementAccessor< spacedim >::centre ( ) const
inline

Definition at line 91 of file accessors.hh.

Here is the caller graph for this function:

template<int spacedim>
unsigned int ElementAccessor< spacedim >::dim ( ) const
inline

Definition at line 83 of file accessors.hh.

Here is the caller graph for this function:

template<int spacedim>
const Element* ElementAccessor< spacedim >::element ( ) const
inline

Definition at line 86 of file accessors.hh.

Here is the caller graph for this function:

template<int spacedim>
unsigned int ElementAccessor< spacedim >::idx ( ) const
inline

Definition at line 113 of file accessors.hh.

Here is the caller graph for this function:

template<int spacedim>
bool ElementAccessor< spacedim >::is_boundary ( ) const
inline

We need this method after replacing Region by RegionIdx, and movinf RegionDB instance into particular mesh.

Definition at line 109 of file accessors.hh.

Here is the caller graph for this function:

template<int spacedim>
bool ElementAccessor< spacedim >::is_elemental ( ) const
inline

Definition at line 75 of file accessors.hh.

Here is the caller graph for this function:

template<int spacedim>
bool ElementAccessor< spacedim >::is_regional ( ) const
inline

Definition at line 71 of file accessors.hh.

Here is the caller graph for this function:

template<int spacedim>
bool ElementAccessor< spacedim >::is_valid ( ) const
inline

Definition at line 79 of file accessors.hh.

Here is the caller graph for this function:

template<int spacedim>
Region ElementAccessor< spacedim >::region ( ) const
inline

Definition at line 98 of file accessors.hh.

Here is the caller graph for this function:

template<int spacedim>
RegionIdx ElementAccessor< spacedim >::region_idx ( ) const
inline

Definition at line 101 of file accessors.hh.

Here is the caller graph for this function:

Member Data Documentation

template<int spacedim>
bool ElementAccessor< spacedim >::boundary_
private

True if the element is boundary, i.e. stored in Mesh::bc_elements, bulk elements are stored in Mesh::element.

Definition at line 129 of file accessors.hh.

template<int spacedim>
unsigned int ElementAccessor< spacedim >::dim_
private

Dimension of reference element.

Definition at line 124 of file accessors.hh.

template<int spacedim>
unsigned int ElementAccessor< spacedim >::element_idx_
private

Index into Mesh::bc_elements or Mesh::element array.

Definition at line 132 of file accessors.hh.

template<int spacedim>
const Mesh* ElementAccessor< spacedim >::mesh_
private

Pointer to the mesh owning the element.

Definition at line 127 of file accessors.hh.

template<int spacedim>
RegionIdx ElementAccessor< spacedim >::r_idx_
private

Region index.

Definition at line 135 of file accessors.hh.

template<int spacedim>
const unsigned int ElementAccessor< spacedim >::undefined_dim_ = 100
staticprivate

When dim_ == undefined_dim_ ; the value of element_idx_ is invalid. Is used for ElementAccessors for whole region

Definition at line 121 of file accessors.hh.


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