dune-vtk 2.12
Loading...
Searching...
No Matches
Dune::Vtk::YaspDataCollector< GridView > Class Template Reference

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

Inheritance diagram for Dune::Vtk::YaspDataCollector< GridView >:
Inheritance graph

Public Types

enum  { dim = GridView::dimension }
 The dimension of the grid. More...
 
enum  { dow = GridView::dimensionworld }
 The dimension of the world. More...
 
using GridView = GV
 Type of the bound grid view.
 

Public Member Functions

 YaspDataCollector (GridView const &gridView)
 
std::array< int, 6 > const & wholeExtentImpl () const
 
std::array< int, 6 > const & extentImpl () const
 
auto const & originImpl () const
 
auto const & spacingImpl () const
 
void updateImpl ()
 
void initGeometry (EquidistantCoordinates< ctype, dim > const &coords)
 
void initGeometry (EquidistantOffsetCoordinates< ctype, dim > const &coords)
 
void initGeometry (TensorProductCoordinates< ctype, dim > const &coords)
 
template<class T >
std::array< std::vector< T >, 3 > coordinatesImpl () const
 Extract the ordinates from the coordinates object of the current level.
 
std::array< int, 6 > wholeExtent () const
 Sequence of Index pairs [begin, end) for the cells in each direction.
 
std::array< int, 6 > extent () const
 Sequence of Index pairs [begin, end) for the cells in each direction of the local partition.
 
void writeLocalPiece (Writer const &writer) const
 Call the writer with extent.
 
void writePieces (Writer const &writer) const
 Call the writer with piece number and piece extent.
 
std::uint64_t numCellsImpl () const
 Return number of grid cells.
 
std::uint64_t numPointsImpl () const
 Return number of grid vertices.
 
std::vector< T > pointsImpl () const
 
std::vector< T > pointDataImpl (GlobalFunction const &fct) const
 
void writeLocalPieceImpl (Writer const &writer) const
 
void writePiecesImpl (Writer const &writer) const
 
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.
 
template<class T , class VtkFunction >
std::vector< T > pointData (VtkFunction const &fct) const
 Return a flat vector of function values evaluated at the points.
 
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.
 
auto comm () const
 
int ghostLevelImpl () const
 
template<class T , class VtkFunction >
std::vector< T > cellDataImpl (VtkFunction const &fct) const
 
FieldVector< ctype, 3 > origin () const
 Lower left corner of the grid.
 
FieldVector< ctype, 3 > spacing () const
 Constant grid spacing in each coordinate direction.
 
std::array< std::vector< T >, 3 > coordinates () const
 The coordinates defines point coordinates for an extent by specifying the ordinate along each axis.
 

Static Public Attributes

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

Protected Types

using SubDataCollector = ContinuousDataCollector< GridView >
 

Protected Member Functions

Derived & asDerived ()
 
const Derived & asDerived () const
 

Member Typedef Documentation

◆ GridView

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

Type of the bound grid view.

◆ SubDataCollector

Member Enumeration Documentation

◆ anonymous enum

template<class GV , class Derived , class Partition = Partitions::InteriorBorder>
anonymous enum
inherited

The dimension of the grid.

Enumerator
dim 

◆ anonymous enum

template<class GV , class Derived , class Partition = Partitions::InteriorBorder>
anonymous enum
inherited

The dimension of the world.

Enumerator
dow 

Constructor & Destructor Documentation

◆ YaspDataCollector()

template<class GridView >
Dune::Vtk::YaspDataCollector< GridView >::YaspDataCollector ( GridView const &  gridView)
inline

Member Function Documentation

◆ asDerived() [1/2]

template<class GV , class Derived , class Partition = Partitions::InteriorBorder>
Derived & Dune::Vtk::DataCollectorInterface< GV, Derived, Partition >::asDerived ( )
inlineprotectedinherited

◆ asDerived() [2/2]

template<class GV , class Derived , class Partition = Partitions::InteriorBorder>
const Derived & Dune::Vtk::DataCollectorInterface< GV, Derived, Partition >::asDerived ( ) const
inlineprotectedinherited

◆ 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
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()

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

◆ comm()

template<class GV , class Derived , class Partition = Partitions::InteriorBorder>
auto Dune::Vtk::DataCollectorInterface< GV, Derived, Partition >::comm ( ) const
inlineinherited

◆ coordinates()

The coordinates defines point coordinates for an extent by specifying the ordinate along each axis.

Interface for RectilinearGrid

◆ coordinatesImpl()

template<class GridView >
template<class T >
std::array< std::vector< T >, 3 > Dune::Vtk::YaspDataCollector< GridView >::coordinatesImpl ( ) const
inline

Extract the ordinates from the coordinates object of the current level.

◆ extent()

Sequence of Index pairs [begin, end) for the cells in each direction of the local partition.

◆ extentImpl()

template<class GridView >
std::array< int, 6 > const & Dune::Vtk::YaspDataCollector< GridView >::extentImpl ( ) const
inline

◆ ghostLevel()

template<class GV , class Derived , class Partition = Partitions::InteriorBorder>
int Dune::Vtk::DataCollectorInterface< GV, Derived, Partition >::ghostLevel ( ) const
inlineinherited

Return the number of ghost elements.

◆ ghostLevelImpl()

template<class GV , class Derived , class Partition = Partitions::InteriorBorder>
int Dune::Vtk::DataCollectorInterface< GV, Derived, Partition >::ghostLevelImpl ( ) const
inlineinherited

◆ gridView()

template<class GV , class Derived , class Partition = Partitions::InteriorBorder>
GridView const & Dune::Vtk::DataCollectorInterface< GV, Derived, Partition >::gridView ( ) const
inlineinherited

Return the bound grid view.

◆ initGeometry() [1/3]

template<class GridView >
void Dune::Vtk::YaspDataCollector< GridView >::initGeometry ( EquidistantCoordinates< ctype, dim > const &  coords)
inline

◆ initGeometry() [2/3]

template<class GridView >
void Dune::Vtk::YaspDataCollector< GridView >::initGeometry ( EquidistantOffsetCoordinates< ctype, dim > const &  coords)
inline

◆ initGeometry() [3/3]

template<class GridView >
void Dune::Vtk::YaspDataCollector< GridView >::initGeometry ( TensorProductCoordinates< ctype, dim > const &  coords)
inline

◆ numCells()

template<class GV , class Derived , class Partition = Partitions::InteriorBorder>
std::uint64_t Dune::Vtk::DataCollectorInterface< GV, Derived, Partition >::numCells ( ) const
inlineinherited

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

◆ numCellsImpl()

Return number of grid cells.

◆ numPoints()

template<class GV , class Derived , class Partition = Partitions::InteriorBorder>
std::uint64_t Dune::Vtk::DataCollectorInterface< GV, Derived, Partition >::numPoints ( ) const
inlineinherited

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

◆ numPointsImpl()

Return number of grid vertices.

◆ origin()

FieldVector< ctype, 3 > Dune::Vtk::StructuredDataCollectorInterface< GridView, YaspDataCollector< GridView > >::origin ( ) const
inlineinherited

Lower left corner of the grid.

Interface for ImageData:

◆ originImpl()

template<class GridView >
auto const & Dune::Vtk::YaspDataCollector< GridView >::originImpl ( ) const
inline

◆ 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
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()

std::vector< T > Dune::Vtk::StructuredDataCollectorInterface< GridView, YaspDataCollector< GridView > >::pointDataImpl ( GlobalFunction const &  fct) const
inlineinherited

◆ points()

template<class GV , class Derived , class Partition = Partitions::InteriorBorder>
template<class T >
std::vector< T > Dune::Vtk::DataCollectorInterface< GV, Derived, Partition >::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()

◆ spacing()

FieldVector< ctype, 3 > Dune::Vtk::StructuredDataCollectorInterface< GridView, YaspDataCollector< GridView > >::spacing ( ) const
inlineinherited

Constant grid spacing in each coordinate direction.

◆ spacingImpl()

template<class GridView >
auto const & Dune::Vtk::YaspDataCollector< GridView >::spacingImpl ( ) const
inline

◆ update()

template<class GV , class Derived , class Partition = Partitions::InteriorBorder>
void Dune::Vtk::DataCollectorInterface< GV, Derived, Partition >::update ( )
inlineinherited

Update the DataCollector on the current GridView.

◆ updateImpl()

template<class GridView >
void Dune::Vtk::YaspDataCollector< GridView >::updateImpl ( )
inline

◆ wholeExtent()

Sequence of Index pairs [begin, end) for the cells in each direction.

◆ wholeExtentImpl()

template<class GridView >
std::array< int, 6 > const & Dune::Vtk::YaspDataCollector< GridView >::wholeExtentImpl ( ) const
inline

◆ writeLocalPiece()

void Dune::Vtk::StructuredDataCollectorInterface< GridView, YaspDataCollector< GridView > >::writeLocalPiece ( Writer const &  writer) const
inlineinherited

Call the writer with extent.

◆ writeLocalPieceImpl()

void Dune::Vtk::StructuredDataCollectorInterface< GridView, YaspDataCollector< GridView > >::writeLocalPieceImpl ( Writer const &  writer) const
inlineinherited

◆ writePieces()

void Dune::Vtk::StructuredDataCollectorInterface< GridView, YaspDataCollector< GridView > >::writePieces ( Writer const &  writer) const
inlineinherited

Call the writer with piece number and piece extent.

◆ writePiecesImpl()

void Dune::Vtk::StructuredDataCollectorInterface< GridView, YaspDataCollector< GridView > >::writePiecesImpl ( Writer const &  writer) const
inlineinherited

Member Data Documentation

◆ partition

template<class GV , class Derived , class Partition = Partitions::InteriorBorder>
constexpr auto Dune::Vtk::DataCollectorInterface< GV, Derived, Partition >::partition = Partition{}
staticconstexprinherited

The partitionset to collect data from.


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