dune-grid
2.2.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
dune
grid
io
file
vtk
corner.hh
Go to the documentation of this file.
1
// -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2
// vi: set et ts=8 sw=2 sts=2:
3
4
#ifndef DUNE_GRID_IO_FILE_VTK_CORNER_HH
5
#define DUNE_GRID_IO_FILE_VTK_CORNER_HH
6
7
#include <
dune/grid/io/file/vtk/common.hh
>
8
9
namespace
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
Generated on Mon Jun 4 2012 12:01:09 for dune-grid by
1.8.1