Dune Core Modules (2.6.0)

common.hh File Reference

Common stuff for the VTKWriter. More...

#include <limits>
#include <sstream>
#include <string>
#include <dune/common/exceptions.hh>
#include <dune/geometry/type.hh>
#include <dune/common/typetraits.hh>

Go to the source code of this file.

Classes

struct  Dune::VTK::PrintType< T >
 determine a type to safely put another type into a stream More...
 
class  Dune::VTK::TypeName< T >
 map type to its VTK name in data array More...
 
class  Dune::VTK::FieldInfo
 Descriptor struct for VTK fields. More...
 

Namespaces

namespace  Dune
 Dune namespace.
 

Enumerations

enum  Dune::VTK::OutputType { Dune::VTK::ascii , Dune::VTK::base64 , Dune::VTK::appendedraw , Dune::VTK::appendedbase64 }
 How the bulk data should be stored in the file. More...
 
enum  Dune::VTK::DataMode { Dune::VTK::conforming , Dune::VTK::nonconforming }
 Whether to produce conforming or non-conforming output. More...
 
enum  Dune::VTK::GeometryType
 Type representing VTK's entity geometry types. More...
 
enum  Dune::VTK::FileType { Dune::VTK::polyData , Dune::VTK::unstructuredGrid }
 which type of VTK file to write More...
 

Functions

GeometryType Dune::VTK::geometryType (const Dune::GeometryType &t)
 mapping from GeometryType to VTKGeometryType More...
 
int Dune::VTK::renumber (const Dune::GeometryType &t, int i)
 renumber VTK <-> Dune More...
 
template<typename T >
int Dune::VTK::renumber (const T &t, int i)
 renumber VTK <-> Dune More...
 
std::string Dune::VTK::getEndiannessString ()
 determine endianness of this C++ implementation More...
 

Detailed Description

Common stuff for the VTKWriter.

Author
Peter Bastian, Christian Engwer

This file contains common stuff for all instances of VTKWriter.

Enumeration Type Documentation

◆ DataMode

Whether to produce conforming or non-conforming output.

Common stuff for the VTKWriter.

This applies to the conformity of the data; a non-conforming grid can still be written in conforming data mode, and it is quite possible for data to be non-conforming on a conforming grid.

Enumerator
conforming 

Output conforming data.

Neighboring elements share common vertices and thus have a common DoF on that vertex.

nonconforming 

Output non-conforming data.

Each element has its own set of vertices. The position of a vertex of one element will coincide with the position of the corresponding vertex on another element. This allows for multiple DoFs (one per element) on the "same" vertex.

◆ FileType

which type of VTK file to write

Enumerator
polyData 

for .vtp files (PolyData)

unstructuredGrid 

for .vtu files (UnstructuredGrid)

◆ GeometryType

Type representing VTK's entity geometry types.

Only the types which have a corresponding Dune::GeometryType have been included here. Dune-type names have been used, this mainly makes a difference for vtkPrism, which is known by VTK as VTK_WEDGE.

◆ OutputType

How the bulk data should be stored in the file.

Enumerator
ascii 

Output to the file is in ascii.

base64 

Output to the file is inline base64 binary.

appendedraw 

Output is to the file is appended raw binary.

appendedbase64 

Output is to the file is appended base64 binary.

Function Documentation

◆ geometryType()

GeometryType Dune::VTK::geometryType ( const Dune::GeometryType t)
inline

◆ getEndiannessString()

std::string Dune::VTK::getEndiannessString ( )
inline

determine endianness of this C++ implementation

Returns
A string suitable for the byte_order property in VTK files; either "BigEndian" or "LittleEndian".

References Dune::VTK::getEndiannessString().

Referenced by Dune::VTK::getEndiannessString(), Dune::VTK::PVTUWriter::PVTUWriter(), and Dune::VTK::VTUWriter::VTUWriter().

◆ renumber() [1/2]

int Dune::VTK::renumber ( const Dune::GeometryType t,
int  i 
)
inline

renumber VTK <-> Dune

Since the renumbering never does anything more complex than exchanging two indices, this method works both ways.

References Dune::GeometryType::isHexahedron(), Dune::GeometryType::isPrism(), Dune::GeometryType::isPyramid(), Dune::GeometryType::isQuadrilateral(), and Dune::VTK::renumber().

Referenced by Dune::VTK::renumber(), and Dune::VTK::Corner< Cell >::vtkIndex().

◆ renumber() [2/2]

template<typename T >
int Dune::VTK::renumber ( const T &  t,
int  i 
)

renumber VTK <-> Dune

This function is just a convenience shortcut function wrapping renumber(const GeometryType&, int).

Parameters
tEntity, Intersection or Geometry to do the renumbering in. Basically, anything with a method type() returning a GeometryType should work here.
iIndex to of corner in either Dune or VTK numbering (the result will be in the other numbering)

References Dune::VTK::renumber().

Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 26, 23:30, 2024)