Dune Core Modules (2.11.0)

Dune::Vtk::SubdivisionDataCollector< GridView > Class Template Reference

Implementation of DataCollector with refined cells. More...

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

Public Types

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

Public Member Functions

 SubdivisionDataCollector (GridView const &gridView, Dune::RefinementIntervals ivals=Dune::RefinementIntervals(1), Vtk::Subdivision subdivision=Vtk::Subdivision::REFINEMENT)
 Construct a data collector with virtual element refinement. More...
 
void updateImpl ()
 Construct the virtual element refinements.
 
std::uint64_t numPointsImpl () const
 Return number of points in the grid.
 
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.
 
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.
 
template<class T , class GlobalFunction >
std::vector< T > cellDataImpl (GlobalFunction const &fct) const
 Evaluate the fct at cell centers.
 
Cells cells () const
 Return cell types, offsets, and connectivity. More...
 
std::vector< std::uint64_t > pointIds () const
 Return parallel unique IDs for each point in the grid.
 
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.
 
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...
 

Static Public Attributes

static constexpr auto partition
 The partitionset to collect data from.
 

Detailed Description

template<class GridView>
class Dune::Vtk::SubdivisionDataCollector< GridView >

Implementation of DataCollector with refined cells.

The data collector constructs virtually refined grid elements by subdivision either halfing each edge, i.e., Subdivision = REFINEMENT, or construction of a triangulation into simplices, i.e., with the option Subdivision = TRIANGULATION. The number of subdivisions is control by a constructor argument passing the RefinementIntervals. The virtual refined cells and their vertices are written non-connected to the file, i.e., the resulting grid is discontinuous. In each cell parametrised with linear elements.

Constructor & Destructor Documentation

◆ SubdivisionDataCollector()

template<class GridView >
Dune::Vtk::SubdivisionDataCollector< GridView >::SubdivisionDataCollector ( GridView const &  gridView,
Dune::RefinementIntervals  ivals = Dune::RefinementIntervals(1),
Vtk::Subdivision  subdivision = Vtk::Subdivision::REFINEMENT 
)
inline

Construct a data collector with virtual element refinement.

The elements are refined using the VirtualRefinement into ivals subintervals per edge, using the subdivision strategy REFINEMENT or TRIANGULATION.

Member Function Documentation

◆ cellData()

std::vector< T > Dune::Vtk::DataCollectorInterface< GridView , Derived, Partitions::InteriorBorder >::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.

◆ cells()

template<class GridView , class Derived , class Partition = Partitions::InteriorBorder>
Cells Dune::Vtk::UnstructuredDataCollectorInterface< GridView, Derived, Partition >::cells ( ) const
inlineinherited

Return cell types, offsets, and connectivity.

See also
Cells

◆ cellsImpl()

◆ pointData()

std::vector< T > Dune::Vtk::DataCollectorInterface< GridView , Derived, Partitions::InteriorBorder >::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)

◆ points()

std::vector< T > Dune::Vtk::DataCollectorInterface< GridView , Derived, Partitions::InteriorBorder >::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()


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