dune-vtk  0.2
Public Types | Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Dune::Vtk::LagrangeDataCollector< GridView, ORDER > Class Template Reference

Implementation of DataCollector for lagrange cells. More...

#include <dune/vtk/datacollectors/lagrangedatacollector.hh>

Inheritance diagram for Dune::Vtk::LagrangeDataCollector< GridView, ORDER >:
Inheritance graph

Public Types

enum  
 The dimension of the grid. More...
 
enum  
 The dimension of the world. More...
 
using GridView = GridView
 

Public Member Functions

 LagrangeDataCollector (GridView const &gridView, int order=ORDER)
 
void updateImpl ()
 Construct the point sets. More...
 
std::uint64_t numPointsImpl () const
 Return number of lagrange nodes. More...
 
template<class T >
std::vector< T > pointsImpl () const
 Return a vector of point coordinates. More...
 
std::uint64_t numCellsImpl () const
 Return number of grid cells. More...
 
Cells cellsImpl () const
 Return cell types, offsets, and connectivity. More...
 
template<class T , class GlobalFunction >
std::vector< T > pointDataImpl (GlobalFunction const &fct) const
 Evaluate the fct at element vertices and edge centers in the same order as the point coords. More...
 
Cells cells () const
 Return cell types, offsets, and connectivity. More...
 
std::vector< std::uint64_t > pointIds () const
 
void update ()
 Update the DataCollector on the current GridView. More...
 
int ghostLevel () const
 Return the number of ghost elements. More...
 
std::uint64_t numCells () const
 Return the number of cells in (this partition of the) grid. More...
 
std::uint64_t numPoints () const
 Return the number of points in (this partition of the) grid. More...
 
std::vector< T > points () const
 Return a flat vector of point coordinates. More...
 
std::vector< T > pointData (VtkFunction const &fct) const
 Return a flat vector of function values evaluated at the points. More...
 
std::vector< T > cellData (VtkFunction const &fct) const
 Return a flat vector of function values evaluated at the cells in the order of traversal. More...
 
int ghostLevelImpl () const
 
std::vector< T > cellDataImpl (VtkFunction const &fct) const
 

Static Public Attributes

static constexpr auto partition
 The partitionset to collect data from. More...
 

Protected Types

using PointSet = LagrangePointSet< typename GridView::ctype, GridView::dimension >
 

Protected Member Functions

std::vector< std::uint64_t > pointIdsImpl () const
 
LagrangeDataCollector< GridView, -1 > & asDerived ()
 
const LagrangeDataCollector< GridView, -1 > & asDerived () const
 

Protected Attributes

unsigned int order_
 
std::uint64_t numPoints_ = 0
 
std::map< GeometryType, PointSetpointSets_
 
GridView gridView_
 

Detailed Description

template<class GridView, int ORDER = -1>
class Dune::Vtk::LagrangeDataCollector< GridView, ORDER >

Implementation of DataCollector for lagrange cells.

Member Typedef Documentation

◆ GridView

◆ PointSet

template<class GridView , int ORDER = -1>
using Dune::Vtk::LagrangeDataCollector< GridView, ORDER >::PointSet = LagrangePointSet<typename GridView::ctype, GridView::dimension>
protected

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
inherited

The dimension of the grid.

◆ anonymous enum

anonymous enum
inherited

The dimension of the world.

Constructor & Destructor Documentation

◆ LagrangeDataCollector()

template<class GridView , int ORDER = -1>
Dune::Vtk::LagrangeDataCollector< GridView, ORDER >::LagrangeDataCollector ( GridView const &  gridView,
int  order = ORDER 
)
inline

Member Function Documentation

◆ asDerived() [1/2]

LagrangeDataCollector< GridView, -1 > & Dune::Vtk::DataCollectorInterface< GridView , LagrangeDataCollector< GridView, -1 > , Partitions::All >::asDerived ( )
inlineprotectedinherited

◆ asDerived() [2/2]

const LagrangeDataCollector< GridView, -1 > & Dune::Vtk::DataCollectorInterface< GridView , LagrangeDataCollector< GridView, -1 > , Partitions::All >::asDerived ( ) const
inlineprotectedinherited

◆ cellData()

std::vector<T> Dune::Vtk::DataCollectorInterface< GridView , LagrangeDataCollector< GridView, -1 > , Partitions::All >::cellData ( VtkFunction const &  fct) const
inlineinherited

Return a flat vector of function values evaluated at the cells in the order of traversal.

See also
pointData. Note: Cells might be described explicitly by connectivity, offsets, and types, e.g. in an UnstructuredGrid, or might be described implicitly by the grid type, e.g. in StructuredGrid.

◆ cellDataImpl()

std::vector< T > Dune::Vtk::DataCollectorInterface< GV, D, P >::cellDataImpl ( VtkFunction const &  fct) const
inherited

◆ cells()

Cells Dune::Vtk::UnstructuredDataCollectorInterface< GridView, LagrangeDataCollector< GridView, -1 > , Partitions::All >::cells ( ) const
inlineinherited

Return cell types, offsets, and connectivity.

See also
Cells

◆ cellsImpl()

template<class GridView , int ORDER = -1>
Cells Dune::Vtk::LagrangeDataCollector< GridView, ORDER >::cellsImpl ( ) const
inline

Return cell types, offsets, and connectivity.

See also
Cells The cell connectivity is composed of cell vertices first and second cell edges, where the indices are grouped [vertex-indices..., (#vertices)+edge-indices...]

◆ ghostLevel()

int Dune::Vtk::DataCollectorInterface< GridView , LagrangeDataCollector< GridView, -1 > , Partitions::All >::ghostLevel ( ) const
inlineinherited

Return the number of ghost elements.

◆ ghostLevelImpl()

int Dune::Vtk::DataCollectorInterface< GridView , LagrangeDataCollector< GridView, -1 > , Partitions::All >::ghostLevelImpl ( ) const
inlineinherited

◆ numCells()

std::uint64_t Dune::Vtk::DataCollectorInterface< GridView , LagrangeDataCollector< GridView, -1 > , Partitions::All >::numCells ( ) const
inlineinherited

Return the number of cells in (this partition of the) grid.

◆ numCellsImpl()

template<class GridView , int ORDER = -1>
std::uint64_t Dune::Vtk::LagrangeDataCollector< GridView, ORDER >::numCellsImpl ( ) const
inline

Return number of grid cells.

◆ numPoints()

std::uint64_t Dune::Vtk::DataCollectorInterface< GridView , LagrangeDataCollector< GridView, -1 > , Partitions::All >::numPoints ( ) const
inlineinherited

Return the number of points in (this partition of the) grid.

◆ numPointsImpl()

template<class GridView , int ORDER = -1>
std::uint64_t Dune::Vtk::LagrangeDataCollector< GridView, ORDER >::numPointsImpl ( ) const
inline

Return number of lagrange nodes.

◆ pointData()

std::vector<T> Dune::Vtk::DataCollectorInterface< GridView , LagrangeDataCollector< GridView, -1 > , Partitions::All >::pointData ( VtkFunction const &  fct) const
inlineinherited

Return a flat vector of function values evaluated at the points.

In case of a vector valued function, flat the vector entries: [fct(p0)_0, fct(p0)_1, fct(p0)_2, fct(p1)_0, ...] where the vector dimension must be 3 (possible extended by 0s) In case of tensor valued function, flat the tensor row-wise: [fct(p0)_00, fct(p0)_01, fct(p0)_02, fct(p0)_10, fct(p0)_11, fct(p0)_12, fct(p0)_20...] where the tensor dimension must be 3x3 (possible extended by 0s)

◆ pointDataImpl()

template<class GridView , int ORDER = -1>
template<class T , class GlobalFunction >
std::vector<T> Dune::Vtk::LagrangeDataCollector< GridView, ORDER >::pointDataImpl ( GlobalFunction const &  fct) const
inline

Evaluate the fct at element vertices and edge centers in the same order as the point coords.

◆ pointIds()

std::vector<std::uint64_t> Dune::Vtk::UnstructuredDataCollectorInterface< GridView, LagrangeDataCollector< GridView, -1 > , Partitions::All >::pointIds ( ) const
inlineinherited

◆ pointIdsImpl()

std::vector<std::uint64_t> Dune::Vtk::UnstructuredDataCollectorInterface< GridView, LagrangeDataCollector< GridView, -1 > , Partitions::All >::pointIdsImpl ( ) const
inlineprotectedinherited

◆ points()

std::vector<T> Dune::Vtk::DataCollectorInterface< GridView , LagrangeDataCollector< GridView, -1 > , Partitions::All >::points ( ) const
inlineinherited

Return a flat vector of point coordinates.

All coordinates are extended to 3 components and concatenated. [p0_x, p0_y, p0_z, p1_x, p1_y, p1_z, ...] If the GridView::dimensionworld < 3, the remaining components are set to 0

◆ pointsImpl()

template<class GridView , int ORDER = -1>
template<class T >
std::vector<T> Dune::Vtk::LagrangeDataCollector< GridView, ORDER >::pointsImpl ( ) const
inline

Return a vector of point coordinates.

The vector of point coordinates is composed of vertex coordinates first and second edge center coordinates.

◆ update()

void Dune::Vtk::DataCollectorInterface< GridView , LagrangeDataCollector< GridView, -1 > , Partitions::All >::update ( )
inlineinherited

Update the DataCollector on the current GridView.

◆ updateImpl()

template<class GridView , int ORDER = -1>
void Dune::Vtk::LagrangeDataCollector< GridView, ORDER >::updateImpl ( )
inline

Construct the point sets.

Member Data Documentation

◆ gridView_

GridView Dune::Vtk::DataCollectorInterface< GridViewType, LagrangeDataCollector< GridView, -1 > , Partitions::All >::gridView_
protectedinherited

◆ numPoints_

template<class GridView , int ORDER = -1>
std::uint64_t Dune::Vtk::LagrangeDataCollector< GridView, ORDER >::numPoints_ = 0
protected

◆ order_

template<class GridView , int ORDER = -1>
unsigned int Dune::Vtk::LagrangeDataCollector< GridView, ORDER >::order_
protected

◆ partition

constexpr auto Dune::Vtk::DataCollectorInterface< GridViewType, LagrangeDataCollector< GridView, -1 > , Partitions::All >::partition
staticconstexprinherited

The partitionset to collect data from.

◆ pointSets_

template<class GridView , int ORDER = -1>
std::map<GeometryType, PointSet> Dune::Vtk::LagrangeDataCollector< GridView, ORDER >::pointSets_
protected

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