deal.II version GIT relicensing-6834-g5b78e6bcdf 2026-10-01 11:20:01+00:00
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
fe_simplex_p.cc
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2//
3// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2020 - 2026 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13#include <deal.II/base/config.h>
14
18#include <deal.II/base/types.h>
19
20#include <deal.II/fe/fe_dgq.h>
23#include <deal.II/fe/fe_q.h>
25#include <deal.II/fe/fe_tools.h>
27#include <deal.II/fe/mapping.h>
28
31
33
34namespace
35{
40 std::vector<unsigned int>
41 get_dpo_vector_fe_p(const unsigned int dim, const unsigned int degree)
42 {
43 Assert(degree != 0, ExcNotImplemented());
44
45 switch (dim)
46 {
47 case 1:
48 return {1, degree - 1};
49 case 2:
50 // the number of support points on the face is
51 // \sum_{i=1}^{degree - 2} i = (degree-2)*(degree-1)/2
52 return {1, degree - 1, (degree - 2) * (degree - 1) / 2};
53 case 3:
54 // the number of support points in the volume are that of a tet
55 // with a lower degree (degree-4)
56 return {1,
57 degree - 1,
58 (degree - 2) * (degree - 1) / 2,
59 (degree - 3) * (degree - 2) * (degree - 1) / 6};
60 }
61
63 return {};
64 }
65
66
67
72 template <int dim>
73 std::vector<Point<dim>>
74 unit_support_points_fe_p(const unsigned int degree)
75 {
76 Assert(dim != 0, ExcInternalError());
77 std::vector<Point<dim>> unit_points;
78 const auto reference_cell = ReferenceCells::get_simplex<dim>();
79
80 // Piecewise constants are a special case: use a support point at the
81 // centroid and only the centroid
82 if (degree == 0)
83 {
84 unit_points.emplace_back(reference_cell.barycenter());
85 return unit_points;
86 }
87
88 // otherwise write everything as linear combinations of vertices
89 const auto dpo = get_dpo_vector_fe_p(dim, degree);
90 Assert(dpo.size() == dim + 1, ExcInternalError());
91 Assert(dpo[0] == 1, ExcNotImplemented());
92
93 // vertices:
94 for (const unsigned int d : reference_cell.vertex_indices())
95 unit_points.push_back(reference_cell.vertex(d));
96
97 // lines:
98 for (const unsigned int l : reference_cell.line_indices())
99 {
100 const Point<dim> p0 =
101 unit_points[reference_cell.line_to_cell_vertices(l, 0)];
102 const Point<dim> p1 =
103 unit_points[reference_cell.line_to_cell_vertices(l, 1)];
104 for (unsigned int p = 0; p < dpo[1]; ++p)
105 unit_points.push_back((double(dpo[1] - p) / (dpo[1] + 1)) * p0 +
106 (double(p + 1) / (dpo[1] + 1)) * p1);
107 }
108
109 // faces:
110 if constexpr (dim == 2)
111 {
112 unsigned int counter = 0;
113 for (unsigned int i = 1; i < degree; ++i)
114 for (unsigned int j = 1; j < degree - i; ++j, ++counter)
116 const double x = static_cast<double>(j) / degree;
117 const double y = static_cast<double>(i) / degree;
118
119 unit_points.push_back(Point<dim>(x, y));
120 }
121 Assert(counter == dpo[2], ExcInternalError());
122 }
123
124 if constexpr (dim == 3)
125 for (const unsigned int f : reference_cell.face_indices())
126 {
127 const Point<dim> p0 =
128 unit_points[reference_cell.face_to_cell_vertices(
130 const Point<dim> p1 =
131 unit_points[reference_cell.face_to_cell_vertices(
133 const Point<dim> p2 =
134 unit_points[reference_cell.face_to_cell_vertices(
136
137 unsigned int counter = 0;
138 for (unsigned int i = 1; i < degree; ++i)
139 for (unsigned int j = 1; j < degree - i; ++j, ++counter)
140 {
141 const double a = static_cast<double>(j) / degree;
142 const double b = static_cast<double>(i) / degree;
143 const double c = 1.0 - a - b;
144 unit_points.push_back(c * p0 + a * p1 + b * p2);
145 }
146 Assert(counter == dpo[2], ExcInternalError());
147 }
148
149 // interior
150 if constexpr (dim == 3)
151 {
152 unsigned int counter = 0;
153 for (unsigned int i = 1; i < degree; ++i)
154 for (unsigned int j = 1; j < degree - i; ++j)
155 for (unsigned int k = 1; k < degree - i - j; ++k, ++counter)
156 {
157 const double x = static_cast<double>(i) / degree;
158 const double y = static_cast<double>(j) / degree;
159 const double z = static_cast<double>(k) / degree;
160
161 unit_points.push_back(Point<dim>(x, y, z));
162 }
163 Assert(counter == dpo[3], ExcInternalError());
164 }
165
166 return unit_points;
167 }
168
169 template <>
170 std::vector<Point<0>>
171 unit_support_points_fe_p(const unsigned int /*degree*/)
172 {
173 return {Point<0>()};
174 }
175
180 template <int dim>
181 std::vector<std::vector<Point<dim - 1>>>
182 unit_face_support_points_fe_p(
183 const unsigned int degree,
184 typename FiniteElementData<dim>::Conformity conformity)
185 {
186 // Discontinuous elements don't have face support points
188 return {};
189
190 // this concept doesn't exist in 1d so just return an empty vector
191 if (dim == 1)
192 return {};
193
194 std::vector<std::vector<Point<dim - 1>>> unit_face_points;
195
196 // all faces have the same support points
197 for (auto face_n : ReferenceCells::get_simplex<dim>().face_indices())
198 {
199 (void)face_n;
200 unit_face_points.emplace_back(
201 unit_support_points_fe_p<dim - 1>(degree));
202 }
203
204 return unit_face_points;
205 }
206
212 template <int dim>
214 constraints_fe_p(const unsigned int /*degree*/)
215 {
216 // no constraints in 1d
217 // constraints in 3d not implemented yet
218 return FullMatrix<double>();
219 }
220
221 template <>
223 constraints_fe_p<2>(const unsigned int degree)
224 {
225 constexpr int dim = 2;
226
227 // the following implements the 2d case
228 // (the 3d case is not implemented yet)
229 //
230 // consult FE_Q_Base::Implementation::initialize_constraints()
231 // for more information
232
233 std::vector<Point<dim - 1>> constraint_points;
234 // midpoint
235 constraint_points.emplace_back(0.5);
236 // subface 0
237 for (unsigned int i = 1; i < degree; ++i)
238 constraint_points.push_back(
240 Point<dim - 1>(i / double(degree)), 0));
241 // subface 1
242 for (unsigned int i = 1; i < degree; ++i)
243 constraint_points.push_back(
245 Point<dim - 1>(i / double(degree)), 1));
246
247 // Now construct relation between destination (child) and source (mother)
248 // dofs.
249
250 const unsigned int n_dofs_constrained = constraint_points.size();
251 unsigned int n_dofs_per_face = degree + 1;
252 FullMatrix<double> interface_constraints(n_dofs_constrained,
253 n_dofs_per_face);
254
255 const auto poly = BarycentricPolynomials<dim - 1>::get_fe_p_basis(degree);
256
257 for (unsigned int i = 0; i < n_dofs_constrained; ++i)
258 for (unsigned int j = 0; j < n_dofs_per_face; ++j)
259 {
260 interface_constraints(i, j) =
261 poly.compute_value(j, constraint_points[i]);
262
263 // if the value is small up to round-off, then simply set it to zero
264 // to avoid unwanted fill-in of the constraint matrices (which would
265 // then increase the number of other DoFs a constrained DoF would
266 // couple to)
267 if (std::fabs(interface_constraints(i, j)) < 1e-13)
268 interface_constraints(i, j) = 0;
269 }
270 return interface_constraints;
271 }
272
273
274
279 std::vector<unsigned int>
280 get_dpo_vector_fe_dgp(const unsigned int dim, const unsigned int degree)
281 {
282 // First treat the case of piecewise constant elements:
283 if (degree == 0)
284 {
285 std::vector<unsigned int> dpo(dim + 1, 0U);
286 dpo[dim] = 1;
287 return dpo;
288 }
289 else
290 {
291 // This element has the same degrees of freedom as the continuous one,
292 // but they are all counted for the interior of the cell because
293 // it is continuous. Rather than hard-code how many DoFs the element
294 // has, we just get the numbers from the continuous case and add them
295 // up
296 const auto continuous_dpo = get_dpo_vector_fe_p(dim, degree);
297
298 switch (dim)
299 {
300 case 1:
301 return {0U,
302 ReferenceCells::Line.n_vertices() * continuous_dpo[0] +
303 continuous_dpo[dim]};
304
305 case 2:
306 return {0U,
307 0U,
309 continuous_dpo[0] +
310 ReferenceCells::Triangle.n_lines() * continuous_dpo[1] +
311 continuous_dpo[dim]};
312
313 case 3:
314 return {
315 0U,
316 0U,
317 0U,
318 ReferenceCells::Tetrahedron.n_vertices() * continuous_dpo[0] +
319 ReferenceCells::Tetrahedron.n_lines() * continuous_dpo[1] +
320 ReferenceCells::Tetrahedron.n_faces() * continuous_dpo[2] +
321 continuous_dpo[dim]};
322 }
323
325 return {};
326 }
327 }
328} // namespace
329
330
331
332template <int dim, int spacedim>
334 const BarycentricPolynomials<dim> polynomials,
335 const FiniteElementData<dim> &fe_data,
336 const bool prolongation_is_additive,
337 const std::vector<Point<dim>> &unit_support_points,
338 const std::vector<std::vector<Point<dim - 1>>> unit_face_support_points,
339 const FullMatrix<double> &interface_constraints)
340 : ::FE_Poly<dim, spacedim>(
341 polynomials,
342 fe_data,
343 std::vector<bool>(fe_data.dofs_per_cell, prolongation_is_additive),
344 std::vector<ComponentMask>(fe_data.dofs_per_cell,
345 ComponentMask(std::vector<bool>(1, true))))
346{
349 this->interface_constraints = interface_constraints;
350}
351
352
353
354template <int dim, int spacedim>
355std::pair<Table<2, bool>, std::vector<unsigned int>>
357{
358 Table<2, bool> constant_modes(1, this->n_dofs_per_cell());
359 constant_modes.fill(true);
360 return std::pair<Table<2, bool>, std::vector<unsigned int>>(
361 constant_modes, std::vector<unsigned int>(1, 0));
362}
363
364
365
366template <int dim, int spacedim>
367const FullMatrix<double> &
369 const unsigned int child,
370 const RefinementCase<dim> &refinement_case) const
371{
372 if (dim == 3)
373 Assert(RefinementCase<dim>(refinement_case) ==
375 static_cast<char>(IsotropicRefinementChoice::cut_tet_68)) ||
376 RefinementCase<dim>(refinement_case) ==
378 static_cast<char>(IsotropicRefinementChoice::cut_tet_57)) ||
379 RefinementCase<dim>(refinement_case) ==
381 static_cast<char>(IsotropicRefinementChoice::cut_tet_49)),
383 else
384 Assert(refinement_case ==
387 AssertDimension(dim, spacedim);
388
389 // initialization upon first request
390 if (this->prolongation[refinement_case - 1][child].n() == 0)
391 {
392 std::scoped_lock lock(prolongation_matrix_mutex);
393
394 // if matrix got updated while waiting for the lock
395 if (this->prolongation[refinement_case - 1][child].n() ==
396 this->n_dofs_per_cell())
397 return this->prolongation[refinement_case - 1][child];
398
399 // now do the work. need to get a non-const version of data in order to
400 // be able to modify them inside a const function
401 auto &this_nonconst = const_cast<FE_SimplexPoly<dim, spacedim> &>(*this);
402
403 if (dim == 2)
404 {
405 std::vector<std::vector<FullMatrix<double>>> isotropic_matrices(
407 isotropic_matrices.back().resize(
408 this->reference_cell().n_children(
409 RefinementCase<dim>(refinement_case)),
410 FullMatrix<double>(this->n_dofs_per_cell(),
411 this->n_dofs_per_cell()));
412
413 FETools::compute_embedding_matrices(*this, isotropic_matrices, true);
414
415 this_nonconst.prolongation[refinement_case - 1] =
416 std::move(isotropic_matrices.back());
417 }
418 else if (dim == 3)
419 {
420 std::vector<std::vector<FullMatrix<double>>> matrices(
421 static_cast<unsigned int>(IsotropicRefinementChoice::cut_tet_49),
422 std::vector<FullMatrix<double>>(
423 this->reference_cell().n_children(
424 RefinementCase<dim>(refinement_case)),
425 FullMatrix<double>(this->n_dofs_per_cell(),
426 this->n_dofs_per_cell())));
427 FETools::compute_embedding_matrices(*this, matrices, true);
428 for (unsigned int refinement_direction = static_cast<unsigned int>(
430 refinement_direction <=
431 static_cast<unsigned int>(IsotropicRefinementChoice::cut_tet_49);
432 refinement_direction++)
433 this_nonconst.prolongation[refinement_direction - 1] =
434 std::move(matrices[refinement_direction - 1]);
435 }
436 else
438 }
439
440 // finally return the matrix
441 return this->prolongation[refinement_case - 1][child];
442}
443
444
445
446template <int dim, int spacedim>
447unsigned int
449 const unsigned int face_dof_index,
450 const unsigned int face,
451 const types::geometric_orientation combined_orientation) const
452{
453 return FETools::face_to_cell_index(*this,
454 face_dof_index,
455 face,
456 combined_orientation);
457}
458
459
460
461template <int dim, int spacedim>
462const FullMatrix<double> &
464 const unsigned int child,
465 const RefinementCase<dim> &refinement_case) const
466{
467 if (dim == 3)
468 Assert(RefinementCase<dim>(refinement_case) ==
470 static_cast<char>(IsotropicRefinementChoice::cut_tet_68)) ||
471 RefinementCase<dim>(refinement_case) ==
473 static_cast<char>(IsotropicRefinementChoice::cut_tet_57)) ||
474 RefinementCase<dim>(refinement_case) ==
476 static_cast<char>(IsotropicRefinementChoice::cut_tet_49)),
478 else
481 AssertDimension(dim, spacedim);
482
483 // initialization upon first request
484 if (this->restriction[refinement_case - 1][child].n() == 0)
485 {
486 std::scoped_lock lock(restriction_matrix_mutex);
487
488 // if matrix got updated while waiting for the lock
489 if (this->restriction[refinement_case - 1][child].n() ==
490 this->n_dofs_per_cell())
491 return this->restriction[refinement_case - 1][child];
492
493 // get the restriction matrix
494 // Refine a unit cell. As the parent cell is a unit
495 // cell, the reference cell of the children equals the parent, i.e. they
496 // have the support points at the same locations. So we just have to check
497 // if a support point of the parent is one of the interpolation points of
498 // the child. If this is not the case we find the interpolation of the
499 // point.
500
501 const double eps = 1e-12;
502 FullMatrix<double> restriction_mat(this->n_dofs_per_cell(),
503 this->n_dofs_per_cell());
504
505 // first get all support points on the reference cell
506 const std::vector<Point<dim>> unit_support_points =
507 this->get_unit_support_points();
508
509 // now create children on the reference cell
511 GridGenerator::reference_cell(tria, this->reference_cell());
512 tria.begin_active()->set_refine_flag(
514 if (dim == 3)
515 tria.begin_active()->set_refine_choice(refinement_case);
517
518 const auto &child_cell = tria.begin(0)->child(child);
519
520 // iterate over all support points and transform them to the unit cell of
521 // the child
522 for (unsigned int i = 0; i < unit_support_points.size(); i++)
523 {
524 std::vector<Point<dim>> transformed_point(1);
525 const std::vector<Point<spacedim>> unit_support_point = {
526 dim == 2 ? Point<spacedim>(unit_support_points[i][0],
527 unit_support_points[i][1]) :
528 Point<spacedim>(unit_support_points[i][0],
529 unit_support_points[i][1],
530 unit_support_points[i][2])};
531 this->reference_cell()
532 .template get_default_linear_mapping<spacedim>()
533 .transform_points_real_to_unit_cell(
534 child_cell,
535 make_array_view(unit_support_point),
536 make_array_view(transformed_point));
537
538 // if point is inside the unit cell iterate over all shape functions
539 if (this->reference_cell().contains_point(transformed_point[0], eps))
540 for (unsigned int j = 0; j < this->n_dofs_per_cell(); j++)
541 restriction_mat[i][j] =
542 this->shape_value(j, transformed_point[0]);
543 }
544 if constexpr (running_in_debug_mode())
545 {
546 for (unsigned int i = 0; i < this->n_dofs_per_cell(); i++)
547 {
548 double sum = 0.;
549
550 for (unsigned int j = 0; j < this->n_dofs_per_cell(); j++)
551 sum += restriction_mat[i][j];
552
553 Assert(std::fabs(sum - 1) < eps || std::fabs(sum) < eps,
555 "The entries in a row of the local "
556 "restriction matrix do not add to zero or one. "
557 "This typically indicates that the "
558 "polynomial interpolation is "
559 "ill-conditioned such that round-off "
560 "prevents the sum to be one."));
561 }
562 }
563
564 // Remove small entries from the matrix
565 for (unsigned int i = 0; i < restriction_mat.m(); ++i)
566 for (unsigned int j = 0; j < restriction_mat.n(); ++j)
567 {
568 if (std::fabs(restriction_mat(i, j)) < eps)
569 restriction_mat(i, j) = 0.;
570 if (std::fabs(restriction_mat(i, j) - 1) < eps)
571 restriction_mat(i, j) = 1.;
572 }
573
574 const_cast<FullMatrix<double> &>(
575 this->restriction[refinement_case - 1][child]) =
576 std::move(restriction_mat);
577 }
578
579 // finally return the matrix
580 return this->restriction[refinement_case - 1][child];
581}
582
583
584
585template <int dim, int spacedim>
586void
588 const FiniteElement<dim, spacedim> &source_fe,
589 FullMatrix<double> &interpolation_matrix,
590 const unsigned int face_no) const
591{
592 Assert(interpolation_matrix.m() == source_fe.n_dofs_per_face(face_no),
593 ExcDimensionMismatch(interpolation_matrix.m(),
594 source_fe.n_dofs_per_face(face_no)));
595
596 // see if source is a P or Q element
597 if ((dynamic_cast<const FE_SimplexPoly<dim, spacedim> *>(&source_fe) !=
598 nullptr) ||
599 (dynamic_cast<const FE_Q_Base<dim, spacedim> *>(&source_fe) != nullptr))
600 {
601 const Quadrature<dim - 1> quad_face_support(
602 source_fe.get_unit_face_support_points(face_no));
603
604 const double eps = 2e-13 * this->degree * (dim - 1);
605
606 const std::vector<Point<dim>> face_quadrature_points =
607 QProjector<dim>::project_to_face(this->reference_cell(),
608 quad_face_support,
609 face_no,
611 .get_points();
612
613 for (unsigned int i = 0; i < source_fe.n_dofs_per_face(face_no); ++i)
614 for (unsigned int j = 0; j < this->n_dofs_per_face(face_no); ++j)
615 {
616 double matrix_entry =
617 this->shape_value(this->face_to_cell_index(j, 0),
618 face_quadrature_points[i]);
619
620 // Correct the interpolated value. I.e. if it is close to 1 or
621 // 0, make it exactly 1 or 0. Unfortunately, this is required to
622 // avoid problems with higher order elements.
623 if (std::fabs(matrix_entry - 1.0) < eps)
624 matrix_entry = 1.0;
625 if (std::fabs(matrix_entry) < eps)
626 matrix_entry = 0.0;
627
628 interpolation_matrix(i, j) = matrix_entry;
629 }
630
631 if constexpr (running_in_debug_mode())
632 {
633 for (unsigned int j = 0; j < source_fe.n_dofs_per_face(face_no); ++j)
634 {
635 double sum = 0.;
636
637 for (unsigned int i = 0; i < this->n_dofs_per_face(face_no); ++i)
638 sum += interpolation_matrix(j, i);
639
640 Assert(std::fabs(sum - 1) < eps, ExcInternalError());
641 }
642 }
643 }
644 else if (dynamic_cast<const FE_Nothing<dim> *>(&source_fe) != nullptr)
645 {
646 // nothing to do here, the FE_Nothing has no degrees of freedom anyway
647 }
648 else
650 false,
651 (typename FiniteElement<dim,
652 spacedim>::ExcInterpolationNotImplemented()));
653}
654
655
656
657template <int dim, int spacedim>
658void
660 const FiniteElement<dim, spacedim> &source_fe,
661 const unsigned int subface,
662 FullMatrix<double> &interpolation_matrix,
663 const unsigned int face_no) const
664{
665 Assert(interpolation_matrix.m() == source_fe.n_dofs_per_face(face_no),
666 ExcDimensionMismatch(interpolation_matrix.m(),
667 source_fe.n_dofs_per_face(face_no)));
668
669 // see if source is a P or Q element
670 if ((dynamic_cast<const FE_SimplexPoly<dim, spacedim> *>(&source_fe) !=
671 nullptr) ||
672 (dynamic_cast<const FE_Q_Base<dim, spacedim> *>(&source_fe) != nullptr))
673 {
674 const Quadrature<dim - 1> quad_face_support(
675 source_fe.get_unit_face_support_points(face_no));
676
677 const double eps = 2e-13 * this->degree * (dim - 1);
678
679 const Quadrature<dim> subface_quadrature =
681 this->reference_cell(),
682 quad_face_support,
683 face_no,
684 subface,
687
688 for (unsigned int i = 0; i < source_fe.n_dofs_per_face(face_no); ++i)
689 for (unsigned int j = 0; j < this->n_dofs_per_face(face_no); ++j)
690 {
691 double matrix_entry =
692 this->shape_value(this->face_to_cell_index(j, 0),
693 subface_quadrature.point(i));
694
695 // Correct the interpolated value. I.e. if it is close to 1 or
696 // 0, make it exactly 1 or 0. Unfortunately, this is required to
697 // avoid problems with higher order elements.
698 if (std::fabs(matrix_entry - 1.0) < eps)
699 matrix_entry = 1.0;
700 if (std::fabs(matrix_entry) < eps)
701 matrix_entry = 0.0;
702
703 interpolation_matrix(i, j) = matrix_entry;
704 }
705
706 if constexpr (running_in_debug_mode())
707 {
708 for (unsigned int j = 0; j < source_fe.n_dofs_per_face(face_no); ++j)
709 {
710 double sum = 0.;
711
712 for (unsigned int i = 0; i < this->n_dofs_per_face(face_no); ++i)
713 sum += interpolation_matrix(j, i);
714
715 Assert(std::fabs(sum - 1) < eps, ExcInternalError());
716 }
717 }
718 }
719 else if (dynamic_cast<const FE_Nothing<dim> *>(&source_fe) != nullptr)
720 {
721 // nothing to do here, the FE_Nothing has no degrees of freedom anyway
722 }
723 else
725 false,
726 (typename FiniteElement<dim,
727 spacedim>::ExcInterpolationNotImplemented()));
728}
729
730
731
732template <int dim, int spacedim>
733bool
738
739
740
741template <int dim, int spacedim>
742void
745 const std::vector<Vector<double>> &support_point_values,
746 std::vector<double> &nodal_values) const
747{
748 AssertDimension(support_point_values.size(),
749 this->get_unit_support_points().size());
750 AssertDimension(support_point_values.size(), nodal_values.size());
751 AssertDimension(this->dofs_per_cell, nodal_values.size());
752
753 for (unsigned int i = 0; i < this->dofs_per_cell; ++i)
754 {
755 AssertDimension(support_point_values[i].size(), 1);
756
757 nodal_values[i] = support_point_values[i](0);
758 }
759}
760
761
762
763template <int dim, int spacedim>
765 : FE_SimplexPoly<dim, spacedim>(
766 BarycentricPolynomials<dim>::get_fe_p_basis(degree),
767 FiniteElementData<dim>(get_dpo_vector_fe_p(dim, degree),
768 ReferenceCells::get_simplex<dim>(),
769 1,
770 degree,
771 FiniteElementData<dim>::H1),
772 false,
773 unit_support_points_fe_p<dim>(degree),
774 unit_face_support_points_fe_p<dim>(degree, FiniteElementData<dim>::H1),
775 constraints_fe_p<dim>(degree))
776{
777 if (degree > 2)
778 for (unsigned int i = 0; i < this->n_dofs_per_line(); ++i)
780 this->n_dofs_per_line() - 1 - i - i;
781
782 // for 1d and 2d or if there are no DoFs on the quads
783 // we can skip adjust_quad_dof_index_for_face_orientation_table
784 if (dim < 3 || degree < 3)
785 return;
786
787 // do some sanity checks
789 const unsigned int face_no = 0;
790
791 Assert(
793 this->reference_cell().n_face_orientations(face_no) *
794 this->n_dofs_per_quad(face_no),
796
797 Assert((degree - 2) * (degree - 1) / 2 == this->n_dofs_per_quad(face_no),
799
800 const auto face_reference_cell =
801 this->reference_cell().face_reference_cell(face_no);
802
803 // the interior nodes build a new triangle with lower degree r
804 const unsigned int r = degree - 3;
805
806 // now loop over all DoFs on the triangle
807 // 0 <= i + j <= r holds on the triangle
808 for (unsigned int j = 0, dof_index = 0; j <= r; ++j)
809 for (unsigned int i = 0; i <= r - j; ++i, ++dof_index)
810 {
811 // index in the style of barycentric coordinates
812 // the first entry is the remainder as i + j <= r has to hold
813 const std::array<unsigned int, 3> local_indices{{r - i - j, i, j}};
814
815 // go over all possible orientations
816 for (types::geometric_orientation orientation = 0;
817 orientation < this->reference_cell().n_face_orientations(face_no);
818 ++orientation)
819 {
820 // get the correct permutation for the current orientation
821 const auto permuted_indices =
822 face_reference_cell.permute_by_combined_orientation(
823 make_array_view(local_indices),
824 face_reference_cell.get_inverse_combined_orientation(
825 orientation));
826
827 // now reconstruct the index of from the permuted i and j
828 // take orientation 0 which is the standard orientation
829 // then the index k is k = i + j*(r+1) - (j*(j-1))/2
830 const unsigned int k =
831 permuted_indices[1] + permuted_indices[2] * (r + 1) -
832 (permuted_indices[2] * (permuted_indices[2] - 1)) / 2;
833
834 const int offset =
835 static_cast<int>(k) - static_cast<int>(dof_index);
837 dof_index, orientation) = offset;
838 }
839 }
840}
841
842
843
844template <int dim, int spacedim>
845std::unique_ptr<FiniteElement<dim, spacedim>>
847{
848 return std::make_unique<FE_SimplexP<dim, spacedim>>(*this);
849}
850
851
852
853template <int dim, int spacedim>
854std::string
856{
857 std::ostringstream namebuf;
858 namebuf << "FE_SimplexP<" << Utilities::dim_string(dim, spacedim) << ">("
859 << this->degree << ")";
860
861 return namebuf.str();
862}
863
864
865
866template <int dim, int spacedim>
869 const FiniteElement<dim, spacedim> &fe_other,
870 const unsigned int codim) const
871{
872 Assert(codim <= dim, ExcImpossibleInDim(dim));
873
874 // vertex/line/face domination
875 // (if fe_other is derived from FE_SimplexDGP)
876 // ------------------------------------
877 if (codim > 0)
878 if (dynamic_cast<const FE_SimplexDGP<dim, spacedim> *>(&fe_other) !=
879 nullptr)
880 // there are no requirements between continuous and discontinuous
881 // elements
883
884 // vertex/line/face domination
885 // (if fe_other is not derived from FE_SimplexDGP)
886 // & cell domination
887 // ----------------------------------------
888 if (const FE_SimplexP<dim, spacedim> *fe_p_other =
889 dynamic_cast<const FE_SimplexP<dim, spacedim> *>(&fe_other))
890 {
891 if (this->degree < fe_p_other->degree)
893 else if (this->degree == fe_p_other->degree)
895 else
897 }
898 else if (const FE_Q<dim, spacedim> *fe_q_other =
899 dynamic_cast<const FE_Q<dim, spacedim> *>(&fe_other))
900 {
901 if (this->degree < fe_q_other->degree)
903 else if (this->degree == fe_q_other->degree)
905 else
907 }
908 else if (const FE_PyramidP<dim, spacedim> *fe_p_other =
909 dynamic_cast<const FE_PyramidP<dim, spacedim> *>(&fe_other))
910 {
911 if (this->degree < fe_p_other->degree)
913 else if (this->degree == fe_p_other->degree)
915 else
917 }
918 else if (const FE_WedgeP<dim, spacedim> *fe_p_other =
919 dynamic_cast<const FE_WedgeP<dim, spacedim> *>(&fe_other))
920 {
921 if (this->degree < fe_p_other->degree)
923 else if (this->degree == fe_p_other->degree)
925 else
927 }
928 else if (const FE_Nothing<dim, spacedim> *fe_nothing =
929 dynamic_cast<const FE_Nothing<dim, spacedim> *>(&fe_other))
930 {
931 if (fe_nothing->is_dominating())
933 else
934 // the FE_Nothing has no degrees of freedom and it is typically used
935 // in a context where we don't require any continuity along the
936 // interface
938 }
939
942}
943
944
945
946template <int dim, int spacedim>
947std::vector<std::pair<unsigned int, unsigned int>>
949 const FiniteElement<dim, spacedim> &fe_other) const
950{
951 if ((dynamic_cast<const FE_SimplexP<dim, spacedim> *>(&fe_other) !=
952 nullptr) ||
953 (dynamic_cast<const FE_Q<dim, spacedim> *>(&fe_other) != nullptr) ||
954 (dynamic_cast<const FE_PyramidP<dim, spacedim> *>(&fe_other) !=
955 nullptr) ||
956 (dynamic_cast<const FE_WedgeP<dim, spacedim> *>(&fe_other) != nullptr))
957 {
958 // there should be exactly one single DoF of each FE at a vertex, and
959 // they should have identical value
960 return {{0U, 0U}};
961 }
962 else if (dynamic_cast<const FE_Nothing<dim> *>(&fe_other) != nullptr)
963 {
964 // the FE_Nothing has no degrees of freedom, so there are no
965 // equivalencies to be recorded
966 return {};
967 }
968 else if (fe_other.n_unique_faces() == 1 && fe_other.n_dofs_per_face(0) == 0)
969 {
970 // if the other element has no DoFs on faces at all,
971 // then it would be impossible to enforce any kind of
972 // continuity even if we knew exactly what kind of element
973 // we have -- simply because the other element declares
974 // that it is discontinuous because it has no DoFs on
975 // its faces. in that case, just state that we have no
976 // constraints to declare
977 return {};
978 }
979 else
980 {
982 return {};
983 }
984}
985
986
987
988template <int dim, int spacedim>
989std::vector<std::pair<unsigned int, unsigned int>>
991 const FiniteElement<dim, spacedim> &fe_other) const
992{
993 if ((dynamic_cast<const FE_SimplexP<dim, spacedim> *>(&fe_other)) ||
994 (dynamic_cast<const FE_Q<dim, spacedim> *>(&fe_other)) ||
995 (dynamic_cast<const FE_PyramidP<dim, spacedim> *>(&fe_other)) ||
996 (dynamic_cast<const FE_WedgeP<dim, spacedim> *>(&fe_other)))
997 {
998 std::vector<std::pair<unsigned int, unsigned int>> identities;
999 // check if the support points are the same location on the line
1000 // to avoid rescaling for pyramids use the support points on the faces
1001 const auto &face_support_points = this->get_unit_face_support_points(0);
1002 const auto &face_support_points_other =
1003 fe_other.get_unit_face_support_points(0);
1004
1005 // now just compare the DoFs on the line going from [0,0] to [1,0]
1006 // for a triangular face that is the first line
1007 // for a quad face that is the third line
1008 // adjust the offsets accordingly
1009 // face number 0 of the tet is a triangle
1010 const unsigned int offset =
1011 this->reference_cell().face_reference_cell(0).n_vertices();
1012
1013 const unsigned int offset_other =
1014 fe_other.reference_cell().face_reference_cell(0).is_simplex() ?
1015 fe_other.reference_cell().face_reference_cell(0).n_vertices() :
1016 fe_other.reference_cell().face_reference_cell(0).n_vertices() +
1017 2 * fe_other.n_dofs_per_line();
1018
1019 // now get the identities
1020 for (unsigned int i = 0; i < this->degree - 1; ++i)
1021 for (unsigned int j = 0; j < fe_other.degree - 1; ++j)
1022 if (face_support_points[i + offset].distance(
1023 face_support_points_other[j + offset_other]) < 1e-14)
1024 identities.emplace_back(i, j);
1025
1026 return identities;
1027 }
1028 else if (dynamic_cast<const FE_Nothing<dim> *>(&fe_other) != nullptr)
1029 {
1030 // The FE_Nothing has no degrees of freedom, so there are no
1031 // equivalencies to be recorded. (If the FE_Nothing is dominating,
1032 // then this will also leads to constraints, but we are not concerned
1033 // with this here.)
1034 return {};
1035 }
1036 else if (fe_other.n_unique_faces() == 1 && fe_other.n_dofs_per_face(0) == 0)
1037 {
1038 // if the other element has no elements on faces at all,
1039 // then it would be impossible to enforce any kind of
1040 // continuity even if we knew exactly what kind of element
1041 // we have -- simply because the other element declares
1042 // that it is discontinuous because it has no DoFs on
1043 // its faces. in that case, just state that we have no
1044 // constraints to declare
1045 return {};
1046 }
1047 else
1048 {
1050 return {};
1051 }
1052}
1053
1054
1055
1056template <int dim, int spacedim>
1057std::vector<std::pair<unsigned int, unsigned int>>
1059 const FiniteElement<dim, spacedim> &fe_other,
1060 const unsigned int) const
1061{
1062 AssertDimension(dim, 3);
1063
1064 if ((dynamic_cast<const FE_SimplexP<dim> *>(&fe_other) != nullptr) ||
1065 (dynamic_cast<const FE_WedgeP<dim> *>(&fe_other) != nullptr) ||
1066 (dynamic_cast<const FE_PyramidP<dim> *>(&fe_other) != nullptr))
1067 {
1068 std::vector<std::pair<unsigned int, unsigned int>> result;
1069 const unsigned int face_no_neighbor =
1070 (dynamic_cast<const FE_PyramidP<dim> *>(&fe_other) != nullptr) ? 1 : 0;
1071
1072 // compare the face support points
1073 const auto &face_support_points = this->get_unit_face_support_points(0);
1074 const auto &face_support_points_other =
1075 fe_other.get_unit_face_support_points(face_no_neighbor);
1076
1077 // get the offsets to only compare the DoFs within the face as the
1078 // vertices and lines were done before
1079 const auto face_reference_cell =
1080 this->reference_cell().face_reference_cell(0);
1081
1082 Assert(face_reference_cell ==
1083 fe_other.reference_cell().face_reference_cell(face_no_neighbor),
1085
1086 const unsigned int offset =
1087 face_reference_cell.n_vertices() +
1088 face_reference_cell.n_lines() * this->n_dofs_per_line();
1089
1090 const unsigned int offset_other =
1091 face_reference_cell.n_vertices() +
1092 face_reference_cell.n_lines() * fe_other.n_dofs_per_line();
1093
1094 // do the comparison
1095 for (unsigned int i = 0; i < this->n_dofs_per_quad(0); ++i)
1096 for (unsigned int j = 0; j < fe_other.n_dofs_per_quad(face_no_neighbor);
1097 ++j)
1098 if (face_support_points[i + offset].distance(
1099 face_support_points_other[j + offset_other]) < 1e-14)
1100 result.emplace_back(i, j);
1101
1102 return result;
1103 }
1104 else if (dynamic_cast<const FE_Nothing<dim> *>(&fe_other) != nullptr)
1105 {
1106 // the FE_Nothing has no degrees of freedom, so there are no
1107 // equivalencies to be recorded
1108 return std::vector<std::pair<unsigned int, unsigned int>>();
1109 }
1110 else if (fe_other.n_unique_faces() == 1 && fe_other.n_dofs_per_face(0) == 0)
1111 {
1112 // if the other element has no elements on faces at all,
1113 // then it would be impossible to enforce any kind of
1114 // continuity even if we knew exactly what kind of element
1115 // we have -- simply because the other element declares
1116 // that it is discontinuous because it has no DoFs on
1117 // its faces. in that case, just state that we have no
1118 // constraints to declare
1119 return std::vector<std::pair<unsigned int, unsigned int>>();
1120 }
1121 else
1122 {
1124 return std::vector<std::pair<unsigned int, unsigned int>>();
1125 }
1126}
1127
1128
1129
1130template <int dim, int spacedim>
1132 : FE_SimplexPoly<dim, spacedim>(
1133 BarycentricPolynomials<dim>::get_fe_p_basis(degree),
1134 FiniteElementData<dim>(get_dpo_vector_fe_dgp(dim, degree),
1135 ReferenceCells::get_simplex<dim>(),
1136 1,
1137 degree,
1138 FiniteElementData<dim>::L2),
1139 true,
1140 unit_support_points_fe_p<dim>(degree),
1141 unit_face_support_points_fe_p<dim>(degree, FiniteElementData<dim>::L2),
1142 constraints_fe_p<dim>(degree))
1143{}
1144
1145
1146
1147template <int dim, int spacedim>
1148std::unique_ptr<FiniteElement<dim, spacedim>>
1150{
1151 return std::make_unique<FE_SimplexDGP<dim, spacedim>>(*this);
1152}
1153
1154
1155
1156template <int dim, int spacedim>
1157std::string
1159{
1160 std::ostringstream namebuf;
1161 namebuf << "FE_SimplexDGP<" << Utilities::dim_string(dim, spacedim) << ">("
1162 << this->degree << ")";
1163
1164 return namebuf.str();
1165}
1166
1167
1168template <int dim, int spacedim>
1171 const FiniteElement<dim, spacedim> &fe_other,
1172 const unsigned int codim) const
1173{
1174 Assert(codim <= dim, ExcImpossibleInDim(dim));
1175
1176 // vertex/line/face domination
1177 // ---------------------------
1178 if (codim > 0)
1179 // this is a discontinuous element, so by definition there will
1180 // be no constraints wherever this element comes together with
1181 // any other kind of element
1183
1184 // cell domination
1185 // ---------------
1186 if (const FE_SimplexDGP<dim, spacedim> *fe_dgp_other =
1187 dynamic_cast<const FE_SimplexDGP<dim, spacedim> *>(&fe_other))
1188 {
1189 if (this->degree < fe_dgp_other->degree)
1191 else if (this->degree == fe_dgp_other->degree)
1193 else
1195 }
1196 else if (const FE_DGQ<dim, spacedim> *fe_dgq_other =
1197 dynamic_cast<const FE_DGQ<dim, spacedim> *>(&fe_other))
1198 {
1199 if (this->degree < fe_dgq_other->degree)
1201 else if (this->degree == fe_dgq_other->degree)
1203 else
1205 }
1206 else if (const FE_Nothing<dim, spacedim> *fe_nothing =
1207 dynamic_cast<const FE_Nothing<dim, spacedim> *>(&fe_other))
1208 {
1209 if (fe_nothing->is_dominating())
1211 else
1212 // the FE_Nothing has no degrees of freedom and it is typically used
1213 // in a context where we don't require any continuity along the
1214 // interface
1216 }
1217
1220}
1221
1222
1223
1224template <int dim, int spacedim>
1225std::vector<std::pair<unsigned int, unsigned int>>
1227 const FiniteElement<dim, spacedim> &fe_other) const
1228{
1229 (void)fe_other;
1230
1231 return {};
1232}
1233
1234
1235
1236template <int dim, int spacedim>
1237std::vector<std::pair<unsigned int, unsigned int>>
1239 const FiniteElement<dim, spacedim> &fe_other) const
1240{
1241 (void)fe_other;
1242
1243 return {};
1244}
1245
1246
1247
1248template <int dim, int spacedim>
1249const FullMatrix<double> &
1251 const unsigned int child,
1252 const RefinementCase<dim> &refinement_case) const
1253{
1254 if (dim == 3)
1255 Assert(RefinementCase<dim>(refinement_case) ==
1257 static_cast<char>(IsotropicRefinementChoice::cut_tet_68)) ||
1258 RefinementCase<dim>(refinement_case) ==
1260 static_cast<char>(IsotropicRefinementChoice::cut_tet_57)) ||
1261 RefinementCase<dim>(refinement_case) ==
1263 static_cast<char>(IsotropicRefinementChoice::cut_tet_49)),
1265 else
1268 AssertDimension(dim, spacedim);
1269
1270 // initialization upon first request
1271 if (this->restriction[refinement_case - 1][child].n() == 0)
1272 {
1273 std::scoped_lock lock(this->restriction_matrix_mutex);
1274
1275 // if matrix got updated while waiting for the lock
1276 if (this->restriction[refinement_case - 1][child].n() ==
1277 this->n_dofs_per_cell())
1278 return this->restriction[refinement_case - 1][child];
1279
1280 // now do the work. need to get a non-const version of data in order to
1281 // be able to modify them inside a const function
1282 auto &this_nonconst = const_cast<FE_SimplexDGP<dim, spacedim> &>(*this);
1283
1284 if (dim == 2)
1285 {
1286 std::vector<std::vector<FullMatrix<double>>> isotropic_matrices(
1288 isotropic_matrices.back().resize(
1289 this->reference_cell().n_children(
1290 RefinementCase<dim>(refinement_case)),
1291 FullMatrix<double>(this->n_dofs_per_cell(),
1292 this->n_dofs_per_cell()));
1293
1294 FETools::compute_projection_matrices(*this, isotropic_matrices, true);
1295
1296 this_nonconst.restriction[refinement_case - 1] =
1297 std::move(isotropic_matrices.back());
1298 }
1299 else if (dim == 3)
1300 {
1301 std::vector<std::vector<FullMatrix<double>>> matrices(
1302 static_cast<unsigned int>(IsotropicRefinementChoice::cut_tet_49),
1303 std::vector<FullMatrix<double>>(
1304 this->reference_cell().n_children(
1305 RefinementCase<dim>(refinement_case)),
1306 FullMatrix<double>(this->n_dofs_per_cell(),
1307 this->n_dofs_per_cell())));
1308 FETools::compute_projection_matrices(*this, matrices, true);
1309 for (unsigned int refinement_direction = static_cast<unsigned int>(
1311 refinement_direction <=
1312 static_cast<unsigned int>(IsotropicRefinementChoice::cut_tet_49);
1313 refinement_direction++)
1314 this_nonconst.restriction[refinement_direction - 1] =
1315 std::move(matrices[refinement_direction - 1]);
1316 }
1317 else
1319 }
1320
1321 // finally return the matrix
1322 return this->restriction[refinement_case - 1][child];
1323}
1324
1325// explicit instantiations
1326#include "fe/fe_simplex_p.inst"
1327
***mech_lbc_system increment_interpolation_handlers push_back(scale_z_handler)
ArrayView< std::remove_reference_t< typename std::iterator_traits< Iterator >::reference >, MemorySpaceType > make_array_view(const Iterator begin, const Iterator end)
static BarycentricPolynomials< dim > get_fe_p_basis(const unsigned int degree)
Definition fe_q.h:552
FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim) const override
std::string get_name() const override
std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
FE_SimplexDGP(const unsigned int degree)
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
FE_SimplexP(const unsigned int degree)
std::vector< std::pair< unsigned int, unsigned int > > hp_line_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
FiniteElementDomination::Domination compare_for_domination(const FiniteElement< dim, spacedim > &fe_other, const unsigned int codim) const override
std::vector< std::pair< unsigned int, unsigned int > > hp_vertex_dof_identities(const FiniteElement< dim, spacedim > &fe_other) const override
std::string get_name() const override
std::unique_ptr< FiniteElement< dim, spacedim > > clone() const override
std::vector< std::pair< unsigned int, unsigned int > > hp_quad_dof_identities(const FiniteElement< dim, spacedim > &fe_other, const unsigned int face_no=0) const override
FE_SimplexPoly(const BarycentricPolynomials< dim > polynomials, const FiniteElementData< dim > &fe_data, const bool prolongation_is_additive, const std::vector< Point< dim > > &unit_support_points, const std::vector< std::vector< Point< dim - 1 > > > unit_face_support_points, const FullMatrix< double > &interface_constraints)
virtual std::pair< Table< 2, bool >, std::vector< unsigned int > > get_constant_modes() const override
void get_subface_interpolation_matrix(const FiniteElement< dim, spacedim > &x_source_fe, const unsigned int subface, FullMatrix< double > &interpolation_matrix, const unsigned int face_no) const override
virtual const FullMatrix< double > & get_restriction_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
virtual void convert_generalized_support_point_values_to_dof_values(const std::vector< Vector< double > > &support_point_values, std::vector< double > &nodal_values) const override
bool hp_constraints_are_implemented() const override
virtual const FullMatrix< double > & get_prolongation_matrix(const unsigned int child, const RefinementCase< dim > &refinement_case=RefinementCase< dim >::isotropic_refinement) const override
virtual unsigned int face_to_cell_index(const unsigned int face_dof_index, const unsigned int face, const types::geometric_orientation combined_orientation=numbers::default_geometric_orientation) const override
void get_face_interpolation_matrix(const FiniteElement< dim, spacedim > &source_fe, FullMatrix< double > &interpolation_matrix, const unsigned int face_no) const override
const unsigned int degree
Definition fe_data.h:450
unsigned int n_dofs_per_line() const
unsigned int n_dofs_per_face(unsigned int face_no=0, unsigned int child=0) const
unsigned int n_unique_faces() const
unsigned int n_dofs_per_quad(unsigned int face_no=0) const
ReferenceCell< dim > reference_cell() const
std::vector< std::vector< Point< dim - 1 > > > unit_face_support_points
Definition fe.h:2592
std::vector< Table< 2, int > > adjust_quad_dof_index_for_face_orientation_table
Definition fe.h:2621
const std::vector< Point< dim - 1 > > & get_unit_face_support_points(const unsigned int face_no=0) const
std::vector< int > adjust_line_dof_index_for_line_orientation_table
Definition fe.h:2634
std::vector< Point< dim > > unit_support_points
Definition fe.h:2585
FullMatrix< double > interface_constraints
Definition fe.h:2573
size_type n() const
size_type m() const
Definition point.h:111
static Quadrature< dim > project_to_face(const ReferenceCell< dim > &reference_cell, const SubQuadrature &quadrature, const unsigned int face_no, const types::geometric_orientation combined_orientation)
static Quadrature< dim > project_to_subface(const ReferenceCell< dim > &reference_cell, const SubQuadrature &quadrature, const unsigned int face_no, const unsigned int subface_no, const types::geometric_orientation combined_orientation, const RefinementCase< dim - 1 > &ref_case)
constexpr unsigned int n_vertices() const
constexpr unsigned int n_lines() const
cell_iterator begin(const unsigned int level=0) const
virtual void execute_coarsening_and_refinement()
active_cell_iterator begin_active(const unsigned int level=0) const
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
constexpr bool running_in_debug_mode()
Definition config.h:76
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
#define DEAL_II_ASSERT_UNREACHABLE()
#define DEAL_II_NOT_IMPLEMENTED()
unsigned int vertex_indices[2]
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
static ::ExceptionBase & ExcImpossibleInDim(int arg1)
#define AssertDimension(dim1, dim2)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
#define AssertThrow(cond, exc)
std::size_t size
Definition mpi.cc:733
unsigned int face_to_cell_index(const FiniteElement< dim, spacedim > &fe, const unsigned int face_dof_index, const unsigned int face_no, const types::geometric_orientation combined_orientation)
void compute_embedding_matrices(const FiniteElement< dim, spacedim > &fe, std::vector< std::vector< FullMatrix< number > > > &matrices, const bool isotropic_only=false, const double threshold=1.e-12)
void compute_projection_matrices(const FiniteElement< dim, spacedim > &fe, std::vector< std::vector< FullMatrix< number > > > &matrices, const bool isotropic_only=false)
void reference_cell(Triangulation< dim, spacedim > &tria, const ReferenceCell< dim > &reference_cell)
constexpr char U
SymmetricTensor< 2, dim, Number > b(const Tensor< 2, dim, Number > &F)
constexpr ReferenceCell< 1 > Line
constexpr ReferenceCell< 2 > Triangle
constexpr ReferenceCell< 3 > Tetrahedron
constexpr const ReferenceCell< dim > & get_simplex()
std::string dim_string(const int dim, const int spacedim)
Definition utilities.cc:547
constexpr types::geometric_orientation default_geometric_orientation
Definition types.h:342
STL namespace.
std::uint8_t geometric_orientation
Definition types.h:38