Reference documentation for deal.II version GIT a3f17f8a20 2023-06-02 10:50:02+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
tria_faces.h
Go to the documentation of this file.
1 // ---------------------------------------------------------------------
2 //
3 // Copyright (C) 2006 - 2021 by the deal.II authors
4 //
5 // This file is part of the deal.II library.
6 //
7 // The deal.II library is free software; you can use it, redistribute
8 // it, and/or modify it under the terms of the GNU Lesser General
9 // Public License as published by the Free Software Foundation; either
10 // version 2.1 of the License, or (at your option) any later version.
11 // The full text of the license can be found in the file LICENSE.md at
12 // the top level directory of deal.II.
13 //
14 // ---------------------------------------------------------------------
15 
16 #ifndef dealii_tria_faces_h
17 #define dealii_tria_faces_h
18 
19 #include <deal.II/base/config.h>
20 
23 
24 
26 
27 namespace internal
28 {
29  namespace TriangulationImplementation
30  {
43  class TriaFaces
44  {
45  public:
49  TriaFaces(const unsigned int dim);
50 
54  TriaFaces() = default;
55 
59  unsigned int dim;
60 
67 
74  std::vector<bool> quads_line_orientations;
75 
83  std::vector<bool> quad_is_quadrilateral;
84 
89  get_quad_type(const std::size_t index) const;
90 
94  void
95  set_quad_type(const std::size_t index, const ReferenceCell face_type);
96 
103 
108  std::size_t
109  memory_consumption() const;
110 
116  template <class Archive>
117  void
118  serialize(Archive &ar, const unsigned int version);
119  };
120 
121 
122 
123  inline ReferenceCell
124  TriaFaces::get_quad_type(const std::size_t index) const
125  {
129  }
130 
131 
132 
133  inline void
134  TriaFaces::set_quad_type(const std::size_t index,
135  const ReferenceCell face_type)
136  {
138  Assert(face_type == ReferenceCells::Quadrilateral ||
139  face_type == ReferenceCells::Triangle,
140  ExcInternalError());
141  if (face_type == ReferenceCells::Quadrilateral)
143  else
144  quad_is_quadrilateral[index] = false;
145  }
146 
147 
148 
149  template <class Archive>
150  void
151  TriaFaces::serialize(Archive &ar, const unsigned int)
152  {
153  ar &dim;
155  }
156  } // namespace TriangulationImplementation
157 } // namespace internal
158 
160 
161 #endif
ReferenceCell get_quad_type(const std::size_t index) const
Definition: tria_faces.h:124
void serialize(Archive &ar, const unsigned int version)
Definition: tria_faces.h:151
void set_quad_type(const std::size_t index, const ReferenceCell face_type)
Definition: tria_faces.h:134
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:474
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:475
static ::ExceptionBase & ExcInternalError()
#define Assert(cond, exc)
Definition: exceptions.h:1614
#define AssertIndexRange(index, range)
Definition: exceptions.h:1855
constexpr const ReferenceCell Quadrilateral
constexpr const ReferenceCell Triangle