29 namespace TriangulationImplementation
31 template <
int dim,
int spacedim>
32 typename ::Triangulation<dim, spacedim>::raw_hex_iterator
34 const unsigned int level)
42 for (; pos < last; ++pos)
51 return tria.end_hex();
56 typename ::Triangulation<dim, spacedim>::raw_hex_iterator(&tria,
98 const std::size_t new_objects_single)
111 std::size_t n_unused_pairs = 0;
112 std::size_t n_unused_singles = 0;
113 for (std::size_t i = 0; i <
used.size(); ++i)
117 else if (i + 1 <
used.size())
142 const std::ptrdiff_t additional_single_objects =
143 new_objects_single - n_unused_singles;
145 Assert(
used.size() + new_objects_in_pairs >= 2 * n_unused_pairs,
147 std::size_t new_size =
148 used.size() + new_objects_in_pairs - 2 * n_unused_pairs;
149 if (additional_single_objects > 0)
150 new_size += additional_single_objects;
157 (new_size - this->n_objects()) *
161 used.reserve(new_size);
170 children.reserve(factor * new_size);
172 factor * new_size -
children.size(),
197 if (n_unused_singles == 0)
205 const auto new_hexes = new_objects_in_pairs;
207 const auto new_size =
208 new_hexes + std::count(
used.begin(),
used.end(),
true);
215 (new_size - this->n_objects()) *
219 used.reserve(new_size);
228 children.reserve(factor * new_size);
230 factor * new_size -
children.size(),
276# include "grid/tria_objects.inst"
std::vector< types::manifold_id > manifold_id
std::vector< int > bounding_objects
void allocate_end(const std::size_t new_objects_in_pairs, const std::size_t new_objects_single)
std::vector< int > children
unsigned int next_free_pair
std::size_t memory_consumption() const
std::size_t n_objects() const
Triangulation< dim, spacedim >::raw_hex_iterator next_free_hex(const Triangulation< dim, spacedim > &tria, const unsigned int level)
std::vector< bool > user_flags
bool reverse_order_next_free_single
unsigned int next_free_single
void allocate(const std::size_t n_objects)
unsigned int faces_per_object
unsigned int children_per_object
std::vector< BoundaryOrMaterialId > boundary_or_material_id
std::vector< std::uint8_t > refinement_cases
std::vector< UserData > user_data
#define DEAL_II_NAMESPACE_OPEN
#define DEAL_II_NAMESPACE_CLOSE
static ::ExceptionBase & ExcNotImplemented()
#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)
constexpr types::manifold_id flat_manifold_id