dune-vtk 2.8
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions | Variables
Dune::Vtk Namespace Reference

Classes

struct  AssociatedGridFunction
 Type-Traits to associate a GridFunction to a GridCreator. More...
 
struct  AssociatedGridFunction< ContinuousGridCreator< GridType >, FieldType, Context >
 
struct  AssociatedGridFunction< LagrangeGridCreator< GridType >, FieldType, Context >
 
struct  CellContext
 Context indicating that a GridFunction generates a local-function from cell data. More...
 
struct  Cells
 
struct  CellType
 Mapping of Dune geometry types to VTK cell types. More...
 
struct  CheckTypes
 
class  ContinuousDataCollector
 Implementation of DataCollector for linear cells, with continuous data. More...
 
struct  ContinuousGridCreator
 
class  ContinuousGridFunction
 A GridFunction representing data stored on the grid vertices in a continuous manner. More...
 
class  DataCollectorInterface
 Base class for data collectors in a CRTP style. More...
 
struct  DerivedGridCreator
 
class  DiscontinuousDataCollector
 Implementation of DataCollector for linear cells, with discontinuous data. More...
 
struct  DiscontinuousGridCreator
 
class  FieldInfo
 
class  FileReader
 
class  FileWriter
 
class  Function
 Wrapper class for functions allowing local evaluations. More...
 
class  GridCreatorInterface
 Base class for grid creators in a CRTP style. More...
 
class  LagrangeDataCollector
 Implementation of DataCollector for lagrange cells. More...
 
class  LagrangeGridCreator
 
class  LagrangeGridFunction
 Grid-function representing values from a VTK file with local Lagrange interpolation of the values stored on the Lagrange nodes. More...
 
class  LagrangePointSet
 A set of lagrange points compatible with the numbering of VTK and Gmsh. More...
 
class  LocalFunction
 A Vtk::LocalFunction is a function-like object that can be bound to a grid element an that provides an evaluate method with a component argument. More...
 
class  LocalFunctionInterface
 An abstract base class for LocalFunctions that can be bound to an element and evaluated in local coordinates w.r.t. to a component of its value. More...
 
class  LocalFunctionWrapper
 Type erasure for dune-functions LocalFunction interface. More...
 
struct  NoConstraint
 
struct  ParallelGridCreator
 
class  Path
 
struct  PointContext
 Context indicating that a GridFunction generates a local-function from point data. More...
 
class  QuadraticDataCollector
 Implementation of DataCollector for quadratic cells, with continuous data. More...
 
struct  SerialGridCreator
 
class  StructuredDataCollectorInterface
 The Interface for structured data-collectors. More...
 
class  UnstructuredDataCollectorInterface
 
class  VTKLocalFunctionWrapper
 Type erasure for Legacy VTKFunction. More...
 
class  YaspDataCollector
 

Typedefs

template<class GridView >
using StructuredDataCollector = typename Impl::StructuredDataCollectorImpl< GridView, typename GridView::Grid >::type
 
template<class Factory , class... Args>
using HasInsertVertex = decltype(std::declval< Factory >().insertVertex(std::declval< Args >()...))
 
template<class GF >
using VertexId_t = typename Impl::VertexIdType< GF >::type
 
template<class DataCollector , class DC = std::decay_t<DataCollector>>
using IsDataCollector = decltype((std::declval< DC & >().update(), std::declval< DC >().numPoints(), std::declval< DC >().numCells(), CheckTypes< typename DC::GridView >{}, true))
 
template<class GridView , class GV = std::decay_t<GridView>>
using IsGridView = decltype((std::declval< GV >().grid(), std::declval< GV >().indexSet(), std::declval< GV >().size(0), std::declval< GV >().size(std::declval< Dune::GeometryType >()), CheckTypes< typename GV::Grid, typename GV::IndexSet >{}, true))
 
template<class GridFunction , class GF = std::decay_t<GridFunction>>
using IsGridFunction = decltype((localFunction(std::declval< GF const & >()), true))
 
template<class LocalFunction , class LocalContext , class LF = std::decay_t<LocalFunction>>
using IsLocalFunction = decltype((std::declval< LF & >().bind(std::declval< LocalContext >()), std::declval< LF & >().unbind(), std::declval< LF >()(std::declval< typename LocalContext::Geometry::LocalCoordinate >()), true))
 

Enumerations

enum class  FormatTypes { ASCII = 1<<0 , BINARY = 1<<1 , COMPRESSED = 1<<2 , APPENDED = BINARY | COMPRESSED }
 Type used for representing the output format. More...
 
enum class  RangeTypes {
  UNSPECIFIED , AUTO , SCALAR , VECTOR ,
  TENSOR
}
 Type used to determine whether to limit output components to e.g. 3 (vector), or 9 (tensor) More...
 
enum class  DataTypes {
  UNKNOWN = 0 , INT8 , UINT8 , INT16 ,
  UINT16 , INT32 , UINT32 , INT64 ,
  UINT64 , FLOAT32 = 32 , FLOAT64 = 64
}
 
enum class  CompressorTypes { NONE = 0 , ZLIB , LZ4 , LZMA }
 

Functions

template<class Writer , class... options>
static void registerVtkWriter (pybind11::handle scope, pybind11::class_< Writer, options... > cls)
 
template<class Grid >
 ContinuousGridCreator (GridFactory< Grid > &) -> ContinuousGridCreator< Grid >
 
template<class Grid >
 DiscontinuousGridCreator (GridFactory< Grid > &) -> DiscontinuousGridCreator< Grid >
 
template<class Grid >
 LagrangeGridCreator (GridFactory< Grid > &) -> LagrangeGridCreator< Grid >
 
template<class Grid >
 ParallelGridCreator (GridFactory< Grid > &) -> ParallelGridCreator< Grid >
 
template<class Grid >
 SerialGridCreator (GridFactory< Grid > &) -> SerialGridCreator< Grid >
 
std::string to_string (Vtk::FormatTypes type)
 
Vtk::FormatTypes formatTypeOf (Dune::VTK::OutputType)
 Map the dune-grid OutputType to FormatTypes. More...
 
std::string to_string (Vtk::RangeTypes type)
 
Vtk::RangeTypes rangeTypeOf (Dune::VTK::FieldInfo::Type t)
 
Vtk::RangeTypes rangeTypeOf (int ncomps)
 
std::string to_string (Vtk::DataTypes type)
 
Vtk::DataTypes dataTypeOf (Dune::VTK::Precision p)
 
Vtk::DataTypes dataTypeOf (std::string s)
 
std::string to_string (Vtk::CompressorTypes type)
 
GeometryType to_geometry (std::uint8_t cell)
 
template<class T >
Vtk::DataTypes dataTypeOf ()
 
template<template< class > class C = NoConstraint, class Caller >
void mapDataTypes (Vtk::DataTypes t, Caller caller)
 Map a given enum DataType to a type passed to Caller as MetaType. More...
 
template<template< class > class Constraint1 = NoConstraint, template< class > class Constraint2 = NoConstraint, class Caller >
void mapDataTypes (Vtk::DataTypes t1, Vtk::DataTypes t2, Caller caller)
 Map two DataTypes as type parameters to the Caller. More...
 
template<template< class > class Constraint1 = NoConstraint, template< class > class Constraint2 = NoConstraint, template< class > class Constraint3 = NoConstraint, class Caller >
void mapDataTypes (Vtk::DataTypes t1, Vtk::DataTypes t2, Vtk::DataTypes t3, Caller caller)
 Map three DataTypes as type parameters to the Caller. More...
 
template<class... T, class Arg0 , class... Args>
decltype(auto) getArg (Arg0 &&arg0, Args &&... args)
 
template<class E , class Integer , std::enable_if_t< std::is_enum< E >::value, int > = 0>
constexpr bool is_a (E a, Integer b)
 
Path currentPath ()
 Returns the current path. More...
 
bool exists (Path const &)
 Test whether the path is a valid (existing and accessible) file / directory. More...
 
bool createDirectories (Path const &)
 Create directory and non existing parent directories. More...
 
Path relative (Path const &a, Path const &b)
 Find the path of a relative to directory of b More...
 
std::string to_upper (std::string input)
 convert all characters in a string to upper case More...
 
std::string to_lower (std::string input)
 convert all characters in a string to upper case More...
 
std::string & ltrim (std::string &str)
 trim a string from the left More...
 
std::string & rtrim (std::string &str)
 trim a string from the right More...
 
std::string & trim (std::string &str)
 trim a string from both sides More...
 
std::string trim_copy (std::string const &str)
 trim a (copy of the) string from both sides More...
 
template<class InputIter , class T , class Func >
void split (InputIter first, InputIter end, T const &t, Func f)
 
template<class InputIter , class SeparatorIter , class Func >
void split (InputIter first, InputIter end, SeparatorIter s_first, SeparatorIter s_end, Func f)
 
void replaceAll (std::string &str, std::string const &from, std::string const &to)
 Replace all occurences of substring from with to in source str. More...
 
template<class InputIter >
std::string join (InputIter first, InputIter end, std::string sep=" ")
 
std::string uid (std::size_t len=8)
 

Variables

auto formatTypesList = {FormatTypes::ASCII, FormatTypes::BINARY, FormatTypes::COMPRESSED, FormatTypes::APPENDED}
 
auto rangeTypesList = {RangeTypes::UNSPECIFIED, RangeTypes::AUTO, RangeTypes::SCALAR, RangeTypes::VECTOR, RangeTypes::TENSOR}
 
auto dataTypesLists
 

Typedef Documentation

◆ HasInsertVertex

template<class Factory , class... Args>
using Dune::Vtk::HasInsertVertex = typedef decltype( std::declval<Factory>().insertVertex(std::declval<Args>()...) )

◆ IsDataCollector

template<class DataCollector , class DC = std::decay_t<DataCollector>>
using Dune::Vtk::IsDataCollector = typedef decltype(( std::declval<DC&>().update(), std::declval<DC>().numPoints(), std::declval<DC>().numCells(), CheckTypes<typename DC::GridView>{}, true))

◆ IsGridFunction

template<class GridFunction , class GF = std::decay_t<GridFunction>>
using Dune::Vtk::IsGridFunction = typedef decltype(( localFunction(std::declval<GF const&>()), true))

◆ IsGridView

template<class GridView , class GV = std::decay_t<GridView>>
using Dune::Vtk::IsGridView = typedef decltype(( std::declval<GV>().grid(), std::declval<GV>().indexSet(), std::declval<GV>().size(0), std::declval<GV>().size(std::declval<Dune::GeometryType>()), CheckTypes<typename GV::Grid, typename GV::IndexSet>{}, true))

◆ IsLocalFunction

template<class LocalFunction , class LocalContext , class LF = std::decay_t<LocalFunction>>
using Dune::Vtk::IsLocalFunction = typedef decltype(( std::declval<LF&>().bind(std::declval<LocalContext>()), std::declval<LF&>().unbind(), std::declval<LF>()(std::declval<typename LocalContext::Geometry::LocalCoordinate>()), true))

◆ StructuredDataCollector

template<class GridView >
using Dune::Vtk::StructuredDataCollector = typedef typename Impl::StructuredDataCollectorImpl<GridView, typename GridView::Grid>::type

◆ VertexId_t

template<class GF >
using Dune::Vtk::VertexId_t = typedef typename Impl::VertexIdType<GF>::type

Enumeration Type Documentation

◆ CompressorTypes

enum class Dune::Vtk::CompressorTypes
strong
Enumerator
NONE 
ZLIB 
LZ4 
LZMA 

◆ DataTypes

enum class Dune::Vtk::DataTypes
strong
Enumerator
UNKNOWN 
INT8 
UINT8 
INT16 
UINT16 
INT32 
UINT32 
INT64 
UINT64 
FLOAT32 
FLOAT64 

◆ FormatTypes

enum class Dune::Vtk::FormatTypes
strong

Type used for representing the output format.

Enumerator
ASCII 
BINARY 
COMPRESSED 
APPENDED 

◆ RangeTypes

enum class Dune::Vtk::RangeTypes
strong

Type used to determine whether to limit output components to e.g. 3 (vector), or 9 (tensor)

Enumerator
UNSPECIFIED 
AUTO 
SCALAR 
VECTOR 
TENSOR 

Function Documentation

◆ ContinuousGridCreator()

template<class Grid >
Dune::Vtk::ContinuousGridCreator ( GridFactory< Grid > &  ) -> ContinuousGridCreator< Grid >

◆ createDirectories()

bool Dune::Vtk::createDirectories ( Path const &  p)

Create directory and non existing parent directories.

◆ currentPath()

Path Dune::Vtk::currentPath ( )

Returns the current path.

◆ dataTypeOf() [1/3]

template<class T >
Vtk::DataTypes Dune::Vtk::dataTypeOf ( )

◆ dataTypeOf() [2/3]

Vtk::DataTypes Dune::Vtk::dataTypeOf ( Dune::VTK::Precision  p)

◆ dataTypeOf() [3/3]

Vtk::DataTypes Dune::Vtk::dataTypeOf ( std::string  s)

◆ DiscontinuousGridCreator()

template<class Grid >
Dune::Vtk::DiscontinuousGridCreator ( GridFactory< Grid > &  ) -> DiscontinuousGridCreator< Grid >

◆ exists()

bool Dune::Vtk::exists ( Path const &  p)

Test whether the path is a valid (existing and accessible) file / directory.

◆ formatTypeOf()

Vtk::FormatTypes Dune::Vtk::formatTypeOf ( Dune::VTK::OutputType  o)

Map the dune-grid OutputType to FormatTypes.

◆ getArg()

template<class... T, class Arg0 , class... Args>
decltype(auto) Dune::Vtk::getArg ( Arg0 &&  arg0,
Args &&...  args 
)

Extract the first argument of the variadic list that is the same as one of the types {T,...} and return its value. This utility can be used to implement function parameters with flexible order.

Example:

template <class... Args>
void foo(Args const&... args)
{
int i = getArg<int>(args...);
double d = getArg<double>(args..., 42.0); // with default value
}

The arguments are tested from first to last. Thus, a default parmaeter could be given at end of the variadic list that is chosen if no argument matches the requested type.

◆ is_a()

template<class E , class Integer , std::enable_if_t< std::is_enum< E >::value, int > = 0>
constexpr bool Dune::Vtk::is_a ( a,
Integer  b 
)
constexpr

◆ join()

template<class InputIter >
std::string Dune::Vtk::join ( InputIter  first,
InputIter  end,
std::string  sep = " " 
)

◆ LagrangeGridCreator()

template<class Grid >
Dune::Vtk::LagrangeGridCreator ( GridFactory< Grid > &  ) -> LagrangeGridCreator< Grid >

◆ ltrim()

std::string & Dune::Vtk::ltrim ( std::string &  str)
inline

trim a string from the left

◆ mapDataTypes() [1/3]

template<template< class > class C = NoConstraint, class Caller >
void Dune::Vtk::mapDataTypes ( Vtk::DataTypes  t,
Caller  caller 
)

Map a given enum DataType to a type passed to Caller as MetaType.

◆ mapDataTypes() [2/3]

template<template< class > class Constraint1 = NoConstraint, template< class > class Constraint2 = NoConstraint, class Caller >
void Dune::Vtk::mapDataTypes ( Vtk::DataTypes  t1,
Vtk::DataTypes  t2,
Caller  caller 
)

Map two DataTypes as type parameters to the Caller.

◆ mapDataTypes() [3/3]

template<template< class > class Constraint1 = NoConstraint, template< class > class Constraint2 = NoConstraint, template< class > class Constraint3 = NoConstraint, class Caller >
void Dune::Vtk::mapDataTypes ( Vtk::DataTypes  t1,
Vtk::DataTypes  t2,
Vtk::DataTypes  t3,
Caller  caller 
)

Map three DataTypes as type parameters to the Caller.

◆ ParallelGridCreator()

template<class Grid >
Dune::Vtk::ParallelGridCreator ( GridFactory< Grid > &  ) -> ParallelGridCreator< Grid >

◆ rangeTypeOf() [1/2]

Vtk::RangeTypes Dune::Vtk::rangeTypeOf ( Dune::VTK::FieldInfo::Type  t)

◆ rangeTypeOf() [2/2]

Vtk::RangeTypes Dune::Vtk::rangeTypeOf ( int  ncomps)

◆ registerVtkWriter()

template<class Writer , class... options>
static void Dune::Vtk::registerVtkWriter ( pybind11::handle  scope,
pybind11::class_< Writer, options... >  cls 
)
inlinestatic

◆ relative()

Path Dune::Vtk::relative ( Path const &  a,
Path const &  b 
)

Find the path of a relative to directory of b

◆ replaceAll()

void Dune::Vtk::replaceAll ( std::string &  str,
std::string const &  from,
std::string const &  to 
)
inline

Replace all occurences of substring from with to in source str.

◆ rtrim()

std::string & Dune::Vtk::rtrim ( std::string &  str)
inline

trim a string from the right

◆ SerialGridCreator()

template<class Grid >
Dune::Vtk::SerialGridCreator ( GridFactory< Grid > &  ) -> SerialGridCreator< Grid >

◆ split() [1/2]

template<class InputIter , class SeparatorIter , class Func >
void Dune::Vtk::split ( InputIter  first,
InputIter  end,
SeparatorIter  s_first,
SeparatorIter  s_end,
Func  f 
)

◆ split() [2/2]

template<class InputIter , class T , class Func >
void Dune::Vtk::split ( InputIter  first,
InputIter  end,
T const &  t,
Func  f 
)

◆ to_geometry()

GeometryType Dune::Vtk::to_geometry ( std::uint8_t  cell)

◆ to_lower()

std::string Dune::Vtk::to_lower ( std::string  input)
inline

convert all characters in a string to upper case

◆ to_string() [1/4]

std::string Dune::Vtk::to_string ( Vtk::CompressorTypes  type)

◆ to_string() [2/4]

std::string Dune::Vtk::to_string ( Vtk::DataTypes  type)

◆ to_string() [3/4]

std::string Dune::Vtk::to_string ( Vtk::FormatTypes  type)

◆ to_string() [4/4]

std::string Dune::Vtk::to_string ( Vtk::RangeTypes  type)

◆ to_upper()

std::string Dune::Vtk::to_upper ( std::string  input)
inline

convert all characters in a string to upper case

◆ trim()

std::string & Dune::Vtk::trim ( std::string &  str)
inline

trim a string from both sides

◆ trim_copy()

std::string Dune::Vtk::trim_copy ( std::string const &  str)
inline

trim a (copy of the) string from both sides

◆ uid()

std::string Dune::Vtk::uid ( std::size_t  len = 8)
inline

Variable Documentation

◆ dataTypesLists

auto Dune::Vtk::dataTypesLists
inline
Initial value:
= {
DataTypes::UNKNOWN,
DataTypes::INT8, DataTypes::UINT8,
DataTypes::INT16, DataTypes::UINT16,
DataTypes::INT32, DataTypes::UINT32,
DataTypes::INT64, DataTypes::UINT64,
DataTypes::FLOAT32, DataTypes::FLOAT64
}

◆ formatTypesList

◆ rangeTypesList