An adaptive container that stores a value per grid element. More...
#include <ElementVector.hpp>
Inherits Observer< event::preAdapt >, Observer< event::adapt >, and Observer< event::postAdapt >.
Public Types | |
using | Grid = G |
Type of the grid. | |
using | size_type = std::size_t |
The index/size - type. | |
using | value_type = T |
The type of the elements of the ElementVector. | |
using | Data = std::vector< T > |
The data container for the ElementVector. | |
Public Member Functions | |
ElementVector (std::shared_ptr< G const > const &grid, T value=0) | |
(1) Constructor. Stores the shared_ptr of the grid. | |
ElementVector (G const &grid, T value=0) | |
(2) Constructor. Forwards to (1) by wrapping into a shared_ptr. | |
auto | gridView () const |
Return the GridView the data is defined on. | |
Data const & | data () const |
Get a const-ref to the internal data vector. | |
Data & | data () |
Get a ref to the internal data vector. | |
void | resize () |
Resize the internal data without interpolating. | |
void | resizeZero () |
Resize the internal data without interpolating and set all values to 0. | |
Protected Member Functions | |
void | updateImpl (event::preAdapt e) override |
Implementation of Observer update(event::preAdapt) method. | |
void | updateImpl (event::adapt e) override |
Implementation of Observer update(event::adapt) method. | |
void | updateImpl (event::postAdapt) override |
Implementation of Observer update(event::postAdapt) method. | |
An adaptive container that stores a value per grid element.
G | Type of the grid |
T | Type of the coefficients |