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_values_views.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
15
17
18#include <deal.II/fe/fe.h>
22
23#include <deal.II/lac/vector.h>
24
25#ifdef DEAL_II_WITH_ADOLC
26# include <adolc/adouble.h>
27# include <adolc/adtl.h>
28#endif
29
30#include <complex>
31
32
34
35
36namespace FEValuesViews
37{
38 template <int dim, int spacedim>
40 const unsigned int component)
41 : fe_values(&fe_values)
42 , component(component)
43 , shape_function_data(this->fe_values->fe->n_dofs_per_cell())
44 {
45 const FiniteElement<dim, spacedim> &fe = *this->fe_values->fe;
47
48 // TODO: we'd like to use the fields with the same name as these
49 // variables from FEValuesBase, but they aren't initialized yet
50 // at the time we get here, so re-create it all
51 const std::vector<unsigned int> shape_function_to_row_table =
53
54 for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
55 {
56 const bool is_primitive = fe.is_primitive() || fe.is_primitive(i);
57
58 if (is_primitive == true)
59 shape_function_data[i].is_nonzero_shape_function_component =
60 (component == fe.system_to_component_index(i).first);
61 else
62 shape_function_data[i].is_nonzero_shape_function_component =
63 (fe.get_nonzero_components(i)[component] == true);
64
65 if (shape_function_data[i].is_nonzero_shape_function_component == true)
66 shape_function_data[i].row_index =
67 shape_function_to_row_table[i * fe.n_components() + component];
68 else
70 }
71 }
72
73
74
75 template <int dim, int spacedim>
77 : fe_values(nullptr)
78 , component(numbers::invalid_unsigned_int)
79 {}
80
81
82
83 template <int dim, int spacedim>
85 const unsigned int first_vector_component)
86 : fe_values(&fe_values)
87 , first_vector_component(first_vector_component)
88 , shape_function_data(this->fe_values->fe->n_dofs_per_cell())
89 {
90 const FiniteElement<dim, spacedim> &fe = *this->fe_values->fe;
92
93 // TODO: we'd like to use the fields with the same name as these
94 // variables from FEValuesBase, but they aren't initialized yet
95 // at the time we get here, so re-create it all
96 const std::vector<unsigned int> shape_function_to_row_table =
98
99 for (unsigned int d = 0; d < spacedim; ++d)
100 {
101 const unsigned int component = first_vector_component + d;
102
103 for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
104 {
105 const bool is_primitive = fe.is_primitive() || fe.is_primitive(i);
106
107 if (is_primitive == true)
108 shape_function_data[i].is_nonzero_shape_function_component[d] =
109 (component == fe.system_to_component_index(i).first);
110 else
111 shape_function_data[i].is_nonzero_shape_function_component[d] =
112 (fe.get_nonzero_components(i)[component] == true);
113
114 if (shape_function_data[i].is_nonzero_shape_function_component[d] ==
115 true)
116 shape_function_data[i].row_index[d] =
117 shape_function_to_row_table[i * fe.n_components() + component];
118 else
119 shape_function_data[i].row_index[d] =
121 }
122 }
123
124 for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
125 {
126 unsigned int n_nonzero_components = 0;
127 for (unsigned int d = 0; d < spacedim; ++d)
128 if (shape_function_data[i].is_nonzero_shape_function_component[d] ==
129 true)
130 ++n_nonzero_components;
131
132 if (n_nonzero_components == 0)
133 shape_function_data[i].single_nonzero_component = -2;
134 else if (n_nonzero_components > 1)
135 shape_function_data[i].single_nonzero_component = -1;
136 else
137 {
138 for (unsigned int d = 0; d < spacedim; ++d)
140 .is_nonzero_shape_function_component[d] == true)
141 {
142 shape_function_data[i].single_nonzero_component =
143 shape_function_data[i].row_index[d];
144 shape_function_data[i].single_nonzero_component_index = d;
145 break;
146 }
147 }
148 }
149 }
150
151
152
153 template <int dim, int spacedim>
155 : fe_values(nullptr)
156 , first_vector_component(numbers::invalid_unsigned_int)
157 {}
158
159
160
161 template <int dim, int spacedim>
163 const FEValuesBase<dim, spacedim> &fe_values,
164 const unsigned int first_tensor_component)
165 : fe_values(&fe_values)
166 , first_tensor_component(first_tensor_component)
167 , shape_function_data(this->fe_values->fe->n_dofs_per_cell())
168 {
169 const FiniteElement<dim, spacedim> &fe = *this->fe_values->fe;
170 Assert(first_tensor_component + (dim * dim + dim) / 2 - 1 <
171 fe.n_components(),
173 first_tensor_component +
175 0,
176 fe.n_components()));
177 // TODO: we'd like to use the fields with the same name as these
178 // variables from FEValuesBase, but they aren't initialized yet
179 // at the time we get here, so re-create it all
180 const std::vector<unsigned int> shape_function_to_row_table =
182
183 for (unsigned int d = 0;
184 d < ::SymmetricTensor<2, dim>::n_independent_components;
185 ++d)
186 {
187 const unsigned int component = first_tensor_component + d;
188
189 for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
190 {
191 const bool is_primitive = fe.is_primitive() || fe.is_primitive(i);
192
193 if (is_primitive == true)
194 shape_function_data[i].is_nonzero_shape_function_component[d] =
195 (component == fe.system_to_component_index(i).first);
196 else
197 shape_function_data[i].is_nonzero_shape_function_component[d] =
198 (fe.get_nonzero_components(i)[component] == true);
199
200 if (shape_function_data[i].is_nonzero_shape_function_component[d] ==
201 true)
202 shape_function_data[i].row_index[d] =
203 shape_function_to_row_table[i * fe.n_components() + component];
204 else
205 shape_function_data[i].row_index[d] =
207 }
208 }
209
210 for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
211 {
212 unsigned int n_nonzero_components = 0;
213 for (unsigned int d = 0;
214 d < ::SymmetricTensor<2, dim>::n_independent_components;
215 ++d)
216 if (shape_function_data[i].is_nonzero_shape_function_component[d] ==
217 true)
218 ++n_nonzero_components;
219
220 if (n_nonzero_components == 0)
221 shape_function_data[i].single_nonzero_component = -2;
222 else if (n_nonzero_components > 1)
223 shape_function_data[i].single_nonzero_component = -1;
224 else
225 {
226 for (unsigned int d = 0;
227 d < ::SymmetricTensor<2, dim>::n_independent_components;
228 ++d)
229 if (shape_function_data[i]
230 .is_nonzero_shape_function_component[d] == true)
231 {
232 shape_function_data[i].single_nonzero_component =
233 shape_function_data[i].row_index[d];
234 shape_function_data[i].single_nonzero_component_index = d;
235 break;
236 }
237 }
238 }
239 }
240
241
242
243 template <int dim, int spacedim>
245 : fe_values(nullptr)
246 , first_tensor_component(numbers::invalid_unsigned_int)
247 {}
248
249
250
251 template <int dim, int spacedim>
253 const unsigned int first_tensor_component)
254 : fe_values(&fe_values)
255 , first_tensor_component(first_tensor_component)
256 , shape_function_data(this->fe_values->fe->n_dofs_per_cell())
257 {
258 const FiniteElement<dim, spacedim> &fe = *this->fe_values->fe;
259 AssertIndexRange(first_tensor_component + dim * dim - 1, fe.n_components());
260 // TODO: we'd like to use the fields with the same name as these
261 // variables from FEValuesBase, but they aren't initialized yet
262 // at the time we get here, so re-create it all
263 const std::vector<unsigned int> shape_function_to_row_table =
265
266 for (unsigned int d = 0; d < dim * dim; ++d)
267 {
268 const unsigned int component = first_tensor_component + d;
269
270 for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
271 {
272 const bool is_primitive = fe.is_primitive() || fe.is_primitive(i);
273
274 if (is_primitive == true)
275 shape_function_data[i].is_nonzero_shape_function_component[d] =
276 (component == fe.system_to_component_index(i).first);
277 else
278 shape_function_data[i].is_nonzero_shape_function_component[d] =
279 (fe.get_nonzero_components(i)[component] == true);
280
281 if (shape_function_data[i].is_nonzero_shape_function_component[d] ==
282 true)
283 shape_function_data[i].row_index[d] =
284 shape_function_to_row_table[i * fe.n_components() + component];
285 else
286 shape_function_data[i].row_index[d] =
288 }
289 }
290
291 for (unsigned int i = 0; i < fe.n_dofs_per_cell(); ++i)
292 {
293 unsigned int n_nonzero_components = 0;
294 for (unsigned int d = 0; d < dim * dim; ++d)
295 if (shape_function_data[i].is_nonzero_shape_function_component[d] ==
296 true)
297 ++n_nonzero_components;
298
299 if (n_nonzero_components == 0)
300 shape_function_data[i].single_nonzero_component = -2;
301 else if (n_nonzero_components > 1)
302 shape_function_data[i].single_nonzero_component = -1;
303 else
304 {
305 for (unsigned int d = 0; d < dim * dim; ++d)
306 if (shape_function_data[i]
307 .is_nonzero_shape_function_component[d] == true)
308 {
309 shape_function_data[i].single_nonzero_component =
310 shape_function_data[i].row_index[d];
311 shape_function_data[i].single_nonzero_component_index = d;
312 break;
313 }
314 }
315 }
316 }
317
318
319
320 template <int dim, int spacedim>
322 : fe_values(nullptr)
323 , first_tensor_component(numbers::invalid_unsigned_int)
324 {}
325
326
327
328 template <int dim, int spacedim>
329 template <typename Number>
330 void
332 const ReadVector<Number> &fe_function,
333 std::vector<solution_value_type<Number>> &values) const
334 {
335 Assert(fe_values->update_flags & update_values,
337 "update_values")));
338 Assert(fe_values->present_cell.is_initialized(),
340 AssertDimension(values.size(), fe_values->n_quadrature_points);
341
342 // get function values of dofs on this cell
343 boost::container::small_vector<Number, 200> dof_values(
344 fe_values->dofs_per_cell);
345 fe_values->present_cell.get_interpolated_dof_values(
346 fe_function, make_array_view(dof_values.begin(), dof_values.end()));
347 internal::do_function_values<dim, spacedim>(
348 make_array_view(dof_values.cbegin(), dof_values.cend()),
349 fe_values->finite_element_output.shape_values,
350 shape_function_data,
351 values);
352 }
353
354
355
356 template <int dim, int spacedim>
357 template <class InputVector>
358 void
360 const InputVector &dof_values,
362 const
363 {
364 Assert(fe_values->update_flags & update_values,
366 "update_values")));
367 Assert(fe_values->present_cell.is_initialized(),
369 AssertDimension(dof_values.size(), fe_values->dofs_per_cell);
370 AssertDimension(values.size(), fe_values->n_quadrature_points);
371
372 internal::do_function_values<dim, spacedim>(
373 make_const_array_view(dof_values),
374 fe_values->finite_element_output.shape_values,
375 shape_function_data,
376 values);
377 }
378
379
380
381 template <int dim, int spacedim>
382 template <typename Number>
383 void
385 const ReadVector<Number> &fe_function,
386 std::vector<solution_gradient_type<Number>> &gradients) const
387 {
388 Assert(fe_values->update_flags & update_gradients,
390 "update_gradients")));
391 Assert(fe_values->present_cell.is_initialized(),
393 AssertDimension(fe_function.size(),
394 fe_values->present_cell.n_dofs_for_dof_handler());
395 AssertDimension(gradients.size(), fe_values->n_quadrature_points);
396
397 // get function values of dofs on this cell
398 boost::container::small_vector<Number, 200> dof_values(
399 fe_values->dofs_per_cell);
400 fe_values->present_cell.get_interpolated_dof_values(
401 fe_function, make_array_view(dof_values.begin(), dof_values.end()));
402 internal::do_function_derivatives<1, dim, spacedim>(
403 make_array_view(dof_values.cbegin(), dof_values.cend()),
404 fe_values->finite_element_output.shape_gradients,
405 shape_function_data,
406 gradients);
407 }
408
409
410
411 template <int dim, int spacedim>
412 template <typename InputVector>
413 void
415 const InputVector &dof_values,
417 &gradients) const
418 {
419 Assert(fe_values->update_flags & update_gradients,
421 "update_gradients")));
422 Assert(fe_values->present_cell.is_initialized(),
424 AssertDimension(dof_values.size(), fe_values->dofs_per_cell);
425 AssertDimension(gradients.size(), fe_values->n_quadrature_points);
426
427 internal::do_function_derivatives<1, dim, spacedim>(
428 make_const_array_view(dof_values),
429 fe_values->finite_element_output.shape_gradients,
430 shape_function_data,
431 gradients);
432 }
433
434
435
436 template <int dim, int spacedim>
437 template <typename Number>
438 void
440 const ReadVector<Number> &fe_function,
441 std::vector<solution_hessian_type<Number>> &hessians) const
442 {
443 Assert(fe_values->update_flags & update_hessians,
445 "update_hessians")));
446 Assert(fe_values->present_cell.is_initialized(),
448 AssertDimension(fe_function.size(),
449 fe_values->present_cell.n_dofs_for_dof_handler());
450 AssertDimension(hessians.size(), fe_values->n_quadrature_points);
451
452 // get function values of dofs on this cell
453 boost::container::small_vector<Number, 200> dof_values(
454 fe_values->dofs_per_cell);
455 fe_values->present_cell.get_interpolated_dof_values(
456 fe_function, make_array_view(dof_values.begin(), dof_values.end()));
457 internal::do_function_derivatives<2, dim, spacedim>(
458 make_array_view(dof_values.cbegin(), dof_values.cend()),
459
460 fe_values->finite_element_output.shape_hessians,
461 shape_function_data,
462 hessians);
463 }
464
465
466
467 template <int dim, int spacedim>
468 template <class InputVector>
469 void
471 const InputVector &dof_values,
473 &hessians) const
474 {
475 Assert(fe_values->update_flags & update_hessians,
477 "update_hessians")));
478 Assert(fe_values->present_cell.is_initialized(),
480 AssertDimension(dof_values.size(), fe_values->dofs_per_cell);
481 AssertDimension(hessians.size(), fe_values->n_quadrature_points);
482
483 internal::do_function_derivatives<2, dim, spacedim>(
484 make_const_array_view(dof_values),
485 fe_values->finite_element_output.shape_hessians,
486 shape_function_data,
487 hessians);
488 }
489
490
491
492 template <int dim, int spacedim>
493 template <typename Number>
494 void
496 const ReadVector<Number> &fe_function,
497 std::vector<solution_laplacian_type<Number>> &laplacians) const
498 {
499 Assert(fe_values->update_flags & update_hessians,
501 "update_hessians")));
502 Assert(fe_values->present_cell.is_initialized(),
504 AssertDimension(fe_function.size(),
505 fe_values->present_cell.n_dofs_for_dof_handler());
506 AssertDimension(laplacians.size(), fe_values->n_quadrature_points);
507
508 // get function values of dofs on this cell
509 boost::container::small_vector<Number, 200> dof_values(
510 fe_values->dofs_per_cell);
511 fe_values->present_cell.get_interpolated_dof_values(
512 fe_function, make_array_view(dof_values.begin(), dof_values.end()));
513 internal::do_function_laplacians<dim, spacedim>(
514 make_array_view(dof_values.cbegin(), dof_values.cend()),
515 fe_values->finite_element_output.shape_hessians,
516 shape_function_data,
517 laplacians);
518 }
519
520
521
522 template <int dim, int spacedim>
523 template <class InputVector>
524 void
526 const InputVector &dof_values,
528 &laplacians) const
529 {
530 Assert(fe_values->update_flags & update_hessians,
532 "update_hessians")));
533 Assert(fe_values->present_cell.is_initialized(),
535 AssertDimension(dof_values.size(), fe_values->dofs_per_cell);
536 AssertDimension(laplacians.size(), fe_values->n_quadrature_points);
537
538 internal::do_function_laplacians<dim, spacedim>(
539 make_const_array_view(dof_values),
540 fe_values->finite_element_output.shape_hessians,
541 shape_function_data,
542 laplacians);
543 }
544
545
546
547 template <int dim, int spacedim>
548 template <typename Number>
549 void
551 const ReadVector<Number> &fe_function,
552 std::vector<solution_third_derivative_type<Number>> &third_derivatives)
553 const
554 {
555 Assert(fe_values->update_flags & update_3rd_derivatives,
557 "update_3rd_derivatives")));
558 Assert(fe_values->present_cell.is_initialized(),
560 AssertDimension(fe_function.size(),
561 fe_values->present_cell.n_dofs_for_dof_handler());
562 AssertDimension(third_derivatives.size(), fe_values->n_quadrature_points);
563
564 // get function values of dofs on this cell
565 boost::container::small_vector<Number, 200> dof_values(
566 fe_values->dofs_per_cell);
567 fe_values->present_cell.get_interpolated_dof_values(
568 fe_function, make_array_view(dof_values.begin(), dof_values.end()));
569 internal::do_function_derivatives<3, dim, spacedim>(
570 make_array_view(dof_values.cbegin(), dof_values.cend()),
571 fe_values->finite_element_output.shape_3rd_derivatives,
572 shape_function_data,
573 third_derivatives);
574 }
575
576
577
578 template <int dim, int spacedim>
579 template <class InputVector>
580 void
582 const InputVector &dof_values,
583 std::vector<
585 &third_derivatives) const
586 {
587 Assert(fe_values->update_flags & update_3rd_derivatives,
589 "update_3rd_derivatives")));
590 Assert(fe_values->present_cell.is_initialized(),
592 AssertDimension(dof_values.size(), fe_values->dofs_per_cell);
593 AssertDimension(third_derivatives.size(), fe_values->n_quadrature_points);
594
595 internal::do_function_derivatives<3, dim, spacedim>(
596 make_const_array_view(dof_values),
597 fe_values->finite_element_output.shape_3rd_derivatives,
598 shape_function_data,
599 third_derivatives);
600 }
601
602
603
604 template <int dim, int spacedim>
605 template <typename Number>
606 void
608 const ReadVector<Number> &fe_function,
609 std::vector<solution_value_type<Number>> &values) const
610 {
611 Assert(fe_values->update_flags & update_values,
613 "update_values")));
614 Assert(fe_values->present_cell.is_initialized(),
616 AssertDimension(values.size(), fe_values->n_quadrature_points);
617
618 // get function values of dofs on this cell
619 boost::container::small_vector<Number, 200> dof_values(
620 fe_values->dofs_per_cell);
621 fe_values->present_cell.get_interpolated_dof_values(
622 fe_function, make_array_view(dof_values.begin(), dof_values.end()));
623 internal::do_function_values<dim, spacedim>(
624 make_array_view(dof_values.cbegin(), dof_values.cend()),
625 fe_values->finite_element_output.shape_values,
626 shape_function_data,
627 values);
628 }
629
630
631
632 template <int dim, int spacedim>
633 template <class InputVector>
634 void
636 const InputVector &dof_values,
638 const
639 {
640 Assert(fe_values->update_flags & update_values,
642 "update_values")));
643 Assert(fe_values->present_cell.is_initialized(),
645 AssertDimension(dof_values.size(), fe_values->dofs_per_cell);
646 AssertDimension(values.size(), fe_values->n_quadrature_points);
647
648 internal::do_function_values<dim, spacedim>(
649 make_const_array_view(dof_values),
650 fe_values->finite_element_output.shape_values,
651 shape_function_data,
652 values);
653 }
654
655
656
657 template <int dim, int spacedim>
658 template <typename Number>
659 void
661 const ReadVector<Number> &fe_function,
662 std::vector<solution_gradient_type<Number>> &gradients) const
663 {
664 Assert(fe_values->update_flags & update_gradients,
666 "update_gradients")));
667 Assert(fe_values->present_cell.is_initialized(),
669 AssertDimension(fe_function.size(),
670 fe_values->present_cell.n_dofs_for_dof_handler());
671 AssertDimension(gradients.size(), fe_values->n_quadrature_points);
672
673 // get function values of dofs on this cell
674 boost::container::small_vector<Number, 200> dof_values(
675 fe_values->dofs_per_cell);
676 fe_values->present_cell.get_interpolated_dof_values(
677 fe_function, make_array_view(dof_values.begin(), dof_values.end()));
678 internal::do_function_derivatives<1, dim, spacedim>(
679 make_array_view(dof_values.cbegin(), dof_values.cend()),
680 fe_values->finite_element_output.shape_gradients,
681 shape_function_data,
682 gradients);
683 }
684
685
686
687 template <int dim, int spacedim>
688 template <typename InputVector>
689 void
691 const InputVector &dof_values,
693 &gradients) const
694 {
695 Assert(fe_values->update_flags & update_gradients,
697 "update_gradients")));
698 Assert(fe_values->present_cell.is_initialized(),
700 AssertDimension(dof_values.size(), fe_values->dofs_per_cell);
701 AssertDimension(gradients.size(), fe_values->n_quadrature_points);
702
703 internal::do_function_derivatives<1, dim, spacedim>(
704 make_const_array_view(dof_values),
705 fe_values->finite_element_output.shape_gradients,
706 shape_function_data,
707 gradients);
708 }
709
710
711
712 template <int dim, int spacedim>
713 template <typename Number>
714 void
716 const ReadVector<Number> &fe_function,
717 std::vector<solution_symmetric_gradient_type<Number>> &symmetric_gradients)
718 const
719 {
720 Assert(fe_values->update_flags & update_gradients,
722 "update_gradients")));
723 Assert(fe_values->present_cell.is_initialized(),
725 AssertDimension(fe_function.size(),
726 fe_values->present_cell.n_dofs_for_dof_handler());
727 AssertDimension(symmetric_gradients.size(), fe_values->n_quadrature_points);
728
729 // get function values of dofs on this cell
730 boost::container::small_vector<Number, 200> dof_values(
731 fe_values->dofs_per_cell);
732 fe_values->present_cell.get_interpolated_dof_values(
733 fe_function, make_array_view(dof_values.begin(), dof_values.end()));
734 internal::do_function_symmetric_gradients<dim, spacedim>(
735 make_array_view(dof_values.cbegin(), dof_values.cend()),
736 fe_values->finite_element_output.shape_gradients,
737 shape_function_data,
738 symmetric_gradients);
739 }
740
741
742
743 template <int dim, int spacedim>
744 template <class InputVector>
745 void
747 const InputVector &dof_values,
748 std::vector<
750 &symmetric_gradients) const
751 {
752 Assert(fe_values->update_flags & update_gradients,
754 "update_gradients")));
755 Assert(fe_values->present_cell.is_initialized(),
757 AssertDimension(dof_values.size(), fe_values->dofs_per_cell);
758 AssertDimension(symmetric_gradients.size(), fe_values->n_quadrature_points);
759
760 internal::do_function_symmetric_gradients<dim, spacedim>(
761 make_const_array_view(dof_values),
762 fe_values->finite_element_output.shape_gradients,
763 shape_function_data,
764 symmetric_gradients);
765 }
766
767
768
769 template <int dim, int spacedim>
770 template <typename Number>
771 void
773 const ReadVector<Number> &fe_function,
774 std::vector<solution_divergence_type<Number>> &divergences) const
775 {
776 Assert(fe_values->update_flags & update_gradients,
778 "update_gradients")));
779 Assert(fe_values->present_cell.is_initialized(),
781 AssertDimension(fe_function.size(),
782 fe_values->present_cell.n_dofs_for_dof_handler());
783 AssertDimension(divergences.size(), fe_values->n_quadrature_points);
784
785 // get function values of dofs on this cell
786 boost::container::small_vector<Number, 200> dof_values(
787 fe_values->dofs_per_cell);
788 fe_values->present_cell.get_interpolated_dof_values(
789 fe_function, make_array_view(dof_values.begin(), dof_values.end()));
790 internal::do_function_divergences<dim, spacedim>(
791 make_array_view(dof_values.cbegin(), dof_values.cend()),
792 fe_values->finite_element_output.shape_gradients,
793 shape_function_data,
794 divergences);
795 }
796
797
798
799 template <int dim, int spacedim>
800 template <class InputVector>
801 void
803 const InputVector &dof_values,
805 &divergences) const
806 {
807 Assert(fe_values->update_flags & update_gradients,
809 "update_gradients")));
810 Assert(fe_values->present_cell.is_initialized(),
812 AssertDimension(dof_values.size(), fe_values->dofs_per_cell);
813 AssertDimension(divergences.size(), fe_values->n_quadrature_points);
814
815 internal::do_function_divergences<dim, spacedim>(
816 make_const_array_view(dof_values),
817 fe_values->finite_element_output.shape_gradients,
818 shape_function_data,
819 divergences);
820 }
821
822
823
824 template <int dim, int spacedim>
825 template <typename Number>
826 void
828 const ReadVector<Number> &fe_function,
829 std::vector<solution_curl_type<Number>> &curls) const
830 {
831 Assert(fe_values->update_flags & update_gradients,
833 "update_gradients")));
834 Assert(fe_values->present_cell.is_initialized(),
835 ExcMessage("FEValues object is not reinited to any cell"));
836 AssertDimension(fe_function.size(),
837 fe_values->present_cell.n_dofs_for_dof_handler());
838 AssertDimension(curls.size(), fe_values->n_quadrature_points);
839
840 if constexpr ((dim == 2) || (dim == 3))
841 {
842 // get function values of dofs on this cell
843 boost::container::small_vector<Number, 200> dof_values(
844 fe_values->dofs_per_cell);
845 fe_values->present_cell.get_interpolated_dof_values(
846 fe_function, make_array_view(dof_values.begin(), dof_values.end()));
847 internal::do_function_curls<dim, spacedim>(
848 make_array_view(dof_values.cbegin(), dof_values.cend()),
849 fe_values->finite_element_output.shape_gradients,
850 shape_function_data,
851 curls);
852 }
853 else
854 AssertThrow(false,
855 ExcMessage("The curl is only defined for vector fields "
856 "that are either two- or three-dimensional. "
857 "You cannot ask for the curl for dim=" +
858 std::to_string(dim) + "."));
859 }
860
861
862
863 template <int dim, int spacedim>
864 template <class InputVector>
865 void
867 const InputVector &dof_values,
869 const
870 {
871 Assert(fe_values->update_flags & update_gradients,
873 "update_gradients")));
874 Assert(fe_values->present_cell.is_initialized(),
875 ExcMessage("FEValues object is not reinited to any cell"));
876 AssertDimension(dof_values.size(), fe_values->dofs_per_cell);
877 AssertDimension(curls.size(), fe_values->n_quadrature_points);
878
879 internal::do_function_curls<dim, spacedim>(
880 make_const_array_view(dof_values),
881 fe_values->finite_element_output.shape_gradients,
882 shape_function_data,
883 curls);
884 }
885
886
887
888 template <int dim, int spacedim>
889 template <typename Number>
890 void
892 const ReadVector<Number> &fe_function,
893 std::vector<solution_hessian_type<Number>> &hessians) const
894 {
895 Assert(fe_values->update_flags & update_hessians,
897 "update_hessians")));
898 Assert(fe_values->present_cell.is_initialized(),
900 AssertDimension(fe_function.size(),
901 fe_values->present_cell.n_dofs_for_dof_handler());
902 AssertDimension(hessians.size(), fe_values->n_quadrature_points);
903
904 // get function values of dofs on this cell
905 boost::container::small_vector<Number, 200> dof_values(
906 fe_values->dofs_per_cell);
907 fe_values->present_cell.get_interpolated_dof_values(
908 fe_function, make_array_view(dof_values.begin(), dof_values.end()));
909 internal::do_function_derivatives<2, dim, spacedim>(
910 make_array_view(dof_values.cbegin(), dof_values.cend()),
911 fe_values->finite_element_output.shape_hessians,
912 shape_function_data,
913 hessians);
914 }
915
916
917
918 template <int dim, int spacedim>
919 template <class InputVector>
920 void
922 const InputVector &dof_values,
924 &hessians) const
925 {
926 Assert(fe_values->update_flags & update_hessians,
928 "update_hessians")));
929 Assert(fe_values->present_cell.is_initialized(),
931 AssertDimension(dof_values.size(), fe_values->dofs_per_cell);
932 AssertDimension(hessians.size(), fe_values->n_quadrature_points);
933
934 internal::do_function_derivatives<2, dim, spacedim>(
935 make_const_array_view(dof_values),
936 fe_values->finite_element_output.shape_hessians,
937 shape_function_data,
938 hessians);
939 }
940
941
942
943 template <int dim, int spacedim>
944 template <typename Number>
945 void
947 const ReadVector<Number> &fe_function,
948 std::vector<solution_value_type<Number>> &laplacians) const
949 {
950 Assert(fe_values->update_flags & update_hessians,
952 "update_hessians")));
953 Assert(laplacians.size() == fe_values->n_quadrature_points,
954 ExcDimensionMismatch(laplacians.size(),
955 fe_values->n_quadrature_points));
956 Assert(fe_values->present_cell.is_initialized(),
958 Assert(
959 fe_function.size() == fe_values->present_cell.n_dofs_for_dof_handler(),
960 ExcDimensionMismatch(fe_function.size(),
961 fe_values->present_cell.n_dofs_for_dof_handler()));
962 AssertDimension(laplacians.size(), fe_values->n_quadrature_points);
963
964 // get function values of dofs on this cell
965 boost::container::small_vector<Number, 200> dof_values(
966 fe_values->dofs_per_cell);
967 fe_values->present_cell.get_interpolated_dof_values(
968 fe_function, make_array_view(dof_values.begin(), dof_values.end()));
969 internal::do_function_laplacians<dim, spacedim>(
970 make_array_view(dof_values.cbegin(), dof_values.cend()),
971 fe_values->finite_element_output.shape_hessians,
972 shape_function_data,
973 laplacians);
974 }
975
976
977
978 template <int dim, int spacedim>
979 template <class InputVector>
980 void
982 const InputVector &dof_values,
984 &laplacians) const
985 {
986 Assert(fe_values->update_flags & update_hessians,
988 "update_hessians")));
989 Assert(laplacians.size() == fe_values->n_quadrature_points,
990 ExcDimensionMismatch(laplacians.size(),
991 fe_values->n_quadrature_points));
992 Assert(fe_values->present_cell.is_initialized(),
994 AssertDimension(dof_values.size(), fe_values->dofs_per_cell);
995 AssertDimension(laplacians.size(), fe_values->n_quadrature_points);
996
997 internal::do_function_laplacians<dim, spacedim>(
998 make_const_array_view(dof_values),
999 fe_values->finite_element_output.shape_hessians,
1000 shape_function_data,
1001 laplacians);
1002 }
1003
1004
1005
1006 template <int dim, int spacedim>
1007 template <typename Number>
1008 void
1010 const ReadVector<Number> &fe_function,
1011 std::vector<solution_third_derivative_type<Number>> &third_derivatives)
1012 const
1013 {
1014 Assert(fe_values->update_flags & update_3rd_derivatives,
1016 "update_3rd_derivatives")));
1017 Assert(fe_values->present_cell.is_initialized(),
1019 AssertDimension(fe_function.size(),
1020 fe_values->present_cell.n_dofs_for_dof_handler());
1021 AssertDimension(third_derivatives.size(), fe_values->n_quadrature_points);
1022
1023 // get function values of dofs on this cell
1024 boost::container::small_vector<Number, 200> dof_values(
1025 fe_values->dofs_per_cell);
1026 fe_values->present_cell.get_interpolated_dof_values(
1027 fe_function, make_array_view(dof_values.begin(), dof_values.end()));
1028 internal::do_function_derivatives<3, dim, spacedim>(
1029 make_array_view(dof_values.cbegin(), dof_values.cend()),
1030 fe_values->finite_element_output.shape_3rd_derivatives,
1031 shape_function_data,
1032 third_derivatives);
1033 }
1034
1035
1036
1037 template <int dim, int spacedim>
1038 template <class InputVector>
1039 void
1041 const InputVector &dof_values,
1042 std::vector<
1044 &third_derivatives) const
1045 {
1046 Assert(fe_values->update_flags & update_3rd_derivatives,
1048 "update_3rd_derivatives")));
1049 Assert(fe_values->present_cell.is_initialized(),
1051 AssertDimension(dof_values.size(), fe_values->dofs_per_cell);
1052 AssertDimension(third_derivatives.size(), fe_values->n_quadrature_points);
1053
1054 internal::do_function_derivatives<3, dim, spacedim>(
1055 make_const_array_view(dof_values),
1056 fe_values->finite_element_output.shape_3rd_derivatives,
1057 shape_function_data,
1058 third_derivatives);
1059 }
1060
1061
1062
1063 template <int dim, int spacedim>
1064 template <typename Number>
1065 void
1067 const ReadVector<Number> &fe_function,
1068 std::vector<solution_value_type<Number>> &values) const
1069 {
1070 Assert(fe_values->update_flags & update_values,
1072 "update_values")));
1073 Assert(fe_values->present_cell.is_initialized(),
1075 AssertDimension(values.size(), fe_values->n_quadrature_points);
1076
1077 // get function values of dofs on this cell
1078 boost::container::small_vector<Number, 200> dof_values(
1079 fe_values->dofs_per_cell);
1080 fe_values->present_cell.get_interpolated_dof_values(
1081 fe_function, make_array_view(dof_values.begin(), dof_values.end()));
1082 internal::do_function_values<dim, spacedim>(
1083 make_array_view(dof_values.cbegin(), dof_values.cend()),
1084 fe_values->finite_element_output.shape_values,
1085 shape_function_data,
1086 values);
1087 }
1088
1089
1090
1091 template <int dim, int spacedim>
1092 template <class InputVector>
1093 void
1095 const InputVector &dof_values,
1097 const
1098 {
1099 Assert(fe_values->update_flags & update_values,
1101 "update_values")));
1102 Assert(fe_values->present_cell.is_initialized(),
1104 AssertDimension(dof_values.size(), fe_values->dofs_per_cell);
1105 AssertDimension(values.size(), fe_values->n_quadrature_points);
1106
1107 internal::do_function_values<dim, spacedim>(
1108 make_const_array_view(dof_values),
1109 fe_values->finite_element_output.shape_values,
1110 shape_function_data,
1111 values);
1112 }
1113
1114
1115
1116 template <int dim, int spacedim>
1117 template <typename Number>
1118 void
1120 const ReadVector<Number> &fe_function,
1121 std::vector<solution_divergence_type<Number>> &divergences) const
1122 {
1123 Assert(fe_values->update_flags & update_gradients,
1125 "update_gradients")));
1126 Assert(fe_values->present_cell.is_initialized(),
1128 AssertDimension(fe_function.size(),
1129 fe_values->present_cell.n_dofs_for_dof_handler());
1130 AssertDimension(divergences.size(), fe_values->n_quadrature_points);
1131
1132 // get function values of dofs on this cell
1133 boost::container::small_vector<Number, 200> dof_values(
1134 fe_values->dofs_per_cell);
1135 fe_values->present_cell.get_interpolated_dof_values(
1136 fe_function, make_array_view(dof_values.begin(), dof_values.end()));
1137 internal::do_function_divergences<dim, spacedim>(
1138 make_array_view(dof_values.cbegin(), dof_values.cend()),
1139 fe_values->finite_element_output.shape_gradients,
1140 shape_function_data,
1141 divergences);
1142 }
1143
1144
1145
1146 template <int dim, int spacedim>
1147 template <class InputVector>
1148 void
1151 const InputVector &dof_values,
1153 &divergences) const
1154 {
1155 Assert(fe_values->update_flags & update_gradients,
1157 "update_gradients")));
1158 Assert(fe_values->present_cell.is_initialized(),
1160 AssertDimension(dof_values.size(), fe_values->dofs_per_cell);
1161 AssertDimension(divergences.size(), fe_values->n_quadrature_points);
1162
1163 internal::do_function_divergences<dim, spacedim>(
1164 make_const_array_view(dof_values),
1165 fe_values->finite_element_output.shape_gradients,
1166 shape_function_data,
1167 divergences);
1168 }
1169
1170
1171
1172 template <int dim, int spacedim>
1173 template <typename Number>
1174 void
1176 const ReadVector<Number> &fe_function,
1177 std::vector<solution_value_type<Number>> &values) const
1178 {
1179 Assert(fe_values->update_flags & update_values,
1181 "update_values")));
1182 Assert(fe_values->present_cell.is_initialized(),
1184 AssertDimension(values.size(), fe_values->n_quadrature_points);
1185
1186 // get function values of dofs on this cell
1187 boost::container::small_vector<Number, 200> dof_values(
1188 fe_values->dofs_per_cell);
1189 fe_values->present_cell.get_interpolated_dof_values(
1190 fe_function, make_array_view(dof_values.begin(), dof_values.end()));
1191 internal::do_function_values<dim, spacedim>(
1192 make_array_view(dof_values.cbegin(), dof_values.cend()),
1193 fe_values->finite_element_output.shape_values,
1194 shape_function_data,
1195 values);
1196 }
1197
1198
1199
1200 template <int dim, int spacedim>
1201 template <class InputVector>
1202 void
1204 const InputVector &dof_values,
1206 const
1207 {
1208 Assert(fe_values->update_flags & update_values,
1210 "update_values")));
1211 Assert(fe_values->present_cell.is_initialized(),
1213 AssertDimension(dof_values.size(), fe_values->dofs_per_cell);
1214 AssertDimension(values.size(), fe_values->n_quadrature_points);
1215
1216 internal::do_function_values<dim, spacedim>(
1217 make_const_array_view(dof_values),
1218 fe_values->finite_element_output.shape_values,
1219 shape_function_data,
1220 values);
1221 }
1222
1223
1224
1225 template <int dim, int spacedim>
1226 template <typename Number>
1227 void
1229 const ReadVector<Number> &fe_function,
1230 std::vector<solution_divergence_type<Number>> &divergences) const
1231 {
1232 Assert(fe_values->update_flags & update_gradients,
1234 "update_gradients")));
1235 Assert(fe_values->present_cell.is_initialized(),
1237 AssertDimension(fe_function.size(),
1238 fe_values->present_cell.n_dofs_for_dof_handler());
1239 AssertDimension(divergences.size(), fe_values->n_quadrature_points);
1240
1241 // get function values of dofs on this cell
1242 boost::container::small_vector<Number, 200> dof_values(
1243 fe_values->dofs_per_cell);
1244 fe_values->present_cell.get_interpolated_dof_values(
1245 fe_function, make_array_view(dof_values.begin(), dof_values.end()));
1246 internal::do_function_divergences<dim, spacedim>(
1247 make_array_view(dof_values.cbegin(), dof_values.cend()),
1248 fe_values->finite_element_output.shape_gradients,
1249 shape_function_data,
1250 divergences);
1251 }
1252
1253
1254
1255 template <int dim, int spacedim>
1256 template <class InputVector>
1257 void
1259 const InputVector &dof_values,
1261 &divergences) const
1262 {
1263 Assert(fe_values->update_flags & update_gradients,
1265 "update_gradients")));
1266 Assert(fe_values->present_cell.is_initialized(),
1268 AssertDimension(dof_values.size(), fe_values->dofs_per_cell);
1269 AssertDimension(divergences.size(), fe_values->n_quadrature_points);
1270
1271 internal::do_function_divergences<dim, spacedim>(
1272 make_const_array_view(dof_values),
1273 fe_values->finite_element_output.shape_gradients,
1274 shape_function_data,
1275 divergences);
1276 }
1277
1278
1279
1280 template <int dim, int spacedim>
1281 template <typename Number>
1282 void
1284 const ReadVector<Number> &fe_function,
1285 std::vector<solution_gradient_type<Number>> &gradients) const
1286 {
1287 Assert(fe_values->update_flags & update_gradients,
1289 "update_gradients")));
1290 Assert(fe_values->present_cell.is_initialized(),
1292 AssertDimension(fe_function.size(),
1293 fe_values->present_cell.n_dofs_for_dof_handler());
1294 AssertDimension(gradients.size(), fe_values->n_quadrature_points);
1295
1296 // get function values of dofs on this cell
1297 boost::container::small_vector<Number, 200> dof_values(
1298 fe_values->dofs_per_cell);
1299 fe_values->present_cell.get_interpolated_dof_values(
1300 fe_function, make_array_view(dof_values.begin(), dof_values.end()));
1301 internal::do_function_gradients<dim, spacedim>(
1302 make_array_view(dof_values.cbegin(), dof_values.cend()),
1303 fe_values->finite_element_output.shape_gradients,
1304 shape_function_data,
1305 gradients);
1306 }
1307
1308
1309
1310 template <int dim, int spacedim>
1311 template <class InputVector>
1312 void
1314 const InputVector &dof_values,
1316 &gradients) const
1317 {
1318 Assert(fe_values->update_flags & update_gradients,
1320 "update_gradients")));
1321 Assert(fe_values->present_cell.is_initialized(),
1323 AssertDimension(dof_values.size(), fe_values->dofs_per_cell);
1324 AssertDimension(gradients.size(), fe_values->n_quadrature_points);
1325
1326 internal::do_function_gradients<dim, spacedim>(
1327 make_const_array_view(dof_values),
1328 fe_values->finite_element_output.shape_gradients,
1329 shape_function_data,
1330 gradients);
1331 }
1332} // namespace FEValuesViews
1333
1334
1335namespace internal
1336{
1337 namespace FEValuesViews
1338 {
1339 template <int dim, int spacedim>
1341 {
1342 const FiniteElement<dim, spacedim> &fe = fe_values.get_fe();
1343
1344 const unsigned int n_scalars = fe.n_components();
1345 scalars.resize(n_scalars);
1346
1347 // compute number of vectors that we can fit into this finite element.
1348 // note that this is based on the dimensionality 'dim' of the manifold,
1349 // not 'spacedim' of the output vector
1350 const unsigned int n_vectors =
1353 1 :
1354 0);
1355 vectors.resize(n_vectors);
1356
1357 // compute number of symmetric tensors in the same way as above
1358 const unsigned int n_symmetric_second_order_tensors =
1359 (fe.n_components() >=
1361 fe.n_components() -
1363 0);
1364 symmetric_second_order_tensors.resize(n_symmetric_second_order_tensors);
1365
1366 // compute number of symmetric tensors in the same way as above
1367 const unsigned int n_second_order_tensors =
1370 1 :
1371 0);
1372 second_order_tensors.resize(n_second_order_tensors);
1373 }
1374 } // namespace FEValuesViews
1375} // namespace internal
1376
1377/*------------------------------- Explicit Instantiations -------------*/
1378
1379#include "fe/fe_values_views.inst"
1380
auto make_const_array_view(const Container &container) -> decltype(make_array_view(container))
ArrayView< std::remove_reference_t< typename std::iterator_traits< Iterator >::reference >, MemorySpaceType > make_array_view(const Iterator begin, const Iterator end)
const ObserverPointer< const FiniteElement< dim, spacedim >, FEValuesBase< dim, spacedim > > fe
const FiniteElement< dim, spacedim > & get_fe() const
void get_function_third_derivatives_from_local_dof_values(const InputVector &dof_values, std::vector< solution_third_derivative_type< typename InputVector::value_type > > &third_derivatives) const
void get_function_laplacians(const ReadVector< Number > &fe_function, std::vector< solution_laplacian_type< Number > > &laplacians) const
typename ProductType< Number, hessian_type >::type solution_hessian_type
void get_function_hessians_from_local_dof_values(const InputVector &dof_values, std::vector< solution_hessian_type< typename InputVector::value_type > > &hessians) const
void get_function_values_from_local_dof_values(const InputVector &dof_values, std::vector< solution_value_type< typename InputVector::value_type > > &values) const
std::vector< ShapeFunctionData > shape_function_data
void get_function_gradients(const ReadVector< Number > &fe_function, std::vector< solution_gradient_type< Number > > &gradients) const
typename ProductType< Number, value_type >::type solution_laplacian_type
typename ProductType< Number, third_derivative_type >::type solution_third_derivative_type
typename ProductType< Number, value_type >::type solution_value_type
typename ProductType< Number, gradient_type >::type solution_gradient_type
void get_function_values(const ReadVector< Number > &fe_function, std::vector< solution_value_type< Number > > &values) const
void get_function_laplacians_from_local_dof_values(const InputVector &dof_values, std::vector< solution_laplacian_type< typename InputVector::value_type > > &laplacians) const
void get_function_gradients_from_local_dof_values(const InputVector &dof_values, std::vector< solution_gradient_type< typename InputVector::value_type > > &gradients) const
void get_function_third_derivatives(const ReadVector< Number > &fe_function, std::vector< solution_third_derivative_type< Number > > &third_derivatives) const
void get_function_hessians(const ReadVector< Number > &fe_function, std::vector< solution_hessian_type< Number > > &hessians) const
typename ProductType< Number, value_type >::type solution_value_type
typename ProductType< Number, divergence_type >::type solution_divergence_type
typename ProductType< Number, value_type >::type solution_value_type
typename ProductType< Number, divergence_type >::type solution_divergence_type
typename ProductType< Number, gradient_type >::type solution_gradient_type
typename ProductType< Number, third_derivative_type >::type solution_third_derivative_type
void get_function_symmetric_gradients_from_local_dof_values(const InputVector &dof_values, std::vector< solution_symmetric_gradient_type< typename InputVector::value_type > > &symmetric_gradients) const
void get_function_gradients_from_local_dof_values(const InputVector &dof_values, std::vector< solution_gradient_type< typename InputVector::value_type > > &gradients) const
typename ProductType< Number, divergence_type >::type solution_divergence_type
void get_function_laplacians(const ReadVector< Number > &fe_function, std::vector< solution_laplacian_type< Number > > &laplacians) const
unsigned int first_vector_component
void get_function_gradients(const ReadVector< Number > &fe_function, std::vector< solution_gradient_type< Number > > &gradients) const
typename ProductType< Number, hessian_type >::type solution_hessian_type
void get_function_symmetric_gradients(const ReadVector< Number > &fe_function, std::vector< solution_symmetric_gradient_type< Number > > &symmetric_gradients) const
typename ProductType< Number, symmetric_gradient_type >::type solution_symmetric_gradient_type
void get_function_laplacians_from_local_dof_values(const InputVector &dof_values, std::vector< solution_laplacian_type< typename InputVector::value_type > > &laplacians) const
void get_function_hessians(const ReadVector< Number > &fe_function, std::vector< solution_hessian_type< Number > > &hessians) const
typename ProductType< Number, gradient_type >::type solution_gradient_type
typename ProductType< Number, value_type >::type solution_value_type
void get_function_third_derivatives(const ReadVector< Number > &fe_function, std::vector< solution_third_derivative_type< Number > > &third_derivatives) const
void get_function_values(const ReadVector< Number > &fe_function, std::vector< solution_value_type< Number > > &values) const
void get_function_curls_from_local_dof_values(const InputVector &dof_values, std::vector< solution_curl_type< typename InputVector::value_type > > &curls) const
typename ProductType< Number, curl_type >::type solution_curl_type
std::vector< ShapeFunctionData > shape_function_data
void get_function_curls(const ReadVector< Number > &fe_function, std::vector< solution_curl_type< Number > > &curls) const
void get_function_hessians_from_local_dof_values(const InputVector &dof_values, std::vector< solution_hessian_type< typename InputVector::value_type > > &hessians) const
typename ProductType< Number, value_type >::type solution_laplacian_type
void get_function_values_from_local_dof_values(const InputVector &dof_values, std::vector< solution_value_type< typename InputVector::value_type > > &values) const
void get_function_divergences_from_local_dof_values(const InputVector &dof_values, std::vector< solution_divergence_type< typename InputVector::value_type > > &divergences) const
void get_function_third_derivatives_from_local_dof_values(const InputVector &dof_values, std::vector< solution_third_derivative_type< typename InputVector::value_type > > &third_derivatives) const
void get_function_divergences(const ReadVector< Number > &fe_function, std::vector< solution_divergence_type< Number > > &divergences) const
unsigned int n_dofs_per_cell() const
unsigned int n_components() const
const ComponentMask & get_nonzero_components(const unsigned int i) const
bool is_primitive() const
std::pair< unsigned int, unsigned int > system_to_component_index(const unsigned int index) const
virtual size_type size() const =0
constexpr SymmetricTensor()=default
friend class Tensor
Definition tensor.h:864
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
#define Assert(cond, exc)
#define AssertDimension(dim1, dim2)
#define AssertIndexRange(index, range)
static ::ExceptionBase & ExcIndexRange(std::size_t arg1, std::size_t arg2, std::size_t arg3)
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
static ::ExceptionBase & ExcMessage(std::string arg1)
#define AssertThrow(cond, exc)
@ update_hessians
Second derivatives of shape functions.
@ update_values
Shape function values.
@ update_3rd_derivatives
Third derivatives of shape functions.
@ update_gradients
Shape function gradients.
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
Cache(const FEValuesBase< dim, spacedim > &fe_values)