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;
1826 const unsigned int face,
1881 friend struct ::internal::TriangulationImplementation::Implementation;
1882 friend struct ::internal::TriangulationImplementation::
1883 ImplementationMixedMesh;
1884 friend struct ::internal::TriaAccessorImplementation::Implementation;
1907template <
int dim,
int spacedim>
1950 const int level = 0,
1951 const int index = 0,
1957 template <
int structdim2,
int dim2,
int spacedim2>
1963 template <
int structdim2,
int dim2,
int spacedim2>
2064 typename ::internal::TriangulationImplementation::
2065 Iterators<dim, spacedim>::line_iterator
static line(
const unsigned int);
2076 static typename ::internal::TriangulationImplementation::
2077 Iterators<dim, spacedim>::quad_iterator
2123 const bool interpolate_from_surrounding =
false)
const;
2293 template <
typename Accessor>
2295 template <
typename Accessor>
2297 template <
typename Accessor>
2319template <
int spacedim>
2397 template <
int structdim2,
int dim2,
int spacedim2>
2403 template <
int structdim2,
int dim2,
int spacedim2>
2540 typename ::internal::TriangulationImplementation::
2541 Iterators<1, spacedim>::line_iterator
static line(
const unsigned int);
2555 static typename ::internal::TriangulationImplementation::
2556 Iterators<1, spacedim>::quad_iterator
3063template <
int dim,
int spacedim = dim>
3088 const int level = -1,
3089 const int index = -1,
3109 template <
int structdim2,
int dim2,
int spacedim2>
3116 template <
int structdim2,
int dim2,
int spacedim2>
3213 boost::container::small_vector<TriaIterator<CellAccessor<dim, spacedim>>,
3234 boost::container::small_vector<
3237 ReferenceCells::max_n_faces<dim>()
3305 const unsigned int subface_no)
const;
3418 std::pair<unsigned int, unsigned int>
3497 const unsigned int subface_no)
const;
3509 std::pair<unsigned int, unsigned int>
3686 const unsigned int face_no,
4186 template <
int dim_,
int spacedim_>
4235 friend struct ::internal::TriangulationImplementation::Implementation;
4236 friend struct ::internal::TriangulationImplementation::
4237 ImplementationMixedMesh;
4245template <
int structdim,
int dim,
int spacedim>
4246template <
typename OtherAccessor>
4248 const OtherAccessor &)
4251 ExcMessage(
"You are attempting an illegal conversion between "
4252 "iterator/accessor types. The constructor you call "
4253 "only exists to make certain template constructs "
4254 "easier to write as dimension independent code but "
4255 "the conversion is not valid in the current context."));
4260template <
int structdim,
int dim,
int spacedim>
4261template <
int structdim2,
int dim2,
int spacedim2>
4266 ExcMessage(
"You are attempting an illegal conversion between "
4267 "iterator/accessor types. The constructor you call "
4268 "only exists to make certain template constructs "
4269 "easier to write as dimension independent code but "
4270 "the conversion is not valid in the current context."));
4275template <
int dim,
int spacedim>
4276template <
int structdim2,
int dim2,
int spacedim2>
4281 ExcMessage(
"You are attempting an illegal conversion between "
4282 "iterator/accessor types. The constructor you call "
4283 "only exists to make certain template constructs "
4284 "easier to write as dimension independent code but "
4285 "the conversion is not valid in the current context."));
4290template <
int structdim,
int dim,
int spacedim>
4291template <
int structdim2,
int dim2,
int spacedim2>
4296 ExcMessage(
"You are attempting an illegal conversion between "
4297 "iterator/accessor types. The constructor you call "
4298 "only exists to make certain template constructs "
4299 "easier to write as dimension independent code but "
4300 "the conversion is not valid in the current context."));
4305template <
int dim,
int spacedim>
4306template <
int structdim2,
int dim2,
int spacedim2>
4311 ExcMessage(
"You are attempting an illegal conversion between "
4312 "iterator/accessor types. The constructor you call "
4313 "only exists to make certain template constructs "
4314 "easier to write as dimension independent code but "
4315 "the conversion is not valid in the current context."));
4349 namespace TriaAccessorImplementation
4356 template <
int dim,
int spacedim>
4368 return (vertices[1] - vertices[0]).norm();
4371 return std::max({(vertices[1] - vertices[0]).norm(),
4372 (vertices[2] - vertices[1]).norm(),
4373 (vertices[2] - vertices[0]).norm()});
4377 (vertices[2] - vertices[1]).
norm()});
4381 (vertices[2] - vertices[0]).
norm(),
4382 (vertices[2] - vertices[1]).
norm(),
4383 (vertices[3] - vertices[0]).
norm(),
4384 (vertices[3] - vertices[1]).
norm(),
4385 (vertices[3] - vertices[2]).
norm()});
4390 (vertices[3] - vertices[0]).
norm(),
4391 (vertices[2] - vertices[1]).
norm(),
4394 (vertices[4] - vertices[0]).
norm(),
4395 (vertices[4] - vertices[1]).
norm(),
4396 (vertices[4] - vertices[2]).
norm(),
4397 (vertices[4] - vertices[3]).
norm()});
4402 (vertices[4] - vertices[0]).
norm(),
4403 (vertices[3] - vertices[1]).
norm(),
4404 (vertices[5] - vertices[1]).
norm(),
4405 (vertices[4] - vertices[2]).
norm(),
4406 (vertices[5] - vertices[0]).
norm(),
4407 (vertices[3] - vertices[2]).
norm(),
4410 (vertices[1] - vertices[0]).
norm(),
4411 (vertices[2] - vertices[1]).
norm(),
4412 (vertices[2] - vertices[0]).
norm(),
4413 (vertices[4] - vertices[3]).
norm(),
4414 (vertices[5] - vertices[4]).
norm(),
4415 (vertices[5] - vertices[3]).
norm()});
4419 (vertices[6] - vertices[1]).
norm(),
4420 (vertices[2] - vertices[5]).
norm(),
4421 (vertices[3] - vertices[4]).
norm()});
4432template <
int structdim,
int dim,
int spacedim>
4437 const AccessorData *)
4438 : present_level((structdim == dim) ?
level : 0)
4439 , present_index(
index)
4447 if (structdim != dim)
4455template <
int structdim,
int dim,
int spacedim>
4458 : present_level(a.present_level)
4459 , present_index(a.present_index)
4464template <
int structdim,
int dim,
int spacedim>
4473 if (structdim != dim)
4475 Assert((present_level == 0) || (present_level == -1) ||
4476 (present_level == -2),
4483template <
int structdim,
int dim,
int spacedim>
4492 if (structdim != dim)
4494 Assert((present_level == 0) || (present_level == -1) ||
4495 (present_level == -2),
4503template <
int structdim,
int dim,
int spacedim>
4516template <
int structdim,
int dim,
int spacedim>
4529template <
int structdim,
int dim,
int spacedim>
4544template <
int structdim,
int dim,
int spacedim>
4550 return present_level;
4555template <
int structdim,
int dim,
int spacedim>
4559 return present_index;
4564template <
int structdim,
int dim,
int spacedim>
4568 if ((present_level >= 0) && (present_index >= 0))
4570 else if (present_index == -1)
4578template <
int structdim,
int dim,
int spacedim>
4587template <
int structdim,
int dim,
int spacedim>
4593 ++this->present_index;
4595 if (structdim != dim)
4602 if (this->present_index >=
static_cast<int>(objects().n_objects()))
4603 this->present_index = -1;
4607 while (this->present_index >=
4609 this->tria->
levels[this->present_level]->cells.n_objects()))
4613 ++this->present_level;
4614 this->present_index = 0;
4616 if (this->present_level >=
4617 static_cast<int>(this->tria->
levels.size()))
4620 this->present_level = this->present_index = -1;
4628template <
int structdim,
int dim,
int spacedim>
4633 --this->present_index;
4635 if (structdim != dim)
4637 if (this->present_index < 0)
4638 this->present_index = -1;
4642 while (this->present_index < 0)
4645 --this->present_level;
4647 if (this->present_level == -1)
4650 this->present_level = this->present_index = -1;
4654 this->present_index =
4655 this->tria->
levels[this->present_level]->cells.n_objects() - 1;
4662template <
int structdim,
int dim,
int spacedim>
4663inline ::internal::TriangulationImplementation::TriaObjects &
4666 if (structdim == dim)
4667 return this->tria->
levels[this->present_level]->cells;
4669 if (structdim == 1 && dim > 1)
4670 return this->tria->
faces->lines;
4672 if (structdim == 2 && dim > 2)
4673 return this->tria->
faces->quads;
4677 return this->tria->
levels[this->present_level]->cells;
4684template <
int structdim,
int dim,
int spacedim>
4688 const AccessorData *)
4691 ExcMessage(
"You are attempting an invalid conversion between "
4692 "iterator/accessor types. The constructor you call "
4693 "only exists to make certain template constructs "
4694 "easier to write as dimension independent code but "
4695 "the conversion is not valid in the current context."));
4700template <
int structdim,
int dim,
int spacedim>
4705 ExcMessage(
"You are attempting an invalid conversion between "
4706 "iterator/accessor types. The constructor you call "
4707 "only exists to make certain template constructs "
4708 "easier to write as dimension independent code but "
4709 "the conversion is not valid in the current context."));
4714template <
int structdim,
int dim,
int spacedim>
4727template <
int structdim,
int dim,
int spacedim>
4742template <
int structdim,
int dim,
int spacedim>
4757template <
int structdim,
int dim,
int spacedim>
4771template <
int structdim,
int dim,
int spacedim>
4785template <
int structdim,
int dim,
int spacedim>
4792template <
int structdim,
int dim,
int spacedim>
4799template <
int structdim,
int dim,
int spacedim>
4808template <
int structdim,
int dim,
int spacedim>
4817template <
int structdim,
int dim,
int spacedim>
4820 const unsigned int)
const
4823 ExcMessage(
"You are trying to set the user index of an "
4824 "invalid object."));
4829template <
int structdim,
int dim,
int spacedim>
4835 ExcMessage(
"You are trying to set the manifold id of an "
4836 "invalid object."));
4841template <
int structdim,
int dim,
int spacedim>
4848 return invalid_vertex;
4852template <
int structdim,
int dim,
int spacedim>
4863template <
int structdim,
int dim,
int spacedim>
4878 namespace TriaAccessorImplementation
4886 using ::TriaAccessor;
4892 struct Implementation
4897 template <
int structdim,
int dim,
int spacedim>
4899 set_combined_face_orientation(
4901 const unsigned int face_no,
4905 ExcMessage(
"This function can only be used on objects that are "
4906 "cells and not on objects which bound cells."));
4915 ->face_orientations.set_combined_orientation(
4916 accessor.
present_index * ReferenceCells::max_n_faces<dim>() +
4918 combined_orientation);
4923 template <
int dim,
int spacedim>
4924 static std::array<unsigned int, 1>
4933 template <
int structdim,
int dim,
int spacedim>
4934 static std::array<unsigned int, 4>
4939 std::array<unsigned int, 4> line_indices = {};
4940 for (
const unsigned int line : cell.line_indices())
4941 line_indices[line] = cell.line_index(line);
4942 return line_indices;
4949 template <
int structdim,
int dim,
int spacedim>
4950 static std::array<unsigned int, 12>
4951 get_line_indices_of_cell(
4954 std::array<unsigned int, 12> line_indices = {};
4962 for (
unsigned int f = 4; f < 6; ++f)
4964 const auto orientation =
4967 ->face_orientations.get_combined_orientation(
4968 cell.
index() * ReferenceCells::max_n_faces<dim>() + f);
4976 const std::array<unsigned int, 4> my_indices{
4977 {ref_cell.standard_to_real_face_line(0, f, orientation),
4978 ref_cell.standard_to_real_face_line(1, f, orientation),
4979 ref_cell.standard_to_real_face_line(2, f, orientation),
4980 ref_cell.standard_to_real_face_line(3, f, orientation)}};
4981 const auto quad = cell.
quad(f);
4982 for (
unsigned int l = 0;
l < 4; ++
l)
4983 line_indices[4 * (f - 4) +
l] =
4984 quad->line_index(my_indices[l]);
4986 for (
unsigned int f = 0; f < 2; ++f)
4988 const auto orientation =
4991 ->face_orientations.get_combined_orientation(
4992 cell.
index() * ReferenceCells::max_n_faces<dim>() + f);
4993 const std::array<unsigned int, 2> my_indices{
4994 {ref_cell.standard_to_real_face_line(0, f, orientation),
4995 ref_cell.standard_to_real_face_line(1, f, orientation)}};
4996 const auto quad = cell.
quad(f);
4997 line_indices[8 + f] = quad->line_index(my_indices[0]);
4998 line_indices[10 + f] = quad->line_index(my_indices[1]);
5003 std::array<unsigned int, 3> orientations{
5007 const std::array<unsigned int, 6> my_indices{
5008 {ref_cell.standard_to_real_face_line(0, 0, orientations[0]),
5009 ref_cell.standard_to_real_face_line(1, 0, orientations[0]),
5010 ref_cell.standard_to_real_face_line(2, 0, orientations[0]),
5011 ref_cell.standard_to_real_face_line(1, 1, orientations[1]),
5012 ref_cell.standard_to_real_face_line(2, 1, orientations[1]),
5013 ref_cell.standard_to_real_face_line(1, 2, orientations[2])}};
5014 line_indices[0] = cell.
quad(0)->line_index(my_indices[0]);
5015 line_indices[1] = cell.
quad(0)->line_index(my_indices[1]);
5016 line_indices[2] = cell.
quad(0)->line_index(my_indices[2]);
5017 line_indices[3] = cell.
quad(1)->line_index(my_indices[3]);
5018 line_indices[4] = cell.
quad(1)->line_index(my_indices[4]);
5019 line_indices[5] = cell.
quad(2)->line_index(my_indices[5]);
5027 return line_indices;
5036 template <
int dim,
int spacedim>
5037 static std::array<types::geometric_orientation, 1>
5050 template <
int dim,
int spacedim>
5051 static std::array<types::geometric_orientation, 4>
5056 std::array<types::geometric_orientation, 4> line_orientations = {};
5057 for (
const unsigned int line : cell.line_indices())
5058 line_orientations[line] = cell.line_orientation(line);
5059 return line_orientations;
5068 template <
int dim,
int spacedim>
5069 static std::array<types::geometric_orientation, 12>
5072 std::array<types::geometric_orientation, 12> line_orientations = {};
5080 for (
unsigned int f = 4; f < 6; ++f)
5082 const auto orientation =
5085 ->face_orientations.get_combined_orientation(
5086 cell.
index() * ReferenceCells::max_n_faces<dim>() + f);
5094 const std::array<unsigned int, 4> my_indices{
5095 {ref_cell.standard_to_real_face_line(0, f, orientation),
5096 ref_cell.standard_to_real_face_line(1, f, orientation),
5097 ref_cell.standard_to_real_face_line(2, f, orientation),
5098 ref_cell.standard_to_real_face_line(3, f, orientation)}};
5099 const auto quad = cell.
quad(f);
5100 const std::array<types::geometric_orientation, 4>
5101 my_orientations{{ref_cell.face_to_cell_line_orientation(
5105 quad->line_orientation(my_indices[0])),
5106 ref_cell.face_to_cell_line_orientation(
5110 quad->line_orientation(my_indices[1])),
5111 ref_cell.face_to_cell_line_orientation(
5115 quad->line_orientation(my_indices[2])),
5116 ref_cell.face_to_cell_line_orientation(
5120 quad->line_orientation(my_indices[3]))}};
5121 for (
unsigned int l = 0;
l < 4; ++
l)
5122 line_orientations[4 * (f - 4) +
l] = my_orientations[
l];
5124 for (
unsigned int f = 0; f < 2; ++f)
5126 const auto orientation =
5129 ->face_orientations.get_combined_orientation(
5130 cell.
index() * ReferenceCells::max_n_faces<3>() + f);
5131 const std::array<unsigned int, 2> my_indices{
5132 {ref_cell.standard_to_real_face_line(0, f, orientation),
5133 ref_cell.standard_to_real_face_line(1, f, orientation)}};
5134 const auto quad = cell.
quad(f);
5135 const std::array<types::geometric_orientation, 2>
5136 my_orientations{{ref_cell.face_to_cell_line_orientation(
5140 quad->line_orientation(my_indices[0])),
5141 ref_cell.face_to_cell_line_orientation(
5145 quad->line_orientation(my_indices[1]))}};
5146 line_orientations[8 + f] = my_orientations[0];
5147 line_orientations[10 + f] = my_orientations[1];
5152 std::array<unsigned int, 3> orientations{
5156 const std::array<unsigned int, 6> my_indices{
5157 {ref_cell.standard_to_real_face_line(0, 0, orientations[0]),
5158 ref_cell.standard_to_real_face_line(1, 0, orientations[0]),
5159 ref_cell.standard_to_real_face_line(2, 0, orientations[0]),
5160 ref_cell.standard_to_real_face_line(1, 1, orientations[1]),
5161 ref_cell.standard_to_real_face_line(2, 1, orientations[1]),
5162 ref_cell.standard_to_real_face_line(1, 2, orientations[2])}};
5163 line_orientations[0] = ref_cell.face_to_cell_line_orientation(
5167 cell.
quad(0)->line_orientation(my_indices[0]));
5168 line_orientations[1] = ref_cell.face_to_cell_line_orientation(
5172 cell.
quad(0)->line_orientation(my_indices[1]));
5173 line_orientations[2] = ref_cell.face_to_cell_line_orientation(
5177 cell.
quad(0)->line_orientation(my_indices[2]));
5178 line_orientations[3] = ref_cell.face_to_cell_line_orientation(
5182 cell.
quad(1)->line_orientation(my_indices[3]));
5183 line_orientations[4] = ref_cell.face_to_cell_line_orientation(
5187 cell.
quad(1)->line_orientation(my_indices[4]));
5188 line_orientations[5] = ref_cell.face_to_cell_line_orientation(
5192 cell.
quad(2)->line_orientation(my_indices[5]));
5200 return line_orientations;
5208template <
int structdim,
int dim,
int spacedim>
5213 const AccessorData *local_data)
5219template <
int structdim,
int dim,
int spacedim>
5224 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5226 return this->objects().used[this->present_index];
5231template <
int structdim,
int dim,
int spacedim>
5234 const unsigned int i)
const
5243template <
int structdim,
int dim,
int spacedim>
5249 else if (structdim == 1)
5251 else if (structdim == dim)
5252 return this->tria->
levels[this->present_level]
5253 ->reference_cell[this->present_index];
5255 return this->tria->
faces->get_quad_type(this->present_index);
5260template <
int structdim,
int dim,
int spacedim>
5263 const unsigned int corner)
const
5267 if constexpr (structdim == 1)
5272 return this->objects()
5273 .cells[this->present_index * ReferenceCells::max_n_faces<1>() + corner];
5275 else if constexpr (structdim == dim)
5279 const auto my_index =
static_cast<std::size_t
>(this->present_index) *
5280 ReferenceCells::max_n_vertices<dim>();
5282 this->tria->
levels[this->present_level]
5283 ->cell_vertex_indices_cache.size());
5284 const unsigned int vertex_index =
5285 this->tria->
levels[this->present_level]
5286 ->cell_vertex_indices_cache[my_index + corner];
5288 return vertex_index;
5290 else if constexpr (structdim == 2)
5292 const auto [line_index, vertex_index] =
5294 const auto vertex_within_line_index =
5296 vertex_index, line_index, this->line_orientation(line_index));
5298 return this->line(line_index)->vertex_index(vertex_within_line_index);
5309template <
int structdim,
int dim,
int spacedim>
5318template <
int structdim,
int dim,
int spacedim>
5319inline typename ::internal::TriangulationImplementation::
5320 Iterators<dim, spacedim>::line_iterator
5324 return typename ::internal::TriangulationImplementation::
5325 Iterators<dim, spacedim>::line_iterator(this->tria, 0, line_index(i));
5330template <
int structdim,
int dim,
int spacedim>
5337 ExcMessage(
"You can't ask for the index of a line bounding a "
5338 "one-dimensional cell because it is not bounded by "
5341 if constexpr (structdim == 2)
5343 return this->objects()
5344 .cells[this->present_index * ReferenceCells::max_n_faces<2>() + i];
5346 else if constexpr (structdim == 3)
5348 const auto [face_index, line_index] =
5350 const auto line_within_face_index =
5354 return this->quad(face_index)->line_index(line_within_face_index);
5363template <
int structdim,
int dim,
int spacedim>
5364inline typename ::internal::TriangulationImplementation::
5365 Iterators<dim, spacedim>::quad_iterator
5369 return typename ::internal::TriangulationImplementation::
5370 Iterators<dim, spacedim>::quad_iterator(this->tria, 0, quad_index(i));
5375template <
int structdim,
int dim,
int spacedim>
5380 ExcMessage(
"You can't ask for the index of a quad bounding "
5381 "a one- or two-dimensional cell because it is not "
5382 "bounded by quads."));
5385 if constexpr (structdim == 3)
5388 return this->tria->
levels[this->present_level]
5390 .cells[this->present_index * ReferenceCells::max_n_faces<3>() + i];
5398template <
int structdim,
int dim,
int spacedim>
5401 const unsigned int face)
const
5406 ExcMessage(
"This function can only be used on objects "
5407 "that are cells, but not on faces or edges "
5408 "that bound cells."));
5412 if constexpr (structdim == 1)
5414 else if constexpr (structdim == 2)
5418 if (this->tria->
levels[this->present_level]
5419 ->face_orientations.n_objects() == 0)
5422 return this->tria->
levels[this->present_level]
5423 ->face_orientations.get_combined_orientation(
5424 this->present_index * ReferenceCells::max_n_faces<dim>() + face);
5427 return this->tria->
levels[this->present_level]
5428 ->face_orientations.get_combined_orientation(
5429 this->present_index * ReferenceCells::max_n_faces<dim>() + face);
5434template <
int structdim,
int dim,
int spacedim>
5437 const unsigned int face)
const
5442 ExcMessage(
"This function can only be used on objects "
5443 "that are cells, but not on faces or edges "
5444 "that bound cells."));
5448 if constexpr (structdim == 1)
5451 else if constexpr (structdim == 2)
5452 return this->line_orientation(face) ==
5455 return this->tria->
levels[this->present_level]
5456 ->face_orientations.get_orientation(
5457 this->present_index * ReferenceCells::max_n_faces<structdim>() + face);
5462template <
int structdim,
int dim,
int spacedim>
5468 ExcMessage(
"This function can only be used on objects "
5469 "that are cells, but not on faces or edges "
5470 "that bound cells."));
5475 if constexpr (structdim == 3)
5476 return this->tria->
levels[this->present_level]->face_orientations.get_flip(
5477 this->present_index * ReferenceCells::max_n_faces<structdim>() + face);
5485template <
int structdim,
int dim,
int spacedim>
5488 const unsigned int face)
const
5492 ExcMessage(
"This function can only be used on objects "
5493 "that are cells, but not on faces or edges "
5494 "that bound cells."));
5499 if constexpr (structdim == 3)
5500 return this->tria->
levels[this->present_level]
5501 ->face_orientations.get_rotation(
5502 this->present_index * ReferenceCells::max_n_faces<structdim>() + face);
5511template <
int structdim,
int dim,
int spacedim>
5514 const unsigned int line)
const
5521 if constexpr (structdim == 1)
5523 else if constexpr (structdim == 2 && dim == 2)
5530 return combined_orientation;
5532 else if constexpr (structdim == 2 && dim == 3)
5538 this->present_index * ReferenceCells::max_n_lines<2>() + line;
5539 Assert(index < this->tria->
faces->quads_line_orientations.size(),
5541 return this->tria->
faces->quads_line_orientations[
index] ?
5545 else if constexpr (structdim == 3 && dim == 3)
5550 const auto [face_index, line_index] =
5552 const auto line_within_face_index =
5561 this->quad(face_index)->line_orientation(line_within_face_index));
5572template <
int structdim,
int dim,
int spacedim>
5575 const unsigned int line,
5581 ExcMessage(
"In 1d lines are cells and thus do not need to have their "
5582 "orientations set."));
5584 ExcMessage(
"In 2d lines are faces, and, for compatibility with other "
5585 "dimensions, their orientations should be set via "
5586 "set_combined_face_orientation()."));
5592 if constexpr (dim == 3)
5598 this->present_index * ReferenceCells::max_n_lines<2>() + line;
5599 Assert(index < this->tria->
faces->quads_line_orientations.size(),
5601 this->tria->
faces->quads_line_orientations[
index] =
5608template <
int structdim,
int dim,
int spacedim>
5611 const unsigned int face,
5617 ::internal::TriaAccessorImplementation::Implementation::
5618 set_combined_face_orientation(*
this, face, combined_orientation);
5623template <
int structdim,
int dim,
int spacedim>
5628 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5630 this->objects().used[this->present_index] =
true;
5635template <
int structdim,
int dim,
int spacedim>
5640 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5642 this->objects().used[this->present_index] =
false;
5646template <
int structdim,
int dim,
int spacedim>
5656 const unsigned int n_sets_of_two =
5658 return this->objects().children[n_sets_of_two * this->present_index + i / 2] +
5664template <
int structdim,
int dim,
int spacedim>
5667 const unsigned int i)
const
5674 return child_index(i);
5678 static_cast<std::uint8_t
>(refinement_case()));
5684 return child_index(i);
5686 (child(i % 2)->refinement_case() ==
5688 return child(i % 2)->child_index(i / 2);
5690 (child(i / 2)->refinement_case() ==
5692 return child(i / 2)->child_index(i % 2);
5697 "This cell has no grandchildren equivalent to isotropic refinement"));
5709template <
int structdim,
int dim,
int spacedim>
5714 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5721 this->objects().children[this->present_index] != -1 ?
5737 Assert(
static_cast<unsigned int>(this->present_index) <
5738 this->objects().refinement_cases.size(),
5741 this->objects().refinement_cases.size()));
5744 this->objects().refinement_cases[this->present_index]));
5750template <
int structdim,
int dim,
int spacedim>
5757 this->tria, (dim == structdim ? this->
level() + 1 : 0), child_index(i));
5767template <
int structdim,
int dim,
int spacedim>
5772 const auto n_children = this->n_children();
5773 for (
unsigned int child_n = 0; child_n < n_children; ++child_n)
5774 if (this->child(child_n) == child)
5778 ExcMessage(
"The given child is not a child of the current object."));
5784template <
int structdim,
int dim,
int spacedim>
5787 const unsigned int i)
const
5800 static_cast<std::uint8_t
>(refinement_case()));
5808 (child(i % 2)->refinement_case() ==
5810 return child(i % 2)->child(i / 2);
5812 (child(i / 2)->refinement_case() ==
5814 return child(i / 2)->child(i % 2);
5819 "This cell has no grandchildren equivalent to isotropic refinement"));
5833template <
int structdim,
int dim,
int spacedim>
5838 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5844 const unsigned int n_sets_of_two =
5846 return (this->objects().children[n_sets_of_two * this->present_index] != -1);
5851template <
int structdim,
int dim,
int spacedim>
5856 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5867template <
int structdim,
int dim,
int spacedim>
5873 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5875 Assert(
static_cast<unsigned int>(this->present_index) <
5876 this->objects().refinement_cases.size(),
5879 this->objects().refinement_cases.size()));
5881 this->objects().refinement_cases[this->present_index] = refinement_case;
5885template <
int structdim,
int dim,
int spacedim>
5890 TriaAccessorExceptions::ExcDereferenceInvalidObject<TriaAccessor>(
5892 Assert(
static_cast<unsigned int>(this->present_index) <
5893 this->objects().refinement_cases.size(),
5896 this->objects().refinement_cases.size()));
5898 this->objects().refinement_cases[this->present_index] =
5904template <
int structdim,
int dim,
int spacedim>
5907 const int index)
const
5915 const unsigned int n_sets_of_two =
5923 (i == 0 && !this->has_children() && (index >= 0)) ||
5927 (i > 0 && this->has_children() && (index >= 0) &&
5928 this->objects().children[n_sets_of_two * this->present_index + i / 2] ==
5932 this->objects().children[n_sets_of_two * this->present_index + i / 2] =
index;
5937template <
int structdim,
int dim,
int spacedim>
5944 const unsigned int n_sets_of_two =
5947 for (
unsigned int i = 0; i < n_sets_of_two; ++i)
5948 set_children(2 * i, -1);
5953template <
int structdim,
int dim,
int spacedim>
5958 return this->objects().user_flags[this->present_index];
5963template <
int structdim,
int dim,
int spacedim>
5968 this->objects().user_flags[this->present_index] =
true;
5973template <
int structdim,
int dim,
int spacedim>
5978 this->objects().user_flags[this->present_index] =
false;
5983template <
int structdim,
int dim,
int spacedim>
5989 if (this->has_children())
5990 for (
unsigned int c = 0; c < this->n_children(); ++c)
5991 this->child(c)->recursively_set_user_flag();
5996template <
int structdim,
int dim,
int spacedim>
6002 if (this->has_children())
6003 for (
unsigned int c = 0; c < this->n_children(); ++c)
6004 this->child(c)->recursively_clear_user_flag();
6009template <
int structdim,
int dim,
int spacedim>
6014 this->objects().clear_user_data(this->present_index);
6019template <
int structdim,
int dim,
int spacedim>
6024 this->objects().user_pointer(this->present_index) = p;
6029template <
int structdim,
int dim,
int spacedim>
6034 this->objects().user_pointer(this->present_index) =
nullptr;
6039template <
int structdim,
int dim,
int spacedim>
6044 return this->objects().user_pointer(this->present_index);
6049template <
int structdim,
int dim,
int spacedim>
6054 set_user_pointer(p);
6056 if (this->has_children())
6057 for (
unsigned int c = 0; c < this->n_children(); ++c)
6058 this->child(c)->recursively_set_user_pointer(p);
6063template <
int structdim,
int dim,
int spacedim>
6067 clear_user_pointer();
6069 if (this->has_children())
6070 for (
unsigned int c = 0; c < this->n_children(); ++c)
6071 this->child(c)->recursively_clear_user_pointer();
6076template <
int structdim,
int dim,
int spacedim>
6079 const unsigned int p)
const
6082 this->objects().user_index(this->present_index) = p;
6087template <
int structdim,
int dim,
int spacedim>
6092 this->objects().user_index(this->present_index) = 0;
6097template <
int structdim,
int dim,
int spacedim>
6102 return this->objects().user_index(this->present_index);
6107template <
int structdim,
int dim,
int spacedim>
6110 const unsigned int p)
const
6114 if (this->has_children())
6115 for (
unsigned int c = 0; c < this->n_children(); ++c)
6116 this->child(c)->recursively_set_user_index(p);
6121template <
int structdim,
int dim,
int spacedim>
6127 if (this->has_children())
6128 for (
unsigned int c = 0; c < this->n_children(); ++c)
6129 this->child(c)->recursively_clear_user_index();
6134template <
int structdim,
int dim,
int spacedim>
6138 if (!this->has_children())
6141 unsigned int max_depth = 1;
6142 for (
unsigned int c = 0; c < n_children(); ++c)
6143 max_depth =
std::max(max_depth, child(c)->max_refinement_depth() + 1);
6149template <
int structdim,
int dim,
int spacedim>
6153 if (!this->has_children())
6157 unsigned int sum = 0;
6158 for (
unsigned int c = 0; c < n_children(); ++c)
6159 sum += this->child(c)->n_active_descendants();
6166template <
int structdim,
int dim,
int spacedim>
6173 return this->objects()
6174 .boundary_or_material_id[this->present_index]
6180template <
int structdim,
int dim,
int spacedim>
6188 ExcMessage(
"You are trying to set the boundary_id to an invalid "
6189 "value (numbers::internal_face_boundary_id is reserved)."));
6190 Assert(this->at_boundary(),
6191 ExcMessage(
"You are trying to set the boundary_id of an "
6192 "internal object, which is not allowed!"));
6194 this->objects().boundary_or_material_id[this->present_index].boundary_id =
6200template <
int structdim,
int dim,
int spacedim>
6208 this->objects().boundary_or_material_id[this->present_index].boundary_id =
6214template <
int structdim,
int dim,
int spacedim>
6219 set_boundary_id(boundary_ind);
6231 for (
unsigned int i = 0; i < this->n_lines(); ++i)
6232 this->line(i)->set_boundary_id(boundary_ind);
6242template <
int structdim,
int dim,
int spacedim>
6253template <
int structdim,
int dim,
int spacedim>
6262template <
int structdim,
int dim,
int spacedim>
6268 return this->objects().manifold_id[this->present_index];
6273template <
int structdim,
int dim,
int spacedim>
6280 this->objects().manifold_id[this->present_index] = manifold_ind;
6284template <
int structdim,
int dim,
int spacedim>
6289 set_manifold_id(manifold_ind);
6291 if (this->has_children())
6292 for (
unsigned int c = 0; c < this->n_children(); ++c)
6293 this->child(c)->set_all_manifold_ids(manifold_ind);
6309 for (
unsigned int i = 0; i < this->n_lines(); ++i)
6310 this->line(i)->set_manifold_id(manifold_ind);
6319template <
int structdim,
int dim,
int spacedim>
6323 boost::container::small_vector<Point<spacedim>,
6325 ReferenceCells::max_n_vertices<structdim>()
6330 vertices(this->n_vertices());
6332 for (
unsigned int v = 0; v < vertices.size(); ++v)
6333 vertices[v] = this->vertex(v);
6335 return internal::TriaAccessorImplementation::diameter<structdim, spacedim>(
6341template <
int dim,
int spacedim>
6346 return internal::TriaAccessorImplementation::diameter<dim, spacedim>(
6348 this->tria, this->level(), this->index())));
6353template <
int structdim,
int dim,
int spacedim>
6354std::pair<Point<spacedim>,
double>
6362 return std::make_pair((this->vertex(1) + this->vertex(0)) * 0.5,
6363 (this->vertex(1) - this->vertex(0)).
norm() * 0.5);
6371 std::vector<bool> is_initial_guess_vertex(this->n_vertices());
6374 std::fill(is_initial_guess_vertex.begin(),
6375 is_initial_guess_vertex.end(),
6388 if (p30.norm() > p21.norm())
6390 center = this->vertex(0) + 0.5 * p30;
6391 radius = p30.
norm() / 2.;
6392 is_initial_guess_vertex[3] =
true;
6393 is_initial_guess_vertex[0] =
true;
6397 center = this->vertex(1) + 0.5 * p21;
6398 radius = p21.
norm() / 2.;
6399 is_initial_guess_vertex[2] =
true;
6400 is_initial_guess_vertex[1] =
true;
6410 const std::vector<double> diagonals = {p70.norm(),
6414 const std::vector<double>::const_iterator it =
6415 std::max_element(diagonals.begin(), diagonals.end());
6416 if (it == diagonals.begin())
6418 center = this->vertex(0) + 0.5 * p70;
6419 is_initial_guess_vertex[7] =
true;
6420 is_initial_guess_vertex[0] =
true;
6422 else if (it == diagonals.begin() + 1)
6424 center = this->vertex(1) + 0.5 * p61;
6425 is_initial_guess_vertex[6] =
true;
6426 is_initial_guess_vertex[1] =
true;
6428 else if (it == diagonals.begin() + 2)
6430 center = this->vertex(5) + 0.5 * p25;
6431 is_initial_guess_vertex[2] =
true;
6432 is_initial_guess_vertex[5] =
true;
6436 center = this->vertex(4) + 0.5 * p34;
6437 is_initial_guess_vertex[3] =
true;
6438 is_initial_guess_vertex[4] =
true;
6445 return std::pair<Point<spacedim>,
double>();
6452 if (!is_initial_guess_vertex[v])
6454 const double distance = center.
distance(this->vertex(v));
6455 if (distance > radius)
6460 radius = (distance + radius) * 0.5;
6461 center = this->vertex(v) + pCV * (radius / distance);
6470 bool all_vertices_within_ball =
true;
6475 if (center.distance(this->vertex(v)) >
6476 radius + 100. *
std::numeric_limits<double>::
epsilon())
6478 all_vertices_within_ball =
false;
6484 return std::make_pair(center, radius);
6488template <
int structdim,
int dim,
int spacedim>
6495 return (this->vertex(1) - this->vertex(0)).norm();
6499 double min = std::numeric_limits<double>::max();
6501 for (unsigned
int j = i + 1; j < this->n_vertices(); ++j)
6503 (this->vertex(i) - this->vertex(j)) *
6504 (this->vertex(i) - this->vertex(j)));
6514template <
int structdim,
int dim,
int spacedim>
6534 bool is_translation =
true;
6537 for (
unsigned int i = 1; i < this->n_vertices(); ++i)
6540 (o->vertex(i) - this->vertex(i)) - dist;
6543 is_translation =
false;
6547 return is_translation;
6552template <
int structdim,
int dim,
int spacedim>
6561template <
int structdim,
int dim,
int spacedim>
6565 return this->reference_cell().
n_lines();
6570template <
int structdim,
int dim,
int spacedim>
6575 ExcMessage(
"This function can only be used on objects "
6576 "that are cells, but not on faces or edges "
6577 "that bound cells."));
6579 return this->reference_cell().
n_faces();
6584template <
int structdim,
int dim,
int spacedim>
6594template <
int structdim,
int dim,
int spacedim>
6604template <
int structdim,
int dim,
int spacedim>
6616template <
int dim,
int spacedim>
6619 const unsigned int vertex_index)
6626template <
int dim,
int spacedim>
6631 const AccessorData *)
6638template <
int dim,
int spacedim>
6639template <
int structdim2,
int dim2,
int spacedim2>
6650template <
int dim,
int spacedim>
6651template <
int structdim2,
int dim2,
int spacedim2>
6662template <
int dim,
int spacedim>
6672template <
int dim,
int spacedim>
6679 return (global_vertex_index < other.global_vertex_index);
6684template <
int dim,
int spacedim>
6696template <
int dim,
int spacedim>
6705template <
int dim,
int spacedim>
6714template <
int dim,
int spacedim>
6723template <
int dim,
int spacedim>
6728 if (global_vertex_index >= tria->
n_vertices())
6734template <
int dim,
int spacedim>
6740 if (global_vertex_index != 0)
6749template <
int dim,
int spacedim>
6754 ((tria == t.
tria) && (global_vertex_index == t.global_vertex_index));
6761template <
int dim,
int spacedim>
6765 return !(*
this == t);
6770template <
int dim,
int spacedim>
6779template <
int dim,
int spacedim>
6789template <
int dim,
int spacedim>
6790inline typename ::internal::TriangulationImplementation::
6791 Iterators<dim, spacedim>::line_iterator
6794 return typename ::internal::TriangulationImplementation::
6795 Iterators<dim, spacedim>::line_iterator();
6800template <
int dim,
int spacedim>
6810template <
int dim,
int spacedim>
6811inline typename ::internal::TriangulationImplementation::
6812 Iterators<dim, spacedim>::quad_iterator
6815 return typename ::internal::TriangulationImplementation::
6816 Iterators<dim, spacedim>::quad_iterator();
6821template <
int dim,
int spacedim>
6831template <
int dim,
int spacedim>
6840template <
int dim,
int spacedim>
6849template <
int dim,
int spacedim>
6858template <
int dim,
int spacedim>
6867template <
int dim,
int spacedim>
6870 const unsigned int )
6877template <
int dim,
int spacedim>
6886template <
int dim,
int spacedim>
6895template <
int dim,
int spacedim>
6904template <
int dim,
int spacedim>
6913template <
int dim,
int spacedim>
6922template <
int dim,
int spacedim>
6931template <
int dim,
int spacedim>
6940template <
int dim,
int spacedim>
6949template <
int dim,
int spacedim>
6959template <
int dim,
int spacedim>
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>
7015template <
int spacedim>
7018 const VertexKind vertex_kind,
7019 const unsigned int vertex_index)
7021 , vertex_kind(vertex_kind)
7027template <
int spacedim>
7032 const AccessorData *)
7034 , vertex_kind(interior_vertex)
7048 "This constructor can not be called for face iterators in 1d, "
7049 "except to default-construct iterator objects."));
7054template <
int spacedim>
7055template <
int structdim2,
int dim2,
int spacedim2>
7059 , vertex_kind(interior_vertex)
7067template <
int spacedim>
7068template <
int structdim2,
int dim2,
int spacedim2>
7072 , vertex_kind(interior_vertex)
7080template <
int spacedim>
7085 vertex_kind = t.vertex_kind;
7091template <
int spacedim>
7104template <
int spacedim>
7111 return (global_vertex_index < other.global_vertex_index);
7116template <
int spacedim>
7124template <
int spacedim>
7133template <
int spacedim>
7142template <
int spacedim>
7151template <
int spacedim>
7159template <
int spacedim>
7168template <
int spacedim>
7173 ((tria == t.
tria) && (global_vertex_index == t.global_vertex_index));
7185template <
int spacedim>
7189 return !(*
this == t);
7194template <
int spacedim>
7205template <
int spacedim>
7217template <
int spacedim>
7226template <
int spacedim>
7227inline typename ::internal::TriangulationImplementation::
7228 Iterators<1, spacedim>::line_iterator
7235template <
int spacedim>
7244template <
int spacedim>
7245inline typename ::internal::TriangulationImplementation::
7246 Iterators<1, spacedim>::quad_iterator
7254template <
int spacedim>
7263template <
int spacedim>
7267 return vertex_kind != interior_vertex;
7271template <
int spacedim>
7275 switch (vertex_kind)
7281 this->vertex_index()) !=
7295template <
int spacedim>
7304template <
int spacedim>
7316template <
int spacedim>
7319 const unsigned int )
7325template <
int spacedim>
7334template <
int spacedim>
7343template <
int spacedim>
7352template <
int spacedim>
7361template <
int spacedim>
7370template <
int spacedim>
7379template <
int spacedim>
7388template <
int spacedim>
7397template <
int spacedim>
7407template <
int spacedim>
7415template <
int spacedim>
7423template <
int spacedim>
7430template <
int spacedim>
7438template <
int spacedim>
7447template <
int spacedim>
7453 ExcMessage(
"You can't set the boundary_id of a face of a cell that is "
7454 "not actually at the boundary."));
7461template <
int spacedim>
7470template <
int spacedim>
7480template <
int spacedim>
7489template <
int spacedim>
7498template <
int spacedim>
7507template <
int spacedim>
7516template <
int spacedim>
7525template <
int spacedim>
7535template <
int spacedim>
7546template <
int dim,
int spacedim>
7551 const AccessorData *local_data)
7557template <
int dim,
int spacedim>
7561 static_cast<const
TriaAccessor<dim, dim, spacedim> &>(cell_accessor))
7566template <
int dim,
int spacedim>
7571 this->present_level + 1,
7572 this->child_index(i));
7582template <
int dim,
int spacedim>
7583inline boost::container::small_vector<TriaIterator<CellAccessor<dim, spacedim>>,
7587 boost::container::small_vector<TriaIterator<CellAccessor<dim, spacedim>>,
7589 child_iterators(this->n_children());
7591 for (
unsigned int i = 0; i < this->n_children(); ++i)
7592 child_iterators[i] = this->child(i);
7594 return child_iterators;
7599template <
int dim,
int spacedim>
7604 if constexpr (dim == 1)
7607 VertexKind vertex_kind = VertexKind::interior_vertex;
7608 if (i == 0 && at_boundary(0))
7609 vertex_kind = VertexKind::left_vertex;
7610 if (i == 1 && at_boundary(1))
7611 vertex_kind = VertexKind::right_vertex;
7614 this->vertex_index(i));
7617 else if constexpr (dim == 2)
7618 return this->line(i);
7619 else if constexpr (dim == 3)
7620 return this->quad(i);
7630template <
int dim,
int spacedim>
7635 for (
const unsigned int face_n : this->face_indices())
7636 if (this->face(face_n) == face)
7640 ExcMessage(
"The given face is not a face of the current cell."));
7646template <
int dim,
int spacedim>
7647inline boost::container::small_vector<
7650 ReferenceCells::max_n_faces<dim>()
7657 boost::container::small_vector<
7660 ReferenceCells::max_n_faces<dim>()
7665 face_iterators(this->n_faces());
7667 for (
const unsigned int i : this->face_indices())
7668 face_iterators[i] = this->face(i);
7670 return face_iterators;
7675template <
int dim,
int spacedim>
7682 return this->vertex_index(i);
7685 return this->line_index(i);
7688 return this->quad_index(i);
7697template <
int dim,
int spacedim>
7702 return this->tria->
levels[this->present_level]
7703 ->neighbors[this->present_index * ReferenceCells::max_n_faces<dim>() +
7710template <
int dim,
int spacedim>
7715 return this->tria->
levels[this->present_level]
7716 ->neighbors[this->present_index * ReferenceCells::max_n_faces<dim>() +
7723template <
int dim,
int spacedim>
7733 Assert(this->is_active() || !this->tria->
levels[this->present_level]
7734 ->refine_flags[this->present_index],
7735 ExcRefineCellNotActive());
7737 this->tria->
levels[this->present_level]->refine_flags[this->present_index]);
7742template <
int dim,
int spacedim>
7747 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7748 Assert(!coarsen_flag_set(), ExcCellFlaggedForCoarsening());
7750 this->tria->
levels[this->present_level]->refine_flags[this->present_index] =
7756template <
int dim,
int spacedim>
7760 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7761 this->tria->
levels[this->present_level]->refine_flags[this->present_index] =
7766template <
int dim,
int spacedim>
7771 if (this->tria->
levels[this->present_level]->refine_choice.size() == 0)
7773 return this->tria->
levels[this->present_level]
7774 ->refine_choice[this->present_index];
7778template <
int dim,
int spacedim>
7781 const std::uint8_t refinement_choice)
const
7783 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7784 if (this->tria->
levels[this->present_level]->refine_choice.size() != 0)
7785 this->tria->
levels[this->present_level]
7786 ->refine_choice[this->present_index] = refinement_choice;
7790template <
int dim,
int spacedim>
7794 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7795 if (this->tria->
levels[this->present_level]->refine_choice.size() != 0)
7796 this->tria->
levels[this->present_level]
7797 ->refine_choice[this->present_index] =
7802template <
int dim,
int spacedim>
7805 const unsigned int face_no,
7821 face_refinement_case,
7823 this->face_orientation(face_no),
7824 this->face_flip(face_no),
7825 this->face_rotation(face_no)));
7826 set_refine_flag(new_ref_case);
7829 return new_ref_case != old_ref_case;
7834template <
int dim,
int spacedim>
7837 const unsigned int line_no)
const
7847 old_ref_case = refine_flag_set(),
7851 set_refine_flag(new_ref_case);
7854 return new_ref_case != old_ref_case;
7859template <
int dim,
int spacedim>
7860inline ::internal::SubfaceCase<dim>
7866 if constexpr (dim == 1)
7867 return ::internal::SubfaceCase<1>::case_none;
7868 else if constexpr (dim == 2)
7869 return ((face(face_no)->has_children()) ?
7871 ::
internal::SubfaceCase<2>::case_none);
7872 else if constexpr (dim == 3)
7874 switch (
static_cast<std::uint8_t
>(face(face_no)->refinement_case()))
7877 return ::internal::SubfaceCase<3>::case_none;
7879 if (face(face_no)->child(0)->has_children())
7881 Assert(face(face_no)->child(0)->refinement_case() ==
7884 if (face(face_no)->child(1)->has_children())
7886 Assert(face(face_no)->child(1)->refinement_case() ==
7889 return ::internal::SubfaceCase<3>::case_x1y2y;
7892 return ::internal::SubfaceCase<3>::case_x1y;
7896 if (face(face_no)->child(1)->has_children())
7898 Assert(face(face_no)->child(1)->refinement_case() ==
7901 return ::internal::SubfaceCase<3>::case_x2y;
7904 return ::internal::SubfaceCase<3>::case_x;
7907 if (face(face_no)->child(0)->has_children())
7909 Assert(face(face_no)->child(0)->refinement_case() ==
7912 if (face(face_no)->child(1)->has_children())
7914 Assert(face(face_no)->child(1)->refinement_case() ==
7917 return ::internal::SubfaceCase<3>::case_y1x2x;
7920 return ::internal::SubfaceCase<3>::case_y1x;
7924 if (face(face_no)->child(1)->has_children())
7926 Assert(face(face_no)->child(1)->refinement_case() ==
7929 return ::internal::SubfaceCase<3>::case_y2x;
7932 return ::internal::SubfaceCase<3>::case_y;
7935 return ::internal::SubfaceCase<3>::case_xy;
7943 return ::internal::SubfaceCase<dim>::case_none;
7948template <
int dim,
int spacedim>
7958 Assert(this->is_active() || !this->tria->
levels[this->present_level]
7959 ->coarsen_flags[this->present_index],
7960 ExcRefineCellNotActive());
7961 return this->tria->
levels[this->present_level]
7962 ->coarsen_flags[this->present_index];
7967template <
int dim,
int spacedim>
7971 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7972 Assert(!refine_flag_set(), ExcCellFlaggedForRefinement());
7974 this->tria->
levels[this->present_level]->coarsen_flags[this->present_index] =
7980template <
int dim,
int spacedim>
7984 Assert(this->used() && this->is_active(), ExcRefineCellNotActive());
7985 this->tria->
levels[this->present_level]->coarsen_flags[this->present_index] =
7991template <
int dim,
int spacedim>
7996 neighbor_level(face_no),
7997 neighbor_index(face_no));
8007template <
int dim,
int spacedim>
8011 return !this->has_children();
8016template <
int dim,
int spacedim>
8020 Assert(this->is_active(),
8021 ExcMessage(
"is_locally_owned() can only be called on active cells!"));
8022# ifndef DEAL_II_WITH_MPI
8039template <
int dim,
int spacedim>
8043# ifndef DEAL_II_WITH_MPI
8054 this->level_subdomain_id() == locally_owned_subdomain);
8060template <
int dim,
int spacedim>
8064 Assert(this->is_active(),
8065 ExcMessage(
"is_ghost() can only be called on active cells!"));
8066 if (this->has_children())
8069# ifndef DEAL_II_WITH_MPI
8082 subdomain_id != locally_owned_subdomain &&
8089template <
int dim,
int spacedim>
8093# ifndef DEAL_II_WITH_MPI
8105 subdomain_id != locally_owned_subdomain &&
8113template <
int dim,
int spacedim>
8117 Assert(this->is_active(),
8118 ExcMessage(
"is_artificial() can only be called on active cells!"));
8119# ifndef DEAL_II_WITH_MPI
8135template <
int dim,
int spacedim>
8139# ifndef DEAL_II_WITH_MPI
8150template <
int dim,
int spacedim>
8155 Assert(this->is_active(),
8156 ExcMessage(
"subdomain_id() can only be called on active cells!"));
8157 return this->tria->
levels[this->present_level]
8158 ->subdomain_ids[this->present_index];
8163template <
int dim,
int spacedim>
8168 return this->tria->
levels[this->present_level]
8169 ->level_subdomain_ids[this->present_index];
8174template <
int dim,
int spacedim>
8178 const unsigned int n2 = neighbor_of_neighbor_internal(neighbor);
8185 return neighbor_of_coarser_neighbor(neighbor).first;
8190template <
int dim,
int spacedim>
8199template <
int dim,
int spacedim>
8204 return this->tria->
levels[this->present_level]
8205 ->active_cell_indices[this->present_index];
8210template <
int dim,
int spacedim>
8215 Assert(this->is_active(),
8217 "global_active_cell_index() can only be called on active cells!"));
8219 return this->tria->
levels[this->present_level]
8220 ->global_active_cell_indices[this->present_index];
8225template <
int dim,
int spacedim>
8229 return this->tria->
levels[this->present_level]
8230 ->global_level_cell_indices[this->present_index];