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);
6478 bool all_vertices_within_ball =
true;
6483 if (center.distance(this->vertex(v)) >
6484 radius + 100. *
std::numeric_limits<double>::
epsilon())
6486 all_vertices_within_ball =
false;
6492 return std::make_pair(center, radius);
6496template <
int structdim,
int dim,
int spacedim>
6503 return (this->vertex(1) - this->vertex(0)).norm();
6507 double min = std::numeric_limits<double>::max();
6509 for (unsigned
int j = i + 1; j < this->n_vertices(); ++j)
6511 (this->vertex(i) - this->vertex(j)) *
6512 (this->vertex(i) - this->vertex(j)));
6522template <
int structdim,
int dim,
int spacedim>
6542 bool is_translation =
true;
6545 for (
unsigned int i = 1; i < this->n_vertices(); ++i)
6548 (o->vertex(i) - this->vertex(i)) - dist;
6551 is_translation =
false;
6555 return is_translation;
6560template <
int structdim,
int dim,
int spacedim>
6569template <
int structdim,
int dim,
int spacedim>
6573 return this->reference_cell().
n_lines();
6578template <
int structdim,
int dim,
int spacedim>
6583 ExcMessage(
"This function can only be used on objects "
6584 "that are cells, but not on faces or edges "
6585 "that bound cells."));
6587 return this->reference_cell().
n_faces();
6592template <
int structdim,
int dim,
int spacedim>
6602template <
int structdim,
int dim,
int spacedim>
6612template <
int structdim,
int dim,
int spacedim>
6624template <
int dim,
int spacedim>
6627 const unsigned int vertex_index)
6634template <
int dim,
int spacedim>
6639 const AccessorData *)
6646template <
int dim,
int spacedim>
6647template <
int structdim2,
int dim2,
int spacedim2>
6658template <
int dim,
int spacedim>
6659template <
int structdim2,
int dim2,
int spacedim2>
6670template <
int dim,
int spacedim>
6680template <
int dim,
int spacedim>
6687 return (global_vertex_index < other.global_vertex_index);
6692template <
int dim,
int spacedim>
6704template <
int dim,
int spacedim>
6713template <
int dim,
int spacedim>
6722template <
int dim,
int spacedim>
6731template <
int dim,
int spacedim>
6736 if (global_vertex_index >= tria->
n_vertices())
6742template <
int dim,
int spacedim>
6748 if (global_vertex_index != 0)
6757template <
int dim,
int spacedim>
6762 ((tria == t.
tria) && (global_vertex_index == t.global_vertex_index));
6769template <
int dim,
int spacedim>
6773 return !(*
this == t);
6778template <
int dim,
int spacedim>
6787template <
int dim,
int spacedim>
6797template <
int dim,
int spacedim>
6798inline typename ::internal::TriangulationImplementation::
6799 Iterators<dim, spacedim>::line_iterator
6802 return typename ::internal::TriangulationImplementation::
6803 Iterators<dim, spacedim>::line_iterator();
6808template <
int dim,
int spacedim>
6818template <
int dim,
int spacedim>
6819inline typename ::internal::TriangulationImplementation::
6820 Iterators<dim, spacedim>::quad_iterator
6823 return typename ::internal::TriangulationImplementation::
6824 Iterators<dim, spacedim>::quad_iterator();
6829template <
int dim,
int spacedim>
6839template <
int dim,
int spacedim>
6848template <
int dim,
int spacedim>
6857template <
int dim,
int spacedim>
6866template <
int dim,
int spacedim>
6875template <
int dim,
int spacedim>
6878 const unsigned int )
6885template <
int dim,
int spacedim>
6894template <
int dim,
int spacedim>
6903template <
int dim,
int spacedim>
6912template <
int dim,
int spacedim>
6921template <
int dim,
int spacedim>
6930template <
int dim,
int spacedim>
6939template <
int dim,
int spacedim>
6948template <
int dim,
int spacedim>
6957template <
int dim,
int spacedim>
6967template <
int dim,
int spacedim>
6976template <
int dim,
int spacedim>
6985template <
int dim,
int spacedim>
6994template <
int dim,
int spacedim>
7003template <
int dim,
int spacedim>
7012template <
int dim,
int spacedim>
7023template <
int spacedim>
7026 const VertexKind vertex_kind,
7027 const unsigned int vertex_index)
7029 , vertex_kind(vertex_kind)
7035template <
int spacedim>
7040 const AccessorData *)
7042 , vertex_kind(interior_vertex)
7056 "This constructor can not be called for face iterators in 1d, "
7057 "except to default-construct iterator objects."));
7062template <
int spacedim>
7063template <
int structdim2,
int dim2,
int spacedim2>
7067 , vertex_kind(interior_vertex)
7075template <
int spacedim>
7076template <
int structdim2,
int dim2,
int spacedim2>
7080 , vertex_kind(interior_vertex)
7088template <
int spacedim>
7093 vertex_kind = t.vertex_kind;
7099template <
int spacedim>
7112template <
int spacedim>
7119 return (global_vertex_index < other.global_vertex_index);
7124template <
int spacedim>
7132template <
int spacedim>
7141template <
int spacedim>
7150template <
int spacedim>
7159template <
int spacedim>
7167template <
int spacedim>
7176template <
int spacedim>
7181 ((tria == t.
tria) && (global_vertex_index == t.global_vertex_index));
7193template <
int spacedim>
7197 return !(*
this == t);
7202template <
int spacedim>
7213template <
int spacedim>
7225template <
int spacedim>
7234template <
int spacedim>
7235inline typename ::internal::TriangulationImplementation::
7236 Iterators<1, spacedim>::line_iterator
7243template <
int spacedim>
7252template <
int spacedim>
7253inline typename ::internal::TriangulationImplementation::
7254 Iterators<1, spacedim>::quad_iterator
7262template <
int spacedim>
7271template <
int spacedim>
7275 return vertex_kind != interior_vertex;
7279template <
int spacedim>
7283 switch (vertex_kind)
7289 this->vertex_index()) !=
7303template <
int spacedim>
7312template <
int spacedim>
7324template <
int spacedim>
7327 const unsigned int )
7333template <
int spacedim>
7342template <
int spacedim>
7351template <
int spacedim>
7360template <
int spacedim>
7369template <
int spacedim>
7378template <
int spacedim>
7387template <
int spacedim>
7396template <
int spacedim>
7405template <
int spacedim>
7415template <
int spacedim>
7423template <
int spacedim>
7431template <
int spacedim>
7438template <
int spacedim>
7446template <
int spacedim>
7455template <
int spacedim>
7461 ExcMessage(
"You can't set the boundary_id of a face of a cell that is "
7462 "not actually at the boundary."));
7469template <
int spacedim>
7478template <
int spacedim>
7488template <
int spacedim>
7497template <
int spacedim>
7506template <
int spacedim>
7515template <
int spacedim>
7524template <
int spacedim>
7533template <
int spacedim>
7543template <
int spacedim>
7554template <
int dim,
int spacedim>
7559 const AccessorData *local_data)
7565template <
int dim,
int spacedim>
7569 static_cast<const
TriaAccessor<dim, dim, spacedim> &>(cell_accessor))
7574template <
int dim,
int spacedim>
7579 this->present_level + 1,
7580 this->child_index(i));
7590template <
int dim,
int spacedim>
7591inline boost::container::small_vector<TriaIterator<CellAccessor<dim, spacedim>>,
7595 boost::container::small_vector<TriaIterator<CellAccessor<dim, spacedim>>,
7597 child_iterators(this->n_children());
7599 for (
unsigned int i = 0; i < this->n_children(); ++i)
7600 child_iterators[i] = this->child(i);
7602 return child_iterators;
7607template <
int dim,
int spacedim>
7612 if constexpr (dim == 1)
7615 VertexKind vertex_kind = VertexKind::interior_vertex;
7616 if (i == 0 && at_boundary(0))
7617 vertex_kind = VertexKind::left_vertex;
7618 if (i == 1 && at_boundary(1))
7619 vertex_kind = VertexKind::right_vertex;
7622 this->vertex_index(i));
7625 else if constexpr (dim == 2)
7626 return this->line(i);
7627 else if constexpr (dim == 3)
7628 return this->quad(i);
7638template <
int dim,
int spacedim>
7643 for (
const unsigned int face_n : this->face_indices())
7644 if (this->face(face_n) == face)
7648 ExcMessage(
"The given face is not a face of the current cell."));
7654template <
int dim,
int spacedim>
7655inline boost::container::small_vector<
7658 ReferenceCells::max_n_faces<dim>()
7665 boost::container::small_vector<
7668 ReferenceCells::max_n_faces<dim>()
7673 face_iterators(this->n_faces());
7675 for (
const unsigned int i : this->face_indices())
7676 face_iterators[i] = this->face(i);
7678 return face_iterators;
7683template <
int dim,
int spacedim>
7690 return this->vertex_index(i);
7693 return this->line_index(i);
7696 return this->quad_index(i);
7705template <
int dim,
int spacedim>
7710 return this->tria->
levels[this->present_level]
7711 ->neighbors[this->present_index * ReferenceCells::max_n_faces<dim>() +
7718template <
int dim,
int spacedim>
7723 return this->tria->
levels[this->present_level]
7724 ->neighbors[this->present_index * ReferenceCells::max_n_faces<dim>() +
7731template <
int dim,
int spacedim>
7741 Assert(this->is_active() || !this->tria->
levels[this->present_level]
7742 ->refine_flags[this->present_index],
7743 ExcRefineCellNotActive());
7745 this->tria->
levels[this->present_level]->refine_flags[this->present_index]);
7750template <
int dim,
int spacedim>
7755 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7756 Assert(!coarsen_flag_set(), ExcCellFlaggedForCoarsening());
7758 this->tria->
levels[this->present_level]->refine_flags[this->present_index] =
7764template <
int dim,
int spacedim>
7768 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7769 this->tria->
levels[this->present_level]->refine_flags[this->present_index] =
7774template <
int dim,
int spacedim>
7779 if (this->tria->
levels[this->present_level]->refine_choice.size() == 0)
7781 return this->tria->
levels[this->present_level]
7782 ->refine_choice[this->present_index];
7786template <
int dim,
int spacedim>
7789 const std::uint8_t refinement_choice)
const
7791 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7792 if (this->tria->
levels[this->present_level]->refine_choice.size() != 0)
7793 this->tria->
levels[this->present_level]
7794 ->refine_choice[this->present_index] = refinement_choice;
7798template <
int dim,
int spacedim>
7802 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7803 if (this->tria->
levels[this->present_level]->refine_choice.size() != 0)
7804 this->tria->
levels[this->present_level]
7805 ->refine_choice[this->present_index] =
7810template <
int dim,
int spacedim>
7813 const unsigned int face_no,
7829 face_refinement_case,
7831 this->face_orientation(face_no),
7832 this->face_flip(face_no),
7833 this->face_rotation(face_no)));
7834 set_refine_flag(new_ref_case);
7837 return new_ref_case != old_ref_case;
7842template <
int dim,
int spacedim>
7845 const unsigned int line_no)
const
7855 old_ref_case = refine_flag_set(),
7859 set_refine_flag(new_ref_case);
7862 return new_ref_case != old_ref_case;
7867template <
int dim,
int spacedim>
7868inline ::internal::SubfaceCase<dim>
7874 if constexpr (dim == 1)
7875 return ::internal::SubfaceCase<1>::case_none;
7876 else if constexpr (dim == 2)
7877 return ((face(face_no)->has_children()) ?
7879 ::
internal::SubfaceCase<2>::case_none);
7880 else if constexpr (dim == 3)
7882 switch (
static_cast<std::uint8_t
>(face(face_no)->refinement_case()))
7885 return ::internal::SubfaceCase<3>::case_none;
7887 if (face(face_no)->child(0)->has_children())
7889 Assert(face(face_no)->child(0)->refinement_case() ==
7892 if (face(face_no)->child(1)->has_children())
7894 Assert(face(face_no)->child(1)->refinement_case() ==
7897 return ::internal::SubfaceCase<3>::case_x1y2y;
7900 return ::internal::SubfaceCase<3>::case_x1y;
7904 if (face(face_no)->child(1)->has_children())
7906 Assert(face(face_no)->child(1)->refinement_case() ==
7909 return ::internal::SubfaceCase<3>::case_x2y;
7912 return ::internal::SubfaceCase<3>::case_x;
7915 if (face(face_no)->child(0)->has_children())
7917 Assert(face(face_no)->child(0)->refinement_case() ==
7920 if (face(face_no)->child(1)->has_children())
7922 Assert(face(face_no)->child(1)->refinement_case() ==
7925 return ::internal::SubfaceCase<3>::case_y1x2x;
7928 return ::internal::SubfaceCase<3>::case_y1x;
7932 if (face(face_no)->child(1)->has_children())
7934 Assert(face(face_no)->child(1)->refinement_case() ==
7937 return ::internal::SubfaceCase<3>::case_y2x;
7940 return ::internal::SubfaceCase<3>::case_y;
7943 return ::internal::SubfaceCase<3>::case_xy;
7951 return ::internal::SubfaceCase<dim>::case_none;
7956template <
int dim,
int spacedim>
7966 Assert(this->is_active() || !this->tria->
levels[this->present_level]
7967 ->coarsen_flags[this->present_index],
7968 ExcRefineCellNotActive());
7969 return this->tria->
levels[this->present_level]
7970 ->coarsen_flags[this->present_index];
7975template <
int dim,
int spacedim>
7979 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7980 Assert(!refine_flag_set(), ExcCellFlaggedForRefinement());
7982 this->tria->
levels[this->present_level]->coarsen_flags[this->present_index] =
7988template <
int dim,
int spacedim>
7992 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7993 this->tria->
levels[this->present_level]->coarsen_flags[this->present_index] =
7999template <
int dim,
int spacedim>
8004 neighbor_level(face_no),
8005 neighbor_index(face_no));
8015template <
int dim,
int spacedim>
8019 return !this->has_children();
8024template <
int dim,
int spacedim>
8028 Assert(this->is_active(),
8029 ExcMessage(
"is_locally_owned() can only be called on active cells!"));
8030# ifndef DEAL_II_WITH_MPI
8047template <
int dim,
int spacedim>
8051# ifndef DEAL_II_WITH_MPI
8062 this->level_subdomain_id() == locally_owned_subdomain);
8068template <
int dim,
int spacedim>
8072 Assert(this->is_active(),
8073 ExcMessage(
"is_ghost() can only be called on active cells!"));
8074 if (this->has_children())
8077# ifndef DEAL_II_WITH_MPI
8090 subdomain_id != locally_owned_subdomain &&
8097template <
int dim,
int spacedim>
8101# ifndef DEAL_II_WITH_MPI
8113 subdomain_id != locally_owned_subdomain &&
8121template <
int dim,
int spacedim>
8125 Assert(this->is_active(),
8126 ExcMessage(
"is_artificial() can only be called on active cells!"));
8127# ifndef DEAL_II_WITH_MPI
8143template <
int dim,
int spacedim>
8147# ifndef DEAL_II_WITH_MPI
8158template <
int dim,
int spacedim>
8163 Assert(this->is_active(),
8164 ExcMessage(
"subdomain_id() can only be called on active cells!"));
8165 return this->tria->
levels[this->present_level]
8166 ->subdomain_ids[this->present_index];
8171template <
int dim,
int spacedim>
8176 return this->tria->
levels[this->present_level]
8177 ->level_subdomain_ids[this->present_index];
8182template <
int dim,
int spacedim>
8186 const unsigned int n2 = neighbor_of_neighbor_internal(neighbor);
8193 return neighbor_of_coarser_neighbor(neighbor).first;
8198template <
int dim,
int spacedim>
8207template <
int dim,
int spacedim>
8212 return this->tria->
levels[this->present_level]
8213 ->active_cell_indices[this->present_index];
8218template <
int dim,
int spacedim>
8223 Assert(this->is_active(),
8225 "global_active_cell_index() can only be called on active cells!"));
8227 return this->tria->
levels[this->present_level]
8228 ->global_active_cell_indices[this->present_index];
8233template <
int dim,
int spacedim>
8237 return this->tria->
levels[this->present_level]
8238 ->global_level_cell_indices[this->present_index];