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,
4903 ExcMessage(
"This function can only be used on objects that are "
4904 "cells and not on objects which bound cells."));
4909 ExcMessage(
"In 1d, faces do not have an orientation, so the "
4910 "only valid value is the default."));
4912 Assert(combined_orientation ==
4916 "In 2d, the only valid values of the combined orientation "
4917 "are the standard orientation or the reversed line "
4923 ->face_orientations.set_combined_orientation(
4924 accessor.
present_index * ReferenceCells::max_n_faces<dim>() +
4926 combined_orientation);
4931 template <
int dim,
int spacedim>
4932 static std::array<unsigned int, 1>
4941 template <
int structdim,
int dim,
int spacedim>
4942 static std::array<unsigned int, 4>
4947 std::array<unsigned int, 4> line_indices = {};
4948 for (
const unsigned int line : cell.line_indices())
4949 line_indices[line] = cell.line_index(line);
4950 return line_indices;
4957 template <
int structdim,
int dim,
int spacedim>
4958 static std::array<unsigned int, 12>
4959 get_line_indices_of_cell(
4962 std::array<unsigned int, 12> line_indices = {};
4970 for (
unsigned int f = 4; f < 6; ++f)
4972 const auto orientation =
4975 ->face_orientations.get_combined_orientation(
4976 cell.
index() * ReferenceCells::max_n_faces<dim>() + f);
4984 const std::array<unsigned int, 4> my_indices{
4985 {ref_cell.standard_to_real_face_line(0, f, orientation),
4986 ref_cell.standard_to_real_face_line(1, f, orientation),
4987 ref_cell.standard_to_real_face_line(2, f, orientation),
4988 ref_cell.standard_to_real_face_line(3, f, orientation)}};
4989 const auto quad = cell.
quad(f);
4990 for (
unsigned int l = 0;
l < 4; ++
l)
4991 line_indices[4 * (f - 4) +
l] =
4992 quad->line_index(my_indices[l]);
4994 for (
unsigned int f = 0; f < 2; ++f)
4996 const auto orientation =
4999 ->face_orientations.get_combined_orientation(
5000 cell.
index() * ReferenceCells::max_n_faces<dim>() + f);
5001 const std::array<unsigned int, 2> my_indices{
5002 {ref_cell.standard_to_real_face_line(0, f, orientation),
5003 ref_cell.standard_to_real_face_line(1, f, orientation)}};
5004 const auto quad = cell.
quad(f);
5005 line_indices[8 + f] = quad->line_index(my_indices[0]);
5006 line_indices[10 + f] = quad->line_index(my_indices[1]);
5011 std::array<unsigned int, 3> orientations{
5015 const std::array<unsigned int, 6> my_indices{
5016 {ref_cell.standard_to_real_face_line(0, 0, orientations[0]),
5017 ref_cell.standard_to_real_face_line(1, 0, orientations[0]),
5018 ref_cell.standard_to_real_face_line(2, 0, orientations[0]),
5019 ref_cell.standard_to_real_face_line(1, 1, orientations[1]),
5020 ref_cell.standard_to_real_face_line(2, 1, orientations[1]),
5021 ref_cell.standard_to_real_face_line(1, 2, orientations[2])}};
5022 line_indices[0] = cell.
quad(0)->line_index(my_indices[0]);
5023 line_indices[1] = cell.
quad(0)->line_index(my_indices[1]);
5024 line_indices[2] = cell.
quad(0)->line_index(my_indices[2]);
5025 line_indices[3] = cell.
quad(1)->line_index(my_indices[3]);
5026 line_indices[4] = cell.
quad(1)->line_index(my_indices[4]);
5027 line_indices[5] = cell.
quad(2)->line_index(my_indices[5]);
5035 return line_indices;
5044 template <
int dim,
int spacedim>
5045 static std::array<types::geometric_orientation, 1>
5058 template <
int dim,
int spacedim>
5059 static std::array<types::geometric_orientation, 4>
5064 std::array<types::geometric_orientation, 4> line_orientations = {};
5065 for (
const unsigned int line : cell.line_indices())
5066 line_orientations[line] = cell.line_orientation(line);
5067 return line_orientations;
5076 template <
int dim,
int spacedim>
5077 static std::array<types::geometric_orientation, 12>
5080 std::array<types::geometric_orientation, 12> line_orientations = {};
5088 for (
unsigned int f = 4; f < 6; ++f)
5090 const auto orientation =
5093 ->face_orientations.get_combined_orientation(
5094 cell.
index() * ReferenceCells::max_n_faces<dim>() + f);
5102 const std::array<unsigned int, 4> my_indices{
5103 {ref_cell.standard_to_real_face_line(0, f, orientation),
5104 ref_cell.standard_to_real_face_line(1, f, orientation),
5105 ref_cell.standard_to_real_face_line(2, f, orientation),
5106 ref_cell.standard_to_real_face_line(3, f, orientation)}};
5107 const auto quad = cell.
quad(f);
5108 const std::array<types::geometric_orientation, 4>
5109 my_orientations{{ref_cell.face_to_cell_line_orientation(
5113 quad->line_orientation(my_indices[0])),
5114 ref_cell.face_to_cell_line_orientation(
5118 quad->line_orientation(my_indices[1])),
5119 ref_cell.face_to_cell_line_orientation(
5123 quad->line_orientation(my_indices[2])),
5124 ref_cell.face_to_cell_line_orientation(
5128 quad->line_orientation(my_indices[3]))}};
5129 for (
unsigned int l = 0;
l < 4; ++
l)
5130 line_orientations[4 * (f - 4) +
l] = my_orientations[
l];
5132 for (
unsigned int f = 0; f < 2; ++f)
5134 const auto orientation =
5137 ->face_orientations.get_combined_orientation(
5138 cell.
index() * ReferenceCells::max_n_faces<3>() + f);
5139 const std::array<unsigned int, 2> my_indices{
5140 {ref_cell.standard_to_real_face_line(0, f, orientation),
5141 ref_cell.standard_to_real_face_line(1, f, orientation)}};
5142 const auto quad = cell.
quad(f);
5143 const std::array<types::geometric_orientation, 2>
5144 my_orientations{{ref_cell.face_to_cell_line_orientation(
5148 quad->line_orientation(my_indices[0])),
5149 ref_cell.face_to_cell_line_orientation(
5153 quad->line_orientation(my_indices[1]))}};
5154 line_orientations[8 + f] = my_orientations[0];
5155 line_orientations[10 + f] = my_orientations[1];
5160 std::array<unsigned int, 3> orientations{
5164 const std::array<unsigned int, 6> my_indices{
5165 {ref_cell.standard_to_real_face_line(0, 0, orientations[0]),
5166 ref_cell.standard_to_real_face_line(1, 0, orientations[0]),
5167 ref_cell.standard_to_real_face_line(2, 0, orientations[0]),
5168 ref_cell.standard_to_real_face_line(1, 1, orientations[1]),
5169 ref_cell.standard_to_real_face_line(2, 1, orientations[1]),
5170 ref_cell.standard_to_real_face_line(1, 2, orientations[2])}};
5171 line_orientations[0] = ref_cell.face_to_cell_line_orientation(
5175 cell.
quad(0)->line_orientation(my_indices[0]));
5176 line_orientations[1] = ref_cell.face_to_cell_line_orientation(
5180 cell.
quad(0)->line_orientation(my_indices[1]));
5181 line_orientations[2] = ref_cell.face_to_cell_line_orientation(
5185 cell.
quad(0)->line_orientation(my_indices[2]));
5186 line_orientations[3] = ref_cell.face_to_cell_line_orientation(
5190 cell.
quad(1)->line_orientation(my_indices[3]));
5191 line_orientations[4] = ref_cell.face_to_cell_line_orientation(
5195 cell.
quad(1)->line_orientation(my_indices[4]));
5196 line_orientations[5] = ref_cell.face_to_cell_line_orientation(
5200 cell.
quad(2)->line_orientation(my_indices[5]));
5208 return line_orientations;
5216template <
int structdim,
int dim,
int spacedim>
5221 const AccessorData *local_data)
5227template <
int structdim,
int dim,
int spacedim>
5232 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5234 return this->objects().used[this->present_index];
5239template <
int structdim,
int dim,
int spacedim>
5242 const unsigned int i)
const
5251template <
int structdim,
int dim,
int spacedim>
5257 else if (structdim == 1)
5259 else if (structdim == dim)
5260 return this->tria->
levels[this->present_level]
5261 ->reference_cell[this->present_index];
5263 return this->tria->
faces->get_quad_type(this->present_index);
5268template <
int structdim,
int dim,
int spacedim>
5271 const unsigned int corner)
const
5275 if constexpr (structdim == 1)
5280 return this->objects()
5281 .cells[this->present_index * ReferenceCells::max_n_faces<1>() + corner];
5283 else if constexpr (structdim == dim)
5287 const auto my_index =
static_cast<std::size_t
>(this->present_index) *
5288 ReferenceCells::max_n_vertices<dim>();
5290 this->tria->
levels[this->present_level]
5291 ->cell_vertex_indices_cache.size());
5292 const unsigned int vertex_index =
5293 this->tria->
levels[this->present_level]
5294 ->cell_vertex_indices_cache[my_index + corner];
5296 return vertex_index;
5298 else if constexpr (structdim == 2)
5300 const auto [line_index, vertex_index] =
5302 const auto vertex_within_line_index =
5304 vertex_index, line_index, this->line_orientation(line_index));
5306 return this->line(line_index)->vertex_index(vertex_within_line_index);
5317template <
int structdim,
int dim,
int spacedim>
5326template <
int structdim,
int dim,
int spacedim>
5327inline typename ::internal::TriangulationImplementation::
5328 Iterators<dim, spacedim>::line_iterator
5332 return typename ::internal::TriangulationImplementation::
5333 Iterators<dim, spacedim>::line_iterator(this->tria, 0, line_index(i));
5338template <
int structdim,
int dim,
int spacedim>
5345 ExcMessage(
"You can't ask for the index of a line bounding a "
5346 "one-dimensional cell because it is not bounded by "
5349 if constexpr (structdim == 2)
5351 return this->objects()
5352 .cells[this->present_index * ReferenceCells::max_n_faces<2>() + i];
5354 else if constexpr (structdim == 3)
5356 const auto [face_index, line_index] =
5358 const auto line_within_face_index =
5362 return this->quad(face_index)->line_index(line_within_face_index);
5371template <
int structdim,
int dim,
int spacedim>
5372inline typename ::internal::TriangulationImplementation::
5373 Iterators<dim, spacedim>::quad_iterator
5377 return typename ::internal::TriangulationImplementation::
5378 Iterators<dim, spacedim>::quad_iterator(this->tria, 0, quad_index(i));
5383template <
int structdim,
int dim,
int spacedim>
5388 ExcMessage(
"You can't ask for the index of a quad bounding "
5389 "a one- or two-dimensional cell because it is not "
5390 "bounded by quads."));
5393 if constexpr (structdim == 3)
5396 return this->tria->
levels[this->present_level]
5398 .cells[this->present_index * ReferenceCells::max_n_faces<3>() + i];
5406template <
int structdim,
int dim,
int spacedim>
5409 const unsigned int face)
const
5414 ExcMessage(
"This function can only be used on objects "
5415 "that are cells, but not on faces or edges "
5416 "that bound cells."));
5420 if constexpr (structdim == 1)
5422 else if constexpr (structdim == 2)
5426 if (this->tria->
levels[this->present_level]
5427 ->face_orientations.n_objects() == 0)
5430 return this->tria->
levels[this->present_level]
5431 ->face_orientations.get_orientation(
5432 this->present_index * ReferenceCells::max_n_faces<dim>() + face);
5435 return this->tria->
levels[this->present_level]
5436 ->face_orientations.get_combined_orientation(
5437 this->present_index * ReferenceCells::max_n_faces<dim>() + face);
5442template <
int structdim,
int dim,
int spacedim>
5445 const unsigned int face)
const
5450 ExcMessage(
"This function can only be used on objects "
5451 "that are cells, but not on faces or edges "
5452 "that bound cells."));
5456 if constexpr (structdim == 1)
5459 else if constexpr (structdim == 2)
5460 return this->line_orientation(face) ==
5463 return this->tria->
levels[this->present_level]
5464 ->face_orientations.get_orientation(
5465 this->present_index * ReferenceCells::max_n_faces<structdim>() + face);
5470template <
int structdim,
int dim,
int spacedim>
5476 ExcMessage(
"This function can only be used on objects "
5477 "that are cells, but not on faces or edges "
5478 "that bound cells."));
5483 if constexpr (structdim == 3)
5484 return this->tria->
levels[this->present_level]->face_orientations.get_flip(
5485 this->present_index * ReferenceCells::max_n_faces<structdim>() + face);
5493template <
int structdim,
int dim,
int spacedim>
5496 const unsigned int face)
const
5500 ExcMessage(
"This function can only be used on objects "
5501 "that are cells, but not on faces or edges "
5502 "that bound cells."));
5507 if constexpr (structdim == 3)
5508 return this->tria->
levels[this->present_level]
5509 ->face_orientations.get_rotation(
5510 this->present_index * ReferenceCells::max_n_faces<structdim>() + face);
5519template <
int structdim,
int dim,
int spacedim>
5522 const unsigned int line)
const
5529 if constexpr (structdim == 1)
5531 else if constexpr (structdim == 2 && dim == 2)
5538 return combined_orientation;
5540 else if constexpr (structdim == 2 && dim == 3)
5546 this->present_index * ReferenceCells::max_n_lines<2>() + line;
5547 Assert(index < this->tria->
faces->quads_line_orientations.size(),
5549 return this->tria->
faces->quads_line_orientations[
index] ?
5553 else if constexpr (structdim == 3 && dim == 3)
5558 const auto [face_index, line_index] =
5560 const auto line_within_face_index =
5569 this->quad(face_index)->line_orientation(line_within_face_index));
5580template <
int structdim,
int dim,
int spacedim>
5583 const unsigned int line,
5589 ExcMessage(
"In 1d lines are cells and thus do not need to have their "
5590 "orientations set."));
5592 ExcMessage(
"In 2d lines are faces, and, for compatibility with other "
5593 "dimensions, their orientations should be set via "
5594 "set_combined_orientation()."));
5600 if constexpr (dim == 3)
5606 this->present_index * ReferenceCells::max_n_lines<2>() + line;
5607 Assert(index < this->tria->
faces->quads_line_orientations.size(),
5609 this->tria->
faces->quads_line_orientations[
index] =
5616template <
int structdim,
int dim,
int spacedim>
5619 const unsigned int face,
5625 ::internal::TriaAccessorImplementation::Implementation::
5626 set_combined_face_orientation(*
this, face, combined_orientation);
5631template <
int structdim,
int dim,
int spacedim>
5636 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5638 this->objects().used[this->present_index] =
true;
5643template <
int structdim,
int dim,
int spacedim>
5648 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5650 this->objects().used[this->present_index] =
false;
5654template <
int structdim,
int dim,
int spacedim>
5664 const unsigned int n_sets_of_two =
5666 return this->objects().children[n_sets_of_two * this->present_index + i / 2] +
5672template <
int structdim,
int dim,
int spacedim>
5675 const unsigned int i)
const
5682 return child_index(i);
5686 static_cast<std::uint8_t
>(refinement_case()));
5692 return child_index(i);
5694 (child(i % 2)->refinement_case() ==
5696 return child(i % 2)->child_index(i / 2);
5698 (child(i / 2)->refinement_case() ==
5700 return child(i / 2)->child_index(i % 2);
5705 "This cell has no grandchildren equivalent to isotropic refinement"));
5717template <
int structdim,
int dim,
int spacedim>
5722 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5729 this->objects().children[this->present_index] != -1 ?
5745 Assert(
static_cast<unsigned int>(this->present_index) <
5746 this->objects().refinement_cases.size(),
5749 this->objects().refinement_cases.size()));
5752 this->objects().refinement_cases[this->present_index]));
5758template <
int structdim,
int dim,
int spacedim>
5765 this->tria, (dim == structdim ? this->
level() + 1 : 0), child_index(i));
5775template <
int structdim,
int dim,
int spacedim>
5780 const auto n_children = this->n_children();
5781 for (
unsigned int child_n = 0; child_n < n_children; ++child_n)
5782 if (this->child(child_n) == child)
5786 ExcMessage(
"The given child is not a child of the current object."));
5792template <
int structdim,
int dim,
int spacedim>
5795 const unsigned int i)
const
5808 static_cast<std::uint8_t
>(refinement_case()));
5816 (child(i % 2)->refinement_case() ==
5818 return child(i % 2)->child(i / 2);
5820 (child(i / 2)->refinement_case() ==
5822 return child(i / 2)->child(i % 2);
5827 "This cell has no grandchildren equivalent to isotropic refinement"));
5841template <
int structdim,
int dim,
int spacedim>
5846 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5852 const unsigned int n_sets_of_two =
5854 return (this->objects().children[n_sets_of_two * this->present_index] != -1);
5859template <
int structdim,
int dim,
int spacedim>
5864 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5875template <
int structdim,
int dim,
int spacedim>
5881 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5883 Assert(
static_cast<unsigned int>(this->present_index) <
5884 this->objects().refinement_cases.size(),
5887 this->objects().refinement_cases.size()));
5889 this->objects().refinement_cases[this->present_index] = refinement_case;
5893template <
int structdim,
int dim,
int spacedim>
5898 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5900 Assert(
static_cast<unsigned int>(this->present_index) <
5901 this->objects().refinement_cases.size(),
5904 this->objects().refinement_cases.size()));
5906 this->objects().refinement_cases[this->present_index] =
5912template <
int structdim,
int dim,
int spacedim>
5915 const int index)
const
5923 const unsigned int n_sets_of_two =
5931 (i == 0 && !this->has_children() && (index >= 0)) ||
5935 (i > 0 && this->has_children() && (index >= 0) &&
5936 this->objects().children[n_sets_of_two * this->present_index + i / 2] ==
5940 this->objects().children[n_sets_of_two * this->present_index + i / 2] =
index;
5945template <
int structdim,
int dim,
int spacedim>
5952 const unsigned int n_sets_of_two =
5955 for (
unsigned int i = 0; i < n_sets_of_two; ++i)
5956 set_children(2 * i, -1);
5961template <
int structdim,
int dim,
int spacedim>
5966 return this->objects().user_flags[this->present_index];
5971template <
int structdim,
int dim,
int spacedim>
5976 this->objects().user_flags[this->present_index] =
true;
5981template <
int structdim,
int dim,
int spacedim>
5986 this->objects().user_flags[this->present_index] =
false;
5991template <
int structdim,
int dim,
int spacedim>
5997 if (this->has_children())
5998 for (
unsigned int c = 0; c < this->n_children(); ++c)
5999 this->child(c)->recursively_set_user_flag();
6004template <
int structdim,
int dim,
int spacedim>
6010 if (this->has_children())
6011 for (
unsigned int c = 0; c < this->n_children(); ++c)
6012 this->child(c)->recursively_clear_user_flag();
6017template <
int structdim,
int dim,
int spacedim>
6022 this->objects().clear_user_data(this->present_index);
6027template <
int structdim,
int dim,
int spacedim>
6032 this->objects().user_pointer(this->present_index) = p;
6037template <
int structdim,
int dim,
int spacedim>
6042 this->objects().user_pointer(this->present_index) =
nullptr;
6047template <
int structdim,
int dim,
int spacedim>
6052 return this->objects().user_pointer(this->present_index);
6057template <
int structdim,
int dim,
int spacedim>
6062 set_user_pointer(p);
6064 if (this->has_children())
6065 for (
unsigned int c = 0; c < this->n_children(); ++c)
6066 this->child(c)->recursively_set_user_pointer(p);
6071template <
int structdim,
int dim,
int spacedim>
6075 clear_user_pointer();
6077 if (this->has_children())
6078 for (
unsigned int c = 0; c < this->n_children(); ++c)
6079 this->child(c)->recursively_clear_user_pointer();
6084template <
int structdim,
int dim,
int spacedim>
6087 const unsigned int p)
const
6090 this->objects().user_index(this->present_index) = p;
6095template <
int structdim,
int dim,
int spacedim>
6100 this->objects().user_index(this->present_index) = 0;
6105template <
int structdim,
int dim,
int spacedim>
6110 return this->objects().user_index(this->present_index);
6115template <
int structdim,
int dim,
int spacedim>
6118 const unsigned int p)
const
6122 if (this->has_children())
6123 for (
unsigned int c = 0; c < this->n_children(); ++c)
6124 this->child(c)->recursively_set_user_index(p);
6129template <
int structdim,
int dim,
int spacedim>
6135 if (this->has_children())
6136 for (
unsigned int c = 0; c < this->n_children(); ++c)
6137 this->child(c)->recursively_clear_user_index();
6142template <
int structdim,
int dim,
int spacedim>
6146 if (!this->has_children())
6149 unsigned int max_depth = 1;
6150 for (
unsigned int c = 0; c < n_children(); ++c)
6151 max_depth =
std::max(max_depth, child(c)->max_refinement_depth() + 1);
6157template <
int structdim,
int dim,
int spacedim>
6161 if (!this->has_children())
6165 unsigned int sum = 0;
6166 for (
unsigned int c = 0; c < n_children(); ++c)
6167 sum += this->child(c)->n_active_descendants();
6174template <
int structdim,
int dim,
int spacedim>
6181 return this->objects()
6182 .boundary_or_material_id[this->present_index]
6188template <
int structdim,
int dim,
int spacedim>
6196 ExcMessage(
"You are trying to set the boundary_id to an invalid "
6197 "value (numbers::internal_face_boundary_id is reserved)."));
6198 Assert(this->at_boundary(),
6199 ExcMessage(
"You are trying to set the boundary_id of an "
6200 "internal object, which is not allowed!"));
6202 this->objects().boundary_or_material_id[this->present_index].boundary_id =
6208template <
int structdim,
int dim,
int spacedim>
6216 this->objects().boundary_or_material_id[this->present_index].boundary_id =
6222template <
int structdim,
int dim,
int spacedim>
6227 set_boundary_id(boundary_ind);
6239 for (
unsigned int i = 0; i < this->n_lines(); ++i)
6240 this->line(i)->set_boundary_id(boundary_ind);
6250template <
int structdim,
int dim,
int spacedim>
6261template <
int structdim,
int dim,
int spacedim>
6270template <
int structdim,
int dim,
int spacedim>
6276 return this->objects().manifold_id[this->present_index];
6281template <
int structdim,
int dim,
int spacedim>
6288 this->objects().manifold_id[this->present_index] = manifold_ind;
6292template <
int structdim,
int dim,
int spacedim>
6297 set_manifold_id(manifold_ind);
6299 if (this->has_children())
6300 for (
unsigned int c = 0; c < this->n_children(); ++c)
6301 this->child(c)->set_all_manifold_ids(manifold_ind);
6317 for (
unsigned int i = 0; i < this->n_lines(); ++i)
6318 this->line(i)->set_manifold_id(manifold_ind);
6327template <
int structdim,
int dim,
int spacedim>
6331 boost::container::small_vector<Point<spacedim>,
6333 ReferenceCells::max_n_vertices<structdim>()
6338 vertices(this->n_vertices());
6340 for (
unsigned int v = 0; v < vertices.size(); ++v)
6341 vertices[v] = this->vertex(v);
6343 return internal::TriaAccessorImplementation::diameter<structdim, spacedim>(
6349template <
int dim,
int spacedim>
6354 return internal::TriaAccessorImplementation::diameter<dim, spacedim>(
6356 this->tria, this->level(), this->index())));
6361template <
int structdim,
int dim,
int spacedim>
6362std::pair<Point<spacedim>,
double>
6370 return std::make_pair((this->vertex(1) + this->vertex(0)) * 0.5,
6371 (this->vertex(1) - this->vertex(0)).
norm() * 0.5);
6379 std::vector<bool> is_initial_guess_vertex(this->n_vertices());
6382 std::fill(is_initial_guess_vertex.begin(),
6383 is_initial_guess_vertex.end(),
6396 if (p30.norm() > p21.norm())
6398 center = this->vertex(0) + 0.5 * p30;
6399 radius = p30.
norm() / 2.;
6400 is_initial_guess_vertex[3] =
true;
6401 is_initial_guess_vertex[0] =
true;
6405 center = this->vertex(1) + 0.5 * p21;
6406 radius = p21.
norm() / 2.;
6407 is_initial_guess_vertex[2] =
true;
6408 is_initial_guess_vertex[1] =
true;
6418 const std::vector<double> diagonals = {p70.norm(),
6422 const std::vector<double>::const_iterator it =
6423 std::max_element(diagonals.begin(), diagonals.end());
6424 if (it == diagonals.begin())
6426 center = this->vertex(0) + 0.5 * p70;
6427 is_initial_guess_vertex[7] =
true;
6428 is_initial_guess_vertex[0] =
true;
6430 else if (it == diagonals.begin() + 1)
6432 center = this->vertex(1) + 0.5 * p61;
6433 is_initial_guess_vertex[6] =
true;
6434 is_initial_guess_vertex[1] =
true;
6436 else if (it == diagonals.begin() + 2)
6438 center = this->vertex(5) + 0.5 * p25;
6439 is_initial_guess_vertex[2] =
true;
6440 is_initial_guess_vertex[5] =
true;
6444 center = this->vertex(4) + 0.5 * p34;
6445 is_initial_guess_vertex[3] =
true;
6446 is_initial_guess_vertex[4] =
true;
6453 return std::pair<Point<spacedim>,
double>();
6460 if (!is_initial_guess_vertex[v])
6462 const double distance = center.
distance(this->vertex(v));
6463 if (distance > radius)
6468 radius = (distance + radius) * 0.5;
6469 center = this->vertex(v) + pCV * (radius / distance);
6477 bool all_vertices_within_ball =
true;
6482 if (center.distance(this->vertex(v)) >
6483 radius + 100. *
std::numeric_limits<double>::
epsilon())
6485 all_vertices_within_ball =
false;
6491 return std::make_pair(center, radius);
6495template <
int structdim,
int dim,
int spacedim>
6502 return (this->vertex(1) - this->vertex(0)).norm();
6506 double min = std::numeric_limits<double>::max();
6508 for (unsigned
int j = i + 1; j < this->n_vertices(); ++j)
6510 (this->vertex(i) - this->vertex(j)) *
6511 (this->vertex(i) - this->vertex(j)));
6521template <
int structdim,
int dim,
int spacedim>
6541 bool is_translation =
true;
6544 for (
unsigned int i = 1; i < this->n_vertices(); ++i)
6547 (o->vertex(i) - this->vertex(i)) - dist;
6550 is_translation =
false;
6554 return is_translation;
6559template <
int structdim,
int dim,
int spacedim>
6568template <
int structdim,
int dim,
int spacedim>
6572 return this->reference_cell().
n_lines();
6577template <
int structdim,
int dim,
int spacedim>
6582 ExcMessage(
"This function can only be used on objects "
6583 "that are cells, but not on faces or edges "
6584 "that bound cells."));
6586 return this->reference_cell().
n_faces();
6591template <
int structdim,
int dim,
int spacedim>
6601template <
int structdim,
int dim,
int spacedim>
6611template <
int structdim,
int dim,
int spacedim>
6623template <
int dim,
int spacedim>
6626 const unsigned int vertex_index)
6633template <
int dim,
int spacedim>
6638 const AccessorData *)
6645template <
int dim,
int spacedim>
6646template <
int structdim2,
int dim2,
int spacedim2>
6657template <
int dim,
int spacedim>
6658template <
int structdim2,
int dim2,
int spacedim2>
6669template <
int dim,
int spacedim>
6679template <
int dim,
int spacedim>
6686 return (global_vertex_index < other.global_vertex_index);
6691template <
int dim,
int spacedim>
6703template <
int dim,
int spacedim>
6712template <
int dim,
int spacedim>
6721template <
int dim,
int spacedim>
6730template <
int dim,
int spacedim>
6735 if (global_vertex_index >= tria->
n_vertices())
6741template <
int dim,
int spacedim>
6747 if (global_vertex_index != 0)
6756template <
int dim,
int spacedim>
6761 ((tria == t.
tria) && (global_vertex_index == t.global_vertex_index));
6768template <
int dim,
int spacedim>
6772 return !(*
this == t);
6777template <
int dim,
int spacedim>
6786template <
int dim,
int spacedim>
6796template <
int dim,
int spacedim>
6797inline typename ::internal::TriangulationImplementation::
6798 Iterators<dim, spacedim>::line_iterator
6801 return typename ::internal::TriangulationImplementation::
6802 Iterators<dim, spacedim>::line_iterator();
6807template <
int dim,
int spacedim>
6817template <
int dim,
int spacedim>
6818inline typename ::internal::TriangulationImplementation::
6819 Iterators<dim, spacedim>::quad_iterator
6822 return typename ::internal::TriangulationImplementation::
6823 Iterators<dim, spacedim>::quad_iterator();
6828template <
int dim,
int spacedim>
6838template <
int dim,
int spacedim>
6847template <
int dim,
int spacedim>
6856template <
int dim,
int spacedim>
6865template <
int dim,
int spacedim>
6874template <
int dim,
int spacedim>
6877 const unsigned int )
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>
6956template <
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>
7011template <
int dim,
int spacedim>
7022template <
int spacedim>
7025 const VertexKind vertex_kind,
7026 const unsigned int vertex_index)
7028 , vertex_kind(vertex_kind)
7034template <
int spacedim>
7039 const AccessorData *)
7041 , vertex_kind(interior_vertex)
7055 "This constructor can not be called for face iterators in 1d, "
7056 "except to default-construct iterator objects."));
7061template <
int spacedim>
7062template <
int structdim2,
int dim2,
int spacedim2>
7066 , vertex_kind(interior_vertex)
7074template <
int spacedim>
7075template <
int structdim2,
int dim2,
int spacedim2>
7079 , vertex_kind(interior_vertex)
7087template <
int spacedim>
7092 vertex_kind = t.vertex_kind;
7098template <
int spacedim>
7111template <
int spacedim>
7118 return (global_vertex_index < other.global_vertex_index);
7123template <
int spacedim>
7131template <
int spacedim>
7140template <
int spacedim>
7149template <
int spacedim>
7158template <
int spacedim>
7166template <
int spacedim>
7175template <
int spacedim>
7180 ((tria == t.
tria) && (global_vertex_index == t.global_vertex_index));
7192template <
int spacedim>
7196 return !(*
this == t);
7201template <
int spacedim>
7212template <
int spacedim>
7224template <
int spacedim>
7233template <
int spacedim>
7234inline typename ::internal::TriangulationImplementation::
7235 Iterators<1, spacedim>::line_iterator
7242template <
int spacedim>
7251template <
int spacedim>
7252inline typename ::internal::TriangulationImplementation::
7253 Iterators<1, spacedim>::quad_iterator
7261template <
int spacedim>
7270template <
int spacedim>
7274 return vertex_kind != interior_vertex;
7278template <
int spacedim>
7282 switch (vertex_kind)
7288 this->vertex_index()) !=
7302template <
int spacedim>
7311template <
int spacedim>
7323template <
int spacedim>
7326 const unsigned int )
7332template <
int spacedim>
7341template <
int spacedim>
7350template <
int spacedim>
7359template <
int spacedim>
7368template <
int spacedim>
7377template <
int spacedim>
7386template <
int spacedim>
7395template <
int spacedim>
7404template <
int spacedim>
7414template <
int spacedim>
7422template <
int spacedim>
7430template <
int spacedim>
7437template <
int spacedim>
7445template <
int spacedim>
7454template <
int spacedim>
7460 ExcMessage(
"You can't set the boundary_id of a face of a cell that is "
7461 "not actually at the boundary."));
7468template <
int spacedim>
7477template <
int spacedim>
7487template <
int spacedim>
7496template <
int spacedim>
7505template <
int spacedim>
7514template <
int spacedim>
7523template <
int spacedim>
7532template <
int spacedim>
7542template <
int spacedim>
7553template <
int dim,
int spacedim>
7558 const AccessorData *local_data)
7564template <
int dim,
int spacedim>
7568 static_cast<const
TriaAccessor<dim, dim, spacedim> &>(cell_accessor))
7573template <
int dim,
int spacedim>
7578 this->present_level + 1,
7579 this->child_index(i));
7589template <
int dim,
int spacedim>
7590inline boost::container::small_vector<TriaIterator<CellAccessor<dim, spacedim>>,
7594 boost::container::small_vector<TriaIterator<CellAccessor<dim, spacedim>>,
7596 child_iterators(this->n_children());
7598 for (
unsigned int i = 0; i < this->n_children(); ++i)
7599 child_iterators[i] = this->child(i);
7601 return child_iterators;
7606template <
int dim,
int spacedim>
7611 if constexpr (dim == 1)
7614 VertexKind vertex_kind = VertexKind::interior_vertex;
7615 if (i == 0 && at_boundary(0))
7616 vertex_kind = VertexKind::left_vertex;
7617 if (i == 1 && at_boundary(1))
7618 vertex_kind = VertexKind::right_vertex;
7621 this->vertex_index(i));
7624 else if constexpr (dim == 2)
7625 return this->line(i);
7626 else if constexpr (dim == 3)
7627 return this->quad(i);
7637template <
int dim,
int spacedim>
7642 for (
const unsigned int face_n : this->face_indices())
7643 if (this->face(face_n) == face)
7647 ExcMessage(
"The given face is not a face of the current cell."));
7653template <
int dim,
int spacedim>
7654inline boost::container::small_vector<
7657 ReferenceCells::max_n_faces<dim>()
7664 boost::container::small_vector<
7667 ReferenceCells::max_n_faces<dim>()
7672 face_iterators(this->n_faces());
7674 for (
const unsigned int i : this->face_indices())
7675 face_iterators[i] = this->face(i);
7677 return face_iterators;
7682template <
int dim,
int spacedim>
7689 return this->vertex_index(i);
7692 return this->line_index(i);
7695 return this->quad_index(i);
7704template <
int dim,
int spacedim>
7709 return this->tria->
levels[this->present_level]
7710 ->neighbors[this->present_index * ReferenceCells::max_n_faces<dim>() +
7717template <
int dim,
int spacedim>
7722 return this->tria->
levels[this->present_level]
7723 ->neighbors[this->present_index * ReferenceCells::max_n_faces<dim>() +
7730template <
int dim,
int spacedim>
7740 Assert(this->is_active() || !this->tria->
levels[this->present_level]
7741 ->refine_flags[this->present_index],
7742 ExcRefineCellNotActive());
7744 this->tria->
levels[this->present_level]->refine_flags[this->present_index]);
7749template <
int dim,
int spacedim>
7754 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7755 Assert(!coarsen_flag_set(), ExcCellFlaggedForCoarsening());
7757 this->tria->
levels[this->present_level]->refine_flags[this->present_index] =
7763template <
int dim,
int spacedim>
7767 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7768 this->tria->
levels[this->present_level]->refine_flags[this->present_index] =
7773template <
int dim,
int spacedim>
7778 if (this->tria->
levels[this->present_level]->refine_choice.size() == 0)
7780 return this->tria->
levels[this->present_level]
7781 ->refine_choice[this->present_index];
7785template <
int dim,
int spacedim>
7788 const std::uint8_t refinement_choice)
const
7790 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7791 if (this->tria->
levels[this->present_level]->refine_choice.size() != 0)
7792 this->tria->
levels[this->present_level]
7793 ->refine_choice[this->present_index] = refinement_choice;
7797template <
int dim,
int spacedim>
7801 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7802 if (this->tria->
levels[this->present_level]->refine_choice.size() != 0)
7803 this->tria->
levels[this->present_level]
7804 ->refine_choice[this->present_index] =
7809template <
int dim,
int spacedim>
7812 const unsigned int face_no,
7828 face_refinement_case,
7830 this->face_orientation(face_no),
7831 this->face_flip(face_no),
7832 this->face_rotation(face_no)));
7833 set_refine_flag(new_ref_case);
7836 return new_ref_case != old_ref_case;
7841template <
int dim,
int spacedim>
7844 const unsigned int line_no)
const
7854 old_ref_case = refine_flag_set(),
7858 set_refine_flag(new_ref_case);
7861 return new_ref_case != old_ref_case;
7866template <
int dim,
int spacedim>
7867inline ::internal::SubfaceCase<dim>
7873 if constexpr (dim == 1)
7874 return ::internal::SubfaceCase<1>::case_none;
7875 else if constexpr (dim == 2)
7876 return ((face(face_no)->has_children()) ?
7878 ::
internal::SubfaceCase<2>::case_none);
7879 else if constexpr (dim == 3)
7881 switch (
static_cast<std::uint8_t
>(face(face_no)->refinement_case()))
7884 return ::internal::SubfaceCase<3>::case_none;
7886 if (face(face_no)->child(0)->has_children())
7888 Assert(face(face_no)->child(0)->refinement_case() ==
7891 if (face(face_no)->child(1)->has_children())
7893 Assert(face(face_no)->child(1)->refinement_case() ==
7896 return ::internal::SubfaceCase<3>::case_x1y2y;
7899 return ::internal::SubfaceCase<3>::case_x1y;
7903 if (face(face_no)->child(1)->has_children())
7905 Assert(face(face_no)->child(1)->refinement_case() ==
7908 return ::internal::SubfaceCase<3>::case_x2y;
7911 return ::internal::SubfaceCase<3>::case_x;
7914 if (face(face_no)->child(0)->has_children())
7916 Assert(face(face_no)->child(0)->refinement_case() ==
7919 if (face(face_no)->child(1)->has_children())
7921 Assert(face(face_no)->child(1)->refinement_case() ==
7924 return ::internal::SubfaceCase<3>::case_y1x2x;
7927 return ::internal::SubfaceCase<3>::case_y1x;
7931 if (face(face_no)->child(1)->has_children())
7933 Assert(face(face_no)->child(1)->refinement_case() ==
7936 return ::internal::SubfaceCase<3>::case_y2x;
7939 return ::internal::SubfaceCase<3>::case_y;
7942 return ::internal::SubfaceCase<3>::case_xy;
7950 return ::internal::SubfaceCase<dim>::case_none;
7955template <
int dim,
int spacedim>
7965 Assert(this->is_active() || !this->tria->
levels[this->present_level]
7966 ->coarsen_flags[this->present_index],
7967 ExcRefineCellNotActive());
7968 return this->tria->
levels[this->present_level]
7969 ->coarsen_flags[this->present_index];
7974template <
int dim,
int spacedim>
7978 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7979 Assert(!refine_flag_set(), ExcCellFlaggedForRefinement());
7981 this->tria->
levels[this->present_level]->coarsen_flags[this->present_index] =
7987template <
int dim,
int spacedim>
7991 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7992 this->tria->
levels[this->present_level]->coarsen_flags[this->present_index] =
7998template <
int dim,
int spacedim>
8003 neighbor_level(face_no),
8004 neighbor_index(face_no));
8014template <
int dim,
int spacedim>
8018 return !this->has_children();
8023template <
int dim,
int spacedim>
8027 Assert(this->is_active(),
8028 ExcMessage(
"is_locally_owned() can only be called on active cells!"));
8029# ifndef DEAL_II_WITH_MPI
8046template <
int dim,
int spacedim>
8050# ifndef DEAL_II_WITH_MPI
8061 this->level_subdomain_id() == locally_owned_subdomain);
8067template <
int dim,
int spacedim>
8071 Assert(this->is_active(),
8072 ExcMessage(
"is_ghost() can only be called on active cells!"));
8073 if (this->has_children())
8076# ifndef DEAL_II_WITH_MPI
8089 subdomain_id != locally_owned_subdomain &&
8096template <
int dim,
int spacedim>
8100# ifndef DEAL_II_WITH_MPI
8112 subdomain_id != locally_owned_subdomain &&
8120template <
int dim,
int spacedim>
8124 Assert(this->is_active(),
8125 ExcMessage(
"is_artificial() can only be called on active cells!"));
8126# ifndef DEAL_II_WITH_MPI
8142template <
int dim,
int spacedim>
8146# ifndef DEAL_II_WITH_MPI
8157template <
int dim,
int spacedim>
8162 Assert(this->is_active(),
8163 ExcMessage(
"subdomain_id() can only be called on active cells!"));
8164 return this->tria->
levels[this->present_level]
8165 ->subdomain_ids[this->present_index];
8170template <
int dim,
int spacedim>
8175 return this->tria->
levels[this->present_level]
8176 ->level_subdomain_ids[this->present_index];
8181template <
int dim,
int spacedim>
8185 const unsigned int n2 = neighbor_of_neighbor_internal(neighbor);
8192 return neighbor_of_coarser_neighbor(neighbor).first;
8197template <
int dim,
int spacedim>
8206template <
int dim,
int spacedim>
8211 return this->tria->
levels[this->present_level]
8212 ->active_cell_indices[this->present_index];
8217template <
int dim,
int spacedim>
8222 Assert(this->is_active(),
8224 "global_active_cell_index() can only be called on active cells!"));
8226 return this->tria->
levels[this->present_level]
8227 ->global_active_cell_indices[this->present_index];
8232template <
int dim,
int spacedim>
8236 return this->tria->
levels[this->present_level]
8237 ->global_level_cell_indices[this->present_index];