dune-grid
2.11
Toggle main menu visibility
Loading...
Searching...
No Matches
dune
grid
io
file
vtk
corner.hh
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
2
// SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception
3
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
4
// vi: set et ts=4 sw=2 sts=2:
5
6
#ifndef DUNE_GRID_IO_FILE_VTK_CORNER_HH
7
#define DUNE_GRID_IO_FILE_VTK_CORNER_HH
8
9
#include <
dune/grid/io/file/vtk/common.hh
>
10
11
namespace
Dune
12
{
15
16
namespace
VTK
{
17
19
24
template
<
typename
Cell>
25
class
Corner
{
26
// store a pointer to the element
27
const
Cell* cell_;
28
// store index of the corner within element (Dune numbering)
29
unsigned
index;
30
31
public
:
33
38
Corner
(
const
Cell&
cell
,
unsigned
duneIndex
)
39
: cell_(&
cell
), index(
duneIndex
)
40
{ }
41
43
Corner
() { }
44
46
const
Cell&
cell
()
const
{
return
*cell_; }
48
52
void
cell
(
const
Cell& cell__) { cell_ = &cell__; index = 0; }
53
55
unsigned
duneIndex
()
const
{
return
index; }
57
void
duneIndex
(
unsigned
i) { index = i; }
58
60
63
unsigned
vtkIndex
()
const
{
return
renumber
(cell_->type(), index); }
65
68
void
vtkIndex
(
unsigned
i) { index =
renumber
(cell_->type(), i); }
69
};
70
71
}
// namespace VTK
72
74
75
}
// namespace Dune
76
77
#endif
// DUNE_GRID_IO_FILE_VTK_CORNER_HH
common.hh
Common stuff for the VTKWriter.
Dune
Include standard header files.
Definition
agrid.hh:60
Dune::VTK
Definition
basicwriter.hh:32
Dune::VTK::renumber
int renumber(const Dune::GeometryType &t, int i)
renumber VTK <-> Dune
Definition
common.hh:186
Dune::VTK::Corner::vtkIndex
unsigned vtkIndex() const
get the index of the corner within the cell in VTK-numbering
Definition
corner.hh:63
Dune::VTK::Corner::vtkIndex
void vtkIndex(unsigned i)
set the index of the corner within the cell in VTK-numbering
Definition
corner.hh:68
Dune::VTK::Corner::Corner
Corner(const Cell &cell, unsigned duneIndex)
construct a Corner
Definition
corner.hh:38
Dune::VTK::Corner::cell
void cell(const Cell &cell__)
set a new cell
Definition
corner.hh:52
Dune::VTK::Corner::duneIndex
void duneIndex(unsigned i)
set the index of the corner within the cell in Dune-numbering
Definition
corner.hh:57
Dune::VTK::Corner< typename std::remove_const< typename std::iterator_traits< CellIterator >::value_type >::type >::duneIndex
unsigned duneIndex() const
Definition
corner.hh:55
Dune::VTK::Corner< typename std::remove_const< typename std::iterator_traits< CellIterator >::value_type >::type >::cell
const typename std::remove_const< typename std::iterator_traits< CellIterator >::value_type >::type & cell() const
Definition
corner.hh:46
Dune::VTK::Corner::Corner
Corner()
construct an invalid Corner
Definition
corner.hh:43
Generated by
1.17.0