![]() |
Dune-Fufem 2.11-git
|
Class for storing data associated to elements. More...
#include <dune/fufem/grid/elementdata.hh>
Public Types | |
| using | GridView = GV |
| using | Grid = typename GridView::Grid |
| using | Mapper = Dune::MultipleCodimMultipleGeomTypeMapper< GridView > |
| using | Element = typename GridView::template Codim< 0 >::Entity |
Public Member Functions | |
| ElementData (const std::vector< T > &coarseData, const GridView &gridView) | |
| Create ElementData. | |
| ElementData (const Dune::GmshReader< Grid > &reader, const Dune::GridFactory< Grid > &factory, const GridView &gridView) | |
| Create ElementData. | |
| ElementData (const Dune::GmshReader< Grid > &reader, const Dune::GridFactory< Grid > &factory, const Grid &grid) | |
| Create ElementData. | |
| ElementData (std::vector< T > &&coarseData, const GridView &gridView) | |
| Create ElementData. | |
| void | update (const GridView &gridView) |
| Update after changes to the grid or GridView. | |
| const T & | operator() (const Element &element) const |
| Map element to associated data. | |
| const T & | operator[] (std::size_t elementIndex) const |
| Access data by consecutive element index. | |
| std::size_t | size () const |
| Size of the container (number of elements in grid view) | |
| const std::vector< T > & | data () const |
| Access raw container with stored data. | |
| const std::vector< T > & | coarseData () const |
| Access raw container with stored level-0 coarse data. | |
Detailed Description
class Dune::Fufem::ElementData< GV, T >
Class for storing data associated to elements.
- Template Parameters
-
GV GridView for access via element T Type of data associated to elements
This behaves like a random access container that associates data to elements from the grid view. The container is indexed using consecutive element indices as provided by a MultipleCodimMultipleGeomTypeMapper(gridView, mcmgElementLayout()). The class also provides a function interface mapping elements directly to the associated data.
This class is intended to be used to extract element data from a Dune::GmshReader in a persistent form.
Member Typedef Documentation
◆ Element
| using Dune::Fufem::ElementData< GV, T >::Element = typename GridView::template Codim<0>::Entity |
◆ Grid
| using Dune::Fufem::ElementData< GV, T >::Grid = typename GridView::Grid |
◆ GridView
| using Dune::Fufem::ElementData< GV, T >::GridView = GV |
◆ Mapper
| using Dune::Fufem::ElementData< GV, T >::Mapper = Dune::MultipleCodimMultipleGeomTypeMapper<GridView> |
Constructor & Destructor Documentation
◆ ElementData() [1/4]
|
inline |
Create ElementData.
- Parameters
-
coarseData A raw vector with the respective level-0 data gridView GridView for which element data should be accessed
This constructor requires that the passed level-0 coarse data is indexed using the consecutive element indices provided by a MultipleCodimMultipleGeomTypeMapper(grid.levelGridView(0), mcmgElementLayout()). This will copy the passed data.
◆ ElementData() [2/4]
|
inline |
Create ElementData.
- Parameters
-
reader A GmshReader to extract the element data from factory The GridFactory used with the reader to translate insertion indices gridView GridView for which element data should be accessed
This constructor will extract the element data from the given GmshReader. To permute from the insertion order used by the reader to the order induced by the grid view indices, this additionally needs the factory that was used to create the grid.
◆ ElementData() [3/4]
|
inline |
Create ElementData.
- Parameters
-
reader A GmshReader to extract the element data from factory The GridFactory used with the reader to translate insertion indices grid Grid for which element data should be accessed
This constructor will extract the element data from the given GmshReader. To permute from the insertion order used by the reader to the order induced by the grid view indices, this additionally needs the factory that was used to create the grid. This constructor will associate the data to a grid.leafGridView() and is thus only available if the GridView type is Grid::LeafGridView.
◆ ElementData() [4/4]
|
inline |
Create ElementData.
- Parameters
-
coarseData A raw vector with the respective level-0 data gridView GridView for access via intersections.
This constructor requires that the passed level-0 coarse data is indexed using the consecutive element indices provided by a MultipleCodimMultipleGeomTypeMapper(grid.levelGridView(0), mcmgElementLayout()). This will move the passed data.
Member Function Documentation
◆ coarseData()
|
inline |
Access raw container with stored level-0 coarse data.
◆ data()
|
inline |
Access raw container with stored data.
◆ operator()()
|
inline |
Map element to associated data.
◆ operator[]()
|
inline |
Access data by consecutive element index.
◆ size()
|
inline |
Size of the container (number of elements in grid view)
◆ update()
|
inline |
Update after changes to the grid or GridView.
This will recompute the data on the given grid view from the stored level-0 coarse data using a hierarchic traversal of the grid.
The documentation for this class was generated from the following file:
