version GIT relicensing-7278-g091132d5eb 2026-12-02 03:10: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_poly_tensor.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) 2005 - 2025 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
23
27
29#include <deal.II/grid/tria.h>
31
33
34namespace internal
35{
36 namespace FE_PolyTensor
37 {
38 namespace
39 {
40 template <int spacedim>
41 void
42 get_dof_sign_change_h_div(
43 const typename ::Triangulation<1, spacedim>::cell_iterator &,
45 const std::vector<MappingKind> &,
46 std::vector<double> &)
47 {
48 // Nothing to do in 1d.
49 }
50
51
52
53 // In 2d, all lines of a valid mesh have the default orientation. Thus,
54 // the orientation carries no information about the directions of the
55 // normals and tables like the ones used in 3d (see, e.g.,
56 // FE_RaviartThomas<dim>::initialize_quad_dof_index_permutation_and_sign_change())
57 // cannot be used. Instead, the neighbor determines the sign: the
58 // reference normals of face f and the neighbor's face nn point in
59 // opposite directions if f + nn is even. Then, the cell with the smaller
60 // CellId changes the sign of its face dofs, such that both cells agree.
61 // TODO: Changing the sign of the dofs on faces 2 and 3 of every cell
62 // would give the same continuity without using the neighbor, but
63 // changes the signs of the global degrees of freedom.
64 template <int spacedim>
65 void
66 get_dof_sign_change_h_div(
67 const typename ::Triangulation<2, spacedim>::cell_iterator &cell,
69 const std::vector<MappingKind> &mapping_kind,
70 std::vector<double> &face_sign)
71 {
72 const unsigned int dim = 2;
73 // const unsigned int spacedim = 2;
74
75 const CellId this_cell_id = cell->id();
76
77 for (unsigned int f = 0; f < GeometryInfo<dim>::faces_per_cell; ++f)
78 {
79 typename ::Triangulation<dim, spacedim>::face_iterator face =
80 cell->face(f);
81 if (!face->at_boundary())
82 {
83 const unsigned int nn = cell->neighbor_face_no(f);
84 const typename ::Triangulation<dim,
85 spacedim>::cell_iterator
86 neighbor_cell_at_face = cell->neighbor(f);
87 const CellId neighbor_cell_id = neighbor_cell_at_face->id();
88
89 // Only fix sign if the orientation is opposite and only do so
90 // on the face dofs on the cell with smaller cell_id.
91 if (((nn + f) % 2 == 0) && this_cell_id < neighbor_cell_id)
92 for (unsigned int j = 0; j < fe.n_dofs_per_face(f); ++j)
93 {
94 const unsigned int cell_j = fe.face_to_cell_index(j, f);
95
96 Assert(f * fe.n_dofs_per_face(f) + j < face_sign.size(),
98 Assert(mapping_kind.size() == 1 ||
99 cell_j < mapping_kind.size(),
101
102 // TODO: This is probably only going to work for those
103 // elements for which all dofs are face dofs
104 if ((mapping_kind.size() > 1 ?
105 mapping_kind[cell_j] :
106 mapping_kind[0]) == mapping_raviart_thomas)
107 face_sign[f * fe.n_dofs_per_face(f) + j] = -1.0;
108 }
109 }
110 }
111 }
112
113
114
115 template <int spacedim>
116 void
117 get_dof_sign_change_h_div(
118 const typename ::Triangulation<3, spacedim>::cell_iterator
119 & /*cell*/,
120 const FiniteElement<3, spacedim> & /*fe*/,
121 const std::vector<MappingKind> & /*mapping_kind*/,
122 std::vector<double> & /*face_sign*/)
123 {
124 // Nothing to do. In 3d we take care of it through the
125 // adjust_quad_dof_sign_for_face_orientation_table
126 }
127
128 template <int spacedim>
129 void
130 get_dof_sign_change_nedelec(
131 const typename ::Triangulation<1, spacedim>::cell_iterator
132 & /*cell*/,
133 const FiniteElement<1, spacedim> & /*fe*/,
134 const std::vector<MappingKind> & /*mapping_kind*/,
135 std::vector<double> & /*line_dof_sign*/)
136 {
137 // nothing to do in 1d
138 }
139
140 template <int spacedim>
141 void
142 get_dof_sign_change_nedelec(
143 const typename ::Triangulation<2, spacedim>::cell_iterator &cell,
145 const std::vector<MappingKind> &mapping_kind,
146 std::vector<double> &line_dof_sign)
147 {
148 // The Nedelec finite elements in two spatial dimensions have two types
149 // of dofs: the line dofs and the quad dofs. The line dofs are
150 // associated with the edges. They are shared between the neighbouring
151 // cells and, consequently, need to be adjusted to compensate for a
152 // possible mismatch in the edge orientation. The quad dofs, they are
153 // associated with the interiors of the cells, are not shared between
154 // the cells in two spatial dimensions and need no adjustments.
155 //
156 // The Nedelec finite elements in two spatial dimensions have
157 // 2*(k+1)*(k+2) dofs per cell. All dofs are distributed between the
158 // line and quad dofs as the following:
159 //
160 // 4*(k+1) line dofs; (k+1) dofs per line.
161 // 2*k*(k+1) quad dofs.
162 //
163 // The dofs are indexed in the following order: first all line dofs,
164 // then all quad dofs.
165 //
166 // Here we adjust the line dofs. The sign of a line dof needs to be
167 // changed if the edge on which the dof resides points in the opposite
168 // direction.
169 const unsigned int k = fe.tensor_degree() - 1;
170
171 for (unsigned int l = 0; l < GeometryInfo<2>::lines_per_cell; ++l)
172 if (cell->line_orientation(l) !=
174 mapping_kind[0] == mapping_nedelec)
175 {
176 if (k == 0)
177 {
178 // The lowest order element (k=0) is straightforward, because
179 // there is a single dof per edge, which needs to be flipped:
180 line_dof_sign[l] = -1.0;
181 }
182 else
183 {
184 // The case k > 0 is a bit more complicated. As we adjust
185 // only edge dofs in this function, we need to concern
186 // ourselves with the first 4*(k+1) entries in line_dof_sign
187 // vector ignoring the rest. There are (k+1) dofs per edge.
188 // Let us consider the local dof indices on one edge,
189 // local_line_dof = 0...k. The shape functions with even
190 // indices are asymmetric. The corresponding dofs need sign
191 // adjustment if the edge points in the opposite direction.
192 // The shape functions with odd indices are symmetric. The
193 // corresponding dofs need no sign adjustment even if the edge
194 // points in the opposite direction. In the current context
195 // the notion of symmetry of a shape function means that a
196 // shape function looks exactly the same if it is looked upon
197 // from the centers of the two neighbouring cells that share
198 // it.
199 for (unsigned int local_line_dof = 0;
200 local_line_dof < (k + 1);
201 local_line_dof++)
202 if (local_line_dof % 2 == 0)
203 line_dof_sign[local_line_dof + l * (k + 1)] = -1.0;
204 }
205 }
206 }
207
208 template <int spacedim>
209 void
210 get_dof_sign_change_nedelec(
211 const typename ::Triangulation<3, spacedim>::cell_iterator &cell,
213 const std::vector<MappingKind> &mapping_kind,
214 std::vector<double> &line_dof_sign)
215 {
216 // This function does half of the job - it adjusts the sign of the
217 // line (edge) dofs. In the three-dimensional space the quad (face) dofs
218 // need to be adjusted as well. The quad dofs are treated by
219 // FE_Nedelec<dim>::initialize_quad_dof_index_permutation_and_sign_change()
220 // in fe_nedelec.cc. The dofs associated with the interior of the cells,
221 // the hex dofs, need no adjustments as they are not shared between the
222 // neighboring cells.
223
224 const unsigned int k = fe.tensor_degree() - 1;
225 // The order of the Nedelec elements equals the tensor degree minus one,
226 // k = n - 1. In the three-dimensional space the Nedelec elements of the
227 // lowermost order, k = 0, have only 12 line (edge) dofs. The Nedelec
228 // elements of the higher orders, k > 0, have 3*(k+1)*(k+2)^2 dofs in
229 // total if dim=3. The dofs in a cell are distributed between lines
230 // (edges), quads (faces), and the hex (the interior of the cell) as the
231 // following:
232 //
233 // 12*(k+1) line dofs; (k+1) dofs per line.
234 // 2*6*k*(k+1) quad dofs; 2*k*(k+1) dofs per quad.
235 // 3*(k+2)^2*(k+1) hex dofs.
236 //
237 // The dofs are indexed in the following order: first all line dofs,
238 // then all quad dofs, and then all hex dofs.
239 //
240 // Here we adjust only the line (edge) dofs. The line dofs need only
241 // sign adjustment. That is, no permutation of the line dofs is needed.
242 for (unsigned int l = 0; l < GeometryInfo<3>::lines_per_cell; ++l)
243 if (cell->line_orientation(l) !=
245 mapping_kind[0] == mapping_nedelec)
246 {
247 if (k == 0)
248 {
249 // The lowest order element (k=0) is straightforward, because
250 // there is a single dof per edge, which needs to be flipped:
251 line_dof_sign[l] = -1.0;
252 }
253 else
254 {
255 // The case k > 0 is a bit more complicated. As we adjust
256 // only edge dofs in this function, we need to concern
257 // ourselves with the first 12*(k+1) entries in line_dof_sign
258 // vector ignoring the rest. There are (k+1) dofs per edge.
259 // Let us consider the local dof indices on one edge,
260 // local_line_dof = 0...k. The shape functions with even
261 // indices are asymmetric. The corresponding dofs need sign
262 // adjustment if the edge points in the opposite direction.
263 // The shape functions with odd indices are symmetric. The
264 // corresponding dofs need no sign adjustment even if the edge
265 // points in the opposite direction. In the current context
266 // the notion of symmetry of a shape function means that a
267 // shape function looks exactly the same if it is looked upon
268 // from the centers of the two neighbouring cells that share
269 // it.
270 for (unsigned int local_line_dof = 0;
271 local_line_dof < (k + 1);
272 local_line_dof++)
273 if (local_line_dof % 2 == 0)
274 line_dof_sign[local_line_dof + l * (k + 1)] = -1.0;
275 }
276 }
277 }
278 } // namespace
279 } // namespace FE_PolyTensor
280} // namespace internal
281
282#ifndef DOXYGEN
283
284template <int dim, int spacedim>
286 const TensorPolynomialsBase<dim> &polynomials,
287 const FiniteElementData<dim> &fe_data,
288 const std::vector<bool> &restriction_is_additive_flags,
289 const std::vector<ComponentMask> &nonzero_components)
290 : FiniteElement<dim, spacedim>(fe_data,
291 restriction_is_additive_flags,
292 nonzero_components)
293 , mapping_kind({MappingKind::mapping_none})
294 , poly_space(polynomials.clone())
295{
296 cached_point[0] = -1;
297 // Set up the table converting
298 // components to base
299 // components. Since we have only
300 // one base element, everything
301 // remains zero except the
302 // component in the base, which is
303 // the component itself
304 for (unsigned int comp = 0; comp < this->n_components(); ++comp)
305 this->component_to_base_table[comp].first.second = comp;
306
307 if (dim == 3)
308 {
309 adjust_quad_dof_sign_for_face_orientation_table.resize(
310 this->n_unique_2d_subobjects());
311
312 for (unsigned int f = 0; f < this->n_unique_2d_subobjects(); ++f)
313 {
314 adjust_quad_dof_sign_for_face_orientation_table[f] =
315 Table<2, bool>(this->n_dofs_per_quad(f),
316 this->reference_cell().n_face_orientations(f));
317 adjust_quad_dof_sign_for_face_orientation_table[f].fill(false);
318 }
319 }
320}
321
322
323
324template <int dim, int spacedim>
326 : FiniteElement<dim, spacedim>(fe)
327 , mapping_kind(fe.mapping_kind)
328 , adjust_quad_dof_sign_for_face_orientation_table(
329 fe.adjust_quad_dof_sign_for_face_orientation_table)
330 , poly_space(fe.poly_space->clone())
331 , inverse_node_matrix(fe.inverse_node_matrix)
332{}
333
334
335
336template <int dim, int spacedim>
337bool
339{
340 return mapping_kind.size() == 1;
341}
342
343
344template <int dim, int spacedim>
345bool
347 const unsigned int index,
348 const unsigned int face,
349 const types::geometric_orientation combined_orientation) const
350{
351 // do nothing in 1d and 2d
352 if (dim < 3)
353 return false;
354
355 // The exception are discontinuous
356 // elements for which there should be no
357 // face dofs anyway (i.e. dofs_per_quad==0
358 // in 3d), so we don't need the table, but
359 // the function should also not have been
360 // called
361 AssertIndexRange(index, this->n_dofs_per_quad(face));
362 Assert(adjust_quad_dof_sign_for_face_orientation_table
363 [this->n_unique_2d_subobjects() == 1 ? 0 : face]
364 .n_elements() ==
365 this->reference_cell().n_face_orientations(face) *
366 this->n_dofs_per_quad(face),
368
369 return adjust_quad_dof_sign_for_face_orientation_table
370 [this->n_unique_2d_subobjects() == 1 ? 0 : face](index,
371 combined_orientation);
372}
373
374
375template <int dim, int spacedim>
377FE_PolyTensor<dim, spacedim>::get_mapping_kind(const unsigned int i) const
378{
379 if (single_mapping_kind())
380 return mapping_kind[0];
381
382 AssertIndexRange(i, mapping_kind.size());
383 return mapping_kind[i];
384}
385
386
387
388template <int dim, int spacedim>
389double
391 const Point<dim> &) const
392
393{
395 return 0.;
396}
397
398
399
400template <int dim, int spacedim>
401double
403 const unsigned int i,
404 const Point<dim> &p,
405 const unsigned int component) const
406{
407 AssertIndexRange(i, this->n_dofs_per_cell());
408 AssertIndexRange(component, dim);
409
410 std::scoped_lock lock(cache_mutex);
411
412 if (cached_point != p || cached_values.empty())
413 {
414 cached_point = p;
415 cached_values.resize(poly_space->n());
416
417 std::vector<Tensor<4, dim>> dummy1;
418 std::vector<Tensor<5, dim>> dummy2;
419 poly_space->evaluate(
420 p, cached_values, cached_grads, cached_grad_grads, dummy1, dummy2);
421 }
422
423 double s = 0;
424 if (inverse_node_matrix.n_cols() == 0)
425 return cached_values[i][component];
426 else
427 for (unsigned int j = 0; j < inverse_node_matrix.n_cols(); ++j)
428 s += inverse_node_matrix(j, i) * cached_values[j][component];
429 return s;
430}
431
432
433
434template <int dim, int spacedim>
437 const Point<dim> &) const
438{
440 return Tensor<1, dim>();
441}
442
443
444
445template <int dim, int spacedim>
448 const unsigned int i,
449 const Point<dim> &p,
450 const unsigned int component) const
451{
452 AssertIndexRange(i, this->n_dofs_per_cell());
453 AssertIndexRange(component, dim);
454
455 std::scoped_lock lock(cache_mutex);
456
457 if (cached_point != p || cached_grads.empty())
458 {
459 cached_point = p;
460 cached_grads.resize(poly_space->n());
461
462 std::vector<Tensor<4, dim>> dummy1;
463 std::vector<Tensor<5, dim>> dummy2;
464 poly_space->evaluate(
465 p, cached_values, cached_grads, cached_grad_grads, dummy1, dummy2);
466 }
467
469 if (inverse_node_matrix.n_cols() == 0)
470 return cached_grads[i][component];
471 else
472 for (unsigned int j = 0; j < inverse_node_matrix.n_cols(); ++j)
473 s += inverse_node_matrix(j, i) * cached_grads[j][component];
474
475 return s;
476}
477
478
479
480template <int dim, int spacedim>
483 const Point<dim> &) const
484{
486 return Tensor<2, dim>();
487}
488
489
490
491template <int dim, int spacedim>
494 const unsigned int i,
495 const Point<dim> &p,
496 const unsigned int component) const
497{
498 AssertIndexRange(i, this->n_dofs_per_cell());
499 AssertIndexRange(component, dim);
500
501 std::scoped_lock lock(cache_mutex);
502
503 if (cached_point != p || cached_grad_grads.empty())
504 {
505 cached_point = p;
506 cached_grad_grads.resize(poly_space->n());
507
508 std::vector<Tensor<4, dim>> dummy1;
509 std::vector<Tensor<5, dim>> dummy2;
510 poly_space->evaluate(
511 p, cached_values, cached_grads, cached_grad_grads, dummy1, dummy2);
512 }
513
515 if (inverse_node_matrix.n_cols() == 0)
516 return cached_grad_grads[i][component];
517 else
518 for (unsigned int j = 0; j < inverse_node_matrix.n_cols(); ++j)
519 s += inverse_node_matrix(i, j) * cached_grad_grads[j][component];
520
521 return s;
522}
523
524
525//---------------------------------------------------------------------------
526// Fill data of FEValues
527//---------------------------------------------------------------------------
528
529template <int dim, int spacedim>
530void
533 const CellSimilarity::Similarity /*cell_similarity*/,
534 const Quadrature<dim> &quadrature,
535 const Mapping<dim, spacedim> &mapping,
536 const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
538 &mapping_data,
539 const typename FiniteElement<dim, spacedim>::InternalDataBase &fe_internal,
541 spacedim>
542 &output_data) const
543{
544 Assert(dynamic_cast<const InternalData *>(&fe_internal) != nullptr,
546
547 compute_fill(cell,
549 quadrature.size(),
550 mapping,
551 mapping_internal,
552 mapping_data,
553 static_cast<const InternalData &>(fe_internal),
554 output_data);
555}
556
557
558
559template <int dim, int spacedim>
560void
563 const unsigned int face_no,
564 const hp::QCollection<dim - 1> &quadrature,
565 const Mapping<dim, spacedim> &mapping,
566 const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
568 &mapping_data,
569 const typename FiniteElement<dim, spacedim>::InternalDataBase &fe_internal,
571 spacedim>
572 &output_data) const
573{
574 AssertDimension(quadrature.size(), 1);
575 Assert(dynamic_cast<const InternalData *>(&fe_internal) != nullptr,
577
578 compute_fill(cell,
580 this->reference_cell(),
581 face_no,
582 // TODO: fix the custom implementation of orientation
584 cell->combined_face_orientation(face_no),
585 quadrature[0].size()),
586 quadrature[0].size(),
587 mapping,
588 mapping_internal,
589 mapping_data,
590 static_cast<const InternalData &>(fe_internal),
591 output_data);
592}
593
594
595
596template <int dim, int spacedim>
597void
600 const unsigned int face_no,
601 const unsigned int sub_no,
602 const Quadrature<dim - 1> &quadrature,
603 const Mapping<dim, spacedim> &mapping,
604 const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
606 &mapping_data,
607 const typename FiniteElement<dim, spacedim>::InternalDataBase &fe_internal,
609 spacedim>
610 &output_data) const
611{
612 Assert(dynamic_cast<const InternalData *>(&fe_internal) != nullptr,
614
615 compute_fill(cell,
617 this->reference_cell(),
618 face_no,
619 sub_no,
620 // TODO: fix the custom implementation of orientation
622 cell->combined_face_orientation(face_no),
623 quadrature.size(),
624 cell->subface_case(face_no)),
625 quadrature.size(),
626 mapping,
627 mapping_internal,
628 mapping_data,
629 static_cast<const InternalData &>(fe_internal),
630 output_data);
631}
632
633
634
635template <int dim, int spacedim>
636void
639 std::vector<double> &dof_signs) const
640{
641 dof_signs.assign(this->n_dofs_per_cell(), 1.0);
642
643 // FE_Nedelec: the dofs on lines with non-standard orientation change their
644 // sign. No permutation is needed since each shape function on a line is
645 // either symmetric or antisymmetric with respect to the midpoint of the
646 // line. In 3d, the dofs on faces are treated below.
647 internal::FE_PolyTensor::get_dof_sign_change_nedelec(cell,
648 *this,
649 this->mapping_kind,
650 dof_signs);
651
652 // H(div) conforming elements in 2d: on faces where the reference normals of
653 // the two adjacent cells point in opposite directions, the cell with the
654 // smaller CellId changes the sign of its face dofs. Nothing to do in 1d; in
655 // 3d, the dofs on faces are treated below.
656 internal::FE_PolyTensor::get_dof_sign_change_h_div(cell,
657 *this,
658 this->mapping_kind,
659 dof_signs);
660
661 // In 3d, the dofs on faces (quads) change their sign according to the
662 // table adjust_quad_dof_sign_for_face_orientation_table. This assumes that
663 // the dofs are ordered by first vertices, lines, quads and volume dofs.
664 if (dim == 3)
665 {
666 const unsigned int first_quad_index = this->get_first_quad_index();
667 const unsigned int n_dofs_per_quad = this->n_dofs_per_quad();
668 const unsigned int n_quad_dofs =
669 n_dofs_per_quad * GeometryInfo<dim>::faces_per_cell;
670 for (unsigned int dof_index = first_quad_index;
671 dof_index < first_quad_index + n_quad_dofs;
672 ++dof_index)
673 {
674 const unsigned int face_index_from_dof_index =
675 (dof_index - first_quad_index) / n_dofs_per_quad;
676 const unsigned int local_quad_dof_index = dof_index % n_dofs_per_quad;
677 if (adjust_quad_dof_sign_for_face_orientation(
678 local_quad_dof_index,
679 face_index_from_dof_index,
680 cell->combined_face_orientation(face_index_from_dof_index)))
681 dof_signs[dof_index] = -1.0;
682 }
683 }
684}
685
686
687
688template <int dim, int spacedim>
689void
692 const typename QProjector<dim>::DataSetDescriptor &offset,
693 const unsigned int n_q_points,
694 const Mapping<dim, spacedim> &mapping,
695 const typename Mapping<dim, spacedim>::InternalDataBase &mapping_internal,
697 &mapping_data,
698 const typename FE_PolyTensor<dim, spacedim>::InternalData &fe_data,
700 &output_data) const
701{
702 Assert(!(fe_data.update_each & update_values) ||
703 fe_data.shape_values.size()[0] == this->n_dofs_per_cell(),
704 ExcDimensionMismatch(fe_data.shape_values.size()[0],
705 this->n_dofs_per_cell()));
706
707 // the sign changes of the shape functions; fe_data.dof_sign_change is
708 // allocated if values (and therefore also if gradients or hessians) are
709 // requested
710 if (fe_data.update_each & update_values)
711 get_dof_sign_changes(cell, fe_data.dof_sign_change);
712
713 for (unsigned int dof_index = 0; dof_index < this->n_dofs_per_cell();
714 ++dof_index)
715 {
716 const double dof_sign = (fe_data.update_each & update_values) ?
717 fe_data.dof_sign_change[dof_index] :
718 1.0;
719
720 const MappingKind mapping_kind = get_mapping_kind(dof_index);
721
722 const unsigned int first =
724 [dof_index * this->n_components() +
725 this->get_nonzero_components(dof_index).first_selected_component()];
726
727 if (fe_data.update_each & update_values)
728 {
729 switch (mapping_kind)
730 {
731 case mapping_none:
732 {
733 for (unsigned int k = 0; k < n_q_points; ++k)
734 for (unsigned int d = 0; d < dim; ++d)
735 output_data.shape_values(first + d, k) =
736 fe_data.shape_values[dof_index][k + offset][d];
737 break;
738 }
739
742 {
744 transformed_shape_values =
746 offset,
747 n_q_points);
748 mapping.transform(make_array_view(fe_data.shape_values,
749 dof_index,
750 offset,
751 n_q_points),
752 mapping_kind,
753 mapping_internal,
754 transformed_shape_values);
755
756 for (unsigned int k = 0; k < n_q_points; ++k)
757 for (unsigned int d = 0; d < spacedim; ++d)
758 output_data.shape_values(first + d, k) =
759 transformed_shape_values[k][d];
760
761 break;
762 }
764 case mapping_piola:
765 {
767 transformed_shape_values =
769 offset,
770 n_q_points);
771 mapping.transform(make_array_view(fe_data.shape_values,
772 dof_index,
773 offset,
774 n_q_points),
776 mapping_internal,
777 transformed_shape_values);
778 for (unsigned int k = 0; k < n_q_points; ++k)
779 for (unsigned int d = 0; d < spacedim; ++d)
780 output_data.shape_values(first + d, k) =
781 dof_sign * transformed_shape_values[k][d];
782 break;
783 }
784
785 case mapping_nedelec:
786 {
788 transformed_shape_values =
790 offset,
791 n_q_points);
792 mapping.transform(make_array_view(fe_data.shape_values,
793 dof_index,
794 offset,
795 n_q_points),
797 mapping_internal,
798 transformed_shape_values);
799
800 for (unsigned int k = 0; k < n_q_points; ++k)
801 for (unsigned int d = 0; d < spacedim; ++d)
802 output_data.shape_values(first + d, k) =
803 dof_sign * transformed_shape_values[k][d];
804
805 break;
806 }
807
808 default:
810 }
811 }
812
813 if (fe_data.update_each & update_gradients)
814 {
815 const ArrayView<Tensor<2, spacedim>> transformed_shape_grads =
817 offset,
818 n_q_points);
819 switch (mapping_kind)
820 {
821 case mapping_none:
822 {
823 mapping.transform(make_array_view(fe_data.shape_grads,
824 dof_index,
825 offset,
826 n_q_points),
828 mapping_internal,
829 transformed_shape_grads);
830 for (unsigned int k = 0; k < n_q_points; ++k)
831 for (unsigned int d = 0; d < spacedim; ++d)
832 output_data.shape_gradients[first + d][k] =
833 transformed_shape_grads[k][d];
834 break;
835 }
836
838 {
839 mapping.transform(make_array_view(fe_data.shape_grads,
840 dof_index,
841 offset,
842 n_q_points),
844 mapping_internal,
845 transformed_shape_grads);
846
847 for (unsigned int k = 0; k < n_q_points; ++k)
848 for (unsigned int d = 0; d < spacedim; ++d)
849 for (unsigned int n = 0; n < spacedim; ++n)
850 transformed_shape_grads[k][d] -=
851 output_data.shape_values(first + n, k) *
852 mapping_data.jacobian_pushed_forward_grads[k][n][d];
853
854 for (unsigned int k = 0; k < n_q_points; ++k)
855 for (unsigned int d = 0; d < spacedim; ++d)
856 output_data.shape_gradients[first + d][k] =
857 transformed_shape_grads[k][d];
858 break;
859 }
860
862 {
863 for (unsigned int k = 0; k < n_q_points; ++k)
864 if constexpr (dim == spacedim)
865 fe_data.untransformed_shape_grads[k + offset] =
866 fe_data.shape_grads[dof_index][k + offset];
867 else
868 for (unsigned int d = 0; d < dim; ++d)
869 fe_data.untransformed_shape_grads[k + offset][d] =
870 fe_data.shape_grads[dof_index][k + offset][d];
871 mapping.transform(
873 offset,
874 n_q_points),
876 mapping_internal,
877 transformed_shape_grads);
878
879 for (unsigned int k = 0; k < n_q_points; ++k)
880 for (unsigned int d = 0; d < spacedim; ++d)
881 for (unsigned int n = 0; n < spacedim; ++n)
882 transformed_shape_grads[k][d] +=
883 output_data.shape_values(first + n, k) *
884 mapping_data.jacobian_pushed_forward_grads[k][d][n];
885
886 for (unsigned int k = 0; k < n_q_points; ++k)
887 for (unsigned int d = 0; d < spacedim; ++d)
888 output_data.shape_gradients[first + d][k] =
889 transformed_shape_grads[k][d];
890
891 break;
892 }
893
895 case mapping_piola:
896 {
897 for (unsigned int k = 0; k < n_q_points; ++k)
898 if constexpr (dim == spacedim)
899 fe_data.untransformed_shape_grads[k + offset] =
900 fe_data.shape_grads[dof_index][k + offset];
901 else
902 for (unsigned int d = 0; d < dim; ++d)
903 fe_data.untransformed_shape_grads[k + offset][d] =
904 fe_data.shape_grads[dof_index][k + offset][d];
905 mapping.transform(
907 offset,
908 n_q_points),
910 mapping_internal,
911 transformed_shape_grads);
912
913 // The terms below with the derivative of the Jacobian use
914 // the shape values in output_data, which already contain
915 // dof_sign, so only the transformed gradient gets dof_sign.
916 for (unsigned int k = 0; k < n_q_points; ++k)
917 transformed_shape_grads[k] *= dof_sign;
918
919 for (unsigned int k = 0; k < n_q_points; ++k)
920 for (unsigned int d = 0; d < spacedim; ++d)
921 for (unsigned int n = 0; n < spacedim; ++n)
922 transformed_shape_grads[k][d] +=
923 (output_data.shape_values(first + n, k) *
924 mapping_data
926 (output_data.shape_values(first + d, k) *
927 mapping_data.jacobian_pushed_forward_grads[k][n][n]);
928
929 for (unsigned int k = 0; k < n_q_points; ++k)
930 for (unsigned int d = 0; d < spacedim; ++d)
931 output_data.shape_gradients[first + d][k] =
932 transformed_shape_grads[k][d];
933
934 break;
935 }
936
937 case mapping_nedelec:
938 {
939 // treat the gradients of
940 // this particular shape
941 // function at all
942 // q-points. if Dv is the
943 // gradient of the shape
944 // function on the unit
945 // cell, then
946 // (J^-T)Dv(J^-1) is the
947 // value we want to have on
948 // the real cell.
949 for (unsigned int k = 0; k < n_q_points; ++k)
950 if constexpr (dim == spacedim)
951 fe_data.untransformed_shape_grads[k + offset] =
952 fe_data.shape_grads[dof_index][k + offset];
953 else
954 for (unsigned int d = 0; d < dim; ++d)
955 fe_data.untransformed_shape_grads[k + offset][d] =
956 fe_data.shape_grads[dof_index][k + offset][d];
957
958 mapping.transform(
960 offset,
961 n_q_points),
963 mapping_internal,
964 transformed_shape_grads);
965
966 // The terms below with the derivative of the Jacobian use
967 // the shape values in output_data, which already contain
968 // dof_sign, so only the transformed gradient gets dof_sign.
969 for (unsigned int k = 0; k < n_q_points; ++k)
970 transformed_shape_grads[k] *= dof_sign;
971
972 for (unsigned int k = 0; k < n_q_points; ++k)
973 for (unsigned int d = 0; d < spacedim; ++d)
974 for (unsigned int n = 0; n < spacedim; ++n)
975 transformed_shape_grads[k][d] -=
976 output_data.shape_values(first + n, k) *
977 mapping_data.jacobian_pushed_forward_grads[k][n][d];
978
979 for (unsigned int k = 0; k < n_q_points; ++k)
980 for (unsigned int d = 0; d < spacedim; ++d)
981 output_data.shape_gradients[first + d][k] =
982 transformed_shape_grads[k][d];
983
984 break;
985 }
986
987 default:
989 }
990 }
991
992 if (fe_data.update_each & update_hessians)
993 {
994 switch (mapping_kind)
995 {
996 case mapping_none:
997 {
999 transformed_shape_hessians =
1001 offset,
1002 n_q_points);
1004 dof_index,
1005 offset,
1006 n_q_points),
1008 mapping_internal,
1009 transformed_shape_hessians);
1010
1011 for (unsigned int k = 0; k < n_q_points; ++k)
1012 for (unsigned int d = 0; d < spacedim; ++d)
1013 for (unsigned int n = 0; n < spacedim; ++n)
1014 transformed_shape_hessians[k][d] -=
1015 output_data.shape_gradients[first + d][k][n] *
1016 mapping_data.jacobian_pushed_forward_grads[k][n];
1017
1018 for (unsigned int k = 0; k < n_q_points; ++k)
1019 for (unsigned int d = 0; d < spacedim; ++d)
1020 output_data.shape_hessians[first + d][k] =
1021 transformed_shape_hessians[k][d];
1022
1023 break;
1024 }
1025 case mapping_covariant:
1026 {
1027 for (unsigned int k = 0; k < n_q_points; ++k)
1028 if constexpr (dim == spacedim)
1029 fe_data.untransformed_shape_hessian_tensors[k + offset] =
1030 fe_data.shape_grad_grads[dof_index][k + offset];
1031 else
1032 for (unsigned int d = 0; d < dim; ++d)
1033 for (unsigned int e = 0; e < dim; ++e)
1034 fe_data
1035 .untransformed_shape_hessian_tensors[k + offset][d]
1036 [e] =
1037 fe_data
1038 .shape_grad_grads[dof_index][k + offset][d][e];
1039
1041 transformed_shape_hessians =
1043 offset,
1044 n_q_points);
1045 mapping.transform(
1047 offset,
1048 n_q_points),
1050 mapping_internal,
1051 transformed_shape_hessians);
1052
1053 for (unsigned int k = 0; k < n_q_points; ++k)
1054 for (unsigned int d = 0; d < spacedim; ++d)
1055 for (unsigned int n = 0; n < spacedim; ++n)
1056 for (unsigned int i = 0; i < spacedim; ++i)
1057 for (unsigned int j = 0; j < spacedim; ++j)
1058 {
1059 transformed_shape_hessians[k][d][i][j] -=
1060 (output_data.shape_values(first + n, k) *
1061 mapping_data
1063 [k][n][d][i][j]) +
1064 (output_data.shape_gradients[first + d][k][n] *
1065 mapping_data
1066 .jacobian_pushed_forward_grads[k][n][i][j]) +
1067 (output_data.shape_gradients[first + n][k][i] *
1068 mapping_data
1069 .jacobian_pushed_forward_grads[k][n][d][j]) +
1070 (output_data.shape_gradients[first + n][k][j] *
1071 mapping_data
1072 .jacobian_pushed_forward_grads[k][n][i][d]);
1073 }
1074
1075 for (unsigned int k = 0; k < n_q_points; ++k)
1076 for (unsigned int d = 0; d < spacedim; ++d)
1077 output_data.shape_hessians[first + d][k] =
1078 transformed_shape_hessians[k][d];
1079
1080 break;
1081 }
1082
1084 {
1085 for (unsigned int k = 0; k < n_q_points; ++k)
1086 if constexpr (dim == spacedim)
1087 fe_data.untransformed_shape_hessian_tensors[k + offset] =
1088 fe_data.shape_grad_grads[dof_index][k + offset];
1089 else
1090 for (unsigned int d = 0; d < dim; ++d)
1091 for (unsigned int e = 0; e < dim; ++e)
1092 fe_data
1093 .untransformed_shape_hessian_tensors[k + offset][d]
1094 [e] =
1095 fe_data
1096 .shape_grad_grads[dof_index][k + offset][d][e];
1097
1099 transformed_shape_hessians =
1101 offset,
1102 n_q_points);
1103 mapping.transform(
1105 offset,
1106 n_q_points),
1108 mapping_internal,
1109 transformed_shape_hessians);
1110
1111 for (unsigned int k = 0; k < n_q_points; ++k)
1112 for (unsigned int d = 0; d < spacedim; ++d)
1113 for (unsigned int n = 0; n < spacedim; ++n)
1114 for (unsigned int i = 0; i < spacedim; ++i)
1115 for (unsigned int j = 0; j < spacedim; ++j)
1116 {
1117 transformed_shape_hessians[k][d][i][j] +=
1118 (output_data.shape_values(first + n, k) *
1119 mapping_data
1121 [k][d][n][i][j]) +
1122 (output_data.shape_gradients[first + n][k][i] *
1123 mapping_data
1124 .jacobian_pushed_forward_grads[k][d][n][j]) +
1125 (output_data.shape_gradients[first + n][k][j] *
1126 mapping_data
1127 .jacobian_pushed_forward_grads[k][d][i][n]) -
1128 (output_data.shape_gradients[first + d][k][n] *
1129 mapping_data
1130 .jacobian_pushed_forward_grads[k][n][i][j]);
1131 for (unsigned int m = 0; m < spacedim; ++m)
1132 transformed_shape_hessians[k][d][i][j] -=
1133 (mapping_data
1134 .jacobian_pushed_forward_grads[k][d][i]
1135 [m] *
1136 mapping_data
1137 .jacobian_pushed_forward_grads[k][m][n]
1138 [j] *
1139 output_data.shape_values(first + n, k)) +
1140 (mapping_data
1141 .jacobian_pushed_forward_grads[k][d][m]
1142 [j] *
1143 mapping_data
1144 .jacobian_pushed_forward_grads[k][m][i]
1145 [n] *
1146 output_data.shape_values(first + n, k));
1147 }
1148
1149 for (unsigned int k = 0; k < n_q_points; ++k)
1150 for (unsigned int d = 0; d < spacedim; ++d)
1151 output_data.shape_hessians[first + d][k] =
1152 transformed_shape_hessians[k][d];
1153
1154 break;
1155 }
1156
1158 case mapping_piola:
1159 {
1160 for (unsigned int k = 0; k < n_q_points; ++k)
1161 if constexpr (dim == spacedim)
1162 fe_data.untransformed_shape_hessian_tensors[k + offset] =
1163 fe_data.shape_grad_grads[dof_index][k + offset];
1164 else
1165 for (unsigned int d = 0; d < dim; ++d)
1166 for (unsigned int e = 0; e < dim; ++e)
1167 fe_data
1168 .untransformed_shape_hessian_tensors[k + offset][d]
1169 [e] =
1170 fe_data
1171 .shape_grad_grads[dof_index][k + offset][d][e];
1172
1174 transformed_shape_hessians =
1176 offset,
1177 n_q_points);
1178 mapping.transform(
1180 offset,
1181 n_q_points),
1183 mapping_internal,
1184 transformed_shape_hessians);
1185
1186 // The terms below with the derivatives of the Jacobian use
1187 // the shape values and gradients in output_data, which
1188 // already contain dof_sign, so only the transformed Hessian
1189 // gets dof_sign.
1190 for (unsigned int k = 0; k < n_q_points; ++k)
1191 transformed_shape_hessians[k] *= dof_sign;
1192
1193 for (unsigned int k = 0; k < n_q_points; ++k)
1194 for (unsigned int d = 0; d < spacedim; ++d)
1195 for (unsigned int n = 0; n < spacedim; ++n)
1196 for (unsigned int i = 0; i < spacedim; ++i)
1197 for (unsigned int j = 0; j < spacedim; ++j)
1198 {
1199 transformed_shape_hessians[k][d][i][j] +=
1200 (output_data.shape_values(first + n, k) *
1201 mapping_data
1203 [k][d][n][i][j]) +
1204 (output_data.shape_gradients[first + n][k][i] *
1205 mapping_data
1206 .jacobian_pushed_forward_grads[k][d][n][j]) +
1207 (output_data.shape_gradients[first + n][k][j] *
1208 mapping_data
1209 .jacobian_pushed_forward_grads[k][d][i][n]) -
1210 (output_data.shape_gradients[first + d][k][n] *
1211 mapping_data
1212 .jacobian_pushed_forward_grads[k][n][i][j]);
1213
1214 transformed_shape_hessians[k][d][i][j] -=
1215 (output_data.shape_values(first + d, k) *
1216 mapping_data
1218 [k][n][n][i][j]) +
1219 (output_data.shape_gradients[first + d][k][i] *
1220 mapping_data
1221 .jacobian_pushed_forward_grads[k][n][n][j]) +
1222 (output_data.shape_gradients[first + d][k][j] *
1223 mapping_data
1224 .jacobian_pushed_forward_grads[k][n][n][i]);
1225
1226 for (unsigned int m = 0; m < spacedim; ++m)
1227 {
1228 transformed_shape_hessians[k][d][i][j] -=
1229 (mapping_data
1231 [m] *
1232 mapping_data
1234 [j] *
1235 output_data.shape_values(first + n, k)) +
1236 (mapping_data
1237 .jacobian_pushed_forward_grads[k][d][m]
1238 [j] *
1239 mapping_data
1240 .jacobian_pushed_forward_grads[k][m][i]
1241 [n] *
1242 output_data.shape_values(first + n, k));
1243
1244 // terms from the derivatives of the
1245 // Jacobian determinant
1246 transformed_shape_hessians[k][d][i][j] +=
1247 (mapping_data
1249 [m] *
1250 mapping_data
1252 [j] *
1253 output_data.shape_values(first + d, k)) +
1254 (mapping_data
1255 .jacobian_pushed_forward_grads[k][n][n]
1256 [j] *
1257 mapping_data
1258 .jacobian_pushed_forward_grads[k][d][m]
1259 [i] *
1260 output_data.shape_values(first + m, k)) +
1261 (mapping_data
1262 .jacobian_pushed_forward_grads[k][n][n]
1263 [i] *
1264 mapping_data
1265 .jacobian_pushed_forward_grads[k][d][m]
1266 [j] *
1267 output_data.shape_values(first + m, k)) -
1268 (mapping_data
1269 .jacobian_pushed_forward_grads[k][n][n]
1270 [j] *
1271 mapping_data
1272 .jacobian_pushed_forward_grads[k][m][m]
1273 [i] *
1274 output_data.shape_values(first + d, k));
1275 }
1276 }
1277
1278 for (unsigned int k = 0; k < n_q_points; ++k)
1279 for (unsigned int d = 0; d < spacedim; ++d)
1280 output_data.shape_hessians[first + d][k] =
1281 transformed_shape_hessians[k][d];
1282
1283 break;
1284 }
1285
1286 case mapping_nedelec:
1287 {
1288 for (unsigned int k = 0; k < n_q_points; ++k)
1289 if constexpr (dim == spacedim)
1290 fe_data.untransformed_shape_hessian_tensors[k + offset] =
1291 fe_data.shape_grad_grads[dof_index][k + offset];
1292 else
1293 for (unsigned int d = 0; d < dim; ++d)
1294 for (unsigned int e = 0; e < dim; ++e)
1295 fe_data
1296 .untransformed_shape_hessian_tensors[k + offset][d]
1297 [e] =
1298 fe_data
1299 .shape_grad_grads[dof_index][k + offset][d][e];
1300
1302 transformed_shape_hessians =
1304 offset,
1305 n_q_points);
1306 mapping.transform(
1308 offset,
1309 n_q_points),
1311 mapping_internal,
1312 transformed_shape_hessians);
1313
1314 // The terms below with the derivatives of the Jacobian use
1315 // the shape values and gradients in output_data, which
1316 // already contain dof_sign, so only the transformed Hessian
1317 // gets dof_sign.
1318 for (unsigned int k = 0; k < n_q_points; ++k)
1319 transformed_shape_hessians[k] *= dof_sign;
1320
1321 for (unsigned int k = 0; k < n_q_points; ++k)
1322 for (unsigned int d = 0; d < spacedim; ++d)
1323 for (unsigned int n = 0; n < spacedim; ++n)
1324 for (unsigned int i = 0; i < spacedim; ++i)
1325 for (unsigned int j = 0; j < spacedim; ++j)
1326 {
1327 transformed_shape_hessians[k][d][i][j] -=
1328 (output_data.shape_values(first + n, k) *
1329 mapping_data
1331 [k][n][d][i][j]) +
1332 (output_data.shape_gradients[first + d][k][n] *
1333 mapping_data
1334 .jacobian_pushed_forward_grads[k][n][i][j]) +
1335 (output_data.shape_gradients[first + n][k][i] *
1336 mapping_data
1337 .jacobian_pushed_forward_grads[k][n][d][j]) +
1338 (output_data.shape_gradients[first + n][k][j] *
1339 mapping_data
1340 .jacobian_pushed_forward_grads[k][n][i][d]);
1341 }
1342
1343 for (unsigned int k = 0; k < n_q_points; ++k)
1344 for (unsigned int d = 0; d < spacedim; ++d)
1345 output_data.shape_hessians[first + d][k] =
1346 transformed_shape_hessians[k][d];
1347
1348 break;
1349 }
1350
1351 default:
1353 }
1354 }
1355
1356 // third derivatives are not implemented
1357 if (fe_data.update_each & update_3rd_derivatives)
1358 {
1360 }
1361 }
1362}
1363
1364
1365
1366template <int dim, int spacedim>
1369 const UpdateFlags flags) const
1370{
1372
1373 for (unsigned int i = 0; i < this->n_dofs_per_cell(); ++i)
1374 {
1375 const MappingKind mapping_kind = get_mapping_kind(i);
1376
1377 switch (mapping_kind)
1378 {
1379 case mapping_none:
1380 {
1381 if (flags & update_values)
1382 out |= update_values;
1383
1384 if (flags & update_gradients)
1387
1388 if (flags & update_hessians)
1392 break;
1393 }
1395 case mapping_piola:
1396 {
1397 if (flags & update_values)
1398 out |= update_values | update_piola;
1399
1400 if (flags & update_gradients)
1405
1406 if (flags & update_hessians)
1411
1412 break;
1413 }
1414
1415
1417 {
1418 if (flags & update_values)
1419 out |= update_values | update_piola;
1420
1421 if (flags & update_gradients)
1426
1427 if (flags & update_hessians)
1432
1433 break;
1434 }
1435
1436 case mapping_nedelec:
1437 case mapping_covariant:
1438 {
1439 if (flags & update_values)
1441
1442 if (flags & update_gradients)
1446
1447 if (flags & update_hessians)
1452
1453 break;
1454 }
1455
1456 default:
1457 {
1459 }
1460 }
1461 }
1462
1463 return out;
1464}
1465
1466#endif
1467// explicit instantiations
1468#include "fe/fe_poly_tensor.inst"
1469
1470
ArrayView< std::remove_reference_t< typename std::iterator_traits< Iterator >::reference >, MemorySpaceType > make_array_view(const Iterator begin, const Iterator end)
std::vector< Tensor< 3, spacedim > > transformed_shape_hessians
Table< 2, DerivativeForm< 2, dim, spacedim > > shape_grad_grads
Table< 2, DerivativeForm< 1, dim, spacedim > > shape_grads
std::vector< Tensor< 2, spacedim > > transformed_shape_grads
std::vector< Tensor< 3, dim > > untransformed_shape_hessian_tensors
std::vector< Tensor< 2, dim > > untransformed_shape_grads
Table< 2, Tensor< 1, dim > > shape_values
std::vector< Tensor< 1, spacedim > > transformed_shape_values
std::vector< double > dof_sign_change
virtual UpdateFlags requires_update_flags(const UpdateFlags update_flags) const override
bool adjust_quad_dof_sign_for_face_orientation(const unsigned int index, const unsigned int face_no, const types::geometric_orientation combined_orientation) const
virtual Tensor< 1, dim > shape_grad(const unsigned int i, const Point< dim > &p) const override
virtual Tensor< 2, dim > shape_grad_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual double shape_value_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
virtual Tensor< 2, dim > shape_grad_grad(const unsigned int i, const Point< dim > &p) const override
void compute_fill(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const typename QProjector< dim >::DataSetDescriptor &offset, const unsigned int n_q_points, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FE_PolyTensor< dim, spacedim >::InternalData &fe_internal, internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const
virtual void fill_fe_face_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const hp::QCollection< dim - 1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
virtual double shape_value(const unsigned int i, const Point< dim > &p) const override
virtual void fill_fe_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const CellSimilarity::Similarity cell_similarity, const Quadrature< dim > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
virtual void fill_fe_subface_values(const typename Triangulation< dim, spacedim >::cell_iterator &cell, const unsigned int face_no, const unsigned int sub_no, const Quadrature< dim - 1 > &quadrature, const Mapping< dim, spacedim > &mapping, const typename Mapping< dim, spacedim >::InternalDataBase &mapping_internal, const internal::FEValuesImplementation::MappingRelatedData< dim, spacedim > &mapping_data, const typename FiniteElement< dim, spacedim >::InternalDataBase &fe_internal, ::internal::FEValuesImplementation::FiniteElementRelatedData< dim, spacedim > &output_data) const override
MappingKind get_mapping_kind(const unsigned int i) const
FE_PolyTensor(const TensorPolynomialsBase< dim > &polynomials, const FiniteElementData< dim > &fe_data, const std::vector< bool > &restriction_is_additive_flags, const std::vector< ComponentMask > &nonzero_components)
bool single_mapping_kind() const
void get_dof_sign_changes(const typename Triangulation< dim, spacedim >::cell_iterator &cell, std::vector< double > &dof_signs) const
virtual Tensor< 1, dim > shape_grad_component(const unsigned int i, const Point< dim > &p, const unsigned int component) const override
unsigned int n_dofs_per_face(unsigned int face_no=0, unsigned int child=0) const
unsigned int tensor_degree() const
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
Abstract base class for mapping classes.
Definition mapping.h:318
virtual void transform(const ArrayView< const Tensor< 1, dim > > &input, const MappingKind kind, const typename Mapping< dim, spacedim >::InternalDataBase &internal, const ArrayView< Tensor< 1, spacedim > > &output) const =0
Definition point.h:111
Class storing the offset index into a Quadrature rule created by project_to_all_faces() or project_to...
Definition qprojector.h:204
Class which transforms dim - 1-dimensional quadrature rules to dim-dimensional face quadratures.
Definition qprojector.h:68
unsigned int size() const
unsigned int size() const
Definition collection.h:314
std::vector< Tensor< 4, spacedim > > jacobian_pushed_forward_2nd_derivatives
std::vector< Tensor< 3, spacedim > > jacobian_pushed_forward_grads
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
#define DEAL_II_NOT_IMPLEMENTED()
Point< 2 > first
Definition grid_out.cc:4639
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
UpdateFlags
@ update_jacobian_pushed_forward_2nd_derivatives
@ update_contravariant_transformation
Contravariant transformation.
@ update_jacobian_pushed_forward_grads
@ update_hessians
Second derivatives of shape functions.
@ update_values
Shape function values.
@ update_3rd_derivatives
Third derivatives of shape functions.
@ update_covariant_transformation
Covariant transformation.
@ update_gradients
Shape function gradients.
@ update_default
No update.
@ update_piola
Values needed for Piola transform.
MappingKind
Definition mapping.h:79
@ mapping_piola
Definition mapping.h:114
@ mapping_covariant_gradient
Definition mapping.h:100
@ mapping_covariant
Definition mapping.h:89
@ mapping_nedelec
Definition mapping.h:129
@ mapping_contravariant
Definition mapping.h:94
@ mapping_raviart_thomas
Definition mapping.h:134
@ mapping_contravariant_hessian
Definition mapping.h:156
@ mapping_covariant_hessian
Definition mapping.h:150
@ mapping_contravariant_gradient
Definition mapping.h:106
@ mapping_none
Definition mapping.h:84
@ mapping_piola_gradient
Definition mapping.h:120
@ mapping_piola_hessian
Definition mapping.h:162
std::size_t size
Definition mpi.cc:733
void reference_cell(Triangulation< dim, spacedim > &tria, const ReferenceCell< dim > &reference_cell)
SymmetricTensor< 2, dim, Number > e(const Tensor< 2, dim, Number > &F)
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
*  *  *  ScaleZFunction< dim, Number, components >::ScaleZFunction *  component(component)
*  *  *  *  std::vector< Number > ThermoPlasticMaterial< dim, ViscoplasticYieldLaw, Number >::get_state_parameters   const
types::geometric_orientation combined_face_orientation(const bool face_orientation, const bool face_rotation, const bool face_flip)
constexpr types::geometric_orientation default_geometric_orientation
Definition types.h:342
std::uint8_t geometric_orientation
Definition types.h:38