759 template <
int structdim2,
int dim2,
int spacedim2>
869 typename ::internal::TriangulationImplementation::
870 Iterators<dim, spacedim>::line_iterator
871 line(
const unsigned int i)
const;
885 typename ::internal::TriangulationImplementation::
886 Iterators<dim, spacedim>::quad_iterator
887 quad(
const unsigned int i)
const;
1495 std::pair<Point<spacedim>,
double>
1603 center(
const bool respect_manifold =
false,
1604 const bool interpolate_from_surrounding =
false)
const;
1754 const std::initializer_list<int> &new_indices)
const;
1761 const std::initializer_list<unsigned int> &new_indices)
const;
1785 const unsigned int face_no,
1840 friend struct ::internal::TriangulationImplementation::Implementation;
1841 friend struct ::internal::TriangulationImplementation::
1842 ImplementationMixedMesh;
1843 friend struct ::internal::TriaAccessorImplementation::Implementation;
1866template <
int dim,
int spacedim>
1909 const int level = 0,
1910 const int index = 0,
1916 template <
int structdim2,
int dim2,
int spacedim2>
1922 template <
int structdim2,
int dim2,
int spacedim2>
2023 typename ::internal::TriangulationImplementation::
2024 Iterators<dim, spacedim>::line_iterator
static line(
const unsigned int);
2035 static typename ::internal::TriangulationImplementation::
2036 Iterators<dim, spacedim>::quad_iterator
2082 const bool interpolate_from_surrounding =
false)
const;
2251 template <
typename Accessor>
2253 template <
typename Accessor>
2255 template <
typename Accessor>
2277template <
int spacedim>
2355 template <
int structdim2,
int dim2,
int spacedim2>
2361 template <
int structdim2,
int dim2,
int spacedim2>
2498 typename ::internal::TriangulationImplementation::
2499 Iterators<1, spacedim>::line_iterator
static line(
const unsigned int);
2513 static typename ::internal::TriangulationImplementation::
2514 Iterators<1, spacedim>::quad_iterator
3040template <
int dim,
int spacedim = dim>
3065 const int level = -1,
3066 const int index = -1,
3086 template <
int structdim2,
int dim2,
int spacedim2>
3093 template <
int structdim2,
int dim2,
int spacedim2>
3190 boost::container::small_vector<TriaIterator<CellAccessor<dim, spacedim>>,
3191 ReferenceCells::max_n_children<dim>()>
3211 boost::container::small_vector<
3214 ReferenceCells::max_n_faces<dim>()
3282 const unsigned int subface_no)
const;
3395 std::pair<unsigned int, unsigned int>
3474 const unsigned int subface_no)
const;
3486 std::pair<unsigned int, unsigned int>
3663 const unsigned int face_no,
4101 std::set<TriaActiveIterator<CellAccessor<dim, spacedim>>>
4181 template <
int dim_,
int spacedim_>
4230 friend struct ::internal::TriangulationImplementation::Implementation;
4231 friend struct ::internal::TriangulationImplementation::
4232 ImplementationMixedMesh;
4240template <
int structdim,
int dim,
int spacedim>
4241template <
typename OtherAccessor>
4243 const OtherAccessor &)
4246 ExcMessage(
"You are attempting an illegal conversion between "
4247 "iterator/accessor types. The constructor you call "
4248 "only exists to make certain template constructs "
4249 "easier to write as dimension independent code but "
4250 "the conversion is not valid in the current context."));
4255template <
int structdim,
int dim,
int spacedim>
4256template <
int structdim2,
int dim2,
int spacedim2>
4261 ExcMessage(
"You are attempting an illegal conversion between "
4262 "iterator/accessor types. The constructor you call "
4263 "only exists to make certain template constructs "
4264 "easier to write as dimension independent code but "
4265 "the conversion is not valid in the current context."));
4270template <
int dim,
int spacedim>
4271template <
int structdim2,
int dim2,
int spacedim2>
4276 ExcMessage(
"You are attempting an illegal conversion between "
4277 "iterator/accessor types. The constructor you call "
4278 "only exists to make certain template constructs "
4279 "easier to write as dimension independent code but "
4280 "the conversion is not valid in the current context."));
4285template <
int structdim,
int dim,
int spacedim>
4286template <
int structdim2,
int dim2,
int spacedim2>
4291 ExcMessage(
"You are attempting an illegal conversion between "
4292 "iterator/accessor types. The constructor you call "
4293 "only exists to make certain template constructs "
4294 "easier to write as dimension independent code but "
4295 "the conversion is not valid in the current context."));
4300template <
int dim,
int spacedim>
4301template <
int structdim2,
int dim2,
int spacedim2>
4306 ExcMessage(
"You are attempting an illegal conversion between "
4307 "iterator/accessor types. The constructor you call "
4308 "only exists to make certain template constructs "
4309 "easier to write as dimension independent code but "
4310 "the conversion is not valid in the current context."));
4344 namespace TriaAccessorImplementation
4351 template <
int dim,
int spacedim>
4356 ReferenceCells::n_vertices_to_reference_cell<dim>(vertices.size());
4358 if constexpr (dim == 1)
4362 return (vertices[1] - vertices[0]).norm();
4364 else if constexpr (dim == 2)
4369 (vertices[2] - vertices[1]).
norm(),
4370 (vertices[2] - vertices[0]).
norm()});
4374 (vertices[2] - vertices[1]).
norm()});
4376 else if constexpr (dim == 3)
4381 (vertices[2] - vertices[0]).
norm(),
4382 (vertices[2] - vertices[1]).
norm(),
4383 (vertices[3] - vertices[0]).
norm(),
4384 (vertices[3] - vertices[1]).
norm(),
4385 (vertices[3] - vertices[2]).
norm()});
4390 (vertices[3] - vertices[0]).
norm(),
4391 (vertices[2] - vertices[1]).
norm(),
4394 (vertices[4] - vertices[0]).
norm(),
4395 (vertices[4] - vertices[1]).
norm(),
4396 (vertices[4] - vertices[2]).
norm(),
4397 (vertices[4] - vertices[3]).
norm()});
4402 (vertices[4] - vertices[0]).
norm(),
4403 (vertices[3] - vertices[1]).
norm(),
4404 (vertices[5] - vertices[1]).
norm(),
4405 (vertices[4] - vertices[2]).
norm(),
4406 (vertices[5] - vertices[0]).
norm(),
4407 (vertices[3] - vertices[2]).
norm(),
4410 (vertices[1] - vertices[0]).
norm(),
4411 (vertices[2] - vertices[1]).
norm(),
4412 (vertices[2] - vertices[0]).
norm(),
4413 (vertices[4] - vertices[3]).
norm(),
4414 (vertices[5] - vertices[4]).
norm(),
4415 (vertices[5] - vertices[3]).
norm()});
4419 (vertices[6] - vertices[1]).
norm(),
4420 (vertices[2] - vertices[5]).
norm(),
4421 (vertices[3] - vertices[4]).
norm()});
4433template <
int structdim,
int dim,
int spacedim>
4438 const AccessorData *)
4440 , present_index(
index)
4446 if (structdim != dim)
4452template <
int structdim,
int dim,
int spacedim>
4456 , present_index(a.present_index)
4464template <
int structdim,
int dim,
int spacedim>
4468 if constexpr (structdim == dim)
4469 this->present_level =
level;
4472 ExcMessage(
"Lower-dimensional objects must be on level 0."));
4477template <
int structdim,
int dim,
int spacedim>
4482 this->set_level(a.
level());
4486 if (structdim != dim)
4492template <
int structdim,
int dim,
int spacedim>
4497 this->set_level(a.
level());
4501 if (structdim != dim)
4508template <
int structdim,
int dim,
int spacedim>
4521template <
int structdim,
int dim,
int spacedim>
4534template <
int structdim,
int dim,
int spacedim>
4549template <
int structdim,
int dim,
int spacedim>
4553 if constexpr (structdim == dim)
4554 return this->present_level;
4561template <
int structdim,
int dim,
int spacedim>
4565 return present_index;
4570template <
int structdim,
int dim,
int spacedim>
4574 if ((
level() >= 0) && (present_index >= 0))
4576 else if (present_index == -1)
4584template <
int structdim,
int dim,
int spacedim>
4593template <
int structdim,
int dim,
int spacedim>
4599 ++this->present_index;
4601 if (structdim != dim)
4608 if (this->present_index >=
static_cast<int>(objects().n_objects()))
4609 this->present_index = -1;
4613 while (this->present_index >=
4614 static_cast<int>(this->tria->
levels[
level()]->cells.n_objects()))
4618 this->set_level(
level() + 1);
4619 this->present_index = 0;
4621 if (
level() >=
static_cast<int>(this->tria->
levels.size()))
4624 this->set_level(-1);
4625 this->present_index = -1;
4633template <
int structdim,
int dim,
int spacedim>
4638 --this->present_index;
4640 if (structdim != dim)
4642 if (this->present_index < 0)
4643 this->present_index = -1;
4647 while (this->present_index < 0)
4650 this->set_level(
level() - 1);
4655 this->set_level(-1);
4656 this->present_index = -1;
4660 this->present_index =
4661 this->tria->
levels[
level()]->cells.n_objects() - 1;
4668template <
int structdim,
int dim,
int spacedim>
4669inline ::internal::TriangulationImplementation::TriaObjects &
4672 if (structdim == dim)
4675 if (structdim == 1 && dim > 1)
4676 return this->tria->
faces->lines;
4678 if (structdim == 2 && dim > 2)
4679 return this->tria->
faces->quads;
4690template <
int structdim,
int dim,
int spacedim>
4694 const AccessorData *)
4697 ExcMessage(
"You are attempting an invalid conversion between "
4698 "iterator/accessor types. The constructor you call "
4699 "only exists to make certain template constructs "
4700 "easier to write as dimension independent code but "
4701 "the conversion is not valid in the current context."));
4706template <
int structdim,
int dim,
int spacedim>
4711 ExcMessage(
"You are attempting an invalid conversion between "
4712 "iterator/accessor types. The constructor you call "
4713 "only exists to make certain template constructs "
4714 "easier to write as dimension independent code but "
4715 "the conversion is not valid in the current context."));
4720template <
int structdim,
int dim,
int spacedim>
4730template <
int structdim,
int dim,
int spacedim>
4742template <
int structdim,
int dim,
int spacedim>
4754template <
int structdim,
int dim,
int spacedim>
4765template <
int structdim,
int dim,
int spacedim>
4776template <
int structdim,
int dim,
int spacedim>
4783template <
int structdim,
int dim,
int spacedim>
4790template <
int structdim,
int dim,
int spacedim>
4799template <
int structdim,
int dim,
int spacedim>
4808template <
int structdim,
int dim,
int spacedim>
4811 const unsigned int)
const
4814 ExcMessage(
"You are trying to set the user index of an "
4815 "invalid object."));
4820template <
int structdim,
int dim,
int spacedim>
4826 ExcMessage(
"You are trying to set the manifold id of an "
4827 "invalid object."));
4832template <
int structdim,
int dim,
int spacedim>
4839 return invalid_vertex;
4843template <
int structdim,
int dim,
int spacedim>
4854template <
int structdim,
int dim,
int spacedim>
4869 namespace TriaAccessorImplementation
4874 using ::TriaAccessor;
4880 struct Implementation
4882 template <
int dim,
int spacedim>
4883 static std::array<unsigned int, 1>
4892 template <
int structdim,
int dim,
int spacedim>
4893 static std::array<unsigned int, 4>
4898 std::array<unsigned int, 4> line_indices = {};
4899 for (
const unsigned int line : cell.line_indices())
4900 line_indices[line] = cell.line_index(line);
4901 return line_indices;
4908 template <
int structdim,
int dim,
int spacedim>
4909 static std::array<unsigned int, 12>
4910 get_line_indices_of_cell(
4913 std::array<unsigned int, 12> line_indices = {};
4922 for (
unsigned int f = 4; f < 6; ++f)
4932 const std::array<unsigned int, 4> my_indices{{
4938 const auto quad = cell.
quad(f);
4939 for (
unsigned int l = 0;
l < 4; ++
l)
4940 line_indices[4 * (f - 4) +
l] =
4941 quad->line_index(my_indices[l]);
4943 for (
unsigned int f = 0; f < 2; ++f)
4945 const auto orientation =
4948 ->face_orientations.get_combined_orientation(cell.
index(),
4950 const std::array<unsigned int, 2> my_indices{{
4954 const auto quad = cell.
quad(f);
4955 line_indices[8 + f] = quad->line_index(my_indices[0]);
4956 line_indices[10 + f] = quad->line_index(my_indices[1]);
4962 const std::array<unsigned int, 3> orientations{
4966 const std::array<unsigned int, 6> my_indices{{
4967 reference_cell.standard_to_real_face_line(0, 0, orientations[0]),
4968 reference_cell.standard_to_real_face_line(1, 0, orientations[0]),
4969 reference_cell.standard_to_real_face_line(2, 0, orientations[0]),
4970 reference_cell.standard_to_real_face_line(1, 1, orientations[1]),
4971 reference_cell.standard_to_real_face_line(2, 1, orientations[1]),
4972 reference_cell.standard_to_real_face_line(1, 2, orientations[2]),
4974 const std::array<
decltype(cell.
quad(0)), 3> quads{
4976 line_indices[0] = quads[0]->line_index(my_indices[0]);
4977 line_indices[1] = quads[0]->line_index(my_indices[1]);
4978 line_indices[2] = quads[0]->line_index(my_indices[2]);
4979 line_indices[3] = quads[1]->line_index(my_indices[3]);
4980 line_indices[4] = quads[1]->line_index(my_indices[4]);
4981 line_indices[5] = quads[2]->line_index(my_indices[5]);
4989 return line_indices;
5002 template <
int dim,
int spacedim>
5003 static std::pair<std::array<unsigned int, 1>,
5004 std::array<types::geometric_orientation, 1>>
5005 get_line_indices_and_orientations_of_cell(
5020 template <
int dim,
int spacedim>
5021 static std::pair<std::array<unsigned int, 4>,
5022 std::array<types::geometric_orientation, 4>>
5023 get_line_indices_and_orientations_of_cell(
5028 std::array<types::geometric_orientation, 4> line_orientations = {};
5029 std::array<unsigned int, 4> line_indices = {};
5030 for (
const unsigned int line : cell.line_indices())
5035 return std::make_pair(line_indices, line_orientations);
5046 template <
int dim,
int spacedim>
5047 static std::pair<std::array<unsigned int, 12>,
5048 std::array<types::geometric_orientation, 12>>
5049 get_line_indices_and_orientations_of_cell(
5052 std::array<types::geometric_orientation, 12> line_orientations = {};
5053 std::array<unsigned int, 12> line_indices = {};
5062 for (
unsigned int f = 4; f < 6; ++f)
5072 const std::array<unsigned int, 4> my_indices{{
5078 const auto quad = cell.
quad(f);
5079 for (
unsigned int l = 0;
l < 4; ++
l)
5080 line_indices[4 * (f - 4) +
l] =
5081 quad->line_index(my_indices[l]);
5082 const std::array<types::geometric_orientation, 4>
5085 0, f, orientation, quad->line_orientation(my_indices[0])),
5087 1, f, orientation, quad->line_orientation(my_indices[1])),
5089 2, f, orientation, quad->line_orientation(my_indices[2])),
5091 3, f, orientation, quad->line_orientation(my_indices[3])),
5093 for (
unsigned int l = 0;
l < 4; ++
l)
5094 line_orientations[4 * (f - 4) +
l] = my_orientations[
l];
5096 for (
unsigned int f = 0; f < 2; ++f)
5100 const std::array<unsigned int, 2> my_indices{{
5104 const auto quad = cell.
quad(f);
5105 line_indices[8 + f] = quad->line_index(my_indices[0]);
5106 line_indices[10 + f] = quad->line_index(my_indices[1]);
5107 const std::array<types::geometric_orientation, 2>
5110 0, f, orientation, quad->line_orientation(my_indices[0])),
5112 1, f, orientation, quad->line_orientation(my_indices[1])),
5114 line_orientations[8 + f] = my_orientations[0];
5115 line_orientations[10 + f] = my_orientations[1];
5121 const std::array<types::geometric_orientation, 3> orientations{
5125 const std::array<unsigned int, 6> my_indices{{
5126 reference_cell.standard_to_real_face_line(0, 0, orientations[0]),
5127 reference_cell.standard_to_real_face_line(1, 0, orientations[0]),
5128 reference_cell.standard_to_real_face_line(2, 0, orientations[0]),
5129 reference_cell.standard_to_real_face_line(1, 1, orientations[1]),
5130 reference_cell.standard_to_real_face_line(2, 1, orientations[1]),
5131 reference_cell.standard_to_real_face_line(1, 2, orientations[2]),
5133 const std::array<
decltype(cell.
quad(0)), 3> quads{
5135 line_indices[0] = quads[0]->line_index(my_indices[0]);
5136 line_indices[1] = quads[0]->line_index(my_indices[1]);
5137 line_indices[2] = quads[0]->line_index(my_indices[2]);
5138 line_indices[3] = quads[1]->line_index(my_indices[3]);
5139 line_indices[4] = quads[1]->line_index(my_indices[4]);
5140 line_indices[5] = quads[2]->line_index(my_indices[5]);
5142 line_orientations[0] =
reference_cell.face_to_cell_line_orientation(
5143 0, 0, orientations[0], quads[0]->line_orientation(my_indices[0]));
5144 line_orientations[1] =
reference_cell.face_to_cell_line_orientation(
5145 1, 0, orientations[0], quads[0]->line_orientation(my_indices[1]));
5146 line_orientations[2] =
reference_cell.face_to_cell_line_orientation(
5147 2, 0, orientations[0], quads[0]->line_orientation(my_indices[2]));
5148 line_orientations[3] =
reference_cell.face_to_cell_line_orientation(
5149 1, 1, orientations[1], quads[1]->line_orientation(my_indices[3]));
5150 line_orientations[4] =
reference_cell.face_to_cell_line_orientation(
5151 2, 1, orientations[1], quads[1]->line_orientation(my_indices[4]));
5152 line_orientations[5] =
reference_cell.face_to_cell_line_orientation(
5153 1, 2, orientations[2], quads[2]->line_orientation(my_indices[5]));
5164 return std::make_pair(line_indices, line_orientations);
5172template <
int structdim,
int dim,
int spacedim>
5177 const AccessorData *local_data)
5183template <
int structdim,
int dim,
int spacedim>
5188 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5190 return this->objects().used[this->present_index];
5195template <
int structdim,
int dim,
int spacedim>
5198 const unsigned int i)
const
5207template <
int structdim,
int dim,
int spacedim>
5211 if constexpr (structdim == 0)
5213 else if constexpr (structdim == 1)
5215 else if constexpr (structdim == dim)
5216 return this->tria->
levels[this->level()]
5217 ->reference_cell[this->present_index];
5219 return this->tria->
faces->get_quad_type(this->present_index);
5224template <
int structdim,
int dim,
int spacedim>
5227 const unsigned int vertex_no)
const
5231 if constexpr (structdim == 1)
5236 return this->objects().get_bounding_object(this->present_index,
5239 else if constexpr (structdim == dim)
5243 const auto vertex_index =
5244 this->tria->
levels[this->
level()]->cached_vertex_index(
5245 this->present_index, vertex_no);
5249 "The present vertex's vertex_index is not valid. This is typically "
5250 "caused by calling cell->vertex_index() during grid refinement for "
5251 "a newly created cell, since the cell vertex index cache is not "
5252 "complete at that point."));
5253 return vertex_index;
5255 else if constexpr (structdim == 2)
5257 const auto [line_index, vertex_index] =
5260 const auto vertex_within_line_index =
5262 vertex_index, line_index, this->line_orientation(line_index));
5264 return this->line(line_index)->vertex_index(vertex_within_line_index);
5275template <
int structdim,
int dim,
int spacedim>
5284template <
int structdim,
int dim,
int spacedim>
5285inline typename ::internal::TriangulationImplementation::
5286 Iterators<dim, spacedim>::line_iterator
5290 return typename ::internal::TriangulationImplementation::
5291 Iterators<dim, spacedim>::line_iterator(this->tria, 0, line_index(i));
5296template <
int structdim,
int dim,
int spacedim>
5303 ExcMessage(
"You can't ask for the index of a line bounding a "
5304 "one-dimensional cell because it is not bounded by "
5307 if constexpr (structdim == 2)
5309 return this->objects().get_bounding_object(this->present_index, i);
5311 else if constexpr (structdim == 3)
5313 const auto [face_index, line_index] =
5315 const auto line_within_face_index =
5319 return this->quad(face_index)->line_index(line_within_face_index);
5328template <
int structdim,
int dim,
int spacedim>
5329inline typename ::internal::TriangulationImplementation::
5330 Iterators<dim, spacedim>::quad_iterator
5334 return typename ::internal::TriangulationImplementation::
5335 Iterators<dim, spacedim>::quad_iterator(this->tria, 0, quad_index(i));
5340template <
int structdim,
int dim,
int spacedim>
5343 const unsigned int face_no)
const
5346 ExcMessage(
"You can't ask for the index of a quad bounding "
5347 "a one- or two-dimensional cell because it is not "
5348 "bounded by quads."));
5352 if constexpr (structdim == 3)
5353 return this->objects().get_bounding_object(this->present_index, face_no);
5360template <
int structdim,
int dim,
int spacedim>
5363 const unsigned int face)
const
5368 ExcMessage(
"This function can only be used on objects "
5369 "that are cells, but not on faces or edges "
5370 "that bound cells."));
5374 if constexpr (structdim == 1)
5376 else if constexpr (structdim == 2)
5380 if (this->tria->
levels[this->level()]->face_orientations.n_objects() == 0)
5384 ->face_orientations.get_combined_orientation(this->present_index,
5389 ->face_orientations.get_combined_orientation(this->present_index, face);
5394template <
int structdim,
int dim,
int spacedim>
5397 const unsigned int face)
const
5402 ExcMessage(
"This function can only be used on objects "
5403 "that are cells, but not on faces or edges "
5404 "that bound cells."));
5408 if constexpr (structdim == 1)
5411 else if constexpr (structdim == 2)
5412 return this->line_orientation(face) ==
5415 return this->tria->
levels[this->
level()]->face_orientations.get_orientation(
5416 this->present_index, face);
5421template <
int structdim,
int dim,
int spacedim>
5427 ExcMessage(
"This function can only be used on objects "
5428 "that are cells, but not on faces or edges "
5429 "that bound cells."));
5434 if constexpr (structdim == 3)
5435 return this->tria->
levels[this->level()]->face_orientations.get_flip(
5436 this->present_index, face);
5444template <
int structdim,
int dim,
int spacedim>
5447 const unsigned int face)
const
5451 ExcMessage(
"This function can only be used on objects "
5452 "that are cells, but not on faces or edges "
5453 "that bound cells."));
5458 if constexpr (structdim == 3)
5459 return this->tria->
levels[this->level()]->face_orientations.get_rotation(
5460 this->present_index, face);
5469template <
int structdim,
int dim,
int spacedim>
5472 const unsigned int line)
const
5479 if constexpr (structdim == 1)
5481 else if constexpr (structdim == 2 && dim == 2)
5488 return combined_orientation;
5490 else if constexpr (structdim == 2 && dim == 3)
5492 return this->tria->
faces->get_line_orientation(this->present_index, line);
5494 else if constexpr (structdim == 3 && dim == 3)
5499 const auto [face_index, line_index] =
5501 const auto line_within_face_index =
5510 this->quad(face_index)->line_orientation(line_within_face_index));
5521template <
int structdim,
int dim,
int spacedim>
5524 const unsigned int line,
5530 ExcMessage(
"In 1d lines are cells and thus do not need to have their "
5531 "orientations set."));
5533 ExcMessage(
"In 2d lines are faces, and, for compatibility with other "
5534 "dimensions, their orientations should be set via "
5535 "set_combined_face_orientation()."));
5541 if constexpr (dim == 3)
5546 this->tria->
faces->set_line_orientation(this->present_index, line, value);
5552template <
int structdim,
int dim,
int spacedim>
5555 const unsigned int face_no,
5561 ExcMessage(
"This function can only be used on objects that are cells "
5562 "and not on objects which bound cells."));
5569 ->face_orientations.set_combined_orientation(this->present_index,
5571 combined_orientation);
5576template <
int structdim,
int dim,
int spacedim>
5581 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5583 this->objects().used[this->present_index] =
true;
5588template <
int structdim,
int dim,
int spacedim>
5593 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5595 this->objects().used[this->present_index] =
false;
5599template <
int structdim,
int dim,
int spacedim>
5609 const auto &objects = this->objects();
5610 const unsigned int n_sets_of_two = objects.children_per_object / 2;
5611 return objects.children[n_sets_of_two * this->present_index + i / 2] + i % 2;
5616template <
int structdim,
int dim,
int spacedim>
5619 const unsigned int i)
const
5626 return child_index(i);
5630 static_cast<std::uint8_t
>(refinement_case()));
5636 return child_index(i);
5638 (child(i % 2)->refinement_case() ==
5640 return child(i % 2)->child_index(i / 2);
5642 (child(i / 2)->refinement_case() ==
5644 return child(i / 2)->child_index(i % 2);
5649 "This cell has no grandchildren equivalent to isotropic refinement"));
5661template <
int structdim,
int dim,
int spacedim>
5666 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5673 this->objects().children[this->present_index] != -1 ?
5682 Assert(
static_cast<unsigned int>(this->present_index) <
5683 this->objects().refinement_cases.size(),
5686 this->objects().refinement_cases.size()));
5689 this->objects().refinement_cases[this->present_index]));
5695template <
int structdim,
int dim,
int spacedim>
5702 this->tria, (dim == structdim ? this->
level() + 1 : 0), child_index(i));
5712template <
int structdim,
int dim,
int spacedim>
5717 const auto n_children = this->n_children();
5718 for (
unsigned int child_n = 0; child_n < n_children; ++child_n)
5719 if (this->child(child_n) == child)
5723 ExcMessage(
"The given child is not a child of the current object."));
5729template <
int structdim,
int dim,
int spacedim>
5732 const unsigned int i)
const
5744 static_cast<std::uint8_t
>(refinement_case()));
5752 (child(i % 2)->refinement_case() ==
5754 return child(i % 2)->child(i / 2);
5756 (child(i / 2)->refinement_case() ==
5758 return child(i / 2)->child(i % 2);
5763 "This cell has no grandchildren equivalent to isotropic refinement"));
5777template <
int structdim,
int dim,
int spacedim>
5782 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5787 const auto &objects = this->objects();
5788 const unsigned int n_sets_of_two = objects.children_per_object / 2;
5789 return (objects.children[n_sets_of_two * this->present_index] != -1);
5794template <
int structdim,
int dim,
int spacedim>
5799 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5807template <
int structdim,
int dim,
int spacedim>
5813 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5815 Assert(
static_cast<unsigned int>(this->present_index) <
5816 this->objects().refinement_cases.size(),
5819 this->objects().refinement_cases.size()));
5821 this->objects().refinement_cases[this->present_index] = refinement_case;
5825template <
int structdim,
int dim,
int spacedim>
5830 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5832 Assert(
static_cast<unsigned int>(this->present_index) <
5833 this->objects().refinement_cases.size(),
5836 this->objects().refinement_cases.size()));
5838 this->objects().refinement_cases[this->present_index] =
5844template <
int structdim,
int dim,
int spacedim>
5847 const int index)
const
5854 auto &objects = this->objects();
5855 const unsigned int n_sets_of_two = objects.children_per_object / 2;
5861 (i == 0 && !this->has_children() && (index >= 0)) ||
5864 (i > 0 && this->has_children() && (index >= 0) &&
5865 objects.children[n_sets_of_two * this->present_index + i / 2] == -1),
5868 objects.children[n_sets_of_two * this->present_index + i / 2] =
index;
5873template <
int structdim,
int dim,
int spacedim>
5879 const auto &objects = this->objects();
5880 const unsigned int n_sets_of_two = objects.children_per_object / 2;
5881 for (
unsigned int i = 0; i < n_sets_of_two; ++i)
5882 set_children(2 * i, -1);
5887template <
int structdim,
int dim,
int spacedim>
5892 return this->objects().user_flags[this->present_index];
5897template <
int structdim,
int dim,
int spacedim>
5902 this->objects().user_flags[this->present_index] =
true;
5907template <
int structdim,
int dim,
int spacedim>
5912 this->objects().user_flags[this->present_index] =
false;
5917template <
int structdim,
int dim,
int spacedim>
5923 if (this->has_children())
5924 for (
unsigned int c = 0; c < this->n_children(); ++c)
5925 this->child(c)->recursively_set_user_flag();
5930template <
int structdim,
int dim,
int spacedim>
5936 if (this->has_children())
5937 for (
unsigned int c = 0; c < this->n_children(); ++c)
5938 this->child(c)->recursively_clear_user_flag();
5943template <
int structdim,
int dim,
int spacedim>
5948 this->objects().clear_user_data(this->present_index);
5953template <
int structdim,
int dim,
int spacedim>
5958 this->objects().user_pointer(this->present_index) = p;
5963template <
int structdim,
int dim,
int spacedim>
5968 this->objects().user_pointer(this->present_index) =
nullptr;
5973template <
int structdim,
int dim,
int spacedim>
5978 return this->objects().user_pointer(this->present_index);
5983template <
int structdim,
int dim,
int spacedim>
5988 set_user_pointer(p);
5990 if (this->has_children())
5991 for (
unsigned int c = 0; c < this->n_children(); ++c)
5992 this->child(c)->recursively_set_user_pointer(p);
5997template <
int structdim,
int dim,
int spacedim>
6001 clear_user_pointer();
6003 if (this->has_children())
6004 for (
unsigned int c = 0; c < this->n_children(); ++c)
6005 this->child(c)->recursively_clear_user_pointer();
6010template <
int structdim,
int dim,
int spacedim>
6013 const unsigned int p)
const
6016 this->objects().user_index(this->present_index) = p;
6021template <
int structdim,
int dim,
int spacedim>
6026 this->objects().user_index(this->present_index) = 0;
6031template <
int structdim,
int dim,
int spacedim>
6036 return this->objects().user_index(this->present_index);
6041template <
int structdim,
int dim,
int spacedim>
6044 const unsigned int p)
const
6048 if (this->has_children())
6049 for (
unsigned int c = 0; c < this->n_children(); ++c)
6050 this->child(c)->recursively_set_user_index(p);
6055template <
int structdim,
int dim,
int spacedim>
6061 if (this->has_children())
6062 for (
unsigned int c = 0; c < this->n_children(); ++c)
6063 this->child(c)->recursively_clear_user_index();
6068template <
int structdim,
int dim,
int spacedim>
6072 if (!this->has_children())
6075 unsigned int max_depth = 1;
6076 for (
unsigned int c = 0; c < n_children(); ++c)
6077 max_depth =
std::max(max_depth, child(c)->max_refinement_depth() + 1);
6083template <
int structdim,
int dim,
int spacedim>
6087 if (!this->has_children())
6091 unsigned int sum = 0;
6092 for (
unsigned int c = 0; c < n_children(); ++c)
6093 sum += this->child(c)->n_active_descendants();
6100template <
int structdim,
int dim,
int spacedim>
6107 return this->objects()
6108 .boundary_or_material_id[this->present_index]
6114template <
int structdim,
int dim,
int spacedim>
6122 ExcMessage(
"You are trying to set the boundary_id to an invalid "
6123 "value (numbers::internal_face_boundary_id is reserved)."));
6124 Assert(this->at_boundary(),
6125 ExcMessage(
"You are trying to set the boundary_id of an "
6126 "internal object, which is not allowed!"));
6128 this->objects().boundary_or_material_id[this->present_index].boundary_id =
6134template <
int structdim,
int dim,
int spacedim>
6142 this->objects().boundary_or_material_id[this->present_index].boundary_id =
6148template <
int structdim,
int dim,
int spacedim>
6153 set_boundary_id(boundary_ind);
6163 for (
unsigned int i = 0; i < this->n_lines(); ++i)
6164 this->line(i)->set_boundary_id(boundary_ind);
6174template <
int structdim,
int dim,
int spacedim>
6184template <
int structdim,
int dim,
int spacedim>
6193template <
int structdim,
int dim,
int spacedim>
6199 return this->objects().manifold_id[this->present_index];
6204template <
int structdim,
int dim,
int spacedim>
6211 this->objects().manifold_id[this->present_index] = manifold_ind;
6215template <
int structdim,
int dim,
int spacedim>
6220 set_manifold_id(manifold_ind);
6222 if (this->has_children())
6223 for (
unsigned int c = 0; c < this->n_children(); ++c)
6224 this->child(c)->set_all_manifold_ids(manifold_ind);
6240 for (
unsigned int i = 0; i < this->n_lines(); ++i)
6241 this->line(i)->set_manifold_id(manifold_ind);
6250template <
int structdim,
int dim,
int spacedim>
6256 ReferenceCells::max_n_vertices<structdim>()
6261 vertices(this->n_vertices());
6263 for (
unsigned int v = 0; v < vertices.size(); ++v)
6264 vertices[v] = this->vertex(v);
6266 return internal::TriaAccessorImplementation::diameter<structdim, spacedim>(
6272template <
int dim,
int spacedim>
6277 return internal::TriaAccessorImplementation::diameter<dim, spacedim>(
6279 this->tria, this->level(), this->index())));
6284template <
int structdim,
int dim,
int spacedim>
6285std::pair<Point<spacedim>,
double>
6292 return std::make_pair((this->vertex(1) + this->vertex(0)) * 0.5,
6293 (this->vertex(1) - this->vertex(0)).
norm() * 0.5);
6301 std::vector<bool> is_initial_guess_vertex(this->n_vertices());
6304 std::fill(is_initial_guess_vertex.begin(),
6305 is_initial_guess_vertex.end(),
6318 if (p30.norm() > p21.norm())
6320 center = this->vertex(0) + 0.5 * p30;
6322 is_initial_guess_vertex[3] =
true;
6323 is_initial_guess_vertex[0] =
true;
6327 center = this->vertex(1) + 0.5 * p21;
6329 is_initial_guess_vertex[2] =
true;
6330 is_initial_guess_vertex[1] =
true;
6340 const std::vector<double> diagonals = {p70.norm(),
6344 const std::vector<double>::const_iterator it =
6345 std::max_element(diagonals.begin(), diagonals.end());
6346 if (it == diagonals.begin())
6348 center = this->vertex(0) + 0.5 * p70;
6349 is_initial_guess_vertex[7] =
true;
6350 is_initial_guess_vertex[0] =
true;
6352 else if (it == diagonals.begin() + 1)
6354 center = this->vertex(1) + 0.5 * p61;
6355 is_initial_guess_vertex[6] =
true;
6356 is_initial_guess_vertex[1] =
true;
6358 else if (it == diagonals.begin() + 2)
6360 center = this->vertex(5) + 0.5 * p25;
6361 is_initial_guess_vertex[2] =
true;
6362 is_initial_guess_vertex[5] =
true;
6366 center = this->vertex(4) + 0.5 * p34;
6367 is_initial_guess_vertex[3] =
true;
6368 is_initial_guess_vertex[4] =
true;
6375 return std::pair<Point<spacedim>,
double>();
6382 if (!is_initial_guess_vertex[v])
6384 const double distance = center.
distance(this->vertex(v));
6391 center = this->vertex(v) + pCV * (
radius / distance);
6399 bool all_vertices_within_ball =
true;
6404 if (center.distance(this->vertex(v)) >
6407 all_vertices_within_ball =
false;
6413 return std::make_pair(center,
radius);
6417template <
int structdim,
int dim,
int spacedim>
6424 return (this->vertex(1) - this->vertex(0)).norm();
6428 double min = std::numeric_limits<double>::max();
6430 for (unsigned
int j = i + 1; j < this->n_vertices(); ++j)
6432 (this->vertex(i) - this->vertex(j)) *
6433 (this->vertex(i) - this->vertex(j)));
6443template <
int structdim,
int dim,
int spacedim>
6456 bool is_translation =
true;
6459 for (
unsigned int i = 1; i < this->n_vertices(); ++i)
6462 (o->vertex(i) - this->vertex(i)) - dist;
6465 is_translation =
false;
6469 return is_translation;
6474template <
int structdim,
int dim,
int spacedim>
6483template <
int structdim,
int dim,
int spacedim>
6487 return this->reference_cell().
n_lines();
6492template <
int structdim,
int dim,
int spacedim>
6497 ExcMessage(
"This function can only be used on objects "
6498 "that are cells, but not on faces or edges "
6499 "that bound cells."));
6501 return this->reference_cell().
n_faces();
6506template <
int structdim,
int dim,
int spacedim>
6516template <
int structdim,
int dim,
int spacedim>
6526template <
int structdim,
int dim,
int spacedim>
6538template <
int dim,
int spacedim>
6541 const unsigned int vertex_index)
6548template <
int dim,
int spacedim>
6553 const AccessorData *)
6560template <
int dim,
int spacedim>
6561template <
int structdim2,
int dim2,
int spacedim2>
6572template <
int dim,
int spacedim>
6573template <
int structdim2,
int dim2,
int spacedim2>
6584template <
int dim,
int spacedim>
6594template <
int dim,
int spacedim>
6601 return (global_vertex_index < other.global_vertex_index);
6606template <
int dim,
int spacedim>
6618template <
int dim,
int spacedim>
6627template <
int dim,
int spacedim>
6636template <
int dim,
int spacedim>
6645template <
int dim,
int spacedim>
6650 if (global_vertex_index >= tria->
n_vertices())
6656template <
int dim,
int spacedim>
6662 if (global_vertex_index != 0)
6671template <
int dim,
int spacedim>
6676 ((tria == t.
tria) && (global_vertex_index == t.global_vertex_index));
6683template <
int dim,
int spacedim>
6687 return !(*
this == t);
6692template <
int dim,
int spacedim>
6701template <
int dim,
int spacedim>
6711template <
int dim,
int spacedim>
6712inline typename ::internal::TriangulationImplementation::
6713 Iterators<dim, spacedim>::line_iterator
6716 return typename ::internal::TriangulationImplementation::
6717 Iterators<dim, spacedim>::line_iterator();
6722template <
int dim,
int spacedim>
6732template <
int dim,
int spacedim>
6733inline typename ::internal::TriangulationImplementation::
6734 Iterators<dim, spacedim>::quad_iterator
6737 return typename ::internal::TriangulationImplementation::
6738 Iterators<dim, spacedim>::quad_iterator();
6743template <
int dim,
int spacedim>
6753template <
int dim,
int spacedim>
6762template <
int dim,
int spacedim>
6771template <
int dim,
int spacedim>
6780template <
int dim,
int spacedim>
6789template <
int dim,
int spacedim>
6792 const unsigned int )
6799template <
int dim,
int spacedim>
6808template <
int dim,
int spacedim>
6817template <
int dim,
int spacedim>
6826template <
int dim,
int spacedim>
6835template <
int dim,
int spacedim>
6844template <
int dim,
int spacedim>
6853template <
int dim,
int spacedim>
6862template <
int dim,
int spacedim>
6871template <
int dim,
int spacedim>
6881template <
int dim,
int spacedim>
6890template <
int dim,
int spacedim>
6899template <
int dim,
int spacedim>
6908template <
int dim,
int spacedim>
6917template <
int dim,
int spacedim>
6926template <
int dim,
int spacedim>
6937template <
int spacedim>
6940 const VertexKind vertex_kind,
6941 const unsigned int vertex_index)
6943 , vertex_kind(vertex_kind)
6949template <
int spacedim>
6954 const AccessorData *)
6956 , vertex_kind(interior_vertex)
6970 "This constructor can not be called for face iterators in 1d, "
6971 "except to default-construct iterator objects."));
6976template <
int spacedim>
6977template <
int structdim2,
int dim2,
int spacedim2>
6981 , vertex_kind(interior_vertex)
6989template <
int spacedim>
6990template <
int structdim2,
int dim2,
int spacedim2>
6994 , vertex_kind(interior_vertex)
7002template <
int spacedim>
7007 vertex_kind = t.vertex_kind;
7013template <
int spacedim>
7026template <
int spacedim>
7033 return (global_vertex_index < other.global_vertex_index);
7038template <
int spacedim>
7046template <
int spacedim>
7055template <
int spacedim>
7064template <
int spacedim>
7073template <
int spacedim>
7081template <
int spacedim>
7090template <
int spacedim>
7095 ((tria == t.
tria) && (global_vertex_index == t.global_vertex_index));
7105template <
int spacedim>
7109 return !(*
this == t);
7114template <
int spacedim>
7125template <
int spacedim>
7137template <
int spacedim>
7146template <
int spacedim>
7147inline typename ::internal::TriangulationImplementation::
7148 Iterators<1, spacedim>::line_iterator
7155template <
int spacedim>
7164template <
int spacedim>
7165inline typename ::internal::TriangulationImplementation::
7166 Iterators<1, spacedim>::quad_iterator
7174template <
int spacedim>
7184template <
int spacedim>
7193template <
int spacedim>
7197 return vertex_kind != interior_vertex;
7201template <
int spacedim>
7205 switch (vertex_kind)
7211 this->vertex_index()) !=
7225template <
int spacedim>
7234template <
int spacedim>
7246template <
int spacedim>
7249 const unsigned int )
7255template <
int spacedim>
7264template <
int spacedim>
7273template <
int spacedim>
7282template <
int spacedim>
7291template <
int spacedim>
7300template <
int spacedim>
7309template <
int spacedim>
7318template <
int spacedim>
7327template <
int spacedim>
7337template <
int spacedim>
7345template <
int spacedim>
7353template <
int spacedim>
7360template <
int spacedim>
7368template <
int spacedim>
7377template <
int spacedim>
7383 ExcMessage(
"You can't set the boundary_id of a face of a cell that is "
7384 "not actually at the boundary."));
7391template <
int spacedim>
7400template <
int spacedim>
7410template <
int spacedim>
7419template <
int spacedim>
7428template <
int spacedim>
7437template <
int spacedim>
7446template <
int spacedim>
7455template <
int spacedim>
7465template <
int spacedim>
7476template <
int dim,
int spacedim>
7481 const AccessorData *local_data)
7487template <
int dim,
int spacedim>
7496template <
int dim,
int spacedim>
7502 this->child_index(i));
7512template <
int dim,
int spacedim>
7513inline boost::container::small_vector<TriaIterator<CellAccessor<dim, spacedim>>,
7514 ReferenceCells::max_n_children<dim>()>
7517 boost::container::small_vector<TriaIterator<CellAccessor<dim, spacedim>>,
7518 ReferenceCells::max_n_children<dim>()>
7519 child_iterators(this->n_children());
7521 for (
unsigned int i = 0; i < this->n_children(); ++i)
7522 child_iterators[i] = this->child(i);
7524 return child_iterators;
7529template <
int dim,
int spacedim>
7534 if constexpr (dim == 1)
7537 VertexKind vertex_kind = VertexKind::interior_vertex;
7538 if (i == 0 && at_boundary(0))
7539 vertex_kind = VertexKind::left_vertex;
7540 if (i == 1 && at_boundary(1))
7541 vertex_kind = VertexKind::right_vertex;
7544 this->vertex_index(i));
7547 else if constexpr (dim == 2)
7548 return this->line(i);
7549 else if constexpr (dim == 3)
7550 return this->quad(i);
7560template <
int dim,
int spacedim>
7565 for (
const unsigned int face_n : this->face_indices())
7566 if (this->face(face_n) == face)
7570 ExcMessage(
"The given face is not a face of the current cell."));
7576template <
int dim,
int spacedim>
7577inline boost::container::small_vector<
7580 ReferenceCells::max_n_faces<dim>()
7587 boost::container::small_vector<
7590 ReferenceCells::max_n_faces<dim>()
7595 face_iterators(this->n_faces());
7597 for (
const unsigned int i : this->face_indices())
7598 face_iterators[i] = this->face(i);
7600 return face_iterators;
7605template <
int dim,
int spacedim>
7612 return this->vertex_index(i);
7615 return this->line_index(i);
7618 return this->quad_index(i);
7627template <
int dim,
int spacedim>
7632 return this->tria->
levels[this->
level()]->neighbor_index(this->present_index,
7638template <
int dim,
int spacedim>
7643 return this->tria->
levels[this->
level()]->neighbor_level(this->present_index,
7649template <
int dim,
int spacedim>
7658 this->is_active() ||
7659 !this->tria->
levels[this->level()]->refine_flags[this->present_index],
7660 ExcRefineCellNotActive());
7662 this->tria->
levels[this->level()]->refine_flags[this->present_index]);
7667template <
int dim,
int spacedim>
7672 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7673 Assert(!coarsen_flag_set(), ExcCellFlaggedForCoarsening());
7675 this->tria->
levels[this->
level()]->refine_flags[this->present_index] =
7681template <
int dim,
int spacedim>
7685 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7686 this->tria->
levels[this->
level()]->refine_flags[this->present_index] =
7691template <
int dim,
int spacedim>
7696 if (this->tria->
levels[this->level()]->refine_choice.size() == 0)
7698 return this->tria->
levels[this->
level()]->refine_choice[this->present_index];
7702template <
int dim,
int spacedim>
7705 const std::uint8_t refinement_choice)
const
7707 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7708 if (this->tria->
levels[this->level()]->refine_choice.size() != 0)
7709 this->tria->
levels[this->
level()]->refine_choice[this->present_index] =
7714template <
int dim,
int spacedim>
7718 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7719 if (this->tria->
levels[this->level()]->refine_choice.size() != 0)
7720 this->tria->
levels[this->
level()]->refine_choice[this->present_index] =
7725template <
int dim,
int spacedim>
7728 const unsigned int face_no,
7742 face_refinement_case,
7744 this->face_orientation(face_no),
7745 this->face_flip(face_no),
7746 this->face_rotation(face_no)));
7747 set_refine_flag(new_ref_case);
7749 return new_ref_case != old_ref_case;
7754template <
int dim,
int spacedim>
7757 const unsigned int line_no)
const
7765 old_ref_case = refine_flag_set(),
7769 set_refine_flag(new_ref_case);
7771 return new_ref_case != old_ref_case;
7776template <
int dim,
int spacedim>
7783 if constexpr (dim == 1)
7785 else if constexpr (dim == 2)
7786 return ((face(face_no)->has_children()) ?
7788 internal::SubfaceCase<2>::case_none);
7789 else if constexpr (dim == 3)
7791 switch (
static_cast<std::uint8_t
>(face(face_no)->refinement_case()))
7796 if (face(face_no)->child(0)->has_children())
7798 Assert(face(face_no)->child(0)->refinement_case() ==
7801 if (face(face_no)->child(1)->has_children())
7803 Assert(face(face_no)->child(1)->refinement_case() ==
7813 if (face(face_no)->child(1)->has_children())
7815 Assert(face(face_no)->child(1)->refinement_case() ==
7824 if (face(face_no)->child(0)->has_children())
7826 Assert(face(face_no)->child(0)->refinement_case() ==
7829 if (face(face_no)->child(1)->has_children())
7831 Assert(face(face_no)->child(1)->refinement_case() ==
7841 if (face(face_no)->child(1)->has_children())
7843 Assert(face(face_no)->child(1)->refinement_case() ==
7865template <
int dim,
int spacedim>
7874 this->is_active() ||
7875 !this->tria->
levels[this->level()]->coarsen_flags[this->present_index],
7876 ExcRefineCellNotActive());
7877 return this->tria->
levels[this->
level()]->coarsen_flags[this->present_index];
7882template <
int dim,
int spacedim>
7886 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7887 Assert(!refine_flag_set(), ExcCellFlaggedForRefinement());
7889 this->tria->
levels[this->
level()]->coarsen_flags[this->present_index] =
true;
7894template <
int dim,
int spacedim>
7898 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7899 this->tria->
levels[this->
level()]->coarsen_flags[this->present_index] =
false;
7904template <
int dim,
int spacedim>
7909 neighbor_level(face_no),
7910 neighbor_index(face_no));
7920template <
int dim,
int spacedim>
7924 return !this->has_children();
7929template <
int dim,
int spacedim>
7933 Assert(this->is_active(),
7934 ExcMessage(
"is_locally_owned() can only be called on active cells!"));
7935# ifndef DEAL_II_WITH_MPI
7952template <
int dim,
int spacedim>
7956# ifndef DEAL_II_WITH_MPI
7967 this->level_subdomain_id() == locally_owned_subdomain);
7973template <
int dim,
int spacedim>
7977 Assert(this->is_active(),
7978 ExcMessage(
"is_ghost() can only be called on active cells!"));
7979 if (this->has_children())
7982# ifndef DEAL_II_WITH_MPI
7995 subdomain_id != locally_owned_subdomain &&
8002template <
int dim,
int spacedim>
8006# ifndef DEAL_II_WITH_MPI
8018 subdomain_id != locally_owned_subdomain &&
8026template <
int dim,
int spacedim>
8030 Assert(this->is_active(),
8031 ExcMessage(
"is_artificial() can only be called on active cells!"));
8032# ifndef DEAL_II_WITH_MPI
8048template <
int dim,
int spacedim>
8052# ifndef DEAL_II_WITH_MPI
8063template <
int dim,
int spacedim>
8066 const unsigned int face_no,
8072 ExcMessage(
"The provided neighbor must be either a valid iterator or "
8073 "an end iterator (to indicate a boundary face)"));
8075 level->set_neighbor(this->present_index,
8083template <
int dim,
int spacedim>
8089 ->cells.boundary_or_material_id[this->present_index]
8095template <
int dim,
int spacedim>
8100 Assert(this->is_active(),
8101 ExcMessage(
"subdomain_id() can only be called on active cells!"));
8102 return this->tria->
levels[this->
level()]->subdomain_ids[this->present_index];
8107template <
int dim,
int spacedim>
8113 ->level_subdomain_ids[this->present_index];
8118template <
int dim,
int spacedim>
8122 const unsigned int n2 = neighbor_of_neighbor_internal(neighbor);
8128 return neighbor_of_coarser_neighbor(neighbor).first;
8133template <
int dim,
int spacedim>
8142template <
int dim,
int spacedim>
8148 ->active_cell_indices[this->present_index];
8153template <
int dim,
int spacedim>
8158 Assert(this->is_active(),
8160 "global_active_cell_index() can only be called on active cells!"));
8163 ->global_active_cell_indices[this->present_index];
8168template <
int dim,
int spacedim>
8173 ->global_level_cell_indices[this->present_index];
8178template <
int dim,
int spacedim>
8183 if constexpr (dim == spacedim)
8185 else if constexpr (dim == spacedim - 1)
8186 return this->tria->
levels[this->level()]
8187 ->direction_flags[this->present_index];
8191 ExcMessage(
"This function cannot be called if dim<spacedim-1."));