deal.II version GIT relicensing-6917-gb466a1809f 2026-10-16 06:30: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_values.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) 1998 - 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
20
22
24
25#include <deal.II/fe/fe.h>
27#include <deal.II/fe/mapping.h>
28
31
32#include <deal.II/lac/vector.h>
33
34#include <boost/container/small_vector.hpp>
35
36#include <iomanip>
37#include <memory>
38#include <type_traits>
39
41
42
43namespace internal
44{
45 namespace FEValuesImplementation
46 {
47 template <int dim, int spacedim>
48 void
50 const unsigned int n_quadrature_points,
52 const UpdateFlags flags)
53 {
54 // initialize the table mapping from shape function number to
55 // the rows in the tables storing the data by shape function and
56 // nonzero component
57 this->shape_function_to_row_table =
59
60 // count the total number of non-zero components accumulated
61 // over all shape functions
62 unsigned int n_nonzero_shape_components = 0;
63 for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
64 n_nonzero_shape_components += fe.n_nonzero_components(i);
65 Assert(n_nonzero_shape_components >= fe.n_dofs_per_cell(),
67
68 // with the number of rows now known, initialize those fields
69 // that we will need to their correct size
70 if (flags & update_values)
71 {
72 this->shape_values.reinit(n_nonzero_shape_components,
73 n_quadrature_points);
74 this->shape_values.fill(numbers::signaling_nan<double>());
75 }
76
77 if (flags & update_gradients)
78 {
79 this->shape_gradients.reinit(n_nonzero_shape_components,
80 n_quadrature_points);
81 this->shape_gradients.fill(
83 }
84
85 if (flags & update_hessians)
86 {
87 this->shape_hessians.reinit(n_nonzero_shape_components,
88 n_quadrature_points);
89 this->shape_hessians.fill(
91 }
92
93 if (flags & update_3rd_derivatives)
94 {
95 this->shape_3rd_derivatives.reinit(n_nonzero_shape_components,
96 n_quadrature_points);
97 this->shape_3rd_derivatives.fill(
99 }
100 }
101
102
103
104 template <int dim, int spacedim>
105 std::size_t
107 {
108 return (
112 MemoryConsumption::memory_consumption(shape_3rd_derivatives) +
113 MemoryConsumption::memory_consumption(shape_function_to_row_table));
114 }
115 } // namespace FEValuesImplementation
116} // namespace internal
117
118/*------------------------------- FEValues -------------------------------*/
119#ifndef DOXYGEN
120
121template <int dim, int spacedim>
123
124
125
126template <int dim, int spacedim>
129 const Quadrature<dim> &q,
130 const UpdateFlags update_flags)
131 : FEValuesBase<dim, spacedim>(q.size(),
132 fe.n_dofs_per_cell(),
134 mapping,
135 fe)
136 , quadrature(q)
137{
138 initialize(update_flags);
139}
140
141
142
143template <int dim, int spacedim>
146 const hp::QCollection<dim> &q,
147 const UpdateFlags update_flags)
148 : FEValues(mapping, fe, q[0], update_flags)
149{
150 AssertDimension(q.size(), 1);
151}
152
153
154
155template <int dim, int spacedim>
157 const Quadrature<dim> &q,
158 const UpdateFlags update_flags)
159 : FEValuesBase<dim, spacedim>(
160 q.size(),
161 fe.n_dofs_per_cell(),
163 fe.reference_cell().template get_default_linear_mapping<spacedim>(),
164 fe)
165 , quadrature(q)
166{
167 initialize(update_flags);
168}
169
170
171
172template <int dim, int spacedim>
174 const hp::QCollection<dim> &q,
175 const UpdateFlags update_flags)
176 : FEValues(fe, q[0], update_flags)
177{
178 AssertDimension(q.size(), 1);
179}
180
181
182
183template <int dim, int spacedim>
184void
186{
187 // You can compute normal vectors to the cells only in the
188 // codimension one case.
189 if (dim != spacedim - 1)
190 Assert((update_flags & update_normal_vectors) == false,
191 ExcMessage("You can only pass the 'update_normal_vectors' "
192 "flag to FEFaceValues or FESubfaceValues objects, "
193 "but not to an FEValues object unless the "
194 "triangulation it refers to is embedded in a higher "
195 "dimensional space."));
196
197 const UpdateFlags flags = this->compute_update_flags(update_flags);
198
199 // initialize the base classes
200 if (flags & update_mapping)
201 this->mapping_output.initialize(this->max_n_quadrature_points, flags);
202 this->finite_element_output.initialize(this->max_n_quadrature_points,
203 *this->fe,
204 flags);
205
206 // then get objects into which the FE and the Mapping can store
207 // intermediate data used across calls to reinit. we can do this in parallel
209 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>>
210 fe_get_data = Threads::new_task([&]() {
211 return this->fe->get_data(flags,
212 *this->mapping,
213 quadrature,
214 this->finite_element_output);
215 });
216
218 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>>
219 mapping_get_data;
220 if (flags & update_mapping)
221 mapping_get_data = Threads::new_task(
222 [&]() { return this->mapping->get_data(flags, quadrature); });
223
224 this->update_flags = flags;
225
226 // then collect answers from the two task above
227 this->fe_data = std::move(fe_get_data.return_value());
228 if (flags & update_mapping)
229 this->mapping_data = std::move(mapping_get_data.return_value());
230 else
231 this->mapping_data =
232 std::make_unique<typename Mapping<dim, spacedim>::InternalDataBase>();
233}
234
235
236
237template <int dim, int spacedim>
238void
241{
242 // Check that mapping and reference cell type are compatible:
243 Assert(this->get_mapping().is_compatible_with(cell->reference_cell()),
245 "You are trying to call FEValues::reinit() with a cell of type " +
246 cell->reference_cell().to_string() +
247 " with a Mapping that is not compatible with it."));
248
249 // no FE in this cell, so no assertion
250 // necessary here
251 this->maybe_invalidate_previous_present_cell(cell);
252 this->check_cell_similarity(cell);
253
254 this->present_cell = {cell};
255
256 // this was the part of the work that is dependent on the actual
257 // data type of the iterator. now pass on to the function doing
258 // the real work.
259 do_reinit();
260}
261
262
263
264template <int dim, int spacedim>
265template <bool lda>
266void
269{
270 // assert that the finite elements passed to the constructor and
271 // used by the DoFHandler used by this cell, are the same
272 Assert(static_cast<const FiniteElementData<dim> &>(*this->fe) ==
273 static_cast<const FiniteElementData<dim> &>(cell->get_fe()),
275
276 // Check that mapping and reference cell type are compatible:
277 Assert(this->get_mapping().is_compatible_with(cell->reference_cell()),
279 "You are trying to call FEValues::reinit() with a cell of type " +
280 cell->reference_cell().to_string() +
281 " with a Mapping that is not compatible with it."));
282
283 this->maybe_invalidate_previous_present_cell(cell);
284 this->check_cell_similarity(cell);
285
286 this->present_cell = {cell};
287
288 // this was the part of the work that is dependent on the actual
289 // data type of the iterator. now pass on to the function doing
290 // the real work.
291 do_reinit();
292}
293
294
295
296template <int dim, int spacedim>
297void
299{
300 // first call the mapping and let it generate the data
301 // specific to the mapping. also let it inspect the
302 // cell similarity flag and, if necessary, update
303 // it
304 if (this->update_flags & update_mapping)
305 {
306 this->cell_similarity =
307 this->get_mapping().fill_fe_values(this->present_cell,
308 this->cell_similarity,
309 quadrature,
310 *this->mapping_data,
311 this->mapping_output);
312 }
313
314 // then call the finite element and, with the data
315 // already filled by the mapping, let it compute the
316 // data for the mapped shape function values, gradients,
317 // etc.
318 this->get_fe().fill_fe_values(this->present_cell,
319 this->cell_similarity,
320 this->quadrature,
321 this->get_mapping(),
322 *this->mapping_data,
323 this->mapping_output,
324 *this->fe_data,
325 this->finite_element_output);
326}
327
328
329
330template <int dim, int spacedim>
331std::size_t
333{
336}
337
338#endif
339/*------------------------------- FEFaceValuesBase --------------------------*/
340#ifndef DOXYGEN
341
342template <int dim, int spacedim>
344 const unsigned int dofs_per_cell,
345 const UpdateFlags flags,
346 const Mapping<dim, spacedim> &mapping,
348 const Quadrature<dim - 1> &quadrature)
349 : FEFaceValuesBase<dim, spacedim>(dofs_per_cell,
350 flags,
351 mapping,
352 fe,
353 hp::QCollection<dim - 1>(quadrature))
354{}
355
356
357
358template <int dim, int spacedim>
360 const unsigned int dofs_per_cell,
361 const UpdateFlags,
362 const Mapping<dim, spacedim> &mapping,
364 const hp::QCollection<dim - 1> &quadrature)
365 : FEValuesBase<dim, spacedim>(quadrature.max_n_quadrature_points(),
366 dofs_per_cell,
368 mapping,
369 fe)
370 , present_face_index(numbers::invalid_unsigned_int)
371 , quadrature(quadrature)
372{
373 Assert(quadrature.size() == 1 ||
374 quadrature.size() == fe.reference_cell().n_faces(),
376}
377
378
379
380template <int dim, int spacedim>
381const std::vector<Tensor<1, spacedim>> &
383{
384 Assert(this->update_flags & update_boundary_forms,
386 "update_boundary_forms")));
387 return this->mapping_output.boundary_forms;
388}
389
390
391
392template <int dim, int spacedim>
393std::size_t
395{
398}
399#endif
400
401/*------------------------------- FEFaceValues -------------------------------*/
402
403#ifndef DOXYGEN
404
405template <int dim, int spacedim>
407
408
409
410template <int dim, int spacedim>
412
413
414
415template <int dim, int spacedim>
417 const Mapping<dim, spacedim> &mapping,
419 const Quadrature<dim - 1> &quadrature,
420 const UpdateFlags update_flags)
421 : FEFaceValues<dim, spacedim>(mapping,
422 fe,
423 hp::QCollection<dim - 1>(quadrature),
424 update_flags)
425{}
426
427
428
429template <int dim, int spacedim>
431 const Mapping<dim, spacedim> &mapping,
433 const hp::QCollection<dim - 1> &quadrature,
434 const UpdateFlags update_flags)
435 : FEFaceValuesBase<dim, spacedim>(fe.n_dofs_per_cell(),
436 update_flags,
437 mapping,
438 fe,
439 quadrature)
440{
441 initialize(update_flags);
442}
443
444
445
446template <int dim, int spacedim>
449 const Quadrature<dim - 1> &quadrature,
450 const UpdateFlags update_flags)
451 : FEFaceValues<dim, spacedim>(fe,
452 hp::QCollection<dim - 1>(quadrature),
453 update_flags)
454{}
455
456
457
458template <int dim, int spacedim>
461 const hp::QCollection<dim - 1> &quadrature,
462 const UpdateFlags update_flags)
463 : FEFaceValuesBase<dim, spacedim>(
464 fe.n_dofs_per_cell(),
465 update_flags,
466 fe.reference_cell().template get_default_linear_mapping<spacedim>(),
467 fe,
468 quadrature)
469{
470 initialize(update_flags);
471}
472
473
474
475template <int dim, int spacedim>
476void
478{
479 const UpdateFlags flags = this->compute_update_flags(update_flags);
480
481 // initialize the base classes
482 if (flags & update_mapping)
483 this->mapping_output.initialize(this->max_n_quadrature_points, flags);
484 this->finite_element_output.initialize(this->max_n_quadrature_points,
485 *this->fe,
486 flags);
487
488 // then get objects into which the FE and the Mapping can store
489 // intermediate data used across calls to reinit. this can be done in parallel
490
491 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase> (
492 FiniteElement<dim, spacedim>::*finite_element_get_face_data)(
493 const UpdateFlags,
497 spacedim>
499
500 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase> (
501 Mapping<dim, spacedim>::*mapping_get_face_data)(
502 const UpdateFlags, const hp::QCollection<dim - 1> &) const =
504
505
507 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>>
508 fe_get_data = Threads::new_task(finite_element_get_face_data,
509 *this->fe,
510 flags,
511 *this->mapping,
512 this->quadrature,
513 this->finite_element_output);
515 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>>
516 mapping_get_data;
517 if (flags & update_mapping)
518 mapping_get_data = Threads::new_task(mapping_get_face_data,
519 *this->mapping,
520 flags,
521 this->quadrature);
522
523 this->update_flags = flags;
524
525 // then collect answers from the two task above
526 this->fe_data = std::move(fe_get_data.return_value());
527 if (flags & update_mapping)
528 this->mapping_data = std::move(mapping_get_data.return_value());
529 else
530 this->mapping_data =
531 std::make_unique<typename Mapping<dim, spacedim>::InternalDataBase>();
532}
533
534
535
536template <int dim, int spacedim>
537template <bool lda>
538void
541 const unsigned int face_no)
542{
543 // assert that the finite elements passed to the constructor and
544 // used by the DoFHandler used by this cell, are the same
545 Assert(static_cast<const FiniteElementData<dim> &>(*this->fe) ==
546 static_cast<const FiniteElementData<dim> &>(
547 cell->get_dof_handler().get_fe(cell->active_fe_index())),
549
551
552 this->maybe_invalidate_previous_present_cell(cell);
553 this->present_cell = {cell};
554
555 // this was the part of the work that is dependent on the actual
556 // data type of the iterator. now pass on to the function doing
557 // the real work.
558 do_reinit(face_no);
559}
560
561
562
563template <int dim, int spacedim>
564template <bool lda>
565void
569{
570 const auto face_n = cell->face_iterator_to_index(face);
571 reinit(cell, face_n);
572}
573
574
575
576template <int dim, int spacedim>
577void
580 const unsigned int face_no)
581{
583
584 this->maybe_invalidate_previous_present_cell(cell);
585 this->present_cell = {cell};
586
587 // this was the part of the work that is dependent on the actual
588 // data type of the iterator. now pass on to the function doing
589 // the real work.
590 do_reinit(face_no);
591}
592
593
594
595template <int dim, int spacedim>
596void
600{
601 const auto face_n = cell->face_iterator_to_index(face);
602 reinit(cell, face_n);
603}
604
605
606
607template <int dim, int spacedim>
608void
609FEFaceValues<dim, spacedim>::do_reinit(const unsigned int face_no)
610{
611 this->present_face_no = face_no;
612
613 // first of all, set the present_face_index (if available)
615 this->present_cell;
616 this->present_face_index = cell->face_index(face_no);
617
618 if (this->update_flags & update_mapping)
619 {
620 this->get_mapping().fill_fe_face_values(this->present_cell,
621 face_no,
622 this->quadrature,
623 *this->mapping_data,
624 this->mapping_output);
625 }
626
627 this->get_fe().fill_fe_face_values(this->present_cell,
628 face_no,
629 this->quadrature,
630 this->get_mapping(),
631 *this->mapping_data,
632 this->mapping_output,
633 *this->fe_data,
634 this->finite_element_output);
635
636 const_cast<unsigned int &>(this->n_quadrature_points) =
637 this->quadrature[this->quadrature.size() == 1 ? 0 : face_no].size();
638}
639
640
641/* ---------------------------- FESubFaceValues ---------------------------- */
642
643
644template <int dim, int spacedim>
646
647
648
649template <int dim, int spacedim>
651
652
653
654template <int dim, int spacedim>
656 const Mapping<dim, spacedim> &mapping,
658 const Quadrature<dim - 1> &quadrature,
659 const UpdateFlags update_flags)
660 : FEFaceValuesBase<dim, spacedim>(fe.n_dofs_per_cell(),
661 update_flags,
662 mapping,
663 fe,
664 quadrature)
665{
666 initialize(update_flags);
667}
668
669
670
671template <int dim, int spacedim>
673 const Mapping<dim, spacedim> &mapping,
675 const hp::QCollection<dim - 1> &quadrature,
676 const UpdateFlags update_flags)
677 : FESubfaceValues(mapping, fe, quadrature[0], update_flags)
678{
679 AssertDimension(quadrature.size(), 1);
680}
681
682
683
684template <int dim, int spacedim>
687 const Quadrature<dim - 1> &quadrature,
688 const UpdateFlags update_flags)
689 : FEFaceValuesBase<dim, spacedim>(
690 fe.n_dofs_per_cell(),
691 update_flags,
692 fe.reference_cell().template get_default_linear_mapping<spacedim>(),
693 fe,
694 quadrature)
695{
696 initialize(update_flags);
697}
698
699
700
701template <int dim, int spacedim>
704 const hp::QCollection<dim - 1> &quadrature,
705 const UpdateFlags update_flags)
706 : FESubfaceValues(fe, quadrature[0], update_flags)
707{
708 AssertDimension(quadrature.size(), 1);
709}
710
711
712
713template <int dim, int spacedim>
714void
716{
717 const UpdateFlags flags = this->compute_update_flags(update_flags);
718
719 // initialize the base classes
720 if (flags & update_mapping)
721 this->mapping_output.initialize(this->max_n_quadrature_points, flags);
722 this->finite_element_output.initialize(this->max_n_quadrature_points,
723 *this->fe,
724 flags);
725
726 // then get objects into which the FE and the Mapping can store
727 // intermediate data used across calls to reinit. this can be done
728 // in parallel
730 std::unique_ptr<typename FiniteElement<dim, spacedim>::InternalDataBase>>
731 fe_get_data =
733 *this->fe,
734 flags,
735 *this->mapping,
736 this->quadrature[0],
737 this->finite_element_output);
739 std::unique_ptr<typename Mapping<dim, spacedim>::InternalDataBase>>
740 mapping_get_data;
741 if (flags & update_mapping)
742 mapping_get_data =
744 *this->mapping,
745 flags,
746 this->quadrature[0]);
747
748 this->update_flags = flags;
749
750 // then collect answers from the two task above
751 this->fe_data = std::move(fe_get_data.return_value());
752 if (flags & update_mapping)
753 this->mapping_data = std::move(mapping_get_data.return_value());
754 else
755 this->mapping_data =
756 std::make_unique<typename Mapping<dim, spacedim>::InternalDataBase>();
757}
758
759
760
761template <int dim, int spacedim>
762template <bool lda>
763void
766 const unsigned int face_no,
767 const unsigned int subface_no)
768{
769 // assert that the finite elements passed to the constructor and
770 // used by the DoFHandler used by this cell, are the same
771 Assert(static_cast<const FiniteElementData<dim> &>(*this->fe) ==
772 static_cast<const FiniteElementData<dim> &>(
773 cell->get_dof_handler().get_fe(cell->active_fe_index())),
776 Assert(cell->has_periodic_neighbor(face_no) ?
777 cell->periodic_neighbor(face_no)
778 ->face(cell->periodic_neighbor_face_no(face_no))
779 ->has_children() :
780 cell->face(face_no)->has_children(),
781 ExcMessage("You can only reinit() an FESubfaceValues object in case "
782 "the neighboring cell is more refined than the one this "
783 "object is initialized on."));
784
785 // in the following check, we need to compare the subface index against the
786 // number of descendants rather than the number of children because in
787 // anisotropic refinement, there might be more subfaces than the face has
788 // immediate children
789 AssertIndexRange(subface_no,
790 (cell->has_periodic_neighbor(face_no) ?
791 cell->periodic_neighbor(face_no)
792 ->face(cell->periodic_neighbor_face_no(face_no))
793 ->n_active_descendants() :
794 cell->face(face_no)->n_active_descendants()));
795
796 Assert(cell->has_children() == false,
797 ExcMessage("You can't use subface data for cells that are "
798 "already refined. Iterate over their children "
799 "instead in these cases."));
800
801 this->maybe_invalidate_previous_present_cell(cell);
802 this->present_cell = {cell};
803
804 // this was the part of the work that is dependent on the actual
805 // data type of the iterator. now pass on to the function doing
806 // the real work.
807 do_reinit(face_no, subface_no);
808}
809
810
811
812template <int dim, int spacedim>
813template <bool lda>
814void
818 const typename Triangulation<dim, spacedim>::face_iterator &subface)
819{
820 reinit(cell,
821 cell->face_iterator_to_index(face),
822 face->child_iterator_to_index(subface));
823}
824
825
826
827template <int dim, int spacedim>
828void
831 const unsigned int face_no,
832 const unsigned int subface_no)
833{
835 Assert(cell->has_periodic_neighbor(face_no) ?
836 cell->periodic_neighbor(face_no)
837 ->face(cell->periodic_neighbor_face_no(face_no))
838 ->has_children() :
839 cell->face(face_no)->has_children(),
840 ExcMessage("You can only reinit() an FESubfaceValues object in case "
841 "the neighboring cell is more refined than the one this "
842 "object is initialized on."));
843
844 // in the following check, we need to compare the subface index against the
845 // number of descendants rather than the number of children because in
846 // anisotropic refinement, there might be more subfaces than the face has
847 // immediate children
848 AssertIndexRange(subface_no,
849 (cell->has_periodic_neighbor(face_no) ?
850 cell->periodic_neighbor(face_no)
851 ->face(cell->periodic_neighbor_face_no(face_no))
852 ->n_active_descendants() :
853 cell->face(face_no)->n_active_descendants()));
854
855 Assert(cell->has_children() == false,
856 ExcMessage("You can't use subface data for cells that are "
857 "already refined. Iterate over their children "
858 "instead in these cases."));
859
860 this->maybe_invalidate_previous_present_cell(cell);
861 this->present_cell = {cell};
862
863 // this was the part of the work that is dependent on the actual
864 // data type of the iterator. now pass on to the function doing
865 // the real work.
866 do_reinit(face_no, subface_no);
867}
868
869
870
871template <int dim, int spacedim>
872void
876 const typename Triangulation<dim, spacedim>::face_iterator &subface)
877{
878 reinit(cell,
879 cell->face_iterator_to_index(face),
880 face->child_iterator_to_index(subface));
881}
882
883
884
885template <int dim, int spacedim>
886void
887FESubfaceValues<dim, spacedim>::do_reinit(const unsigned int face_no,
888 const unsigned int subface_no)
889{
890 this->present_face_no = face_no;
891
892 // first of all, set the present_face_index (if available)
894 this->present_cell;
895
896 if (!cell->face(face_no)->has_children())
897 // no subfaces at all, so set present_face_index to this face rather
898 // than any subface
899 this->present_face_index = cell->face_index(face_no);
900 else if (dim != 3)
901 this->present_face_index = cell->face(face_no)->child_index(subface_no);
902 else
903 {
904 // this is the same logic we use in cell->neighbor_child_on_subface(). See
905 // there for an explanation of the different cases
906 unsigned int subface_index = numbers::invalid_unsigned_int;
907 switch (cell->subface_case(face_no))
908 {
912 subface_index = cell->face(face_no)->child_index(subface_no);
913 break;
916 subface_index = cell->face(face_no)
917 ->child(subface_no / 2)
918 ->child_index(subface_no % 2);
919 break;
922 switch (subface_no)
923 {
924 case 0:
925 case 1:
926 subface_index =
927 cell->face(face_no)->child(0)->child_index(subface_no);
928 break;
929 case 2:
930 subface_index = cell->face(face_no)->child_index(1);
931 break;
932 default:
934 }
935 break;
938 switch (subface_no)
939 {
940 case 0:
941 subface_index = cell->face(face_no)->child_index(0);
942 break;
943 case 1:
944 case 2:
945 subface_index =
946 cell->face(face_no)->child(1)->child_index(subface_no - 1);
947 break;
948 default:
950 }
951 break;
952 default:
954 break;
955 }
956 Assert(subface_index != numbers::invalid_unsigned_int,
958 this->present_face_index = subface_index;
959 }
960
961 // now ask the mapping and the finite element to do the actual work
962 if (this->update_flags & update_mapping)
963 {
964 this->get_mapping().fill_fe_subface_values(this->present_cell,
965 face_no,
966 subface_no,
967 this->quadrature[0],
968 *this->mapping_data,
969 this->mapping_output);
970 }
971
972 this->get_fe().fill_fe_subface_values(this->present_cell,
973 face_no,
974 subface_no,
975 this->quadrature[0],
976 this->get_mapping(),
977 *this->mapping_data,
978 this->mapping_output,
979 *this->fe_data,
980 this->finite_element_output);
981}
982#endif
983
984/*------------------------- Explicit Instantiations --------------------------*/
985
986#include "fe/fe_values.inst"
987
FEFaceValuesBase(const unsigned int dofs_per_cell, const UpdateFlags update_flags, const Mapping< dim, spacedim > &mapping, const FiniteElement< dim, spacedim > &fe, const Quadrature< dim - 1 > &quadrature)
std::size_t memory_consumption() const
const std::vector< Tensor< 1, spacedim > > & get_boundary_forms() const
void initialize(const UpdateFlags update_flags)
void reinit(const TriaIterator< DoFCellAccessor< dim, spacedim, level_dof_access > > &cell, const unsigned int face_no)
void do_reinit(const unsigned int face_no)
FEFaceValues(const Mapping< dim, spacedim > &mapping, const FiniteElement< dim, spacedim > &fe, const Quadrature< dim - 1 > &quadrature, const UpdateFlags update_flags)
FESubfaceValues(const Mapping< dim, spacedim > &mapping, const FiniteElement< dim, spacedim > &fe, const Quadrature< dim - 1 > &face_quadrature, const UpdateFlags update_flags)
void reinit(const TriaIterator< DoFCellAccessor< dim, spacedim, level_dof_access > > &cell, const unsigned int face_no, const unsigned int subface_no)
void initialize(const UpdateFlags update_flags)
void do_reinit(const unsigned int face_no, const unsigned int subface_no)
FEValues(const Mapping< dim, spacedim > &mapping, const FiniteElement< dim, spacedim > &fe, const Quadrature< dim > &quadrature, const UpdateFlags update_flags)
void do_reinit()
void initialize(const UpdateFlags update_flags)
void reinit(const TriaIterator< DoFCellAccessor< dim, spacedim, level_dof_access > > &cell)
std::size_t memory_consumption() const
unsigned int n_dofs_per_cell() const
ReferenceCell< dim > reference_cell() const
unsigned int n_nonzero_components(const unsigned int i) const
Abstract base class for mapping classes.
Definition mapping.h:318
unsigned int size() const
Definition collection.h:314
void initialize(const unsigned int n_quadrature_points, const FiniteElement< dim, spacedim > &fe, const UpdateFlags flags)
Definition fe_values.cc:49
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
#define DEAL_II_ASSERT_UNREACHABLE()
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcInternalError()
static ::ExceptionBase & ExcMessage(std::string arg1)
UpdateFlags
@ update_hessians
Second derivatives of shape functions.
@ update_values
Shape function values.
@ update_normal_vectors
Normal vectors.
@ update_3rd_derivatives
Third derivatives of shape functions.
@ update_mapping
@ update_gradients
Shape function gradients.
@ update_default
No update.
@ update_boundary_forms
Outer normal vector, not normalized.
Task< RT > new_task(const std::function< RT()> &function)
const Mapping< dim, spacedim > & get_default_linear_mapping(const Triangulation< dim, spacedim > &triangulation)
Definition mapping.cc:314
std::size_t size
Definition mpi.cc:733
void reference_cell(Triangulation< dim, spacedim > &tria, const ReferenceCell< dim > &reference_cell)
std::enable_if_t< std::is_fundamental_v< T >, std::size_t > memory_consumption(const T &t)
Definition hp.h:115
void reinit(MatrixBlock< MatrixType > &v, const BlockSparsityPattern &p)
std::vector< unsigned int > make_shape_function_to_row_table(const FiniteElement< dim, spacedim > &fe)
constexpr unsigned int invalid_unsigned_int
Definition types.h:228
T signaling_nan()