Dune Core Modules (2.11.0)

Dune::Vtk::DataCollectorInterface< GV, Derived, Partition > Class Template Reference

Base class for data collectors in a CRTP style. More...

#include <dune/vtk/datacollectorinterface.hh>

Public Types

enum  
 The dimension of the grid.
 
enum  
 The dimension of the world.
 
using GridView = GV
 Type of the bound grid view.
 

Public Member Functions

 DataCollectorInterface (GridView const &gridView)
 Store a copy of the GridView.
 
GridView const & gridView () const
 Return the bound grid view.
 
void update ()
 Update the DataCollector on the current GridView.
 
int ghostLevel () const
 Return the number of ghost elements.
 
std::uint64_t numCells () const
 Return the number of cells in (this partition of the) grid.
 
std::uint64_t numPoints () const
 Return the number of points in (this partition of the) grid.
 
template<class T >
std::vector< T > points () const
 Return a flat vector of point coordinates. More...
 
template<class T , class VtkFunction >
std::vector< T > pointData (VtkFunction const &fct) const
 Return a flat vector of function values evaluated at the points. More...
 
template<class T , class VtkFunction >
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...
 

Static Public Attributes

static constexpr auto partition = Partition{}
 The partitionset to collect data from.
 

Detailed Description

template<class GV, class Derived, class Partition = Partitions::InteriorBorder>
class Dune::Vtk::DataCollectorInterface< GV, Derived, Partition >

Base class for data collectors in a CRTP style.

Template Parameters
GVModel of Dune::GridView
DerivedImplementation of a concrete DataCollector.
PartitionDune::PartitionType [Partitions::InteriorBorder]

Member Function Documentation

◆ cellData()

template<class GV , class Derived , class Partition = Partitions::InteriorBorder>
template<class T , class VtkFunction >
std::vector< T > Dune::Vtk::DataCollectorInterface< GV, Derived, Partition >::cellData ( VtkFunction const &  fct) const
inline

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.

◆ pointData()

template<class GV , class Derived , class Partition = Partitions::InteriorBorder>
template<class T , class VtkFunction >
std::vector< T > Dune::Vtk::DataCollectorInterface< GV, Derived, Partition >::pointData ( VtkFunction const &  fct) const
inline

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)

◆ points()

template<class GV , class Derived , class Partition = Partitions::InteriorBorder>
template<class T >
std::vector< T > Dune::Vtk::DataCollectorInterface< GV, Derived, Partition >::points ( ) const
inline

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


The documentation for this class was generated from the following files:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden & Uni Heidelberg  |  generated with Hugo v0.111.3 (Feb 14, 23:39, 2026)