811 template <
int structdim2,
int dim2,
int spacedim2>
921 typename ::internal::TriangulationImplementation::
922 Iterators<dim, spacedim>::line_iterator
923 line(
const unsigned int i)
const;
937 typename ::internal::TriangulationImplementation::
938 Iterators<dim, spacedim>::quad_iterator
939 quad(
const unsigned int i)
const;
1550 std::pair<Point<spacedim>,
double>
1658 center(
const bool respect_manifold =
false,
1659 const bool interpolate_from_surrounding =
false)
const;
1806 const std::initializer_list<int> &new_indices)
const;
1813 const std::initializer_list<unsigned int> &new_indices)
const;
1834 const unsigned char combined_orientation)
const;
1888 friend struct ::internal::TriangulationImplementation::Implementation;
1889 friend struct ::internal::TriangulationImplementation::
1890 ImplementationMixedMesh;
1891 friend struct ::internal::TriaAccessorImplementation::Implementation;
1914template <
int dim,
int spacedim>
1957 const int level = 0,
1958 const int index = 0,
1964 template <
int structdim2,
int dim2,
int spacedim2>
1970 template <
int structdim2,
int dim2,
int spacedim2>
2071 typename ::internal::TriangulationImplementation::
2072 Iterators<dim, spacedim>::line_iterator
static line(
const unsigned int);
2083 static typename ::internal::TriangulationImplementation::
2084 Iterators<dim, spacedim>::quad_iterator
2130 const bool interpolate_from_surrounding =
false)
const;
2158 static unsigned char
2300 template <
typename Accessor>
2302 template <
typename Accessor>
2304 template <
typename Accessor>
2326template <
int spacedim>
2404 template <
int structdim2,
int dim2,
int spacedim2>
2410 template <
int structdim2,
int dim2,
int spacedim2>
2547 typename ::internal::TriangulationImplementation::
2548 Iterators<1, spacedim>::line_iterator
static line(
const unsigned int);
2562 static typename ::internal::TriangulationImplementation::
2563 Iterators<1, spacedim>::quad_iterator
2827 static unsigned char
3070template <
int dim,
int spacedim = dim>
3095 const int level = -1,
3096 const int index = -1,
3116 template <
int structdim2,
int dim2,
int spacedim2>
3123 template <
int structdim2,
int dim2,
int spacedim2>
3220 boost::container::small_vector<TriaIterator<CellAccessor<dim, spacedim>>,
3241 boost::container::small_vector<
3307 const unsigned int subface_no)
const;
3420 std::pair<unsigned int, unsigned int>
3499 const unsigned int subface_no)
const;
3511 std::pair<unsigned int, unsigned int>
3688 const unsigned int face_no,
4188 template <
int dim_,
int spacedim_>
4237 friend struct ::internal::TriangulationImplementation::Implementation;
4238 friend struct ::internal::TriangulationImplementation::
4239 ImplementationMixedMesh;
4247template <
int structdim,
int dim,
int spacedim>
4248template <
typename OtherAccessor>
4250 const OtherAccessor &)
4253 ExcMessage(
"You are attempting an illegal conversion between "
4254 "iterator/accessor types. The constructor you call "
4255 "only exists to make certain template constructs "
4256 "easier to write as dimension independent code but "
4257 "the conversion is not valid in the current context."));
4262template <
int structdim,
int dim,
int spacedim>
4263template <
int structdim2,
int dim2,
int spacedim2>
4268 ExcMessage(
"You are attempting an illegal conversion between "
4269 "iterator/accessor types. The constructor you call "
4270 "only exists to make certain template constructs "
4271 "easier to write as dimension independent code but "
4272 "the conversion is not valid in the current context."));
4277template <
int dim,
int spacedim>
4278template <
int structdim2,
int dim2,
int spacedim2>
4283 ExcMessage(
"You are attempting an illegal conversion between "
4284 "iterator/accessor types. The constructor you call "
4285 "only exists to make certain template constructs "
4286 "easier to write as dimension independent code but "
4287 "the conversion is not valid in the current context."));
4292template <
int structdim,
int dim,
int spacedim>
4293template <
int structdim2,
int dim2,
int spacedim2>
4298 ExcMessage(
"You are attempting an illegal conversion between "
4299 "iterator/accessor types. The constructor you call "
4300 "only exists to make certain template constructs "
4301 "easier to write as dimension independent code but "
4302 "the conversion is not valid in the current context."));
4307template <
int dim,
int spacedim>
4308template <
int structdim2,
int dim2,
int spacedim2>
4313 ExcMessage(
"You are attempting an illegal conversion between "
4314 "iterator/accessor types. The constructor you call "
4315 "only exists to make certain template constructs "
4316 "easier to write as dimension independent code but "
4317 "the conversion is not valid in the current context."));
4351 namespace TriaAccessorImplementation
4358 template <
int dim,
int spacedim>
4370 return (vertices[1] - vertices[0]).norm();
4373 return std::max({(vertices[1] - vertices[0]).norm(),
4374 (vertices[2] - vertices[1]).norm(),
4375 (vertices[2] - vertices[0]).norm()});
4379 (vertices[2] - vertices[1]).
norm()});
4383 (vertices[2] - vertices[0]).
norm(),
4384 (vertices[2] - vertices[1]).
norm(),
4385 (vertices[3] - vertices[0]).
norm(),
4386 (vertices[3] - vertices[1]).
norm(),
4387 (vertices[3] - vertices[2]).
norm()});
4392 (vertices[3] - vertices[0]).
norm(),
4393 (vertices[2] - vertices[1]).
norm(),
4396 (vertices[4] - vertices[0]).
norm(),
4397 (vertices[4] - vertices[1]).
norm(),
4398 (vertices[4] - vertices[2]).
norm(),
4399 (vertices[4] - vertices[3]).
norm()});
4404 (vertices[4] - vertices[0]).
norm(),
4405 (vertices[3] - vertices[1]).
norm(),
4406 (vertices[5] - vertices[1]).
norm(),
4407 (vertices[4] - vertices[2]).
norm(),
4408 (vertices[5] - vertices[0]).
norm(),
4409 (vertices[3] - vertices[2]).
norm(),
4412 (vertices[1] - vertices[0]).
norm(),
4413 (vertices[2] - vertices[1]).
norm(),
4414 (vertices[2] - vertices[0]).
norm(),
4415 (vertices[4] - vertices[3]).
norm(),
4416 (vertices[5] - vertices[4]).
norm(),
4417 (vertices[5] - vertices[3]).
norm()});
4421 (vertices[6] - vertices[1]).
norm(),
4422 (vertices[2] - vertices[5]).
norm(),
4423 (vertices[3] - vertices[4]).
norm()});
4434template <
int structdim,
int dim,
int spacedim>
4439 const AccessorData *)
4440 : present_level((structdim == dim) ?
level : 0)
4441 , present_index(
index)
4449 if (structdim != dim)
4457template <
int structdim,
int dim,
int spacedim>
4460 : present_level(a.present_level)
4461 , present_index(a.present_index)
4466template <
int structdim,
int dim,
int spacedim>
4475 if (structdim != dim)
4477 Assert((present_level == 0) || (present_level == -1) ||
4478 (present_level == -2),
4485template <
int structdim,
int dim,
int spacedim>
4494 if (structdim != dim)
4496 Assert((present_level == 0) || (present_level == -1) ||
4497 (present_level == -2),
4505template <
int structdim,
int dim,
int spacedim>
4518template <
int structdim,
int dim,
int spacedim>
4531template <
int structdim,
int dim,
int spacedim>
4546template <
int structdim,
int dim,
int spacedim>
4552 return present_level;
4557template <
int structdim,
int dim,
int spacedim>
4561 return present_index;
4566template <
int structdim,
int dim,
int spacedim>
4570 if ((present_level >= 0) && (present_index >= 0))
4572 else if (present_index == -1)
4580template <
int structdim,
int dim,
int spacedim>
4589template <
int structdim,
int dim,
int spacedim>
4595 ++this->present_index;
4597 if (structdim != dim)
4604 if (this->present_index >=
static_cast<int>(objects().n_objects()))
4605 this->present_index = -1;
4609 while (this->present_index >=
4611 this->tria->
levels[this->present_level]->cells.n_objects()))
4615 ++this->present_level;
4616 this->present_index = 0;
4618 if (this->present_level >=
4619 static_cast<int>(this->tria->
levels.size()))
4622 this->present_level = this->present_index = -1;
4630template <
int structdim,
int dim,
int spacedim>
4635 --this->present_index;
4637 if (structdim != dim)
4639 if (this->present_index < 0)
4640 this->present_index = -1;
4644 while (this->present_index < 0)
4647 --this->present_level;
4649 if (this->present_level == -1)
4652 this->present_level = this->present_index = -1;
4656 this->present_index =
4657 this->tria->
levels[this->present_level]->cells.n_objects() - 1;
4664template <
int structdim,
int dim,
int spacedim>
4665inline ::internal::TriangulationImplementation::TriaObjects &
4668 if (structdim == dim)
4669 return this->tria->
levels[this->present_level]->cells;
4671 if (structdim == 1 && dim > 1)
4672 return this->tria->
faces->lines;
4674 if (structdim == 2 && dim > 2)
4675 return this->tria->
faces->quads;
4679 return this->tria->
levels[this->present_level]->cells;
4686template <
int structdim,
int dim,
int spacedim>
4690 const AccessorData *)
4693 ExcMessage(
"You are attempting an invalid conversion between "
4694 "iterator/accessor types. The constructor you call "
4695 "only exists to make certain template constructs "
4696 "easier to write as dimension independent code but "
4697 "the conversion is not valid in the current context."));
4702template <
int structdim,
int dim,
int spacedim>
4707 ExcMessage(
"You are attempting an invalid conversion between "
4708 "iterator/accessor types. The constructor you call "
4709 "only exists to make certain template constructs "
4710 "easier to write as dimension independent code but "
4711 "the conversion is not valid in the current context."));
4716template <
int structdim,
int dim,
int spacedim>
4729template <
int structdim,
int dim,
int spacedim>
4744template <
int structdim,
int dim,
int spacedim>
4759template <
int structdim,
int dim,
int spacedim>
4773template <
int structdim,
int dim,
int spacedim>
4787template <
int structdim,
int dim,
int spacedim>
4794template <
int structdim,
int dim,
int spacedim>
4801template <
int structdim,
int dim,
int spacedim>
4810template <
int structdim,
int dim,
int spacedim>
4819template <
int structdim,
int dim,
int spacedim>
4822 const unsigned int)
const
4825 ExcMessage(
"You are trying to set the user index of an "
4826 "invalid object."));
4831template <
int structdim,
int dim,
int spacedim>
4837 ExcMessage(
"You are trying to set the manifold id of an "
4838 "invalid object."));
4843template <
int structdim,
int dim,
int spacedim>
4850 return invalid_vertex;
4854template <
int structdim,
int dim,
int spacedim>
4865template <
int structdim,
int dim,
int spacedim>
4880 namespace TriaAccessorImplementation
4888 using ::TriaAccessor;
4894 struct Implementation
4899 template <
int dim,
int spacedim>
4900 inline static unsigned int
4904 ExcMessage(
"You can't ask for the index of a line bounding "
4905 "a one-dimensional cell because it is not "
4906 "bounded by lines."));
4911 template <
int dim,
int spacedim>
4912 inline static unsigned int
4914 const unsigned int i)
4916 constexpr unsigned int max_faces_per_cell = 4;
4922 inline static unsigned int
4925 const auto [face_index, line_index] =
4927 const auto line_within_face_index =
4933 return accessor.
quad(face_index)->line_index(line_within_face_index);
4941 template <
int structdim,
int dim,
int spacedim>
4942 inline static unsigned int
4947 ExcMessage(
"You can't ask for the index of a quad bounding "
4948 "a one- or two-dimensional cell because it is not "
4949 "bounded by quads."));
4954 inline static unsigned int
4957 constexpr unsigned int max_faces_per_cell = 6;
4959 ->cells.cells[accessor.
present_index * max_faces_per_cell + i];
4967 template <
int structdim,
int dim,
int spacedim>
4969 set_combined_face_orientation(
4971 const unsigned int face,
4972 const unsigned char combined_orientation)
4975 ExcMessage(
"This function can only be used on objects that are "
4976 "cells and not on objects which bound cells."));
4980 Assert(combined_orientation ==
4982 ExcMessage(
"In 1d, faces do not have an orientation, so the "
4983 "only valid value is the default."));
4985 Assert(combined_orientation ==
4987 combined_orientation ==
4990 "In 2d, the only valid values of the combined orientation "
4991 "are the standard orientation or the reversed line "
4997 ->face_orientations.set_combined_orientation(
4999 combined_orientation);
5005 template <
int dim,
int spacedim>
5015 template <
int spacedim>
5027 template <
int spacedim>
5030 const unsigned int line,
5036 accessor.
tria->
faces->quads_line_orientations.size(),
5040 accessor.
tria->
faces->quads_line_orientations
5060 template <
int dim,
int spacedim>
5061 inline static unsigned int
5063 const unsigned int corner)
5065 constexpr unsigned int max_faces_per_cell = 2;
5071 template <
int dim,
int spacedim>
5072 inline static unsigned int
5074 const unsigned int corner)
5076 const auto [line_index, vertex_index] =
5079 const auto vertex_within_line_index =
5087 return accessor.
line(line_index)
5088 ->vertex_index(vertex_within_line_index);
5093 inline static unsigned int
5095 const unsigned int corner)
5097 const auto [face_index, vertex_index] =
5100 const auto vertex_within_face_index =
5106 return accessor.
quad(face_index)
5107 ->vertex_index(vertex_within_face_index);
5112 template <
int dim,
int spacedim>
5113 static std::array<unsigned int, 1>
5122 template <
int structdim,
int dim,
int spacedim>
5123 static std::array<unsigned int, 4>
5128 std::array<unsigned int, 4> line_indices = {};
5129 for (
const unsigned int line : cell.line_indices())
5130 line_indices[line] = cell.line_index(line);
5131 return line_indices;
5138 template <
int structdim,
int dim,
int spacedim>
5139 static std::array<unsigned int, 12>
5140 get_line_indices_of_cell(
5143 std::array<unsigned int, 12> line_indices = {};
5151 for (
unsigned int f = 4; f < 6; ++f)
5153 const unsigned char orientation =
5156 ->face_orientations.get_combined_orientation(
5165 const std::array<unsigned int, 4> my_indices{
5166 {ref_cell.standard_to_real_face_line(0, f, orientation),
5167 ref_cell.standard_to_real_face_line(1, f, orientation),
5168 ref_cell.standard_to_real_face_line(2, f, orientation),
5169 ref_cell.standard_to_real_face_line(3, f, orientation)}};
5170 const auto quad = cell.
quad(f);
5171 for (
unsigned int l = 0;
l < 4; ++
l)
5172 line_indices[4 * (f - 4) +
l] =
5173 quad->line_index(my_indices[l]);
5175 for (
unsigned int f = 0; f < 2; ++f)
5177 const unsigned char orientation =
5180 ->face_orientations.get_combined_orientation(
5182 const std::array<unsigned int, 2> my_indices{
5183 {ref_cell.standard_to_real_face_line(0, f, orientation),
5184 ref_cell.standard_to_real_face_line(1, f, orientation)}};
5185 const auto quad = cell.
quad(f);
5186 line_indices[8 + f] = quad->line_index(my_indices[0]);
5187 line_indices[10 + f] = quad->line_index(my_indices[1]);
5192 std::array<unsigned int, 3> orientations{
5196 const std::array<unsigned int, 6> my_indices{
5197 {ref_cell.standard_to_real_face_line(0, 0, orientations[0]),
5198 ref_cell.standard_to_real_face_line(1, 0, orientations[0]),
5199 ref_cell.standard_to_real_face_line(2, 0, orientations[0]),
5200 ref_cell.standard_to_real_face_line(1, 1, orientations[1]),
5201 ref_cell.standard_to_real_face_line(2, 1, orientations[1]),
5202 ref_cell.standard_to_real_face_line(1, 2, orientations[2])}};
5203 line_indices[0] = cell.
quad(0)->line_index(my_indices[0]);
5204 line_indices[1] = cell.
quad(0)->line_index(my_indices[1]);
5205 line_indices[2] = cell.
quad(0)->line_index(my_indices[2]);
5206 line_indices[3] = cell.
quad(1)->line_index(my_indices[3]);
5207 line_indices[4] = cell.
quad(1)->line_index(my_indices[4]);
5208 line_indices[5] = cell.
quad(2)->line_index(my_indices[5]);
5216 return line_indices;
5225 template <
int dim,
int spacedim>
5226 static std::array<unsigned char, 1>
5239 template <
int dim,
int spacedim>
5240 static std::array<unsigned char, 4>
5245 std::array<unsigned char, 4> line_orientations = {};
5246 for (
const unsigned int line : cell.line_indices())
5247 line_orientations[line] =
5248 cell.line_orientation(line) == true ?
5251 return line_orientations;
5260 template <
int dim,
int spacedim>
5261 static std::array<unsigned char, 12>
5264 std::array<unsigned char, 12> line_orientations = {};
5272 for (
unsigned int f = 4; f < 6; ++f)
5274 const unsigned char orientation =
5277 ->face_orientations.get_combined_orientation(
5286 const std::array<unsigned int, 4> my_indices{
5287 {ref_cell.standard_to_real_face_line(0, f, orientation),
5288 ref_cell.standard_to_real_face_line(1, f, orientation),
5289 ref_cell.standard_to_real_face_line(2, f, orientation),
5290 ref_cell.standard_to_real_face_line(3, f, orientation)}};
5291 const auto quad = cell.
quad(f);
5292 const std::array<bool, 4> my_orientations{
5293 {ref_cell.standard_vs_true_line_orientation(
5294 0, f, orientation, quad->line_orientation(my_indices[0])),
5295 ref_cell.standard_vs_true_line_orientation(
5296 1, f, orientation, quad->line_orientation(my_indices[1])),
5297 ref_cell.standard_vs_true_line_orientation(
5298 2, f, orientation, quad->line_orientation(my_indices[2])),
5299 ref_cell.standard_vs_true_line_orientation(
5303 quad->line_orientation(my_indices[3]))}};
5304 for (
unsigned int l = 0;
l < 4; ++
l)
5305 line_orientations[4 * (f - 4) +
l] = my_orientations[
l];
5307 for (
unsigned int f = 0; f < 2; ++f)
5309 const unsigned char orientation =
5312 ->face_orientations.get_combined_orientation(
5314 const std::array<unsigned int, 2> my_indices{
5315 {ref_cell.standard_to_real_face_line(0, f, orientation),
5316 ref_cell.standard_to_real_face_line(1, f, orientation)}};
5317 const auto quad = cell.
quad(f);
5318 const std::array<bool, 2> my_orientations{
5319 {ref_cell.standard_vs_true_line_orientation(
5320 0, f, orientation, quad->line_orientation(my_indices[0])),
5321 ref_cell.standard_vs_true_line_orientation(
5325 quad->line_orientation(my_indices[1]))}};
5326 line_orientations[8 + f] = my_orientations[0];
5327 line_orientations[10 + f] = my_orientations[1];
5332 std::array<unsigned int, 3> orientations{
5336 const std::array<unsigned int, 6> my_indices{
5337 {ref_cell.standard_to_real_face_line(0, 0, orientations[0]),
5338 ref_cell.standard_to_real_face_line(1, 0, orientations[0]),
5339 ref_cell.standard_to_real_face_line(2, 0, orientations[0]),
5340 ref_cell.standard_to_real_face_line(1, 1, orientations[1]),
5341 ref_cell.standard_to_real_face_line(2, 1, orientations[1]),
5342 ref_cell.standard_to_real_face_line(1, 2, orientations[2])}};
5343 line_orientations[0] = ref_cell.standard_vs_true_line_orientation(
5347 cell.
quad(0)->line_orientation(my_indices[0]));
5348 line_orientations[1] = ref_cell.standard_vs_true_line_orientation(
5352 cell.
quad(0)->line_orientation(my_indices[1]));
5353 line_orientations[2] = ref_cell.standard_vs_true_line_orientation(
5357 cell.
quad(0)->line_orientation(my_indices[2]));
5358 line_orientations[3] = ref_cell.standard_vs_true_line_orientation(
5362 cell.
quad(1)->line_orientation(my_indices[3]));
5363 line_orientations[4] = ref_cell.standard_vs_true_line_orientation(
5367 cell.
quad(1)->line_orientation(my_indices[4]));
5368 line_orientations[5] = ref_cell.standard_vs_true_line_orientation(
5372 cell.
quad(2)->line_orientation(my_indices[5]));
5380 return line_orientations;
5388template <
int structdim,
int dim,
int spacedim>
5393 const AccessorData *local_data)
5399template <
int structdim,
int dim,
int spacedim>
5404 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5406 return this->objects().used[this->present_index];
5411template <
int structdim,
int dim,
int spacedim>
5414 const unsigned int i)
const
5423template <
int structdim,
int dim,
int spacedim>
5429 else if (structdim == 1)
5431 else if (structdim == dim)
5432 return this->tria->
levels[this->present_level]
5433 ->reference_cell[this->present_index];
5435 return this->tria->
faces->get_quad_type(this->present_index);
5440template <
int structdim,
int dim,
int spacedim>
5443 const unsigned int corner)
const
5447 if (structdim == dim)
5449 constexpr unsigned int max_vertices_per_cell = 1 << dim;
5450 const std::size_t my_index =
5451 static_cast<std::size_t
>(this->present_index) * max_vertices_per_cell;
5453 this->tria->
levels[this->present_level]
5454 ->cell_vertex_indices_cache.size());
5455 const unsigned int vertex_index =
5456 this->tria->
levels[this->present_level]
5457 ->cell_vertex_indices_cache[my_index + corner];
5459 return vertex_index;
5462 return ::internal::TriaAccessorImplementation::Implementation::
5463 vertex_index(*
this, corner);
5468template <
int structdim,
int dim,
int spacedim>
5477template <
int structdim,
int dim,
int spacedim>
5478inline typename ::internal::TriangulationImplementation::
5479 Iterators<dim, spacedim>::line_iterator
5483 return typename ::internal::TriangulationImplementation::
5484 Iterators<dim, spacedim>::line_iterator(this->tria, 0, line_index(i));
5489template <
int structdim,
int dim,
int spacedim>
5495 return ::internal::TriaAccessorImplementation::Implementation::
5496 line_index(*
this, i);
5501template <
int structdim,
int dim,
int spacedim>
5502inline typename ::internal::TriangulationImplementation::
5503 Iterators<dim, spacedim>::quad_iterator
5507 return typename ::internal::TriangulationImplementation::
5508 Iterators<dim, spacedim>::quad_iterator(this->tria, 0, quad_index(i));
5513template <
int structdim,
int dim,
int spacedim>
5517 return ::internal::TriaAccessorImplementation::Implementation::
5518 quad_index(*
this, i);
5523template <
int structdim,
int dim,
int spacedim>
5526 const unsigned int face)
const
5531 ExcMessage(
"This function can only be used on objects "
5532 "that are cells, but not on faces or edges "
5533 "that bound cells."));
5537 if constexpr (structdim == 1)
5539 else if constexpr (structdim == 2)
5540 return this->line_orientation(face) ==
true ?
5544 return this->tria->
levels[this->present_level]
5545 ->face_orientations.get_combined_orientation(
5551template <
int structdim,
int dim,
int spacedim>
5554 const unsigned int face)
const
5559 ExcMessage(
"This function can only be used on objects "
5560 "that are cells, but not on faces or edges "
5561 "that bound cells."));
5565 if constexpr (structdim == 1)
5568 else if constexpr (structdim == 2)
5569 return this->line_orientation(face);
5571 return this->tria->
levels[this->present_level]
5572 ->face_orientations.get_orientation(
5578template <
int structdim,
int dim,
int spacedim>
5584 ExcMessage(
"This function can only be used on objects "
5585 "that are cells, but not on faces or edges "
5586 "that bound cells."));
5591 if constexpr (structdim == 3)
5592 return this->tria->
levels[this->present_level]->face_orientations.get_flip(
5601template <
int structdim,
int dim,
int spacedim>
5604 const unsigned int face)
const
5608 ExcMessage(
"This function can only be used on objects "
5609 "that are cells, but not on faces or edges "
5610 "that bound cells."));
5615 if constexpr (structdim == 3)
5616 return this->tria->
levels[this->present_level]
5617 ->face_orientations.get_rotation(
5627template <
int structdim,
int dim,
int spacedim>
5630 const unsigned int line)
const
5637 if constexpr (structdim == 1)
5639 else if constexpr (structdim == 2 && dim == 2)
5644 if (this->tria->
levels[this->present_level]
5645 ->face_orientations.n_objects() == 0)
5651 return this->tria->
levels[this->present_level]
5652 ->face_orientations.get_orientation(
5657 else if constexpr (structdim == 2 && dim == 3)
5661 this->tria->
faces->quads_line_orientations.size(),
5663 return this->tria->
faces->quads_line_orientations
5666 else if constexpr (structdim == 3 && dim == 3)
5671 const auto [face_index, line_index] =
5673 const auto line_within_face_index =
5682 this->quad(face_index)->line_orientation(line_within_face_index));
5693template <
int structdim,
int dim,
int spacedim>
5696 const unsigned int line,
5697 const bool value)
const
5702 ::internal::TriaAccessorImplementation::Implementation::
5703 set_line_orientation(*
this, line, value);
5708template <
int structdim,
int dim,
int spacedim>
5711 const unsigned int face,
5712 const unsigned char combined_orientation)
const
5717 ::internal::TriaAccessorImplementation::Implementation::
5718 set_combined_face_orientation(*
this, face, combined_orientation);
5723template <
int structdim,
int dim,
int spacedim>
5728 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5730 this->objects().used[this->present_index] =
true;
5735template <
int structdim,
int dim,
int spacedim>
5740 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5742 this->objects().used[this->present_index] =
false;
5746template <
int structdim,
int dim,
int spacedim>
5756 const unsigned int n_sets_of_two =
5758 return this->objects().children[n_sets_of_two * this->present_index + i / 2] +
5764template <
int structdim,
int dim,
int spacedim>
5767 const unsigned int i)
const
5774 return child_index(i);
5778 static_cast<std::uint8_t
>(refinement_case()));
5784 return child_index(i);
5786 (child(i % 2)->refinement_case() ==
5788 return child(i % 2)->child_index(i / 2);
5790 (child(i / 2)->refinement_case() ==
5792 return child(i / 2)->child_index(i % 2);
5797 "This cell has no grandchildren equivalent to isotropic refinement"));
5809template <
int structdim,
int dim,
int spacedim>
5814 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5821 this->objects().children[this->present_index] != -1 ?
5837 Assert(
static_cast<unsigned int>(this->present_index) <
5838 this->objects().refinement_cases.size(),
5841 this->objects().refinement_cases.size()));
5844 this->objects().refinement_cases[this->present_index]));
5850template <
int structdim,
int dim,
int spacedim>
5857 this->tria, (dim == structdim ? this->
level() + 1 : 0), child_index(i));
5867template <
int structdim,
int dim,
int spacedim>
5872 const auto n_children = this->n_children();
5873 for (
unsigned int child_n = 0; child_n < n_children; ++child_n)
5874 if (this->child(child_n) == child)
5878 ExcMessage(
"The given child is not a child of the current object."));
5884template <
int structdim,
int dim,
int spacedim>
5887 const unsigned int i)
const
5900 static_cast<std::uint8_t
>(refinement_case()));
5908 (child(i % 2)->refinement_case() ==
5910 return child(i % 2)->child(i / 2);
5912 (child(i / 2)->refinement_case() ==
5914 return child(i / 2)->child(i % 2);
5919 "This cell has no grandchildren equivalent to isotropic refinement"));
5933template <
int structdim,
int dim,
int spacedim>
5938 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5944 const unsigned int n_sets_of_two =
5946 return (this->objects().children[n_sets_of_two * this->present_index] != -1);
5951template <
int structdim,
int dim,
int spacedim>
5956 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5967template <
int structdim,
int dim,
int spacedim>
5973 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5975 Assert(
static_cast<unsigned int>(this->present_index) <
5976 this->objects().refinement_cases.size(),
5979 this->objects().refinement_cases.size()));
5981 this->objects().refinement_cases[this->present_index] = refinement_case;
5985template <
int structdim,
int dim,
int spacedim>
5990 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5992 Assert(
static_cast<unsigned int>(this->present_index) <
5993 this->objects().refinement_cases.size(),
5996 this->objects().refinement_cases.size()));
5998 this->objects().refinement_cases[this->present_index] =
6004template <
int structdim,
int dim,
int spacedim>
6007 const int index)
const
6015 const unsigned int n_sets_of_two =
6023 (i == 0 && !this->has_children() && (index >= 0)) ||
6027 (i > 0 && this->has_children() && (index >= 0) &&
6028 this->objects().children[n_sets_of_two * this->present_index + i / 2] ==
6032 this->objects().children[n_sets_of_two * this->present_index + i / 2] =
index;
6037template <
int structdim,
int dim,
int spacedim>
6044 const unsigned int n_sets_of_two =
6047 for (
unsigned int i = 0; i < n_sets_of_two; ++i)
6048 set_children(2 * i, -1);
6053template <
int structdim,
int dim,
int spacedim>
6058 return this->objects().user_flags[this->present_index];
6063template <
int structdim,
int dim,
int spacedim>
6068 this->objects().user_flags[this->present_index] =
true;
6073template <
int structdim,
int dim,
int spacedim>
6078 this->objects().user_flags[this->present_index] =
false;
6083template <
int structdim,
int dim,
int spacedim>
6089 if (this->has_children())
6090 for (
unsigned int c = 0; c < this->n_children(); ++c)
6091 this->child(c)->recursively_set_user_flag();
6096template <
int structdim,
int dim,
int spacedim>
6102 if (this->has_children())
6103 for (
unsigned int c = 0; c < this->n_children(); ++c)
6104 this->child(c)->recursively_clear_user_flag();
6109template <
int structdim,
int dim,
int spacedim>
6114 this->objects().clear_user_data(this->present_index);
6119template <
int structdim,
int dim,
int spacedim>
6124 this->objects().user_pointer(this->present_index) = p;
6129template <
int structdim,
int dim,
int spacedim>
6134 this->objects().user_pointer(this->present_index) =
nullptr;
6139template <
int structdim,
int dim,
int spacedim>
6144 return this->objects().user_pointer(this->present_index);
6149template <
int structdim,
int dim,
int spacedim>
6154 set_user_pointer(p);
6156 if (this->has_children())
6157 for (
unsigned int c = 0; c < this->n_children(); ++c)
6158 this->child(c)->recursively_set_user_pointer(p);
6163template <
int structdim,
int dim,
int spacedim>
6167 clear_user_pointer();
6169 if (this->has_children())
6170 for (
unsigned int c = 0; c < this->n_children(); ++c)
6171 this->child(c)->recursively_clear_user_pointer();
6176template <
int structdim,
int dim,
int spacedim>
6179 const unsigned int p)
const
6182 this->objects().user_index(this->present_index) = p;
6187template <
int structdim,
int dim,
int spacedim>
6192 this->objects().user_index(this->present_index) = 0;
6197template <
int structdim,
int dim,
int spacedim>
6202 return this->objects().user_index(this->present_index);
6207template <
int structdim,
int dim,
int spacedim>
6210 const unsigned int p)
const
6214 if (this->has_children())
6215 for (
unsigned int c = 0; c < this->n_children(); ++c)
6216 this->child(c)->recursively_set_user_index(p);
6221template <
int structdim,
int dim,
int spacedim>
6227 if (this->has_children())
6228 for (
unsigned int c = 0; c < this->n_children(); ++c)
6229 this->child(c)->recursively_clear_user_index();
6234template <
int structdim,
int dim,
int spacedim>
6238 if (!this->has_children())
6241 unsigned int max_depth = 1;
6242 for (
unsigned int c = 0; c < n_children(); ++c)
6243 max_depth =
std::max(max_depth, child(c)->max_refinement_depth() + 1);
6249template <
int structdim,
int dim,
int spacedim>
6253 if (!this->has_children())
6257 unsigned int sum = 0;
6258 for (
unsigned int c = 0; c < n_children(); ++c)
6259 sum += this->child(c)->n_active_descendants();
6266template <
int structdim,
int dim,
int spacedim>
6273 return this->objects()
6274 .boundary_or_material_id[this->present_index]
6280template <
int structdim,
int dim,
int spacedim>
6288 ExcMessage(
"You are trying to set the boundary_id to an invalid "
6289 "value (numbers::internal_face_boundary_id is reserved)."));
6290 Assert(this->at_boundary(),
6291 ExcMessage(
"You are trying to set the boundary_id of an "
6292 "internal object, which is not allowed!"));
6294 this->objects().boundary_or_material_id[this->present_index].boundary_id =
6300template <
int structdim,
int dim,
int spacedim>
6308 this->objects().boundary_or_material_id[this->present_index].boundary_id =
6314template <
int structdim,
int dim,
int spacedim>
6319 set_boundary_id(boundary_ind);
6331 for (
unsigned int i = 0; i < this->n_lines(); ++i)
6332 this->line(i)->set_boundary_id(boundary_ind);
6342template <
int structdim,
int dim,
int spacedim>
6353template <
int structdim,
int dim,
int spacedim>
6362template <
int structdim,
int dim,
int spacedim>
6368 return this->objects().manifold_id[this->present_index];
6373template <
int structdim,
int dim,
int spacedim>
6380 this->objects().manifold_id[this->present_index] = manifold_ind;
6384template <
int structdim,
int dim,
int spacedim>
6389 set_manifold_id(manifold_ind);
6391 if (this->has_children())
6392 for (
unsigned int c = 0; c < this->n_children(); ++c)
6393 this->child(c)->set_all_manifold_ids(manifold_ind);
6409 for (
unsigned int i = 0; i < this->n_lines(); ++i)
6410 this->line(i)->set_manifold_id(manifold_ind);
6419template <
int structdim,
int dim,
int spacedim>
6423 boost::container::small_vector<Point<spacedim>,
6425 vertices(this->n_vertices());
6427 for (
unsigned int v = 0; v < vertices.size(); ++v)
6428 vertices[v] = this->vertex(v);
6430 return internal::TriaAccessorImplementation::diameter<structdim, spacedim>(
6436template <
int dim,
int spacedim>
6441 return internal::TriaAccessorImplementation::diameter<dim, spacedim>(
6443 this->tria, this->level(), this->index())));
6448template <
int structdim,
int dim,
int spacedim>
6449std::pair<Point<spacedim>,
double>
6457 return std::make_pair((this->vertex(1) + this->vertex(0)) * 0.5,
6458 (this->vertex(1) - this->vertex(0)).
norm() * 0.5);
6466 std::vector<bool> is_initial_guess_vertex(this->n_vertices());
6469 std::fill(is_initial_guess_vertex.begin(),
6470 is_initial_guess_vertex.end(),
6483 if (p30.norm() > p21.norm())
6485 center = this->vertex(0) + 0.5 * p30;
6486 radius = p30.
norm() / 2.;
6487 is_initial_guess_vertex[3] =
true;
6488 is_initial_guess_vertex[0] =
true;
6492 center = this->vertex(1) + 0.5 * p21;
6493 radius = p21.
norm() / 2.;
6494 is_initial_guess_vertex[2] =
true;
6495 is_initial_guess_vertex[1] =
true;
6505 const std::vector<double> diagonals = {p70.norm(),
6509 const std::vector<double>::const_iterator it =
6510 std::max_element(diagonals.begin(), diagonals.end());
6511 if (it == diagonals.begin())
6513 center = this->vertex(0) + 0.5 * p70;
6514 is_initial_guess_vertex[7] =
true;
6515 is_initial_guess_vertex[0] =
true;
6517 else if (it == diagonals.begin() + 1)
6519 center = this->vertex(1) + 0.5 * p61;
6520 is_initial_guess_vertex[6] =
true;
6521 is_initial_guess_vertex[1] =
true;
6523 else if (it == diagonals.begin() + 2)
6525 center = this->vertex(5) + 0.5 * p25;
6526 is_initial_guess_vertex[2] =
true;
6527 is_initial_guess_vertex[5] =
true;
6531 center = this->vertex(4) + 0.5 * p34;
6532 is_initial_guess_vertex[3] =
true;
6533 is_initial_guess_vertex[4] =
true;
6540 return std::pair<Point<spacedim>,
double>();
6547 if (!is_initial_guess_vertex[v])
6549 const double distance = center.
distance(this->vertex(v));
6550 if (distance > radius)
6555 radius = (distance + radius) * 0.5;
6556 center = this->vertex(v) + pCV * (radius / distance);
6564 bool all_vertices_within_ball =
true;
6569 if (center.distance(this->vertex(v)) >
6570 radius + 100. *
std::numeric_limits<double>::
epsilon())
6572 all_vertices_within_ball =
false;
6578 return std::make_pair(center, radius);
6582template <
int structdim,
int dim,
int spacedim>
6589 return (this->vertex(1) - this->vertex(0)).norm();
6593 double min = std::numeric_limits<double>::max();
6595 for (unsigned
int j = i + 1; j < this->n_vertices(); ++j)
6597 (this->vertex(i) - this->vertex(j)) *
6598 (this->vertex(i) - this->vertex(j)));
6608template <
int structdim,
int dim,
int spacedim>
6628 bool is_translation =
true;
6631 for (
unsigned int i = 1; i < this->n_vertices(); ++i)
6634 (o->vertex(i) - this->vertex(i)) - dist;
6637 is_translation =
false;
6641 return is_translation;
6646template <
int structdim,
int dim,
int spacedim>
6655template <
int structdim,
int dim,
int spacedim>
6659 return this->reference_cell().
n_lines();
6664template <
int structdim,
int dim,
int spacedim>
6669 ExcMessage(
"This function can only be used on objects "
6670 "that are cells, but not on faces or edges "
6671 "that bound cells."));
6673 return this->reference_cell().
n_faces();
6678template <
int structdim,
int dim,
int spacedim>
6682 return {0U, n_vertices()};
6687template <
int structdim,
int dim,
int spacedim>
6691 return {0U, n_lines()};
6696template <
int structdim,
int dim,
int spacedim>
6700 return {0U, n_faces()};
6707template <
int dim,
int spacedim>
6710 const unsigned int vertex_index)
6717template <
int dim,
int spacedim>
6722 const AccessorData *)
6729template <
int dim,
int spacedim>
6730template <
int structdim2,
int dim2,
int spacedim2>
6741template <
int dim,
int spacedim>
6742template <
int structdim2,
int dim2,
int spacedim2>
6753template <
int dim,
int spacedim>
6763template <
int dim,
int spacedim>
6770 return (global_vertex_index < other.global_vertex_index);
6775template <
int dim,
int spacedim>
6787template <
int dim,
int spacedim>
6796template <
int dim,
int spacedim>
6805template <
int dim,
int spacedim>
6814template <
int dim,
int spacedim>
6819 if (global_vertex_index >= tria->
n_vertices())
6825template <
int dim,
int spacedim>
6831 if (global_vertex_index != 0)
6840template <
int dim,
int spacedim>
6845 ((tria == t.
tria) && (global_vertex_index == t.global_vertex_index));
6852template <
int dim,
int spacedim>
6856 return !(*
this == t);
6861template <
int dim,
int spacedim>
6870template <
int dim,
int spacedim>
6880template <
int dim,
int spacedim>
6881inline typename ::internal::TriangulationImplementation::
6882 Iterators<dim, spacedim>::line_iterator
6885 return typename ::internal::TriangulationImplementation::
6886 Iterators<dim, spacedim>::line_iterator();
6891template <
int dim,
int spacedim>
6901template <
int dim,
int spacedim>
6902inline typename ::internal::TriangulationImplementation::
6903 Iterators<dim, spacedim>::quad_iterator
6906 return typename ::internal::TriangulationImplementation::
6907 Iterators<dim, spacedim>::quad_iterator();
6912template <
int dim,
int spacedim>
6922template <
int dim,
int spacedim>
6931template <
int dim,
int spacedim>
6940template <
int dim,
int spacedim>
6949template <
int dim,
int spacedim>
6958template <
int dim,
int spacedim>
6961 const unsigned int )
6968template <
int dim,
int spacedim>
6977template <
int dim,
int spacedim>
6986template <
int dim,
int spacedim>
6995template <
int dim,
int spacedim>
7004template <
int dim,
int spacedim>
7013template <
int dim,
int spacedim>
7022template <
int dim,
int spacedim>
7031template <
int dim,
int spacedim>
7040template <
int dim,
int spacedim>
7050template <
int dim,
int spacedim>
7059template <
int dim,
int spacedim>
7068template <
int dim,
int spacedim>
7077template <
int dim,
int spacedim>
7086template <
int dim,
int spacedim>
7095template <
int dim,
int spacedim>
7106template <
int spacedim>
7109 const VertexKind vertex_kind,
7110 const unsigned int vertex_index)
7112 , vertex_kind(vertex_kind)
7118template <
int spacedim>
7123 const AccessorData *)
7125 , vertex_kind(interior_vertex)
7139 "This constructor can not be called for face iterators in 1d, "
7140 "except to default-construct iterator objects."));
7145template <
int spacedim>
7146template <
int structdim2,
int dim2,
int spacedim2>
7150 , vertex_kind(interior_vertex)
7158template <
int spacedim>
7159template <
int structdim2,
int dim2,
int spacedim2>
7163 , vertex_kind(interior_vertex)
7171template <
int spacedim>
7176 vertex_kind = t.vertex_kind;
7182template <
int spacedim>
7195template <
int spacedim>
7202 return (global_vertex_index < other.global_vertex_index);
7207template <
int spacedim>
7215template <
int spacedim>
7224template <
int spacedim>
7233template <
int spacedim>
7242template <
int spacedim>
7250template <
int spacedim>
7259template <
int spacedim>
7264 ((tria == t.
tria) && (global_vertex_index == t.global_vertex_index));
7276template <
int spacedim>
7280 return !(*
this == t);
7285template <
int spacedim>
7296template <
int spacedim>
7308template <
int spacedim>
7317template <
int spacedim>
7318inline typename ::internal::TriangulationImplementation::
7319 Iterators<1, spacedim>::line_iterator
7326template <
int spacedim>
7335template <
int spacedim>
7336inline typename ::internal::TriangulationImplementation::
7337 Iterators<1, spacedim>::quad_iterator
7345template <
int spacedim>
7354template <
int spacedim>
7358 return vertex_kind != interior_vertex;
7362template <
int spacedim>
7366 switch (vertex_kind)
7372 this->vertex_index()) !=
7386template <
int spacedim>
7395template <
int spacedim>
7407template <
int spacedim>
7410 const unsigned int )
7416template <
int spacedim>
7425template <
int spacedim>
7434template <
int spacedim>
7443template <
int spacedim>
7452template <
int spacedim>
7461template <
int spacedim>
7470template <
int spacedim>
7479template <
int spacedim>
7488template <
int spacedim>
7498template <
int spacedim>
7506template <
int spacedim>
7514template <
int spacedim>
7521template <
int spacedim>
7529template <
int spacedim>
7538template <
int spacedim>
7544 ExcMessage(
"You can't set the boundary_id of a face of a cell that is "
7545 "not actually at the boundary."));
7552template <
int spacedim>
7561template <
int spacedim>
7571template <
int spacedim>
7580template <
int spacedim>
7589template <
int spacedim>
7598template <
int spacedim>
7607template <
int spacedim>
7616template <
int spacedim>
7620 return {0U, n_vertices()};
7625template <
int spacedim>
7629 return {0U, n_lines()};
7635template <
int dim,
int spacedim>
7640 const AccessorData *local_data)
7646template <
int dim,
int spacedim>
7650 static_cast<const
TriaAccessor<dim, dim, spacedim> &>(cell_accessor))
7655template <
int dim,
int spacedim>
7660 this->present_level + 1,
7661 this->child_index(i));
7671template <
int dim,
int spacedim>
7672inline boost::container::small_vector<TriaIterator<CellAccessor<dim, spacedim>>,
7676 boost::container::small_vector<TriaIterator<CellAccessor<dim, spacedim>>,
7678 child_iterators(this->n_children());
7680 for (
unsigned int i = 0; i < this->n_children(); ++i)
7681 child_iterators[i] = this->child(i);
7683 return child_iterators;
7688template <
int dim,
int spacedim>
7693 if constexpr (dim == 1)
7696 &this->get_triangulation(),
7697 ((i == 0) && at_boundary(0) ?
7699 ((i == 1) && at_boundary(1) ?
7702 internal::TriaAccessorImplementation::Implementation::vertex_index(
7706 else if constexpr (dim == 2)
7707 return this->line(i);
7708 else if constexpr (dim == 3)
7709 return this->quad(i);
7719template <
int dim,
int spacedim>
7724 for (
const unsigned int face_n : this->face_indices())
7725 if (this->face(face_n) == face)
7729 ExcMessage(
"The given face is not a face of the current cell."));
7735template <
int dim,
int spacedim>
7736inline boost::container::small_vector<
7741 boost::container::small_vector<
7744 face_iterators(this->n_faces());
7746 for (
const unsigned int i : this->face_indices())
7747 face_iterators[i] = this->face(i);
7749 return face_iterators;
7754template <
int dim,
int spacedim>
7762 return this->vertex_index(i);
7766 return this->line_index(i);
7769 return this->quad_index(i);
7778template <
int dim,
int spacedim>
7783 return this->tria->
levels[this->present_level]
7791template <
int dim,
int spacedim>
7796 return this->tria->
levels[this->present_level]
7804template <
int dim,
int spacedim>
7814 Assert(this->is_active() || !this->tria->
levels[this->present_level]
7815 ->refine_flags[this->present_index],
7816 ExcRefineCellNotActive());
7818 this->tria->
levels[this->present_level]->refine_flags[this->present_index]);
7823template <
int dim,
int spacedim>
7828 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7829 Assert(!coarsen_flag_set(), ExcCellFlaggedForCoarsening());
7831 this->tria->
levels[this->present_level]->refine_flags[this->present_index] =
7837template <
int dim,
int spacedim>
7841 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7842 this->tria->
levels[this->present_level]->refine_flags[this->present_index] =
7847template <
int dim,
int spacedim>
7852 if (this->tria->
levels[this->present_level]->refine_choice.size() == 0)
7854 return this->tria->
levels[this->present_level]
7855 ->refine_choice[this->present_index];
7859template <
int dim,
int spacedim>
7862 const std::uint8_t refinement_choice)
const
7864 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7865 if (this->tria->
levels[this->present_level]->refine_choice.size() != 0)
7866 this->tria->
levels[this->present_level]
7867 ->refine_choice[this->present_index] = refinement_choice;
7871template <
int dim,
int spacedim>
7875 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7876 if (this->tria->
levels[this->present_level]->refine_choice.size() != 0)
7877 this->tria->
levels[this->present_level]
7878 ->refine_choice[this->present_index] =
7883template <
int dim,
int spacedim>
7886 const unsigned int face_no,
7902 face_refinement_case,
7904 this->face_orientation(face_no),
7905 this->face_flip(face_no),
7906 this->face_rotation(face_no)));
7907 set_refine_flag(new_ref_case);
7910 return new_ref_case != old_ref_case;
7915template <
int dim,
int spacedim>
7918 const unsigned int line_no)
const
7928 old_ref_case = refine_flag_set(),
7932 set_refine_flag(new_ref_case);
7935 return new_ref_case != old_ref_case;
7941inline ::internal::SubfaceCase<1>
7944 return ::internal::SubfaceCase<1>::case_none;
7948inline ::internal::SubfaceCase<1>
7951 return ::internal::SubfaceCase<1>::case_none;
7956inline ::internal::SubfaceCase<1>
7959 return ::internal::SubfaceCase<1>::case_none;
7964inline ::internal::SubfaceCase<2>
7969 return ((face(face_no)->has_children()) ?
7971 ::
internal::SubfaceCase<2>::case_none);
7975inline ::internal::SubfaceCase<2>
7980 return ((face(face_no)->has_children()) ?
7982 ::
internal::SubfaceCase<2>::case_none);
7987inline ::internal::SubfaceCase<3>
7992 switch (
static_cast<std::uint8_t
>(face(face_no)->refinement_case()))
7995 return ::internal::SubfaceCase<3>::case_none;
7997 if (face(face_no)->child(0)->has_children())
7999 Assert(face(face_no)->child(0)->refinement_case() ==
8002 if (face(face_no)->child(1)->has_children())
8004 Assert(face(face_no)->child(1)->refinement_case() ==
8007 return ::internal::SubfaceCase<3>::case_x1y2y;
8010 return ::internal::SubfaceCase<3>::case_x1y;
8014 if (face(face_no)->child(1)->has_children())
8016 Assert(face(face_no)->child(1)->refinement_case() ==
8019 return ::internal::SubfaceCase<3>::case_x2y;
8022 return ::internal::SubfaceCase<3>::case_x;
8025 if (face(face_no)->child(0)->has_children())
8027 Assert(face(face_no)->child(0)->refinement_case() ==
8030 if (face(face_no)->child(1)->has_children())
8032 Assert(face(face_no)->child(1)->refinement_case() ==
8035 return ::internal::SubfaceCase<3>::case_y1x2x;
8038 return ::internal::SubfaceCase<3>::case_y1x;
8042 if (face(face_no)->child(1)->has_children())
8044 Assert(face(face_no)->child(1)->refinement_case() ==
8047 return ::internal::SubfaceCase<3>::case_y2x;
8050 return ::internal::SubfaceCase<3>::case_y;
8053 return ::internal::SubfaceCase<3>::case_xy;
8058 return ::internal::SubfaceCase<3>::case_none;
8063template <
int dim,
int spacedim>
8073 Assert(this->is_active() || !this->tria->
levels[this->present_level]
8074 ->coarsen_flags[this->present_index],
8075 ExcRefineCellNotActive());
8076 return this->tria->
levels[this->present_level]
8077 ->coarsen_flags[this->present_index];
8082template <
int dim,
int spacedim>
8086 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
8087 Assert(!refine_flag_set(), ExcCellFlaggedForRefinement());
8089 this->tria->
levels[this->present_level]->coarsen_flags[this->present_index] =
8095template <
int dim,
int spacedim>
8099 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
8100 this->tria->
levels[this->present_level]->coarsen_flags[this->present_index] =
8106template <
int dim,
int spacedim>
8111 neighbor_level(face_no),
8112 neighbor_index(face_no));
8122template <
int dim,
int spacedim>
8126 return !this->has_children();
8131template <
int dim,
int spacedim>
8135 Assert(this->is_active(),
8136 ExcMessage(
"is_locally_owned() can only be called on active cells!"));
8137# ifndef DEAL_II_WITH_MPI
8154template <
int dim,
int spacedim>
8158# ifndef DEAL_II_WITH_MPI
8169 this->level_subdomain_id() == locally_owned_subdomain);
8175template <
int dim,
int spacedim>
8179 Assert(this->is_active(),
8180 ExcMessage(
"is_ghost() can only be called on active cells!"));
8181 if (this->has_children())
8184# ifndef DEAL_II_WITH_MPI
8197 subdomain_id != locally_owned_subdomain &&
8204template <
int dim,
int spacedim>
8208# ifndef DEAL_II_WITH_MPI
8220 subdomain_id != locally_owned_subdomain &&
8228template <
int dim,
int spacedim>
8232 Assert(this->is_active(),
8233 ExcMessage(
"is_artificial() can only be called on active cells!"));
8234# ifndef DEAL_II_WITH_MPI
8250template <
int dim,
int spacedim>
8254# ifndef DEAL_II_WITH_MPI
8265template <
int dim,
int spacedim>
8270 Assert(this->is_active(),
8271 ExcMessage(
"subdomain_id() can only be called on active cells!"));
8272 return this->tria->
levels[this->present_level]
8273 ->subdomain_ids[this->present_index];
8278template <
int dim,
int spacedim>
8283 return this->tria->
levels[this->present_level]
8284 ->level_subdomain_ids[this->present_index];
8289template <
int dim,
int spacedim>
8293 const unsigned int n2 = neighbor_of_neighbor_internal(neighbor);
8300 return neighbor_of_coarser_neighbor(neighbor).first;
8305template <
int dim,
int spacedim>
8314template <
int dim,
int spacedim>
8319 return this->tria->
levels[this->present_level]
8320 ->active_cell_indices[this->present_index];
8325template <
int dim,
int spacedim>
8330 Assert(this->is_active(),
8332 "global_active_cell_index() can only be called on active cells!"));
8334 return this->tria->
levels[this->present_level]
8335 ->global_active_cell_indices[this->present_index];
8340template <
int dim,
int spacedim>
8344 return this->tria->
levels[this->present_level]
8345 ->global_level_cell_indices[this->present_index];