KASKADE 7 development version
|
Class that stores information for each cell of a grid. More...
#include <celldata.hh>
Class that stores information for each cell of a grid.
In many cases it is useful to store information on a cell in a vector. An example is the storage of error indicators, or some debugging information, such as which entity has been marked for refinement, or has been refined. The class CellData provides infrastructure for these tasks with an emphasis on error estimation.
Since a CellData object contains many EntityPointers, it may become very large. If memory space is an urgent issue, it may be a good idea to replace the current data structure by a different one. In any case it might be a good idea to restrict the livetime of these objects to when they are actually needed.
Definition at line 36 of file celldata.hh.
Public Types | |
typedef Grd | Grid |
typedef T | ValueType |
typedef Grid::template Codim< 0 >::Entity | Cell |
typedef std::pair< T, typename Cell::EntityPointer > | CellDataPair |
A pair, where the data and an EntityPointer is stored. More... | |
typedef std::vector< CellDataPair > | CellDataVector |
Public Member Functions | |
CellData () | |
Default constructor. More... | |
CellData (CellDataVector const &data_) | |
Construct Cell Data from a given CellDataVector. More... | |
template<class S > | |
CellData (std::vector< std::pair< S, typename Cell::EntityPointer > > const &data_) | |
Construct Cell Data from a given CellDataVector of different scalar type. More... | |
template<class Space , class Vector > | |
CellData (Vector const &data_, Space const &ds) | |
CellData< Grid, T > & | operator= (const CellData< Grid, T > &ei) |
Assignment operator from a CellData object. More... | |
CellData< Grid, T > & | operator= (const CellDataVector &ei) |
Assignment operator between two CellDataVector. More... | |
double | sum () const |
Compute the sum over all entries. More... | |
double | abssum () const |
Compute the sum over the absolute values of all entries. More... | |
void | sort () |
Sort all entries from large to small. More... | |
double | maxElement () const |
Compute the maximal value of all entries. More... | |
void | normalize () |
Scale all entries, such that their maximal value is 1. More... | |
CellDataVector::const_iterator | begin () const |
Return a const_iterator on data.begin() More... | |
CellDataVector::const_iterator | end () const |
Return a const_iterator on data.end() More... | |
CellDataVector::iterator | begin () |
Return a const_iterator on data.begin() More... | |
CellDataVector::iterator | end () |
Return a const_iterator on data.end() More... | |
template<typename FSElement > | |
void | toFunction (FSElement &fse) const |
Create a function space element from *this. More... | |
void | setCorrectedEstimate (double est) |
double | getCorrectedEstimate () const |
bool | estIsCorrected () const |
Static Public Attributes | |
static int const | dim = Grid::dimension |
typedef Grid::template Codim<0>::Entity Kaskade::CellData< Grd, T >::Cell |
Definition at line 41 of file celldata.hh.
typedef std::pair<T, typename Cell::EntityPointer> Kaskade::CellData< Grd, T >::CellDataPair |
A pair, where the data and an EntityPointer is stored.
Definition at line 43 of file celldata.hh.
typedef std::vector<CellDataPair> Kaskade::CellData< Grd, T >::CellDataVector |
Definition at line 44 of file celldata.hh.
typedef Grd Kaskade::CellData< Grd, T >::Grid |
Definition at line 39 of file celldata.hh.
typedef T Kaskade::CellData< Grd, T >::ValueType |
Definition at line 40 of file celldata.hh.
|
inline |
Default constructor.
Definition at line 56 of file celldata.hh.
|
inlineexplicit |
Construct Cell Data from a given CellDataVector.
Definition at line 59 of file celldata.hh.
|
inlineexplicit |
Construct Cell Data from a given CellDataVector of different scalar type.
Definition at line 63 of file celldata.hh.
|
inlineexplicit |
Definition at line 71 of file celldata.hh.
|
inline |
Compute the sum over the absolute values of all entries.
Definition at line 114 of file celldata.hh.
Referenced by Kaskade::markByBulkCriterion().
|
inline |
Return a const_iterator on data.begin()
Definition at line 162 of file celldata.hh.
|
inline |
Return a const_iterator on data.begin()
Definition at line 156 of file celldata.hh.
Referenced by Kaskade::deleteAllAboveLevel(), Kaskade::errorL2(), Kaskade::GridManagerBase< Grd >::mark(), Kaskade::markByBulkCriterion(), Kaskade::markByMaxCriterion(), Kaskade::markWithinInterval(), and Kaskade::unmarkOutOf().
|
inline |
Return a const_iterator on data.end()
Definition at line 165 of file celldata.hh.
|
inline |
Return a const_iterator on data.end()
Definition at line 159 of file celldata.hh.
Referenced by Kaskade::deleteAllAboveLevel(), Kaskade::errorL2(), Kaskade::GridManagerBase< Grd >::mark(), Kaskade::markByBulkCriterion(), Kaskade::markByMaxCriterion(), Kaskade::markWithinInterval(), and Kaskade::unmarkOutOf().
|
inline |
Definition at line 206 of file celldata.hh.
|
inline |
Definition at line 201 of file celldata.hh.
|
inline |
Compute the maximal value of all entries.
Definition at line 130 of file celldata.hh.
Referenced by Kaskade::markByMaxCriterion(), and Kaskade::CellData< Grd, T >::normalize().
|
inline |
Scale all entries, such that their maximal value is 1.
Definition at line 146 of file celldata.hh.
|
inline |
Assignment operator from a CellData object.
Definition at line 87 of file celldata.hh.
|
inline |
Assignment operator between two CellDataVector.
Definition at line 96 of file celldata.hh.
|
inline |
Definition at line 195 of file celldata.hh.
|
inline |
Sort all entries from large to small.
Definition at line 123 of file celldata.hh.
Referenced by Kaskade::markByBulkCriterion().
|
inline |
Compute the sum over all entries.
Definition at line 105 of file celldata.hh.
|
inline |
Create a function space element from *this.
Definition at line 169 of file celldata.hh.
|
static |
Definition at line 45 of file celldata.hh.