dune-grid  2.11
types.hh
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file AUTHORS.md
2 // SPDX-License-Identifier: LicenseRef-GPL-2.0-only-with-DUNE-exception OR LGPL-3.0-or-later
3 
4 #ifndef DUNE_GRID_IO_FILE_GMSH_TYPES_HH
5 #define DUNE_GRID_IO_FILE_GMSH_TYPES_HH
6 
7 #include <cstdint>
8 #include <map>
9 #include <string>
10 #include <vector>
11 
12 #include <dune/common/ftraits.hh>
13 #include <dune/geometry/type.hh>
14 
15 namespace Dune::Impl::Gmsh
16 {
18  GeometryType gmshNumberToGeometryType (int elementType);
19 
21  class CellType
22  {
23  public:
24  CellType (GeometryType const& t);
25 
27  GeometryType type () const
28  {
29  return type_;
30  }
31 
33  int gmshVertexToDuneVertex (int idx) const
34  {
35  return permutation_[idx];
36  }
37 
39  bool identityPermutation () const
40  {
41  return identityPermutation_;
42  }
43 
44  private:
45  GeometryType type_;
46  std::vector<int> permutation_;
47  bool identityPermutation_;
48  };
49 
50 } // end namespace Dune::Impl::Gmsh
51 
52 #endif
Definition: filereader.hh:14
GeometryType
Type representing VTK&#39;s entity geometry types.
Definition: common.hh:132