810 template <
int structdim2,
int dim2,
int spacedim2>
920 typename ::internal::TriangulationImplementation::
921 Iterators<dim, spacedim>::line_iterator
922 line(
const unsigned int i)
const;
936 typename ::internal::TriangulationImplementation::
937 Iterators<dim, spacedim>::quad_iterator
938 quad(
const unsigned int i)
const;
1546 std::pair<Point<spacedim>,
double>
1654 center(
const bool respect_manifold =
false,
1655 const bool interpolate_from_surrounding =
false)
const;
1805 const std::initializer_list<int> &new_indices)
const;
1812 const std::initializer_list<unsigned int> &new_indices)
const;
1836 const unsigned int face_no,
1891 friend struct ::internal::TriangulationImplementation::Implementation;
1892 friend struct ::internal::TriangulationImplementation::
1893 ImplementationMixedMesh;
1894 friend struct ::internal::TriaAccessorImplementation::Implementation;
1917template <
int dim,
int spacedim>
1960 const int level = 0,
1961 const int index = 0,
1967 template <
int structdim2,
int dim2,
int spacedim2>
1973 template <
int structdim2,
int dim2,
int spacedim2>
2074 typename ::internal::TriangulationImplementation::
2075 Iterators<dim, spacedim>::line_iterator
static line(
const unsigned int);
2086 static typename ::internal::TriangulationImplementation::
2087 Iterators<dim, spacedim>::quad_iterator
2133 const bool interpolate_from_surrounding =
false)
const;
2302 template <
typename Accessor>
2304 template <
typename Accessor>
2306 template <
typename Accessor>
2328template <
int spacedim>
2406 template <
int structdim2,
int dim2,
int spacedim2>
2412 template <
int structdim2,
int dim2,
int spacedim2>
2549 typename ::internal::TriangulationImplementation::
2550 Iterators<1, spacedim>::line_iterator
static line(
const unsigned int);
2564 static typename ::internal::TriangulationImplementation::
2565 Iterators<1, spacedim>::quad_iterator
3091template <
int dim,
int spacedim = dim>
3116 const int level = -1,
3117 const int index = -1,
3137 template <
int structdim2,
int dim2,
int spacedim2>
3144 template <
int structdim2,
int dim2,
int spacedim2>
3241 boost::container::small_vector<TriaIterator<CellAccessor<dim, spacedim>>,
3242 ReferenceCells::max_n_children<dim>()>
3262 boost::container::small_vector<
3265 ReferenceCells::max_n_faces<dim>()
3333 const unsigned int subface_no)
const;
3446 std::pair<unsigned int, unsigned int>
3525 const unsigned int subface_no)
const;
3537 std::pair<unsigned int, unsigned int>
3714 const unsigned int face_no,
4152 std::set<TriaActiveIterator<CellAccessor<dim, spacedim>>>
4232 template <
int dim_,
int spacedim_>
4281 friend struct ::internal::TriangulationImplementation::Implementation;
4282 friend struct ::internal::TriangulationImplementation::
4283 ImplementationMixedMesh;
4291template <
int structdim,
int dim,
int spacedim>
4292template <
typename OtherAccessor>
4294 const OtherAccessor &)
4297 ExcMessage(
"You are attempting an illegal conversion between "
4298 "iterator/accessor types. The constructor you call "
4299 "only exists to make certain template constructs "
4300 "easier to write as dimension independent code but "
4301 "the conversion is not valid in the current context."));
4306template <
int structdim,
int dim,
int spacedim>
4307template <
int structdim2,
int dim2,
int spacedim2>
4312 ExcMessage(
"You are attempting an illegal conversion between "
4313 "iterator/accessor types. The constructor you call "
4314 "only exists to make certain template constructs "
4315 "easier to write as dimension independent code but "
4316 "the conversion is not valid in the current context."));
4321template <
int dim,
int spacedim>
4322template <
int structdim2,
int dim2,
int spacedim2>
4327 ExcMessage(
"You are attempting an illegal conversion between "
4328 "iterator/accessor types. The constructor you call "
4329 "only exists to make certain template constructs "
4330 "easier to write as dimension independent code but "
4331 "the conversion is not valid in the current context."));
4336template <
int structdim,
int dim,
int spacedim>
4337template <
int structdim2,
int dim2,
int spacedim2>
4342 ExcMessage(
"You are attempting an illegal conversion between "
4343 "iterator/accessor types. The constructor you call "
4344 "only exists to make certain template constructs "
4345 "easier to write as dimension independent code but "
4346 "the conversion is not valid in the current context."));
4351template <
int dim,
int spacedim>
4352template <
int structdim2,
int dim2,
int spacedim2>
4357 ExcMessage(
"You are attempting an illegal conversion between "
4358 "iterator/accessor types. The constructor you call "
4359 "only exists to make certain template constructs "
4360 "easier to write as dimension independent code but "
4361 "the conversion is not valid in the current context."));
4395 namespace TriaAccessorImplementation
4402 template <
int dim,
int spacedim>
4407 ReferenceCells::n_vertices_to_reference_cell<dim>(vertices.size());
4409 if constexpr (dim == 1)
4413 return (vertices[1] - vertices[0]).norm();
4415 else if constexpr (dim == 2)
4420 (vertices[2] - vertices[1]).
norm(),
4421 (vertices[2] - vertices[0]).
norm()});
4425 (vertices[2] - vertices[1]).
norm()});
4427 else if constexpr (dim == 3)
4432 (vertices[2] - vertices[0]).
norm(),
4433 (vertices[2] - vertices[1]).
norm(),
4434 (vertices[3] - vertices[0]).
norm(),
4435 (vertices[3] - vertices[1]).
norm(),
4436 (vertices[3] - vertices[2]).
norm()});
4441 (vertices[3] - vertices[0]).
norm(),
4442 (vertices[2] - vertices[1]).
norm(),
4445 (vertices[4] - vertices[0]).
norm(),
4446 (vertices[4] - vertices[1]).
norm(),
4447 (vertices[4] - vertices[2]).
norm(),
4448 (vertices[4] - vertices[3]).
norm()});
4453 (vertices[4] - vertices[0]).
norm(),
4454 (vertices[3] - vertices[1]).
norm(),
4455 (vertices[5] - vertices[1]).
norm(),
4456 (vertices[4] - vertices[2]).
norm(),
4457 (vertices[5] - vertices[0]).
norm(),
4458 (vertices[3] - vertices[2]).
norm(),
4461 (vertices[1] - vertices[0]).
norm(),
4462 (vertices[2] - vertices[1]).
norm(),
4463 (vertices[2] - vertices[0]).
norm(),
4464 (vertices[4] - vertices[3]).
norm(),
4465 (vertices[5] - vertices[4]).
norm(),
4466 (vertices[5] - vertices[3]).
norm()});
4470 (vertices[6] - vertices[1]).
norm(),
4471 (vertices[2] - vertices[5]).
norm(),
4472 (vertices[3] - vertices[4]).
norm()});
4484template <
int structdim,
int dim,
int spacedim>
4489 const AccessorData *)
4490 :
internal::TriaAccessorImplementation::LevelAccessor<dim == structdim>(
4491 (structdim == dim) ?
level : 0)
4492 , present_index(
index)
4497 if (structdim != dim)
4502template <
int structdim,
int dim,
int spacedim>
4505 :
internal::TriaAccessorImplementation::LevelAccessor<dim == structdim>(
4507 , present_index(a.present_index)
4512template <
int structdim,
int dim,
int spacedim>
4517 this->set_level(a.
level());
4521 if (structdim != dim)
4527template <
int structdim,
int dim,
int spacedim>
4532 this->set_level(a.
level());
4536 if (structdim != dim)
4543template <
int structdim,
int dim,
int spacedim>
4556template <
int structdim,
int dim,
int spacedim>
4569template <
int structdim,
int dim,
int spacedim>
4584template <
int structdim,
int dim,
int spacedim>
4590 return this->get_level();
4595template <
int structdim,
int dim,
int spacedim>
4599 return present_index;
4604template <
int structdim,
int dim,
int spacedim>
4608 if ((
level() >= 0) && (present_index >= 0))
4610 else if (present_index == -1)
4618template <
int structdim,
int dim,
int spacedim>
4627template <
int structdim,
int dim,
int spacedim>
4633 ++this->present_index;
4635 if (structdim != dim)
4642 if (this->present_index >=
static_cast<int>(objects().n_objects()))
4643 this->present_index = -1;
4647 while (this->present_index >=
4648 static_cast<int>(this->tria->
levels[
level()]->cells.n_objects()))
4652 this->set_level(
level() + 1);
4653 this->present_index = 0;
4655 if (
level() >=
static_cast<int>(this->tria->
levels.size()))
4658 this->set_level(-1);
4659 this->present_index = -1;
4667template <
int structdim,
int dim,
int spacedim>
4672 --this->present_index;
4674 if (structdim != dim)
4676 if (this->present_index < 0)
4677 this->present_index = -1;
4681 while (this->present_index < 0)
4684 this->set_level(
level() - 1);
4689 this->set_level(-1);
4690 this->present_index = -1;
4694 this->present_index =
4695 this->tria->
levels[
level()]->cells.n_objects() - 1;
4702template <
int structdim,
int dim,
int spacedim>
4703inline ::internal::TriangulationImplementation::TriaObjects &
4706 if (structdim == dim)
4709 if (structdim == 1 && dim > 1)
4710 return this->tria->
faces->lines;
4712 if (structdim == 2 && dim > 2)
4713 return this->tria->
faces->quads;
4724template <
int structdim,
int dim,
int spacedim>
4728 const AccessorData *)
4731 ExcMessage(
"You are attempting an invalid conversion between "
4732 "iterator/accessor types. The constructor you call "
4733 "only exists to make certain template constructs "
4734 "easier to write as dimension independent code but "
4735 "the conversion is not valid in the current context."));
4740template <
int structdim,
int dim,
int spacedim>
4745 ExcMessage(
"You are attempting an invalid conversion between "
4746 "iterator/accessor types. The constructor you call "
4747 "only exists to make certain template constructs "
4748 "easier to write as dimension independent code but "
4749 "the conversion is not valid in the current context."));
4754template <
int structdim,
int dim,
int spacedim>
4764template <
int structdim,
int dim,
int spacedim>
4776template <
int structdim,
int dim,
int spacedim>
4788template <
int structdim,
int dim,
int spacedim>
4799template <
int structdim,
int dim,
int spacedim>
4810template <
int structdim,
int dim,
int spacedim>
4817template <
int structdim,
int dim,
int spacedim>
4824template <
int structdim,
int dim,
int spacedim>
4833template <
int structdim,
int dim,
int spacedim>
4842template <
int structdim,
int dim,
int spacedim>
4845 const unsigned int)
const
4848 ExcMessage(
"You are trying to set the user index of an "
4849 "invalid object."));
4854template <
int structdim,
int dim,
int spacedim>
4860 ExcMessage(
"You are trying to set the manifold id of an "
4861 "invalid object."));
4866template <
int structdim,
int dim,
int spacedim>
4873 return invalid_vertex;
4877template <
int structdim,
int dim,
int spacedim>
4888template <
int structdim,
int dim,
int spacedim>
4903 namespace TriaAccessorImplementation
4908 using ::TriaAccessor;
4914 struct Implementation
4916 template <
int dim,
int spacedim>
4917 static std::array<unsigned int, 1>
4926 template <
int structdim,
int dim,
int spacedim>
4927 static std::array<unsigned int, 4>
4932 std::array<unsigned int, 4> line_indices = {};
4933 for (
const unsigned int line : cell.line_indices())
4934 line_indices[line] = cell.line_index(line);
4935 return line_indices;
4942 template <
int structdim,
int dim,
int spacedim>
4943 static std::array<unsigned int, 12>
4944 get_line_indices_of_cell(
4947 std::array<unsigned int, 12> line_indices = {};
4956 for (
unsigned int f = 4; f < 6; ++f)
4966 const std::array<unsigned int, 4> my_indices{{
4972 const auto quad = cell.
quad(f);
4973 for (
unsigned int l = 0;
l < 4; ++
l)
4974 line_indices[4 * (f - 4) +
l] =
4975 quad->line_index(my_indices[l]);
4977 for (
unsigned int f = 0; f < 2; ++f)
4979 const auto orientation =
4982 ->face_orientations.get_combined_orientation(cell.
index(),
4984 const std::array<unsigned int, 2> my_indices{{
4988 const auto quad = cell.
quad(f);
4989 line_indices[8 + f] = quad->line_index(my_indices[0]);
4990 line_indices[10 + f] = quad->line_index(my_indices[1]);
4996 const std::array<unsigned int, 3> orientations{
5000 const std::array<unsigned int, 6> my_indices{{
5001 reference_cell.standard_to_real_face_line(0, 0, orientations[0]),
5002 reference_cell.standard_to_real_face_line(1, 0, orientations[0]),
5003 reference_cell.standard_to_real_face_line(2, 0, orientations[0]),
5004 reference_cell.standard_to_real_face_line(1, 1, orientations[1]),
5005 reference_cell.standard_to_real_face_line(2, 1, orientations[1]),
5006 reference_cell.standard_to_real_face_line(1, 2, orientations[2]),
5008 const std::array<
decltype(cell.
quad(0)), 3> quads{
5010 line_indices[0] = quads[0]->line_index(my_indices[0]);
5011 line_indices[1] = quads[0]->line_index(my_indices[1]);
5012 line_indices[2] = quads[0]->line_index(my_indices[2]);
5013 line_indices[3] = quads[1]->line_index(my_indices[3]);
5014 line_indices[4] = quads[1]->line_index(my_indices[4]);
5015 line_indices[5] = quads[2]->line_index(my_indices[5]);
5023 return line_indices;
5036 template <
int dim,
int spacedim>
5037 static std::pair<std::array<unsigned int, 1>,
5038 std::array<types::geometric_orientation, 1>>
5039 get_line_indices_and_orientations_of_cell(
5054 template <
int dim,
int spacedim>
5055 static std::pair<std::array<unsigned int, 4>,
5056 std::array<types::geometric_orientation, 4>>
5057 get_line_indices_and_orientations_of_cell(
5062 std::array<types::geometric_orientation, 4> line_orientations = {};
5063 std::array<unsigned int, 4> line_indices = {};
5064 for (
const unsigned int line : cell.line_indices())
5069 return std::make_pair(line_indices, line_orientations);
5080 template <
int dim,
int spacedim>
5081 static std::pair<std::array<unsigned int, 12>,
5082 std::array<types::geometric_orientation, 12>>
5083 get_line_indices_and_orientations_of_cell(
5086 std::array<types::geometric_orientation, 12> line_orientations = {};
5087 std::array<unsigned int, 12> line_indices = {};
5096 for (
unsigned int f = 4; f < 6; ++f)
5106 const std::array<unsigned int, 4> my_indices{{
5112 const auto quad = cell.
quad(f);
5113 for (
unsigned int l = 0;
l < 4; ++
l)
5114 line_indices[4 * (f - 4) +
l] =
5115 quad->line_index(my_indices[l]);
5116 const std::array<types::geometric_orientation, 4>
5119 0, f, orientation, quad->line_orientation(my_indices[0])),
5121 1, f, orientation, quad->line_orientation(my_indices[1])),
5123 2, f, orientation, quad->line_orientation(my_indices[2])),
5125 3, f, orientation, quad->line_orientation(my_indices[3])),
5127 for (
unsigned int l = 0;
l < 4; ++
l)
5128 line_orientations[4 * (f - 4) +
l] = my_orientations[
l];
5130 for (
unsigned int f = 0; f < 2; ++f)
5134 const std::array<unsigned int, 2> my_indices{{
5138 const auto quad = cell.
quad(f);
5139 line_indices[8 + f] = quad->line_index(my_indices[0]);
5140 line_indices[10 + f] = quad->line_index(my_indices[1]);
5141 const std::array<types::geometric_orientation, 2>
5144 0, f, orientation, quad->line_orientation(my_indices[0])),
5146 1, f, orientation, quad->line_orientation(my_indices[1])),
5148 line_orientations[8 + f] = my_orientations[0];
5149 line_orientations[10 + f] = my_orientations[1];
5155 const std::array<types::geometric_orientation, 3> orientations{
5159 const std::array<unsigned int, 6> my_indices{{
5160 reference_cell.standard_to_real_face_line(0, 0, orientations[0]),
5161 reference_cell.standard_to_real_face_line(1, 0, orientations[0]),
5162 reference_cell.standard_to_real_face_line(2, 0, orientations[0]),
5163 reference_cell.standard_to_real_face_line(1, 1, orientations[1]),
5164 reference_cell.standard_to_real_face_line(2, 1, orientations[1]),
5165 reference_cell.standard_to_real_face_line(1, 2, orientations[2]),
5167 const std::array<
decltype(cell.
quad(0)), 3> quads{
5169 line_indices[0] = quads[0]->line_index(my_indices[0]);
5170 line_indices[1] = quads[0]->line_index(my_indices[1]);
5171 line_indices[2] = quads[0]->line_index(my_indices[2]);
5172 line_indices[3] = quads[1]->line_index(my_indices[3]);
5173 line_indices[4] = quads[1]->line_index(my_indices[4]);
5174 line_indices[5] = quads[2]->line_index(my_indices[5]);
5176 line_orientations[0] =
reference_cell.face_to_cell_line_orientation(
5177 0, 0, orientations[0], quads[0]->line_orientation(my_indices[0]));
5178 line_orientations[1] =
reference_cell.face_to_cell_line_orientation(
5179 1, 0, orientations[0], quads[0]->line_orientation(my_indices[1]));
5180 line_orientations[2] =
reference_cell.face_to_cell_line_orientation(
5181 2, 0, orientations[0], quads[0]->line_orientation(my_indices[2]));
5182 line_orientations[3] =
reference_cell.face_to_cell_line_orientation(
5183 1, 1, orientations[1], quads[1]->line_orientation(my_indices[3]));
5184 line_orientations[4] =
reference_cell.face_to_cell_line_orientation(
5185 2, 1, orientations[1], quads[1]->line_orientation(my_indices[4]));
5186 line_orientations[5] =
reference_cell.face_to_cell_line_orientation(
5187 1, 2, orientations[2], quads[2]->line_orientation(my_indices[5]));
5198 return std::make_pair(line_indices, line_orientations);
5206template <
int structdim,
int dim,
int spacedim>
5211 const AccessorData *local_data)
5217template <
int structdim,
int dim,
int spacedim>
5222 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5224 return this->objects().used[this->present_index];
5229template <
int structdim,
int dim,
int spacedim>
5232 const unsigned int i)
const
5241template <
int structdim,
int dim,
int spacedim>
5245 if constexpr (structdim == 0)
5247 else if constexpr (structdim == 1)
5249 else if constexpr (structdim == dim)
5250 return this->tria->
levels[this->level()]
5251 ->reference_cell[this->present_index];
5253 return this->tria->
faces->get_quad_type(this->present_index);
5258template <
int structdim,
int dim,
int spacedim>
5261 const unsigned int vertex_no)
const
5265 if constexpr (structdim == 1)
5270 return this->objects().get_bounding_object(this->present_index,
5273 else if constexpr (structdim == dim)
5277 const auto vertex_index =
5278 this->tria->
levels[this->
level()]->cached_vertex_index(
5279 this->present_index, vertex_no);
5283 "The present vertex's vertex_index is not valid. This is typically "
5284 "caused by calling cell->vertex_index() during grid refinement for "
5285 "a newly created cell, since the cell vertex index cache is not "
5286 "complete at that point."));
5287 return vertex_index;
5289 else if constexpr (structdim == 2)
5291 const auto [line_index, vertex_index] =
5294 const auto vertex_within_line_index =
5296 vertex_index, line_index, this->line_orientation(line_index));
5298 return this->line(line_index)->vertex_index(vertex_within_line_index);
5309template <
int structdim,
int dim,
int spacedim>
5318template <
int structdim,
int dim,
int spacedim>
5319inline typename ::internal::TriangulationImplementation::
5320 Iterators<dim, spacedim>::line_iterator
5324 return typename ::internal::TriangulationImplementation::
5325 Iterators<dim, spacedim>::line_iterator(this->tria, 0, line_index(i));
5330template <
int structdim,
int dim,
int spacedim>
5337 ExcMessage(
"You can't ask for the index of a line bounding a "
5338 "one-dimensional cell because it is not bounded by "
5341 if constexpr (structdim == 2)
5343 return this->objects().get_bounding_object(this->present_index, i);
5345 else if constexpr (structdim == 3)
5347 const auto [face_index, line_index] =
5349 const auto line_within_face_index =
5353 return this->quad(face_index)->line_index(line_within_face_index);
5362template <
int structdim,
int dim,
int spacedim>
5363inline typename ::internal::TriangulationImplementation::
5364 Iterators<dim, spacedim>::quad_iterator
5368 return typename ::internal::TriangulationImplementation::
5369 Iterators<dim, spacedim>::quad_iterator(this->tria, 0, quad_index(i));
5374template <
int structdim,
int dim,
int spacedim>
5377 const unsigned int face_no)
const
5380 ExcMessage(
"You can't ask for the index of a quad bounding "
5381 "a one- or two-dimensional cell because it is not "
5382 "bounded by quads."));
5386 if constexpr (structdim == 3)
5387 return this->objects().get_bounding_object(this->present_index, face_no);
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)
5410 else if constexpr (structdim == 2)
5414 if (this->tria->
levels[this->level()]->face_orientations.n_objects() == 0)
5418 ->face_orientations.get_combined_orientation(this->present_index,
5423 ->face_orientations.get_combined_orientation(this->present_index, face);
5428template <
int structdim,
int dim,
int spacedim>
5431 const unsigned int face)
const
5436 ExcMessage(
"This function can only be used on objects "
5437 "that are cells, but not on faces or edges "
5438 "that bound cells."));
5442 if constexpr (structdim == 1)
5445 else if constexpr (structdim == 2)
5446 return this->line_orientation(face) ==
5449 return this->tria->
levels[this->
level()]->face_orientations.get_orientation(
5450 this->present_index, face);
5455template <
int structdim,
int dim,
int spacedim>
5461 ExcMessage(
"This function can only be used on objects "
5462 "that are cells, but not on faces or edges "
5463 "that bound cells."));
5468 if constexpr (structdim == 3)
5469 return this->tria->
levels[this->level()]->face_orientations.get_flip(
5470 this->present_index, face);
5478template <
int structdim,
int dim,
int spacedim>
5481 const unsigned int face)
const
5485 ExcMessage(
"This function can only be used on objects "
5486 "that are cells, but not on faces or edges "
5487 "that bound cells."));
5492 if constexpr (structdim == 3)
5493 return this->tria->
levels[this->level()]->face_orientations.get_rotation(
5494 this->present_index, face);
5503template <
int structdim,
int dim,
int spacedim>
5506 const unsigned int line)
const
5513 if constexpr (structdim == 1)
5515 else if constexpr (structdim == 2 && dim == 2)
5522 return combined_orientation;
5524 else if constexpr (structdim == 2 && dim == 3)
5526 return this->tria->
faces->get_line_orientation(this->present_index, line);
5528 else if constexpr (structdim == 3 && dim == 3)
5533 const auto [face_index, line_index] =
5535 const auto line_within_face_index =
5544 this->quad(face_index)->line_orientation(line_within_face_index));
5555template <
int structdim,
int dim,
int spacedim>
5558 const unsigned int line,
5564 ExcMessage(
"In 1d lines are cells and thus do not need to have their "
5565 "orientations set."));
5567 ExcMessage(
"In 2d lines are faces, and, for compatibility with other "
5568 "dimensions, their orientations should be set via "
5569 "set_combined_face_orientation()."));
5575 if constexpr (dim == 3)
5580 this->tria->
faces->set_line_orientation(this->present_index, line, value);
5586template <
int structdim,
int dim,
int spacedim>
5589 const unsigned int face_no,
5595 ExcMessage(
"This function can only be used on objects that are cells "
5596 "and not on objects which bound cells."));
5603 ->face_orientations.set_combined_orientation(this->present_index,
5605 combined_orientation);
5610template <
int structdim,
int dim,
int spacedim>
5615 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5617 this->objects().used[this->present_index] =
true;
5622template <
int structdim,
int dim,
int spacedim>
5627 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5629 this->objects().used[this->present_index] =
false;
5633template <
int structdim,
int dim,
int spacedim>
5643 const auto &objects = this->objects();
5644 const unsigned int n_sets_of_two = objects.children_per_object / 2;
5645 return objects.children[n_sets_of_two * this->present_index + i / 2] + i % 2;
5650template <
int structdim,
int dim,
int spacedim>
5653 const unsigned int i)
const
5660 return child_index(i);
5664 static_cast<std::uint8_t
>(refinement_case()));
5670 return child_index(i);
5672 (child(i % 2)->refinement_case() ==
5674 return child(i % 2)->child_index(i / 2);
5676 (child(i / 2)->refinement_case() ==
5678 return child(i / 2)->child_index(i % 2);
5683 "This cell has no grandchildren equivalent to isotropic refinement"));
5695template <
int structdim,
int dim,
int spacedim>
5700 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5707 this->objects().children[this->present_index] != -1 ?
5716 Assert(
static_cast<unsigned int>(this->present_index) <
5717 this->objects().refinement_cases.size(),
5720 this->objects().refinement_cases.size()));
5723 this->objects().refinement_cases[this->present_index]));
5729template <
int structdim,
int dim,
int spacedim>
5736 this->tria, (dim == structdim ? this->
level() + 1 : 0), child_index(i));
5746template <
int structdim,
int dim,
int spacedim>
5751 const auto n_children = this->n_children();
5752 for (
unsigned int child_n = 0; child_n < n_children; ++child_n)
5753 if (this->child(child_n) == child)
5757 ExcMessage(
"The given child is not a child of the current object."));
5763template <
int structdim,
int dim,
int spacedim>
5766 const unsigned int i)
const
5778 static_cast<std::uint8_t
>(refinement_case()));
5786 (child(i % 2)->refinement_case() ==
5788 return child(i % 2)->child(i / 2);
5790 (child(i / 2)->refinement_case() ==
5792 return child(i / 2)->child(i % 2);
5797 "This cell has no grandchildren equivalent to isotropic refinement"));
5811template <
int structdim,
int dim,
int spacedim>
5816 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5821 const auto &objects = this->objects();
5822 const unsigned int n_sets_of_two = objects.children_per_object / 2;
5823 return (objects.children[n_sets_of_two * this->present_index] != -1);
5828template <
int structdim,
int dim,
int spacedim>
5833 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5841template <
int structdim,
int dim,
int spacedim>
5847 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5849 Assert(
static_cast<unsigned int>(this->present_index) <
5850 this->objects().refinement_cases.size(),
5853 this->objects().refinement_cases.size()));
5855 this->objects().refinement_cases[this->present_index] = refinement_case;
5859template <
int structdim,
int dim,
int spacedim>
5864 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5866 Assert(
static_cast<unsigned int>(this->present_index) <
5867 this->objects().refinement_cases.size(),
5870 this->objects().refinement_cases.size()));
5872 this->objects().refinement_cases[this->present_index] =
5878template <
int structdim,
int dim,
int spacedim>
5881 const int index)
const
5888 auto &objects = this->objects();
5889 const unsigned int n_sets_of_two = objects.children_per_object / 2;
5895 (i == 0 && !this->has_children() && (index >= 0)) ||
5898 (i > 0 && this->has_children() && (index >= 0) &&
5899 objects.children[n_sets_of_two * this->present_index + i / 2] == -1),
5902 objects.children[n_sets_of_two * this->present_index + i / 2] =
index;
5907template <
int structdim,
int dim,
int spacedim>
5913 const auto &objects = this->objects();
5914 const unsigned int n_sets_of_two = objects.children_per_object / 2;
5915 for (
unsigned int i = 0; i < n_sets_of_two; ++i)
5916 set_children(2 * i, -1);
5921template <
int structdim,
int dim,
int spacedim>
5926 return this->objects().user_flags[this->present_index];
5931template <
int structdim,
int dim,
int spacedim>
5936 this->objects().user_flags[this->present_index] =
true;
5941template <
int structdim,
int dim,
int spacedim>
5946 this->objects().user_flags[this->present_index] =
false;
5951template <
int structdim,
int dim,
int spacedim>
5957 if (this->has_children())
5958 for (
unsigned int c = 0; c < this->n_children(); ++c)
5959 this->child(c)->recursively_set_user_flag();
5964template <
int structdim,
int dim,
int spacedim>
5970 if (this->has_children())
5971 for (
unsigned int c = 0; c < this->n_children(); ++c)
5972 this->child(c)->recursively_clear_user_flag();
5977template <
int structdim,
int dim,
int spacedim>
5982 this->objects().clear_user_data(this->present_index);
5987template <
int structdim,
int dim,
int spacedim>
5992 this->objects().user_pointer(this->present_index) = p;
5997template <
int structdim,
int dim,
int spacedim>
6002 this->objects().user_pointer(this->present_index) =
nullptr;
6007template <
int structdim,
int dim,
int spacedim>
6012 return this->objects().user_pointer(this->present_index);
6017template <
int structdim,
int dim,
int spacedim>
6022 set_user_pointer(p);
6024 if (this->has_children())
6025 for (
unsigned int c = 0; c < this->n_children(); ++c)
6026 this->child(c)->recursively_set_user_pointer(p);
6031template <
int structdim,
int dim,
int spacedim>
6035 clear_user_pointer();
6037 if (this->has_children())
6038 for (
unsigned int c = 0; c < this->n_children(); ++c)
6039 this->child(c)->recursively_clear_user_pointer();
6044template <
int structdim,
int dim,
int spacedim>
6047 const unsigned int p)
const
6050 this->objects().user_index(this->present_index) = p;
6055template <
int structdim,
int dim,
int spacedim>
6060 this->objects().user_index(this->present_index) = 0;
6065template <
int structdim,
int dim,
int spacedim>
6070 return this->objects().user_index(this->present_index);
6075template <
int structdim,
int dim,
int spacedim>
6078 const unsigned int p)
const
6082 if (this->has_children())
6083 for (
unsigned int c = 0; c < this->n_children(); ++c)
6084 this->child(c)->recursively_set_user_index(p);
6089template <
int structdim,
int dim,
int spacedim>
6095 if (this->has_children())
6096 for (
unsigned int c = 0; c < this->n_children(); ++c)
6097 this->child(c)->recursively_clear_user_index();
6102template <
int structdim,
int dim,
int spacedim>
6106 if (!this->has_children())
6109 unsigned int max_depth = 1;
6110 for (
unsigned int c = 0; c < n_children(); ++c)
6111 max_depth =
std::max(max_depth, child(c)->max_refinement_depth() + 1);
6117template <
int structdim,
int dim,
int spacedim>
6121 if (!this->has_children())
6125 unsigned int sum = 0;
6126 for (
unsigned int c = 0; c < n_children(); ++c)
6127 sum += this->child(c)->n_active_descendants();
6134template <
int structdim,
int dim,
int spacedim>
6141 return this->objects()
6142 .boundary_or_material_id[this->present_index]
6148template <
int structdim,
int dim,
int spacedim>
6156 ExcMessage(
"You are trying to set the boundary_id to an invalid "
6157 "value (numbers::internal_face_boundary_id is reserved)."));
6158 Assert(this->at_boundary(),
6159 ExcMessage(
"You are trying to set the boundary_id of an "
6160 "internal object, which is not allowed!"));
6162 this->objects().boundary_or_material_id[this->present_index].boundary_id =
6168template <
int structdim,
int dim,
int spacedim>
6176 this->objects().boundary_or_material_id[this->present_index].boundary_id =
6182template <
int structdim,
int dim,
int spacedim>
6187 set_boundary_id(boundary_ind);
6197 for (
unsigned int i = 0; i < this->n_lines(); ++i)
6198 this->line(i)->set_boundary_id(boundary_ind);
6208template <
int structdim,
int dim,
int spacedim>
6218template <
int structdim,
int dim,
int spacedim>
6227template <
int structdim,
int dim,
int spacedim>
6233 return this->objects().manifold_id[this->present_index];
6238template <
int structdim,
int dim,
int spacedim>
6245 this->objects().manifold_id[this->present_index] = manifold_ind;
6249template <
int structdim,
int dim,
int spacedim>
6254 set_manifold_id(manifold_ind);
6256 if (this->has_children())
6257 for (
unsigned int c = 0; c < this->n_children(); ++c)
6258 this->child(c)->set_all_manifold_ids(manifold_ind);
6274 for (
unsigned int i = 0; i < this->n_lines(); ++i)
6275 this->line(i)->set_manifold_id(manifold_ind);
6284template <
int structdim,
int dim,
int spacedim>
6290 ReferenceCells::max_n_vertices<structdim>()
6295 vertices(this->n_vertices());
6297 for (
unsigned int v = 0; v < vertices.size(); ++v)
6298 vertices[v] = this->vertex(v);
6300 return internal::TriaAccessorImplementation::diameter<structdim, spacedim>(
6306template <
int dim,
int spacedim>
6311 return internal::TriaAccessorImplementation::diameter<dim, spacedim>(
6313 this->tria, this->level(), this->index())));
6318template <
int structdim,
int dim,
int spacedim>
6319std::pair<Point<spacedim>,
double>
6326 return std::make_pair((this->vertex(1) + this->vertex(0)) * 0.5,
6327 (this->vertex(1) - this->vertex(0)).
norm() * 0.5);
6335 std::vector<bool> is_initial_guess_vertex(this->n_vertices());
6338 std::fill(is_initial_guess_vertex.begin(),
6339 is_initial_guess_vertex.end(),
6352 if (p30.norm() > p21.norm())
6354 center = this->vertex(0) + 0.5 * p30;
6356 is_initial_guess_vertex[3] =
true;
6357 is_initial_guess_vertex[0] =
true;
6361 center = this->vertex(1) + 0.5 * p21;
6363 is_initial_guess_vertex[2] =
true;
6364 is_initial_guess_vertex[1] =
true;
6374 const std::vector<double> diagonals = {p70.norm(),
6378 const std::vector<double>::const_iterator it =
6379 std::max_element(diagonals.begin(), diagonals.end());
6380 if (it == diagonals.begin())
6382 center = this->vertex(0) + 0.5 * p70;
6383 is_initial_guess_vertex[7] =
true;
6384 is_initial_guess_vertex[0] =
true;
6386 else if (it == diagonals.begin() + 1)
6388 center = this->vertex(1) + 0.5 * p61;
6389 is_initial_guess_vertex[6] =
true;
6390 is_initial_guess_vertex[1] =
true;
6392 else if (it == diagonals.begin() + 2)
6394 center = this->vertex(5) + 0.5 * p25;
6395 is_initial_guess_vertex[2] =
true;
6396 is_initial_guess_vertex[5] =
true;
6400 center = this->vertex(4) + 0.5 * p34;
6401 is_initial_guess_vertex[3] =
true;
6402 is_initial_guess_vertex[4] =
true;
6409 return std::pair<Point<spacedim>,
double>();
6416 if (!is_initial_guess_vertex[v])
6418 const double distance = center.
distance(this->vertex(v));
6425 center = this->vertex(v) + pCV * (
radius / distance);
6433 bool all_vertices_within_ball =
true;
6438 if (center.distance(this->vertex(v)) >
6441 all_vertices_within_ball =
false;
6447 return std::make_pair(center,
radius);
6451template <
int structdim,
int dim,
int spacedim>
6458 return (this->vertex(1) - this->vertex(0)).norm();
6462 double min = std::numeric_limits<double>::max();
6464 for (unsigned
int j = i + 1; j < this->n_vertices(); ++j)
6466 (this->vertex(i) - this->vertex(j)) *
6467 (this->vertex(i) - this->vertex(j)));
6477template <
int structdim,
int dim,
int spacedim>
6490 bool is_translation =
true;
6493 for (
unsigned int i = 1; i < this->n_vertices(); ++i)
6496 (o->vertex(i) - this->vertex(i)) - dist;
6499 is_translation =
false;
6503 return is_translation;
6508template <
int structdim,
int dim,
int spacedim>
6517template <
int structdim,
int dim,
int spacedim>
6521 return this->reference_cell().
n_lines();
6526template <
int structdim,
int dim,
int spacedim>
6531 ExcMessage(
"This function can only be used on objects "
6532 "that are cells, but not on faces or edges "
6533 "that bound cells."));
6535 return this->reference_cell().
n_faces();
6540template <
int structdim,
int dim,
int spacedim>
6550template <
int structdim,
int dim,
int spacedim>
6560template <
int structdim,
int dim,
int spacedim>
6572template <
int dim,
int spacedim>
6575 const unsigned int vertex_index)
6582template <
int dim,
int spacedim>
6587 const AccessorData *)
6594template <
int dim,
int spacedim>
6595template <
int structdim2,
int dim2,
int spacedim2>
6606template <
int dim,
int spacedim>
6607template <
int structdim2,
int dim2,
int spacedim2>
6618template <
int dim,
int spacedim>
6628template <
int dim,
int spacedim>
6635 return (global_vertex_index < other.global_vertex_index);
6640template <
int dim,
int spacedim>
6652template <
int dim,
int spacedim>
6661template <
int dim,
int spacedim>
6670template <
int dim,
int spacedim>
6679template <
int dim,
int spacedim>
6684 if (global_vertex_index >= tria->
n_vertices())
6690template <
int dim,
int spacedim>
6696 if (global_vertex_index != 0)
6705template <
int dim,
int spacedim>
6710 ((tria == t.
tria) && (global_vertex_index == t.global_vertex_index));
6717template <
int dim,
int spacedim>
6721 return !(*
this == t);
6726template <
int dim,
int spacedim>
6735template <
int dim,
int spacedim>
6745template <
int dim,
int spacedim>
6746inline typename ::internal::TriangulationImplementation::
6747 Iterators<dim, spacedim>::line_iterator
6750 return typename ::internal::TriangulationImplementation::
6751 Iterators<dim, spacedim>::line_iterator();
6756template <
int dim,
int spacedim>
6766template <
int dim,
int spacedim>
6767inline typename ::internal::TriangulationImplementation::
6768 Iterators<dim, spacedim>::quad_iterator
6771 return typename ::internal::TriangulationImplementation::
6772 Iterators<dim, spacedim>::quad_iterator();
6777template <
int dim,
int spacedim>
6787template <
int dim,
int spacedim>
6796template <
int dim,
int spacedim>
6805template <
int dim,
int spacedim>
6814template <
int dim,
int spacedim>
6823template <
int dim,
int spacedim>
6826 const unsigned int )
6833template <
int dim,
int spacedim>
6842template <
int dim,
int spacedim>
6851template <
int dim,
int spacedim>
6860template <
int dim,
int spacedim>
6869template <
int dim,
int spacedim>
6878template <
int dim,
int spacedim>
6887template <
int dim,
int spacedim>
6896template <
int dim,
int spacedim>
6905template <
int dim,
int spacedim>
6915template <
int dim,
int spacedim>
6924template <
int dim,
int spacedim>
6933template <
int dim,
int spacedim>
6942template <
int dim,
int spacedim>
6951template <
int dim,
int spacedim>
6960template <
int dim,
int spacedim>
6971template <
int spacedim>
6974 const VertexKind vertex_kind,
6975 const unsigned int vertex_index)
6977 , vertex_kind(vertex_kind)
6983template <
int spacedim>
6988 const AccessorData *)
6990 , vertex_kind(interior_vertex)
7004 "This constructor can not be called for face iterators in 1d, "
7005 "except to default-construct iterator objects."));
7010template <
int spacedim>
7011template <
int structdim2,
int dim2,
int spacedim2>
7015 , vertex_kind(interior_vertex)
7023template <
int spacedim>
7024template <
int structdim2,
int dim2,
int spacedim2>
7028 , vertex_kind(interior_vertex)
7036template <
int spacedim>
7041 vertex_kind = t.vertex_kind;
7047template <
int spacedim>
7060template <
int spacedim>
7067 return (global_vertex_index < other.global_vertex_index);
7072template <
int spacedim>
7080template <
int spacedim>
7089template <
int spacedim>
7098template <
int spacedim>
7107template <
int spacedim>
7115template <
int spacedim>
7124template <
int spacedim>
7129 ((tria == t.
tria) && (global_vertex_index == t.global_vertex_index));
7139template <
int spacedim>
7143 return !(*
this == t);
7148template <
int spacedim>
7159template <
int spacedim>
7171template <
int spacedim>
7180template <
int spacedim>
7181inline typename ::internal::TriangulationImplementation::
7182 Iterators<1, spacedim>::line_iterator
7189template <
int spacedim>
7198template <
int spacedim>
7199inline typename ::internal::TriangulationImplementation::
7200 Iterators<1, spacedim>::quad_iterator
7208template <
int spacedim>
7218template <
int spacedim>
7227template <
int spacedim>
7231 return vertex_kind != interior_vertex;
7235template <
int spacedim>
7239 switch (vertex_kind)
7245 this->vertex_index()) !=
7259template <
int spacedim>
7268template <
int spacedim>
7280template <
int spacedim>
7283 const unsigned int )
7289template <
int spacedim>
7298template <
int spacedim>
7307template <
int spacedim>
7316template <
int spacedim>
7325template <
int spacedim>
7334template <
int spacedim>
7343template <
int spacedim>
7352template <
int spacedim>
7361template <
int spacedim>
7371template <
int spacedim>
7379template <
int spacedim>
7387template <
int spacedim>
7394template <
int spacedim>
7402template <
int spacedim>
7411template <
int spacedim>
7417 ExcMessage(
"You can't set the boundary_id of a face of a cell that is "
7418 "not actually at the boundary."));
7425template <
int spacedim>
7434template <
int spacedim>
7444template <
int spacedim>
7453template <
int spacedim>
7462template <
int spacedim>
7471template <
int spacedim>
7480template <
int spacedim>
7489template <
int spacedim>
7499template <
int spacedim>
7510template <
int dim,
int spacedim>
7515 const AccessorData *local_data)
7521template <
int dim,
int spacedim>
7530template <
int dim,
int spacedim>
7536 this->child_index(i));
7546template <
int dim,
int spacedim>
7547inline boost::container::small_vector<TriaIterator<CellAccessor<dim, spacedim>>,
7548 ReferenceCells::max_n_children<dim>()>
7551 boost::container::small_vector<TriaIterator<CellAccessor<dim, spacedim>>,
7552 ReferenceCells::max_n_children<dim>()>
7553 child_iterators(this->n_children());
7555 for (
unsigned int i = 0; i < this->n_children(); ++i)
7556 child_iterators[i] = this->child(i);
7558 return child_iterators;
7563template <
int dim,
int spacedim>
7568 if constexpr (dim == 1)
7571 VertexKind vertex_kind = VertexKind::interior_vertex;
7572 if (i == 0 && at_boundary(0))
7573 vertex_kind = VertexKind::left_vertex;
7574 if (i == 1 && at_boundary(1))
7575 vertex_kind = VertexKind::right_vertex;
7578 this->vertex_index(i));
7581 else if constexpr (dim == 2)
7582 return this->line(i);
7583 else if constexpr (dim == 3)
7584 return this->quad(i);
7594template <
int dim,
int spacedim>
7599 for (
const unsigned int face_n : this->face_indices())
7600 if (this->face(face_n) == face)
7604 ExcMessage(
"The given face is not a face of the current cell."));
7610template <
int dim,
int spacedim>
7611inline boost::container::small_vector<
7614 ReferenceCells::max_n_faces<dim>()
7621 boost::container::small_vector<
7624 ReferenceCells::max_n_faces<dim>()
7629 face_iterators(this->n_faces());
7631 for (
const unsigned int i : this->face_indices())
7632 face_iterators[i] = this->face(i);
7634 return face_iterators;
7639template <
int dim,
int spacedim>
7646 return this->vertex_index(i);
7649 return this->line_index(i);
7652 return this->quad_index(i);
7661template <
int dim,
int spacedim>
7666 return this->tria->
levels[this->
level()]->neighbor_index(this->present_index,
7672template <
int dim,
int spacedim>
7677 return this->tria->
levels[this->
level()]->neighbor_level(this->present_index,
7683template <
int dim,
int spacedim>
7692 this->is_active() ||
7693 !this->tria->
levels[this->level()]->refine_flags[this->present_index],
7694 ExcRefineCellNotActive());
7696 this->tria->
levels[this->level()]->refine_flags[this->present_index]);
7701template <
int dim,
int spacedim>
7706 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7707 Assert(!coarsen_flag_set(), ExcCellFlaggedForCoarsening());
7709 this->tria->
levels[this->
level()]->refine_flags[this->present_index] =
7715template <
int dim,
int spacedim>
7719 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7720 this->tria->
levels[this->
level()]->refine_flags[this->present_index] =
7725template <
int dim,
int spacedim>
7730 if (this->tria->
levels[this->level()]->refine_choice.size() == 0)
7732 return this->tria->
levels[this->
level()]->refine_choice[this->present_index];
7736template <
int dim,
int spacedim>
7739 const std::uint8_t refinement_choice)
const
7741 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7742 if (this->tria->
levels[this->level()]->refine_choice.size() != 0)
7743 this->tria->
levels[this->
level()]->refine_choice[this->present_index] =
7748template <
int dim,
int spacedim>
7752 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7753 if (this->tria->
levels[this->level()]->refine_choice.size() != 0)
7754 this->tria->
levels[this->
level()]->refine_choice[this->present_index] =
7759template <
int dim,
int spacedim>
7762 const unsigned int face_no,
7776 face_refinement_case,
7778 this->face_orientation(face_no),
7779 this->face_flip(face_no),
7780 this->face_rotation(face_no)));
7781 set_refine_flag(new_ref_case);
7783 return new_ref_case != old_ref_case;
7788template <
int dim,
int spacedim>
7791 const unsigned int line_no)
const
7799 old_ref_case = refine_flag_set(),
7803 set_refine_flag(new_ref_case);
7805 return new_ref_case != old_ref_case;
7810template <
int dim,
int spacedim>
7817 if constexpr (dim == 1)
7819 else if constexpr (dim == 2)
7820 return ((face(face_no)->has_children()) ?
7822 internal::SubfaceCase<2>::case_none);
7823 else if constexpr (dim == 3)
7825 switch (
static_cast<std::uint8_t
>(face(face_no)->refinement_case()))
7830 if (face(face_no)->child(0)->has_children())
7832 Assert(face(face_no)->child(0)->refinement_case() ==
7835 if (face(face_no)->child(1)->has_children())
7837 Assert(face(face_no)->child(1)->refinement_case() ==
7847 if (face(face_no)->child(1)->has_children())
7849 Assert(face(face_no)->child(1)->refinement_case() ==
7858 if (face(face_no)->child(0)->has_children())
7860 Assert(face(face_no)->child(0)->refinement_case() ==
7863 if (face(face_no)->child(1)->has_children())
7865 Assert(face(face_no)->child(1)->refinement_case() ==
7875 if (face(face_no)->child(1)->has_children())
7877 Assert(face(face_no)->child(1)->refinement_case() ==
7899template <
int dim,
int spacedim>
7908 this->is_active() ||
7909 !this->tria->
levels[this->level()]->coarsen_flags[this->present_index],
7910 ExcRefineCellNotActive());
7911 return this->tria->
levels[this->
level()]->coarsen_flags[this->present_index];
7916template <
int dim,
int spacedim>
7920 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7921 Assert(!refine_flag_set(), ExcCellFlaggedForRefinement());
7923 this->tria->
levels[this->
level()]->coarsen_flags[this->present_index] =
true;
7928template <
int dim,
int spacedim>
7932 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7933 this->tria->
levels[this->
level()]->coarsen_flags[this->present_index] =
false;
7938template <
int dim,
int spacedim>
7943 neighbor_level(face_no),
7944 neighbor_index(face_no));
7954template <
int dim,
int spacedim>
7958 return !this->has_children();
7963template <
int dim,
int spacedim>
7967 Assert(this->is_active(),
7968 ExcMessage(
"is_locally_owned() can only be called on active cells!"));
7969# ifndef DEAL_II_WITH_MPI
7986template <
int dim,
int spacedim>
7990# ifndef DEAL_II_WITH_MPI
8001 this->level_subdomain_id() == locally_owned_subdomain);
8007template <
int dim,
int spacedim>
8011 Assert(this->is_active(),
8012 ExcMessage(
"is_ghost() can only be called on active cells!"));
8013 if (this->has_children())
8016# ifndef DEAL_II_WITH_MPI
8029 subdomain_id != locally_owned_subdomain &&
8036template <
int dim,
int spacedim>
8040# ifndef DEAL_II_WITH_MPI
8052 subdomain_id != locally_owned_subdomain &&
8060template <
int dim,
int spacedim>
8064 Assert(this->is_active(),
8065 ExcMessage(
"is_artificial() can only be called on active cells!"));
8066# ifndef DEAL_II_WITH_MPI
8082template <
int dim,
int spacedim>
8086# ifndef DEAL_II_WITH_MPI
8097template <
int dim,
int spacedim>
8100 const unsigned int face_no,
8106 ExcMessage(
"The provided neighbor must be either a valid iterator or "
8107 "an end iterator (to indicate a boundary face)"));
8109 level->set_neighbor(this->present_index,
8117template <
int dim,
int spacedim>
8123 ->cells.boundary_or_material_id[this->present_index]
8129template <
int dim,
int spacedim>
8134 Assert(this->is_active(),
8135 ExcMessage(
"subdomain_id() can only be called on active cells!"));
8136 return this->tria->
levels[this->
level()]->subdomain_ids[this->present_index];
8141template <
int dim,
int spacedim>
8147 ->level_subdomain_ids[this->present_index];
8152template <
int dim,
int spacedim>
8156 const unsigned int n2 = neighbor_of_neighbor_internal(neighbor);
8162 return neighbor_of_coarser_neighbor(neighbor).first;
8167template <
int dim,
int spacedim>
8176template <
int dim,
int spacedim>
8182 ->active_cell_indices[this->present_index];
8187template <
int dim,
int spacedim>
8192 Assert(this->is_active(),
8194 "global_active_cell_index() can only be called on active cells!"));
8197 ->global_active_cell_indices[this->present_index];
8202template <
int dim,
int spacedim>
8207 ->global_level_cell_indices[this->present_index];
8212template <
int dim,
int spacedim>
8217 if constexpr (dim == spacedim)
8219 else if constexpr (dim == spacedim - 1)
8220 return this->tria->
levels[this->level()]
8221 ->direction_flags[this->present_index];
8225 ExcMessage(
"This function cannot be called if dim<spacedim-1."));