Reference documentation for deal.II version GIT relicensing-761-gcc3619e707 2024-05-25 17:40: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\}}\)
Loading...
Searching...
No Matches
tria_objects.cc
Go to the documentation of this file.
1// ------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: LGPL-2.1-or-later
4// Copyright (C) 2006 - 2020 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Part of the source code is dual licensed under Apache-2.0 WITH
9// LLVM-exception OR LGPL-2.1-or-later. Detailed license information
10// governing the source code and code contributions can be found in
11// LICENSE.md and CONTRIBUTING.md at the top level directory of deal.II.
12//
13// ------------------------------------------------------------------------
14
16
17#include <deal.II/grid/tria.h>
21
22#include <algorithm>
23#include <functional>
24
25
26
28
29namespace internal
30{
31 namespace TriangulationImplementation
32 {
33 template <int dim, int spacedim>
34 typename ::Triangulation<dim, spacedim>::raw_hex_iterator
35 TriaObjects::next_free_hex(const ::Triangulation<dim, spacedim> &tria,
36 const unsigned int level)
37 {
38 AssertDimension(this->structdim, 3);
39
40 // TODO: Think of a way to ensure that we are using the correct
41 // triangulation, i.e. the one containing *this.
42
43 int pos = next_free_pair, last = used.size() - 1;
44 for (; pos < last; ++pos)
45 if (!used[pos])
46 {
47 // this should be a pair slot
48 Assert(!used[pos + 1], ExcInternalError());
49 break;
50 }
51 if (pos >= last)
52 // no free slot
53 return tria.end_hex();
54 else
55 next_free_pair = pos + 2;
56
57 return
58 typename ::Triangulation<dim, spacedim>::raw_hex_iterator(&tria,
59 level,
60 pos);
61 }
62
63
64 std::size_t
76
77
78
79 // explicit instantiations
80#ifndef DOXYGEN
81# include "tria_objects.inst"
82#endif
83 } // namespace TriangulationImplementation
84} // namespace internal
85
hex_iterator end_hex() const
std::vector< types::manifold_id > manifold_id
Triangulation< dim, spacedim >::raw_hex_iterator next_free_hex(const Triangulation< dim, spacedim > &tria, const unsigned int level)
std::vector< BoundaryOrMaterialId > boundary_or_material_id
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:502
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:503
unsigned int level
Definition grid_out.cc:4626
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
static ::ExceptionBase & ExcInternalError()
std::enable_if_t< std::is_fundamental_v< T >, std::size_t > memory_consumption(const T &t)