Dune Core Modules (2.5.0)

corner.hh
1// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2// vi: set et ts=4 sw=2 sts=2:
3
4#ifndef DUNE_GRID_IO_FILE_VTK_CORNER_HH
5#define DUNE_GRID_IO_FILE_VTK_CORNER_HH
6
8
9namespace Dune
10{
13
14 namespace VTK {
15
17
22 template<typename Cell>
23 class Corner {
24 // store a pointer to the element
25 const Cell* cell_;
26 // store index of the corner within element (Dune numbering)
27 unsigned index;
28
29 public:
31
36 Corner(const Cell& cell, unsigned duneIndex)
37 : cell_(&cell), index(duneIndex)
38 { }
39
41 Corner() { }
42
44 const Cell& cell() const { return *cell_; }
46
50 void cell(const Cell& cell__) { cell_ = &cell__; index = 0; }
51
53 unsigned duneIndex() const { return index; }
55 void duneIndex(unsigned i) { index = i; }
56
58
61 unsigned vtkIndex() const { return renumber(cell_->type(), index); }
63
66 void vtkIndex(unsigned i) { index = renumber(cell_->type(), i); }
67 };
68
69 } // namespace VTK
70
72
73} // namespace Dune
74
75#endif // DUNE_GRID_IO_FILE_VTK_CORNER_HH
simple class representing a corner of a cell
Definition: corner.hh:23
unsigned vtkIndex() const
get the index of the corner within the cell in VTK-numbering
Definition: corner.hh:61
void vtkIndex(unsigned i)
set the index of the corner within the cell in VTK-numbering
Definition: corner.hh:66
Corner(const Cell &cell, unsigned duneIndex)
construct a Corner
Definition: corner.hh:36
void cell(const Cell &cell__)
set a new cell
Definition: corner.hh:50
void duneIndex(unsigned i)
set the index of the corner within the cell in Dune-numbering
Definition: corner.hh:55
unsigned duneIndex() const
get the index of the corner within the cell in Dune-numbering
Definition: corner.hh:53
const Cell & cell() const
get reference to the cell
Definition: corner.hh:44
Corner()
construct an invalid Corner
Definition: corner.hh:41
Common stuff for the VTKWriter.
int renumber(const Dune::GeometryType &t, int i)
renumber VTK <-> Dune
Definition: common.hh:232
Dune namespace.
Definition: alignment.hh:11
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Nov 23, 23:29, 2024)