803 template <
int structdim2,
int dim2,
int spacedim2>
913 typename ::internal::TriangulationImplementation::
914 Iterators<dim, spacedim>::line_iterator
915 line(
const unsigned int i)
const;
929 typename ::internal::TriangulationImplementation::
930 Iterators<dim, spacedim>::quad_iterator
931 quad(
const unsigned int i)
const;
1539 std::pair<Point<spacedim>,
double>
1647 center(
const bool respect_manifold =
false,
1648 const bool interpolate_from_surrounding =
false)
const;
1795 const std::initializer_list<int> &new_indices)
const;
1802 const std::initializer_list<unsigned int> &new_indices)
const;
1824 const unsigned int face,
1879 friend struct ::internal::TriangulationImplementation::Implementation;
1880 friend struct ::internal::TriangulationImplementation::
1881 ImplementationMixedMesh;
1882 friend struct ::internal::TriaAccessorImplementation::Implementation;
1905template <
int dim,
int spacedim>
1948 const int level = 0,
1949 const int index = 0,
1955 template <
int structdim2,
int dim2,
int spacedim2>
1961 template <
int structdim2,
int dim2,
int spacedim2>
2062 typename ::internal::TriangulationImplementation::
2063 Iterators<dim, spacedim>::line_iterator
static line(
const unsigned int);
2074 static typename ::internal::TriangulationImplementation::
2075 Iterators<dim, spacedim>::quad_iterator
2121 const bool interpolate_from_surrounding =
false)
const;
2291 template <
typename Accessor>
2293 template <
typename Accessor>
2295 template <
typename Accessor>
2317template <
int spacedim>
2395 template <
int structdim2,
int dim2,
int spacedim2>
2401 template <
int structdim2,
int dim2,
int spacedim2>
2538 typename ::internal::TriangulationImplementation::
2539 Iterators<1, spacedim>::line_iterator
static line(
const unsigned int);
2553 static typename ::internal::TriangulationImplementation::
2554 Iterators<1, spacedim>::quad_iterator
3061template <
int dim,
int spacedim = dim>
3086 const int level = -1,
3087 const int index = -1,
3107 template <
int structdim2,
int dim2,
int spacedim2>
3114 template <
int structdim2,
int dim2,
int spacedim2>
3211 boost::container::small_vector<TriaIterator<CellAccessor<dim, spacedim>>,
3232 boost::container::small_vector<
3235 ReferenceCells::max_n_faces<dim>()
3303 const unsigned int subface_no)
const;
3416 std::pair<unsigned int, unsigned int>
3495 const unsigned int subface_no)
const;
3507 std::pair<unsigned int, unsigned int>
3684 const unsigned int face_no,
4184 template <
int dim_,
int spacedim_>
4233 friend struct ::internal::TriangulationImplementation::Implementation;
4234 friend struct ::internal::TriangulationImplementation::
4235 ImplementationMixedMesh;
4243template <
int structdim,
int dim,
int spacedim>
4244template <
typename OtherAccessor>
4246 const OtherAccessor &)
4249 ExcMessage(
"You are attempting an illegal conversion between "
4250 "iterator/accessor types. The constructor you call "
4251 "only exists to make certain template constructs "
4252 "easier to write as dimension independent code but "
4253 "the conversion is not valid in the current context."));
4258template <
int structdim,
int dim,
int spacedim>
4259template <
int structdim2,
int dim2,
int spacedim2>
4264 ExcMessage(
"You are attempting an illegal conversion between "
4265 "iterator/accessor types. The constructor you call "
4266 "only exists to make certain template constructs "
4267 "easier to write as dimension independent code but "
4268 "the conversion is not valid in the current context."));
4273template <
int dim,
int spacedim>
4274template <
int structdim2,
int dim2,
int spacedim2>
4279 ExcMessage(
"You are attempting an illegal conversion between "
4280 "iterator/accessor types. The constructor you call "
4281 "only exists to make certain template constructs "
4282 "easier to write as dimension independent code but "
4283 "the conversion is not valid in the current context."));
4288template <
int structdim,
int dim,
int spacedim>
4289template <
int structdim2,
int dim2,
int spacedim2>
4294 ExcMessage(
"You are attempting an illegal conversion between "
4295 "iterator/accessor types. The constructor you call "
4296 "only exists to make certain template constructs "
4297 "easier to write as dimension independent code but "
4298 "the conversion is not valid in the current context."));
4303template <
int dim,
int spacedim>
4304template <
int structdim2,
int dim2,
int spacedim2>
4309 ExcMessage(
"You are attempting an illegal conversion between "
4310 "iterator/accessor types. The constructor you call "
4311 "only exists to make certain template constructs "
4312 "easier to write as dimension independent code but "
4313 "the conversion is not valid in the current context."));
4347 namespace TriaAccessorImplementation
4354 template <
int dim,
int spacedim>
4366 return (vertices[1] - vertices[0]).norm();
4369 return std::max({(vertices[1] - vertices[0]).norm(),
4370 (vertices[2] - vertices[1]).norm(),
4371 (vertices[2] - vertices[0]).norm()});
4375 (vertices[2] - vertices[1]).
norm()});
4379 (vertices[2] - vertices[0]).
norm(),
4380 (vertices[2] - vertices[1]).
norm(),
4381 (vertices[3] - vertices[0]).
norm(),
4382 (vertices[3] - vertices[1]).
norm(),
4383 (vertices[3] - vertices[2]).
norm()});
4388 (vertices[3] - vertices[0]).
norm(),
4389 (vertices[2] - vertices[1]).
norm(),
4392 (vertices[4] - vertices[0]).
norm(),
4393 (vertices[4] - vertices[1]).
norm(),
4394 (vertices[4] - vertices[2]).
norm(),
4395 (vertices[4] - vertices[3]).
norm()});
4400 (vertices[4] - vertices[0]).
norm(),
4401 (vertices[3] - vertices[1]).
norm(),
4402 (vertices[5] - vertices[1]).
norm(),
4403 (vertices[4] - vertices[2]).
norm(),
4404 (vertices[5] - vertices[0]).
norm(),
4405 (vertices[3] - vertices[2]).
norm(),
4408 (vertices[1] - vertices[0]).
norm(),
4409 (vertices[2] - vertices[1]).
norm(),
4410 (vertices[2] - vertices[0]).
norm(),
4411 (vertices[4] - vertices[3]).
norm(),
4412 (vertices[5] - vertices[4]).
norm(),
4413 (vertices[5] - vertices[3]).
norm()});
4417 (vertices[6] - vertices[1]).
norm(),
4418 (vertices[2] - vertices[5]).
norm(),
4419 (vertices[3] - vertices[4]).
norm()});
4430template <
int structdim,
int dim,
int spacedim>
4435 const AccessorData *)
4436 : present_level((structdim == dim) ?
level : 0)
4437 , present_index(
index)
4445 if (structdim != dim)
4453template <
int structdim,
int dim,
int spacedim>
4456 : present_level(a.present_level)
4457 , present_index(a.present_index)
4462template <
int structdim,
int dim,
int spacedim>
4471 if (structdim != dim)
4473 Assert((present_level == 0) || (present_level == -1) ||
4474 (present_level == -2),
4481template <
int structdim,
int dim,
int spacedim>
4490 if (structdim != dim)
4492 Assert((present_level == 0) || (present_level == -1) ||
4493 (present_level == -2),
4501template <
int structdim,
int dim,
int spacedim>
4514template <
int structdim,
int dim,
int spacedim>
4527template <
int structdim,
int dim,
int spacedim>
4542template <
int structdim,
int dim,
int spacedim>
4548 return present_level;
4553template <
int structdim,
int dim,
int spacedim>
4557 return present_index;
4562template <
int structdim,
int dim,
int spacedim>
4566 if ((present_level >= 0) && (present_index >= 0))
4568 else if (present_index == -1)
4576template <
int structdim,
int dim,
int spacedim>
4585template <
int structdim,
int dim,
int spacedim>
4591 ++this->present_index;
4593 if (structdim != dim)
4600 if (this->present_index >=
static_cast<int>(objects().n_objects()))
4601 this->present_index = -1;
4605 while (this->present_index >=
4607 this->tria->
levels[this->present_level]->cells.n_objects()))
4611 ++this->present_level;
4612 this->present_index = 0;
4614 if (this->present_level >=
4615 static_cast<int>(this->tria->
levels.size()))
4618 this->present_level = this->present_index = -1;
4626template <
int structdim,
int dim,
int spacedim>
4631 --this->present_index;
4633 if (structdim != dim)
4635 if (this->present_index < 0)
4636 this->present_index = -1;
4640 while (this->present_index < 0)
4643 --this->present_level;
4645 if (this->present_level == -1)
4648 this->present_level = this->present_index = -1;
4652 this->present_index =
4653 this->tria->
levels[this->present_level]->cells.n_objects() - 1;
4660template <
int structdim,
int dim,
int spacedim>
4661inline ::internal::TriangulationImplementation::TriaObjects &
4664 if (structdim == dim)
4665 return this->tria->
levels[this->present_level]->cells;
4667 if (structdim == 1 && dim > 1)
4668 return this->tria->
faces->lines;
4670 if (structdim == 2 && dim > 2)
4671 return this->tria->
faces->quads;
4675 return this->tria->
levels[this->present_level]->cells;
4682template <
int structdim,
int dim,
int spacedim>
4686 const AccessorData *)
4689 ExcMessage(
"You are attempting an invalid conversion between "
4690 "iterator/accessor types. The constructor you call "
4691 "only exists to make certain template constructs "
4692 "easier to write as dimension independent code but "
4693 "the conversion is not valid in the current context."));
4698template <
int structdim,
int dim,
int spacedim>
4703 ExcMessage(
"You are attempting an invalid conversion between "
4704 "iterator/accessor types. The constructor you call "
4705 "only exists to make certain template constructs "
4706 "easier to write as dimension independent code but "
4707 "the conversion is not valid in the current context."));
4712template <
int structdim,
int dim,
int spacedim>
4725template <
int structdim,
int dim,
int spacedim>
4740template <
int structdim,
int dim,
int spacedim>
4755template <
int structdim,
int dim,
int spacedim>
4769template <
int structdim,
int dim,
int spacedim>
4783template <
int structdim,
int dim,
int spacedim>
4790template <
int structdim,
int dim,
int spacedim>
4797template <
int structdim,
int dim,
int spacedim>
4806template <
int structdim,
int dim,
int spacedim>
4815template <
int structdim,
int dim,
int spacedim>
4818 const unsigned int)
const
4821 ExcMessage(
"You are trying to set the user index of an "
4822 "invalid object."));
4827template <
int structdim,
int dim,
int spacedim>
4833 ExcMessage(
"You are trying to set the manifold id of an "
4834 "invalid object."));
4839template <
int structdim,
int dim,
int spacedim>
4846 return invalid_vertex;
4850template <
int structdim,
int dim,
int spacedim>
4861template <
int structdim,
int dim,
int spacedim>
4876 namespace TriaAccessorImplementation
4884 using ::TriaAccessor;
4890 struct Implementation
4895 template <
int structdim,
int dim,
int spacedim>
4897 set_combined_face_orientation(
4899 const unsigned int face_no,
4903 ExcMessage(
"This function can only be used on objects that are "
4904 "cells and not on objects which bound cells."));
4913 ->face_orientations.set_combined_orientation(
4914 accessor.
present_index * ReferenceCells::max_n_faces<dim>() +
4916 combined_orientation);
4921 template <
int dim,
int spacedim>
4922 static std::array<unsigned int, 1>
4931 template <
int structdim,
int dim,
int spacedim>
4932 static std::array<unsigned int, 4>
4937 std::array<unsigned int, 4> line_indices = {};
4938 for (
const unsigned int line : cell.line_indices())
4939 line_indices[line] = cell.line_index(line);
4940 return line_indices;
4947 template <
int structdim,
int dim,
int spacedim>
4948 static std::array<unsigned int, 12>
4949 get_line_indices_of_cell(
4952 std::array<unsigned int, 12> line_indices = {};
4960 for (
unsigned int f = 4; f < 6; ++f)
4962 const auto orientation =
4965 ->face_orientations.get_combined_orientation(
4966 cell.
index() * ReferenceCells::max_n_faces<dim>() + f);
4974 const std::array<unsigned int, 4> my_indices{
4975 {ref_cell.standard_to_real_face_line(0, f, orientation),
4976 ref_cell.standard_to_real_face_line(1, f, orientation),
4977 ref_cell.standard_to_real_face_line(2, f, orientation),
4978 ref_cell.standard_to_real_face_line(3, f, orientation)}};
4979 const auto quad = cell.
quad(f);
4980 for (
unsigned int l = 0;
l < 4; ++
l)
4981 line_indices[4 * (f - 4) +
l] =
4982 quad->line_index(my_indices[l]);
4984 for (
unsigned int f = 0; f < 2; ++f)
4986 const auto orientation =
4989 ->face_orientations.get_combined_orientation(
4990 cell.
index() * ReferenceCells::max_n_faces<dim>() + f);
4991 const std::array<unsigned int, 2> my_indices{
4992 {ref_cell.standard_to_real_face_line(0, f, orientation),
4993 ref_cell.standard_to_real_face_line(1, f, orientation)}};
4994 const auto quad = cell.
quad(f);
4995 line_indices[8 + f] = quad->line_index(my_indices[0]);
4996 line_indices[10 + f] = quad->line_index(my_indices[1]);
5001 std::array<unsigned int, 3> orientations{
5005 const std::array<unsigned int, 6> my_indices{
5006 {ref_cell.standard_to_real_face_line(0, 0, orientations[0]),
5007 ref_cell.standard_to_real_face_line(1, 0, orientations[0]),
5008 ref_cell.standard_to_real_face_line(2, 0, orientations[0]),
5009 ref_cell.standard_to_real_face_line(1, 1, orientations[1]),
5010 ref_cell.standard_to_real_face_line(2, 1, orientations[1]),
5011 ref_cell.standard_to_real_face_line(1, 2, orientations[2])}};
5012 line_indices[0] = cell.
quad(0)->line_index(my_indices[0]);
5013 line_indices[1] = cell.
quad(0)->line_index(my_indices[1]);
5014 line_indices[2] = cell.
quad(0)->line_index(my_indices[2]);
5015 line_indices[3] = cell.
quad(1)->line_index(my_indices[3]);
5016 line_indices[4] = cell.
quad(1)->line_index(my_indices[4]);
5017 line_indices[5] = cell.
quad(2)->line_index(my_indices[5]);
5025 return line_indices;
5034 template <
int dim,
int spacedim>
5035 static std::array<types::geometric_orientation, 1>
5048 template <
int dim,
int spacedim>
5049 static std::array<types::geometric_orientation, 4>
5054 std::array<types::geometric_orientation, 4> line_orientations = {};
5055 for (
const unsigned int line : cell.line_indices())
5056 line_orientations[line] = cell.line_orientation(line);
5057 return line_orientations;
5066 template <
int dim,
int spacedim>
5067 static std::array<types::geometric_orientation, 12>
5070 std::array<types::geometric_orientation, 12> line_orientations = {};
5078 for (
unsigned int f = 4; f < 6; ++f)
5080 const auto orientation =
5083 ->face_orientations.get_combined_orientation(
5084 cell.
index() * ReferenceCells::max_n_faces<dim>() + f);
5092 const std::array<unsigned int, 4> my_indices{
5093 {ref_cell.standard_to_real_face_line(0, f, orientation),
5094 ref_cell.standard_to_real_face_line(1, f, orientation),
5095 ref_cell.standard_to_real_face_line(2, f, orientation),
5096 ref_cell.standard_to_real_face_line(3, f, orientation)}};
5097 const auto quad = cell.
quad(f);
5098 const std::array<types::geometric_orientation, 4>
5099 my_orientations{{ref_cell.face_to_cell_line_orientation(
5103 quad->line_orientation(my_indices[0])),
5104 ref_cell.face_to_cell_line_orientation(
5108 quad->line_orientation(my_indices[1])),
5109 ref_cell.face_to_cell_line_orientation(
5113 quad->line_orientation(my_indices[2])),
5114 ref_cell.face_to_cell_line_orientation(
5118 quad->line_orientation(my_indices[3]))}};
5119 for (
unsigned int l = 0;
l < 4; ++
l)
5120 line_orientations[4 * (f - 4) +
l] = my_orientations[
l];
5122 for (
unsigned int f = 0; f < 2; ++f)
5124 const auto orientation =
5127 ->face_orientations.get_combined_orientation(
5128 cell.
index() * ReferenceCells::max_n_faces<3>() + f);
5129 const std::array<unsigned int, 2> my_indices{
5130 {ref_cell.standard_to_real_face_line(0, f, orientation),
5131 ref_cell.standard_to_real_face_line(1, f, orientation)}};
5132 const auto quad = cell.
quad(f);
5133 const std::array<types::geometric_orientation, 2>
5134 my_orientations{{ref_cell.face_to_cell_line_orientation(
5138 quad->line_orientation(my_indices[0])),
5139 ref_cell.face_to_cell_line_orientation(
5143 quad->line_orientation(my_indices[1]))}};
5144 line_orientations[8 + f] = my_orientations[0];
5145 line_orientations[10 + f] = my_orientations[1];
5150 std::array<unsigned int, 3> orientations{
5154 const std::array<unsigned int, 6> my_indices{
5155 {ref_cell.standard_to_real_face_line(0, 0, orientations[0]),
5156 ref_cell.standard_to_real_face_line(1, 0, orientations[0]),
5157 ref_cell.standard_to_real_face_line(2, 0, orientations[0]),
5158 ref_cell.standard_to_real_face_line(1, 1, orientations[1]),
5159 ref_cell.standard_to_real_face_line(2, 1, orientations[1]),
5160 ref_cell.standard_to_real_face_line(1, 2, orientations[2])}};
5161 line_orientations[0] = ref_cell.face_to_cell_line_orientation(
5165 cell.
quad(0)->line_orientation(my_indices[0]));
5166 line_orientations[1] = ref_cell.face_to_cell_line_orientation(
5170 cell.
quad(0)->line_orientation(my_indices[1]));
5171 line_orientations[2] = ref_cell.face_to_cell_line_orientation(
5175 cell.
quad(0)->line_orientation(my_indices[2]));
5176 line_orientations[3] = ref_cell.face_to_cell_line_orientation(
5180 cell.
quad(1)->line_orientation(my_indices[3]));
5181 line_orientations[4] = ref_cell.face_to_cell_line_orientation(
5185 cell.
quad(1)->line_orientation(my_indices[4]));
5186 line_orientations[5] = ref_cell.face_to_cell_line_orientation(
5190 cell.
quad(2)->line_orientation(my_indices[5]));
5198 return 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>
5247 else if (structdim == 1)
5249 else if (structdim == dim)
5250 return this->tria->
levels[this->present_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 corner)
const
5265 if constexpr (structdim == 1)
5270 return this->objects()
5271 .cells[this->present_index * ReferenceCells::max_n_faces<1>() + corner];
5273 else if constexpr (structdim == dim)
5277 const auto my_index =
static_cast<std::size_t
>(this->present_index) *
5278 ReferenceCells::max_n_vertices<dim>();
5280 this->tria->
levels[this->present_level]
5281 ->cell_vertex_indices_cache.size());
5282 const unsigned int vertex_index =
5283 this->tria->
levels[this->present_level]
5284 ->cell_vertex_indices_cache[my_index + corner];
5286 return vertex_index;
5288 else if constexpr (structdim == 2)
5290 const auto [line_index, vertex_index] =
5292 const auto vertex_within_line_index =
5294 vertex_index, line_index, this->line_orientation(line_index));
5296 return this->line(line_index)->vertex_index(vertex_within_line_index);
5307template <
int structdim,
int dim,
int spacedim>
5316template <
int structdim,
int dim,
int spacedim>
5317inline typename ::internal::TriangulationImplementation::
5318 Iterators<dim, spacedim>::line_iterator
5322 return typename ::internal::TriangulationImplementation::
5323 Iterators<dim, spacedim>::line_iterator(this->tria, 0, line_index(i));
5328template <
int structdim,
int dim,
int spacedim>
5335 ExcMessage(
"You can't ask for the index of a line bounding a "
5336 "one-dimensional cell because it is not bounded by "
5339 if constexpr (structdim == 2)
5341 return this->objects()
5342 .cells[this->present_index * ReferenceCells::max_n_faces<2>() + i];
5344 else if constexpr (structdim == 3)
5346 const auto [face_index, line_index] =
5348 const auto line_within_face_index =
5352 return this->quad(face_index)->line_index(line_within_face_index);
5361template <
int structdim,
int dim,
int spacedim>
5362inline typename ::internal::TriangulationImplementation::
5363 Iterators<dim, spacedim>::quad_iterator
5367 return typename ::internal::TriangulationImplementation::
5368 Iterators<dim, spacedim>::quad_iterator(this->tria, 0, quad_index(i));
5373template <
int structdim,
int dim,
int spacedim>
5378 ExcMessage(
"You can't ask for the index of a quad bounding "
5379 "a one- or two-dimensional cell because it is not "
5380 "bounded by quads."));
5383 if constexpr (structdim == 3)
5386 return this->tria->
levels[this->present_level]
5388 .cells[this->present_index * ReferenceCells::max_n_faces<3>() + i];
5396template <
int structdim,
int dim,
int spacedim>
5399 const unsigned int face)
const
5404 ExcMessage(
"This function can only be used on objects "
5405 "that are cells, but not on faces or edges "
5406 "that bound cells."));
5410 if constexpr (structdim == 1)
5412 else if constexpr (structdim == 2)
5416 if (this->tria->
levels[this->present_level]
5417 ->face_orientations.n_objects() == 0)
5420 return this->tria->
levels[this->present_level]
5421 ->face_orientations.get_combined_orientation(
5422 this->present_index * ReferenceCells::max_n_faces<dim>() + face);
5425 return this->tria->
levels[this->present_level]
5426 ->face_orientations.get_combined_orientation(
5427 this->present_index * ReferenceCells::max_n_faces<dim>() + face);
5432template <
int structdim,
int dim,
int spacedim>
5435 const unsigned int face)
const
5440 ExcMessage(
"This function can only be used on objects "
5441 "that are cells, but not on faces or edges "
5442 "that bound cells."));
5446 if constexpr (structdim == 1)
5449 else if constexpr (structdim == 2)
5450 return this->line_orientation(face) ==
5453 return this->tria->
levels[this->present_level]
5454 ->face_orientations.get_orientation(
5455 this->present_index * ReferenceCells::max_n_faces<structdim>() + face);
5460template <
int structdim,
int dim,
int spacedim>
5466 ExcMessage(
"This function can only be used on objects "
5467 "that are cells, but not on faces or edges "
5468 "that bound cells."));
5473 if constexpr (structdim == 3)
5474 return this->tria->
levels[this->present_level]->face_orientations.get_flip(
5475 this->present_index * ReferenceCells::max_n_faces<structdim>() + face);
5483template <
int structdim,
int dim,
int spacedim>
5486 const unsigned int face)
const
5490 ExcMessage(
"This function can only be used on objects "
5491 "that are cells, but not on faces or edges "
5492 "that bound cells."));
5497 if constexpr (structdim == 3)
5498 return this->tria->
levels[this->present_level]
5499 ->face_orientations.get_rotation(
5500 this->present_index * ReferenceCells::max_n_faces<structdim>() + face);
5509template <
int structdim,
int dim,
int spacedim>
5512 const unsigned int line)
const
5519 if constexpr (structdim == 1)
5521 else if constexpr (structdim == 2 && dim == 2)
5528 return combined_orientation;
5530 else if constexpr (structdim == 2 && dim == 3)
5536 this->present_index * ReferenceCells::max_n_lines<2>() + line;
5537 Assert(index < this->tria->
faces->quads_line_orientations.size(),
5539 return this->tria->
faces->quads_line_orientations[
index] ?
5543 else if constexpr (structdim == 3 && dim == 3)
5548 const auto [face_index, line_index] =
5550 const auto line_within_face_index =
5559 this->quad(face_index)->line_orientation(line_within_face_index));
5570template <
int structdim,
int dim,
int spacedim>
5573 const unsigned int line,
5579 ExcMessage(
"In 1d lines are cells and thus do not need to have their "
5580 "orientations set."));
5582 ExcMessage(
"In 2d lines are faces, and, for compatibility with other "
5583 "dimensions, their orientations should be set via "
5584 "set_combined_face_orientation()."));
5590 if constexpr (dim == 3)
5596 this->present_index * ReferenceCells::max_n_lines<2>() + line;
5597 Assert(index < this->tria->
faces->quads_line_orientations.size(),
5599 this->tria->
faces->quads_line_orientations[
index] =
5606template <
int structdim,
int dim,
int spacedim>
5609 const unsigned int face,
5615 ::internal::TriaAccessorImplementation::Implementation::
5616 set_combined_face_orientation(*
this, face, combined_orientation);
5621template <
int structdim,
int dim,
int spacedim>
5626 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5628 this->objects().used[this->present_index] =
true;
5633template <
int structdim,
int dim,
int spacedim>
5638 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5640 this->objects().used[this->present_index] =
false;
5644template <
int structdim,
int dim,
int spacedim>
5654 const unsigned int n_sets_of_two =
5656 return this->objects().children[n_sets_of_two * this->present_index + i / 2] +
5662template <
int structdim,
int dim,
int spacedim>
5665 const unsigned int i)
const
5672 return child_index(i);
5676 static_cast<std::uint8_t
>(refinement_case()));
5682 return child_index(i);
5684 (child(i % 2)->refinement_case() ==
5686 return child(i % 2)->child_index(i / 2);
5688 (child(i / 2)->refinement_case() ==
5690 return child(i / 2)->child_index(i % 2);
5695 "This cell has no grandchildren equivalent to isotropic refinement"));
5707template <
int structdim,
int dim,
int spacedim>
5712 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5719 this->objects().children[this->present_index] != -1 ?
5735 Assert(
static_cast<unsigned int>(this->present_index) <
5736 this->objects().refinement_cases.size(),
5739 this->objects().refinement_cases.size()));
5742 this->objects().refinement_cases[this->present_index]));
5748template <
int structdim,
int dim,
int spacedim>
5755 this->tria, (dim == structdim ? this->
level() + 1 : 0), child_index(i));
5765template <
int structdim,
int dim,
int spacedim>
5770 const auto n_children = this->n_children();
5771 for (
unsigned int child_n = 0; child_n < n_children; ++child_n)
5772 if (this->child(child_n) == child)
5776 ExcMessage(
"The given child is not a child of the current object."));
5782template <
int structdim,
int dim,
int spacedim>
5785 const unsigned int i)
const
5798 static_cast<std::uint8_t
>(refinement_case()));
5806 (child(i % 2)->refinement_case() ==
5808 return child(i % 2)->child(i / 2);
5810 (child(i / 2)->refinement_case() ==
5812 return child(i / 2)->child(i % 2);
5817 "This cell has no grandchildren equivalent to isotropic refinement"));
5831template <
int structdim,
int dim,
int spacedim>
5836 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5842 const unsigned int n_sets_of_two =
5844 return (this->objects().children[n_sets_of_two * this->present_index] != -1);
5849template <
int structdim,
int dim,
int spacedim>
5854 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5865template <
int structdim,
int dim,
int spacedim>
5871 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5873 Assert(
static_cast<unsigned int>(this->present_index) <
5874 this->objects().refinement_cases.size(),
5877 this->objects().refinement_cases.size()));
5879 this->objects().refinement_cases[this->present_index] = refinement_case;
5883template <
int structdim,
int dim,
int spacedim>
5888 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5890 Assert(
static_cast<unsigned int>(this->present_index) <
5891 this->objects().refinement_cases.size(),
5894 this->objects().refinement_cases.size()));
5896 this->objects().refinement_cases[this->present_index] =
5902template <
int structdim,
int dim,
int spacedim>
5905 const int index)
const
5913 const unsigned int n_sets_of_two =
5921 (i == 0 && !this->has_children() && (index >= 0)) ||
5925 (i > 0 && this->has_children() && (index >= 0) &&
5926 this->objects().children[n_sets_of_two * this->present_index + i / 2] ==
5930 this->objects().children[n_sets_of_two * this->present_index + i / 2] =
index;
5935template <
int structdim,
int dim,
int spacedim>
5942 const unsigned int n_sets_of_two =
5945 for (
unsigned int i = 0; i < n_sets_of_two; ++i)
5946 set_children(2 * i, -1);
5951template <
int structdim,
int dim,
int spacedim>
5956 return this->objects().user_flags[this->present_index];
5961template <
int structdim,
int dim,
int spacedim>
5966 this->objects().user_flags[this->present_index] =
true;
5971template <
int structdim,
int dim,
int spacedim>
5976 this->objects().user_flags[this->present_index] =
false;
5981template <
int structdim,
int dim,
int spacedim>
5987 if (this->has_children())
5988 for (
unsigned int c = 0; c < this->n_children(); ++c)
5989 this->child(c)->recursively_set_user_flag();
5994template <
int structdim,
int dim,
int spacedim>
6000 if (this->has_children())
6001 for (
unsigned int c = 0; c < this->n_children(); ++c)
6002 this->child(c)->recursively_clear_user_flag();
6007template <
int structdim,
int dim,
int spacedim>
6012 this->objects().clear_user_data(this->present_index);
6017template <
int structdim,
int dim,
int spacedim>
6022 this->objects().user_pointer(this->present_index) = p;
6027template <
int structdim,
int dim,
int spacedim>
6032 this->objects().user_pointer(this->present_index) =
nullptr;
6037template <
int structdim,
int dim,
int spacedim>
6042 return this->objects().user_pointer(this->present_index);
6047template <
int structdim,
int dim,
int spacedim>
6052 set_user_pointer(p);
6054 if (this->has_children())
6055 for (
unsigned int c = 0; c < this->n_children(); ++c)
6056 this->child(c)->recursively_set_user_pointer(p);
6061template <
int structdim,
int dim,
int spacedim>
6065 clear_user_pointer();
6067 if (this->has_children())
6068 for (
unsigned int c = 0; c < this->n_children(); ++c)
6069 this->child(c)->recursively_clear_user_pointer();
6074template <
int structdim,
int dim,
int spacedim>
6077 const unsigned int p)
const
6080 this->objects().user_index(this->present_index) = p;
6085template <
int structdim,
int dim,
int spacedim>
6090 this->objects().user_index(this->present_index) = 0;
6095template <
int structdim,
int dim,
int spacedim>
6100 return this->objects().user_index(this->present_index);
6105template <
int structdim,
int dim,
int spacedim>
6108 const unsigned int p)
const
6112 if (this->has_children())
6113 for (
unsigned int c = 0; c < this->n_children(); ++c)
6114 this->child(c)->recursively_set_user_index(p);
6119template <
int structdim,
int dim,
int spacedim>
6125 if (this->has_children())
6126 for (
unsigned int c = 0; c < this->n_children(); ++c)
6127 this->child(c)->recursively_clear_user_index();
6132template <
int structdim,
int dim,
int spacedim>
6136 if (!this->has_children())
6139 unsigned int max_depth = 1;
6140 for (
unsigned int c = 0; c < n_children(); ++c)
6141 max_depth =
std::max(max_depth, child(c)->max_refinement_depth() + 1);
6147template <
int structdim,
int dim,
int spacedim>
6151 if (!this->has_children())
6155 unsigned int sum = 0;
6156 for (
unsigned int c = 0; c < n_children(); ++c)
6157 sum += this->child(c)->n_active_descendants();
6164template <
int structdim,
int dim,
int spacedim>
6171 return this->objects()
6172 .boundary_or_material_id[this->present_index]
6178template <
int structdim,
int dim,
int spacedim>
6186 ExcMessage(
"You are trying to set the boundary_id to an invalid "
6187 "value (numbers::internal_face_boundary_id is reserved)."));
6188 Assert(this->at_boundary(),
6189 ExcMessage(
"You are trying to set the boundary_id of an "
6190 "internal object, which is not allowed!"));
6192 this->objects().boundary_or_material_id[this->present_index].boundary_id =
6198template <
int structdim,
int dim,
int spacedim>
6206 this->objects().boundary_or_material_id[this->present_index].boundary_id =
6212template <
int structdim,
int dim,
int spacedim>
6217 set_boundary_id(boundary_ind);
6229 for (
unsigned int i = 0; i < this->n_lines(); ++i)
6230 this->line(i)->set_boundary_id(boundary_ind);
6240template <
int structdim,
int dim,
int spacedim>
6251template <
int structdim,
int dim,
int spacedim>
6260template <
int structdim,
int dim,
int spacedim>
6266 return this->objects().manifold_id[this->present_index];
6271template <
int structdim,
int dim,
int spacedim>
6278 this->objects().manifold_id[this->present_index] = manifold_ind;
6282template <
int structdim,
int dim,
int spacedim>
6287 set_manifold_id(manifold_ind);
6289 if (this->has_children())
6290 for (
unsigned int c = 0; c < this->n_children(); ++c)
6291 this->child(c)->set_all_manifold_ids(manifold_ind);
6307 for (
unsigned int i = 0; i < this->n_lines(); ++i)
6308 this->line(i)->set_manifold_id(manifold_ind);
6317template <
int structdim,
int dim,
int spacedim>
6321 boost::container::small_vector<Point<spacedim>,
6323 ReferenceCells::max_n_vertices<structdim>()
6328 vertices(this->n_vertices());
6330 for (
unsigned int v = 0; v < vertices.size(); ++v)
6331 vertices[v] = this->vertex(v);
6333 return internal::TriaAccessorImplementation::diameter<structdim, spacedim>(
6339template <
int dim,
int spacedim>
6344 return internal::TriaAccessorImplementation::diameter<dim, spacedim>(
6346 this->tria, this->level(), this->index())));
6351template <
int structdim,
int dim,
int spacedim>
6352std::pair<Point<spacedim>,
double>
6360 return std::make_pair((this->vertex(1) + this->vertex(0)) * 0.5,
6361 (this->vertex(1) - this->vertex(0)).
norm() * 0.5);
6369 std::vector<bool> is_initial_guess_vertex(this->n_vertices());
6372 std::fill(is_initial_guess_vertex.begin(),
6373 is_initial_guess_vertex.end(),
6386 if (p30.norm() > p21.norm())
6388 center = this->vertex(0) + 0.5 * p30;
6389 radius = p30.
norm() / 2.;
6390 is_initial_guess_vertex[3] =
true;
6391 is_initial_guess_vertex[0] =
true;
6395 center = this->vertex(1) + 0.5 * p21;
6396 radius = p21.
norm() / 2.;
6397 is_initial_guess_vertex[2] =
true;
6398 is_initial_guess_vertex[1] =
true;
6408 const std::vector<double> diagonals = {p70.norm(),
6412 const std::vector<double>::const_iterator it =
6413 std::max_element(diagonals.begin(), diagonals.end());
6414 if (it == diagonals.begin())
6416 center = this->vertex(0) + 0.5 * p70;
6417 is_initial_guess_vertex[7] =
true;
6418 is_initial_guess_vertex[0] =
true;
6420 else if (it == diagonals.begin() + 1)
6422 center = this->vertex(1) + 0.5 * p61;
6423 is_initial_guess_vertex[6] =
true;
6424 is_initial_guess_vertex[1] =
true;
6426 else if (it == diagonals.begin() + 2)
6428 center = this->vertex(5) + 0.5 * p25;
6429 is_initial_guess_vertex[2] =
true;
6430 is_initial_guess_vertex[5] =
true;
6434 center = this->vertex(4) + 0.5 * p34;
6435 is_initial_guess_vertex[3] =
true;
6436 is_initial_guess_vertex[4] =
true;
6443 return std::pair<Point<spacedim>,
double>();
6450 if (!is_initial_guess_vertex[v])
6452 const double distance = center.
distance(this->vertex(v));
6453 if (distance > radius)
6458 radius = (distance + radius) * 0.5;
6459 center = this->vertex(v) + pCV * (radius / distance);
6468 bool all_vertices_within_ball =
true;
6473 if (center.distance(this->vertex(v)) >
6474 radius + 100. *
std::numeric_limits<double>::
epsilon())
6476 all_vertices_within_ball =
false;
6482 return std::make_pair(center, radius);
6486template <
int structdim,
int dim,
int spacedim>
6493 return (this->vertex(1) - this->vertex(0)).norm();
6497 double min = std::numeric_limits<double>::max();
6499 for (unsigned
int j = i + 1; j < this->n_vertices(); ++j)
6501 (this->vertex(i) - this->vertex(j)) *
6502 (this->vertex(i) - this->vertex(j)));
6512template <
int structdim,
int dim,
int spacedim>
6532 bool is_translation =
true;
6535 for (
unsigned int i = 1; i < this->n_vertices(); ++i)
6538 (o->vertex(i) - this->vertex(i)) - dist;
6541 is_translation =
false;
6545 return is_translation;
6550template <
int structdim,
int dim,
int spacedim>
6559template <
int structdim,
int dim,
int spacedim>
6563 return this->reference_cell().
n_lines();
6568template <
int structdim,
int dim,
int spacedim>
6573 ExcMessage(
"This function can only be used on objects "
6574 "that are cells, but not on faces or edges "
6575 "that bound cells."));
6577 return this->reference_cell().
n_faces();
6582template <
int structdim,
int dim,
int spacedim>
6592template <
int structdim,
int dim,
int spacedim>
6602template <
int structdim,
int dim,
int spacedim>
6614template <
int dim,
int spacedim>
6617 const unsigned int vertex_index)
6624template <
int dim,
int spacedim>
6629 const AccessorData *)
6636template <
int dim,
int spacedim>
6637template <
int structdim2,
int dim2,
int spacedim2>
6648template <
int dim,
int spacedim>
6649template <
int structdim2,
int dim2,
int spacedim2>
6660template <
int dim,
int spacedim>
6670template <
int dim,
int spacedim>
6677 return (global_vertex_index < other.global_vertex_index);
6682template <
int dim,
int spacedim>
6694template <
int dim,
int spacedim>
6703template <
int dim,
int spacedim>
6712template <
int dim,
int spacedim>
6721template <
int dim,
int spacedim>
6726 if (global_vertex_index >= tria->
n_vertices())
6732template <
int dim,
int spacedim>
6738 if (global_vertex_index != 0)
6747template <
int dim,
int spacedim>
6752 ((tria == t.
tria) && (global_vertex_index == t.global_vertex_index));
6759template <
int dim,
int spacedim>
6763 return !(*
this == t);
6768template <
int dim,
int spacedim>
6777template <
int dim,
int spacedim>
6787template <
int dim,
int spacedim>
6788inline typename ::internal::TriangulationImplementation::
6789 Iterators<dim, spacedim>::line_iterator
6792 return typename ::internal::TriangulationImplementation::
6793 Iterators<dim, spacedim>::line_iterator();
6798template <
int dim,
int spacedim>
6808template <
int dim,
int spacedim>
6809inline typename ::internal::TriangulationImplementation::
6810 Iterators<dim, spacedim>::quad_iterator
6813 return typename ::internal::TriangulationImplementation::
6814 Iterators<dim, spacedim>::quad_iterator();
6819template <
int dim,
int spacedim>
6829template <
int dim,
int spacedim>
6838template <
int dim,
int spacedim>
6847template <
int dim,
int spacedim>
6856template <
int dim,
int spacedim>
6865template <
int dim,
int spacedim>
6868 const unsigned int )
6875template <
int dim,
int spacedim>
6884template <
int dim,
int spacedim>
6893template <
int dim,
int spacedim>
6902template <
int dim,
int spacedim>
6911template <
int dim,
int spacedim>
6920template <
int dim,
int spacedim>
6929template <
int dim,
int spacedim>
6938template <
int dim,
int spacedim>
6947template <
int dim,
int spacedim>
6957template <
int dim,
int spacedim>
6966template <
int dim,
int spacedim>
6975template <
int dim,
int spacedim>
6984template <
int dim,
int spacedim>
6993template <
int dim,
int spacedim>
7002template <
int dim,
int spacedim>
7013template <
int spacedim>
7016 const VertexKind vertex_kind,
7017 const unsigned int vertex_index)
7019 , vertex_kind(vertex_kind)
7025template <
int spacedim>
7030 const AccessorData *)
7032 , vertex_kind(interior_vertex)
7046 "This constructor can not be called for face iterators in 1d, "
7047 "except to default-construct iterator objects."));
7052template <
int spacedim>
7053template <
int structdim2,
int dim2,
int spacedim2>
7057 , vertex_kind(interior_vertex)
7065template <
int spacedim>
7066template <
int structdim2,
int dim2,
int spacedim2>
7070 , vertex_kind(interior_vertex)
7078template <
int spacedim>
7083 vertex_kind = t.vertex_kind;
7089template <
int spacedim>
7102template <
int spacedim>
7109 return (global_vertex_index < other.global_vertex_index);
7114template <
int spacedim>
7122template <
int spacedim>
7131template <
int spacedim>
7140template <
int spacedim>
7149template <
int spacedim>
7157template <
int spacedim>
7166template <
int spacedim>
7171 ((tria == t.
tria) && (global_vertex_index == t.global_vertex_index));
7183template <
int spacedim>
7187 return !(*
this == t);
7192template <
int spacedim>
7203template <
int spacedim>
7215template <
int spacedim>
7224template <
int spacedim>
7225inline typename ::internal::TriangulationImplementation::
7226 Iterators<1, spacedim>::line_iterator
7233template <
int spacedim>
7242template <
int spacedim>
7243inline typename ::internal::TriangulationImplementation::
7244 Iterators<1, spacedim>::quad_iterator
7252template <
int spacedim>
7261template <
int spacedim>
7265 return vertex_kind != interior_vertex;
7269template <
int spacedim>
7273 switch (vertex_kind)
7279 this->vertex_index()) !=
7293template <
int spacedim>
7302template <
int spacedim>
7314template <
int spacedim>
7317 const unsigned int )
7323template <
int spacedim>
7332template <
int spacedim>
7341template <
int spacedim>
7350template <
int spacedim>
7359template <
int spacedim>
7368template <
int spacedim>
7377template <
int spacedim>
7386template <
int spacedim>
7395template <
int spacedim>
7405template <
int spacedim>
7413template <
int spacedim>
7421template <
int spacedim>
7428template <
int spacedim>
7436template <
int spacedim>
7445template <
int spacedim>
7451 ExcMessage(
"You can't set the boundary_id of a face of a cell that is "
7452 "not actually at the boundary."));
7459template <
int spacedim>
7468template <
int spacedim>
7478template <
int spacedim>
7487template <
int spacedim>
7496template <
int spacedim>
7505template <
int spacedim>
7514template <
int spacedim>
7523template <
int spacedim>
7533template <
int spacedim>
7544template <
int dim,
int spacedim>
7549 const AccessorData *local_data)
7555template <
int dim,
int spacedim>
7559 static_cast<const
TriaAccessor<dim, dim, spacedim> &>(cell_accessor))
7564template <
int dim,
int spacedim>
7569 this->present_level + 1,
7570 this->child_index(i));
7580template <
int dim,
int spacedim>
7581inline boost::container::small_vector<TriaIterator<CellAccessor<dim, spacedim>>,
7585 boost::container::small_vector<TriaIterator<CellAccessor<dim, spacedim>>,
7587 child_iterators(this->n_children());
7589 for (
unsigned int i = 0; i < this->n_children(); ++i)
7590 child_iterators[i] = this->child(i);
7592 return child_iterators;
7597template <
int dim,
int spacedim>
7602 if constexpr (dim == 1)
7605 VertexKind vertex_kind = VertexKind::interior_vertex;
7606 if (i == 0 && at_boundary(0))
7607 vertex_kind = VertexKind::left_vertex;
7608 if (i == 1 && at_boundary(1))
7609 vertex_kind = VertexKind::right_vertex;
7612 this->vertex_index(i));
7615 else if constexpr (dim == 2)
7616 return this->line(i);
7617 else if constexpr (dim == 3)
7618 return this->quad(i);
7628template <
int dim,
int spacedim>
7633 for (
const unsigned int face_n : this->face_indices())
7634 if (this->face(face_n) == face)
7638 ExcMessage(
"The given face is not a face of the current cell."));
7644template <
int dim,
int spacedim>
7645inline boost::container::small_vector<
7648 ReferenceCells::max_n_faces<dim>()
7655 boost::container::small_vector<
7658 ReferenceCells::max_n_faces<dim>()
7663 face_iterators(this->n_faces());
7665 for (
const unsigned int i : this->face_indices())
7666 face_iterators[i] = this->face(i);
7668 return face_iterators;
7673template <
int dim,
int spacedim>
7680 return this->vertex_index(i);
7683 return this->line_index(i);
7686 return this->quad_index(i);
7695template <
int dim,
int spacedim>
7700 return this->tria->
levels[this->present_level]
7701 ->neighbors[this->present_index * ReferenceCells::max_n_faces<dim>() +
7708template <
int dim,
int spacedim>
7713 return this->tria->
levels[this->present_level]
7714 ->neighbors[this->present_index * ReferenceCells::max_n_faces<dim>() +
7721template <
int dim,
int spacedim>
7731 Assert(this->is_active() || !this->tria->
levels[this->present_level]
7732 ->refine_flags[this->present_index],
7733 ExcRefineCellNotActive());
7735 this->tria->
levels[this->present_level]->refine_flags[this->present_index]);
7740template <
int dim,
int spacedim>
7745 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7746 Assert(!coarsen_flag_set(), ExcCellFlaggedForCoarsening());
7748 this->tria->
levels[this->present_level]->refine_flags[this->present_index] =
7754template <
int dim,
int spacedim>
7758 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7759 this->tria->
levels[this->present_level]->refine_flags[this->present_index] =
7764template <
int dim,
int spacedim>
7769 if (this->tria->
levels[this->present_level]->refine_choice.size() == 0)
7771 return this->tria->
levels[this->present_level]
7772 ->refine_choice[this->present_index];
7776template <
int dim,
int spacedim>
7779 const std::uint8_t refinement_choice)
const
7781 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7782 if (this->tria->
levels[this->present_level]->refine_choice.size() != 0)
7783 this->tria->
levels[this->present_level]
7784 ->refine_choice[this->present_index] = refinement_choice;
7788template <
int dim,
int spacedim>
7792 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7793 if (this->tria->
levels[this->present_level]->refine_choice.size() != 0)
7794 this->tria->
levels[this->present_level]
7795 ->refine_choice[this->present_index] =
7800template <
int dim,
int spacedim>
7803 const unsigned int face_no,
7819 face_refinement_case,
7821 this->face_orientation(face_no),
7822 this->face_flip(face_no),
7823 this->face_rotation(face_no)));
7824 set_refine_flag(new_ref_case);
7827 return new_ref_case != old_ref_case;
7832template <
int dim,
int spacedim>
7835 const unsigned int line_no)
const
7845 old_ref_case = refine_flag_set(),
7849 set_refine_flag(new_ref_case);
7852 return new_ref_case != old_ref_case;
7857template <
int dim,
int spacedim>
7858inline ::internal::SubfaceCase<dim>
7864 if constexpr (dim == 1)
7865 return ::internal::SubfaceCase<1>::case_none;
7866 else if constexpr (dim == 2)
7867 return ((face(face_no)->has_children()) ?
7869 ::
internal::SubfaceCase<2>::case_none);
7870 else if constexpr (dim == 3)
7872 switch (
static_cast<std::uint8_t
>(face(face_no)->refinement_case()))
7875 return ::internal::SubfaceCase<3>::case_none;
7877 if (face(face_no)->child(0)->has_children())
7879 Assert(face(face_no)->child(0)->refinement_case() ==
7882 if (face(face_no)->child(1)->has_children())
7884 Assert(face(face_no)->child(1)->refinement_case() ==
7887 return ::internal::SubfaceCase<3>::case_x1y2y;
7890 return ::internal::SubfaceCase<3>::case_x1y;
7894 if (face(face_no)->child(1)->has_children())
7896 Assert(face(face_no)->child(1)->refinement_case() ==
7899 return ::internal::SubfaceCase<3>::case_x2y;
7902 return ::internal::SubfaceCase<3>::case_x;
7905 if (face(face_no)->child(0)->has_children())
7907 Assert(face(face_no)->child(0)->refinement_case() ==
7910 if (face(face_no)->child(1)->has_children())
7912 Assert(face(face_no)->child(1)->refinement_case() ==
7915 return ::internal::SubfaceCase<3>::case_y1x2x;
7918 return ::internal::SubfaceCase<3>::case_y1x;
7922 if (face(face_no)->child(1)->has_children())
7924 Assert(face(face_no)->child(1)->refinement_case() ==
7927 return ::internal::SubfaceCase<3>::case_y2x;
7930 return ::internal::SubfaceCase<3>::case_y;
7933 return ::internal::SubfaceCase<3>::case_xy;
7941 return ::internal::SubfaceCase<dim>::case_none;
7946template <
int dim,
int spacedim>
7956 Assert(this->is_active() || !this->tria->
levels[this->present_level]
7957 ->coarsen_flags[this->present_index],
7958 ExcRefineCellNotActive());
7959 return this->tria->
levels[this->present_level]
7960 ->coarsen_flags[this->present_index];
7965template <
int dim,
int spacedim>
7969 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7970 Assert(!refine_flag_set(), ExcCellFlaggedForRefinement());
7972 this->tria->
levels[this->present_level]->coarsen_flags[this->present_index] =
7978template <
int dim,
int spacedim>
7982 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7983 this->tria->
levels[this->present_level]->coarsen_flags[this->present_index] =
7989template <
int dim,
int spacedim>
7994 neighbor_level(face_no),
7995 neighbor_index(face_no));
8005template <
int dim,
int spacedim>
8009 return !this->has_children();
8014template <
int dim,
int spacedim>
8018 Assert(this->is_active(),
8019 ExcMessage(
"is_locally_owned() can only be called on active cells!"));
8020# ifndef DEAL_II_WITH_MPI
8037template <
int dim,
int spacedim>
8041# ifndef DEAL_II_WITH_MPI
8052 this->level_subdomain_id() == locally_owned_subdomain);
8058template <
int dim,
int spacedim>
8062 Assert(this->is_active(),
8063 ExcMessage(
"is_ghost() can only be called on active cells!"));
8064 if (this->has_children())
8067# ifndef DEAL_II_WITH_MPI
8080 subdomain_id != locally_owned_subdomain &&
8087template <
int dim,
int spacedim>
8091# ifndef DEAL_II_WITH_MPI
8103 subdomain_id != locally_owned_subdomain &&
8111template <
int dim,
int spacedim>
8115 Assert(this->is_active(),
8116 ExcMessage(
"is_artificial() can only be called on active cells!"));
8117# ifndef DEAL_II_WITH_MPI
8133template <
int dim,
int spacedim>
8137# ifndef DEAL_II_WITH_MPI
8148template <
int dim,
int spacedim>
8153 Assert(this->is_active(),
8154 ExcMessage(
"subdomain_id() can only be called on active cells!"));
8155 return this->tria->
levels[this->present_level]
8156 ->subdomain_ids[this->present_index];
8161template <
int dim,
int spacedim>
8166 return this->tria->
levels[this->present_level]
8167 ->level_subdomain_ids[this->present_index];
8172template <
int dim,
int spacedim>
8176 const unsigned int n2 = neighbor_of_neighbor_internal(neighbor);
8183 return neighbor_of_coarser_neighbor(neighbor).first;
8188template <
int dim,
int spacedim>
8197template <
int dim,
int spacedim>
8202 return this->tria->
levels[this->present_level]
8203 ->active_cell_indices[this->present_index];
8208template <
int dim,
int spacedim>
8213 Assert(this->is_active(),
8215 "global_active_cell_index() can only be called on active cells!"));
8217 return this->tria->
levels[this->present_level]
8218 ->global_active_cell_indices[this->present_index];
8223template <
int dim,
int spacedim>
8227 return this->tria->
levels[this->present_level]
8228 ->global_level_cell_indices[this->present_index];