Reference documentation for deal.II version 9.4.1
\(\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
tensor_product_matrix.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2017 - 2021 by the deal.II authors
4//
5// This file is part of the deal.II library.
6//
7// The deal.II library is free software; you can use it, redistribute
8// it, and/or modify it under the terms of the GNU Lesser General
9// Public License as published by the Free Software Foundation; either
10// version 2.1 of the License, or (at your option) any later version.
11// The full text of the license can be found in the file LICENSE.md at
12// the top level directory of deal.II.
13//
14// ---------------------------------------------------------------------
15
16#ifndef dealii_tensor_product_matrix_h
17#define dealii_tensor_product_matrix_h
18
19
20#include <deal.II/base/config.h>
21
24
26
28
30
31// Forward declarations
32#ifndef DOXYGEN
33template <typename>
34class Vector;
35template <typename>
36class FullMatrix;
37#endif
38
73template <int dim, typename Number, int n_rows_1d = -1>
75{
76public:
81 using value_type = Number;
82
87 static constexpr int n_rows_1d_static = n_rows_1d;
88
94 unsigned int
95 m() const;
96
102 unsigned int
103 n() const;
104
111 void
112 vmult(const ArrayView<Number> &dst, const ArrayView<const Number> &src) const;
113
120 void
122 const ArrayView<const Number> &src) const;
123
124protected:
129
133 std::array<Table<2, Number>, dim> mass_matrix;
134
138 std::array<Table<2, Number>, dim> derivative_matrix;
139
144 std::array<AlignedVector<Number>, dim> eigenvalues;
145
150 std::array<Table<2, Number>, dim> eigenvectors;
151
152private:
157
162};
163
164
165
237template <int dim, typename Number, int n_rows_1d = -1>
239 : public TensorProductMatrixSymmetricSumBase<dim, Number, n_rows_1d>
240{
241public:
246
254 const std::array<Table<2, Number>, dim> &mass_matrix,
255 const std::array<Table<2, Number>, dim> &derivative_matrix);
256
264 const std::array<FullMatrix<Number>, dim> &mass_matrix,
265 const std::array<FullMatrix<Number>, dim> &derivative_matrix);
266
273
285 void
286 reinit(const std::array<Table<2, Number>, dim> &mass_matrix,
287 const std::array<Table<2, Number>, dim> &derivative_matrix);
288
294 void
295 reinit(const std::array<FullMatrix<Number>, dim> &mass_matrix,
296 const std::array<FullMatrix<Number>, dim> &derivative_matrix);
297
303 void
306
307private:
316 template <typename MatrixArray>
317 void
318 reinit_impl(MatrixArray &&mass_matrix, MatrixArray &&derivative_matrix);
319};
320
321
322
329template <int dim, typename Number, int n_rows_1d>
332 VectorizedArray<Number>,
333 n_rows_1d>
334{
335public:
340
348 const std::array<Table<2, VectorizedArray<Number>>, dim> &mass_matrix,
349 const std::array<Table<2, VectorizedArray<Number>>, dim>
351
361
373 void
374 reinit(const std::array<Table<2, VectorizedArray<Number>>, dim> &mass_matrix,
375 const std::array<Table<2, VectorizedArray<Number>>, dim>
377
383 void
386
387private:
396 template <typename MatrixArray>
397 void
398 reinit_impl(MatrixArray &&mass_matrix, MatrixArray &&derivative_matrix);
399};
400
401
402/*----------------------- Inline functions ----------------------------------*/
403
404#ifndef DOXYGEN
405
406namespace internal
407{
408 namespace TensorProductMatrix
409 {
418 template <typename Number>
419 void
420 spectral_assembly(const Number * mass_matrix,
421 const Number * derivative_matrix,
422 const unsigned int n_rows,
423 const unsigned int n_cols,
424 Number * eigenvalues,
425 Number * eigenvectors)
426 {
427 Assert(n_rows == n_cols, ExcNotImplemented());
428
429 auto &&transpose_fill_nm = [](Number * out,
430 const Number * in,
431 const unsigned int n,
432 const unsigned int m) {
433 for (unsigned int mm = 0; mm < m; ++mm)
434 for (unsigned int nn = 0; nn < n; ++nn)
435 out[mm + nn * m] = *(in++);
436 };
437
438 std::vector<::Vector<Number>> eigenvecs(n_rows);
439 LAPACKFullMatrix<Number> mass_copy(n_rows, n_cols);
440 LAPACKFullMatrix<Number> deriv_copy(n_rows, n_cols);
441
442 transpose_fill_nm(&(mass_copy(0, 0)), mass_matrix, n_rows, n_cols);
443 transpose_fill_nm(&(deriv_copy(0, 0)), derivative_matrix, n_rows, n_cols);
444
445 deriv_copy.compute_generalized_eigenvalues_symmetric(mass_copy,
446 eigenvecs);
447 AssertDimension(eigenvecs.size(), n_rows);
448 for (unsigned int i = 0; i < n_rows; ++i)
449 for (unsigned int j = 0; j < n_cols; ++j, ++eigenvectors)
450 *eigenvectors = eigenvecs[j][i];
451
452 for (unsigned int i = 0; i < n_rows; ++i, ++eigenvalues)
453 *eigenvalues = deriv_copy.eigenvalue(i).real();
454 }
455 } // namespace TensorProductMatrix
456} // namespace internal
457
458
459template <int dim, typename Number, int n_rows_1d>
460inline unsigned int
462{
463 unsigned int m = mass_matrix[0].n_rows();
464 for (unsigned int d = 1; d < dim; ++d)
465 m *= mass_matrix[d].n_rows();
466 return m;
467}
468
469
470
471template <int dim, typename Number, int n_rows_1d>
472inline unsigned int
474{
475 unsigned int n = mass_matrix[0].n_cols();
476 for (unsigned int d = 1; d < dim; ++d)
477 n *= mass_matrix[d].n_cols();
478 return n;
479}
480
481
482
483template <int dim, typename Number, int n_rows_1d>
484inline void
486 const ArrayView<Number> & dst_view,
487 const ArrayView<const Number> &src_view) const
488{
489 AssertDimension(dst_view.size(), this->m());
490 AssertDimension(src_view.size(), this->n());
491 std::lock_guard<std::mutex> lock(this->mutex);
492 const unsigned int n = Utilities::fixed_power<dim>(
493 n_rows_1d > 0 ? n_rows_1d : eigenvalues[0].size());
494 tmp_array.resize_fast(n * 2);
495 constexpr int kernel_size = n_rows_1d > 0 ? n_rows_1d : 0;
497 dim,
498 kernel_size,
499 kernel_size,
500 Number>
504 mass_matrix[0].n_rows(),
505 mass_matrix[0].n_rows());
506 Number * t = tmp_array.begin();
507 const Number *src = src_view.begin();
508 Number * dst = dst_view.data();
509
510 if (dim == 1)
511 {
512 const Number *A = &derivative_matrix[0](0, 0);
513 eval.template apply<0, false, false>(A, src, dst);
514 }
515
516 else if (dim == 2)
517 {
518 const Number *A0 = &derivative_matrix[0](0, 0);
519 const Number *M0 = &mass_matrix[0](0, 0);
520 const Number *A1 = &derivative_matrix[1](0, 0);
521 const Number *M1 = &mass_matrix[1](0, 0);
522 eval.template apply<0, false, false>(M0, src, t);
523 eval.template apply<1, false, false>(A1, t, dst);
524 eval.template apply<0, false, false>(A0, src, t);
525 eval.template apply<1, false, true>(M1, t, dst);
526 }
527
528 else if (dim == 3)
529 {
530 const Number *A0 = &derivative_matrix[0](0, 0);
531 const Number *M0 = &mass_matrix[0](0, 0);
532 const Number *A1 = &derivative_matrix[1](0, 0);
533 const Number *M1 = &mass_matrix[1](0, 0);
534 const Number *A2 = &derivative_matrix[2](0, 0);
535 const Number *M2 = &mass_matrix[2](0, 0);
536 eval.template apply<0, false, false>(M0, src, t + n);
537 eval.template apply<1, false, false>(M1, t + n, t);
538 eval.template apply<2, false, false>(A2, t, dst);
539 eval.template apply<1, false, false>(A1, t + n, t);
540 eval.template apply<0, false, false>(A0, src, t + n);
541 eval.template apply<1, false, true>(M1, t + n, t);
542 eval.template apply<2, false, true>(M2, t, dst);
543 }
544
545 else
547}
548
549
550
551template <int dim, typename Number, int n_rows_1d>
552inline void
554 const ArrayView<Number> & dst_view,
555 const ArrayView<const Number> &src_view) const
556{
557 AssertDimension(dst_view.size(), this->n());
558 AssertDimension(src_view.size(), this->m());
559 std::lock_guard<std::mutex> lock(this->mutex);
560 const unsigned int n = n_rows_1d > 0 ? n_rows_1d : eigenvalues[0].size();
561 tmp_array.resize_fast(Utilities::fixed_power<dim>(n));
562 constexpr int kernel_size = n_rows_1d > 0 ? n_rows_1d : 0;
564 dim,
565 kernel_size,
566 kernel_size,
567 Number>
571 mass_matrix[0].n_rows(),
572 mass_matrix[0].n_rows());
573 Number * t = tmp_array.begin();
574 const Number *src = src_view.data();
575 Number * dst = dst_view.data();
576
577 // NOTE: dof_to_quad has to be interpreted as 'dof to eigenvalue index'
578 // --> apply<.,true,.> (S,src,dst) calculates dst = S^T * src,
579 // --> apply<.,false,.> (S,src,dst) calculates dst = S * src,
580 // while the eigenvectors are stored column-wise in S, i.e.
581 // rows correspond to dofs whereas columns to eigenvalue indices!
582 if (dim == 1)
583 {
584 const Number *S = &eigenvectors[0](0, 0);
585 eval.template apply<0, true, false>(S, src, t);
586 for (unsigned int i = 0; i < n; ++i)
587 t[i] /= eigenvalues[0][i];
588 eval.template apply<0, false, false>(S, t, dst);
589 }
590
591 else if (dim == 2)
592 {
593 const Number *S0 = &(eigenvectors[0](0, 0));
594 const Number *S1 = &(eigenvectors[1](0, 0));
595 eval.template apply<0, true, false>(S0, src, t);
596 eval.template apply<1, true, false>(S1, t, dst);
597 for (unsigned int i1 = 0, c = 0; i1 < n; ++i1)
598 for (unsigned int i0 = 0; i0 < n; ++i0, ++c)
599 dst[c] /= (eigenvalues[1][i1] + eigenvalues[0][i0]);
600 eval.template apply<0, false, false>(S0, dst, t);
601 eval.template apply<1, false, false>(S1, t, dst);
602 }
603
604 else if (dim == 3)
605 {
606 const Number *S0 = &eigenvectors[0](0, 0);
607 const Number *S1 = &eigenvectors[1](0, 0);
608 const Number *S2 = &eigenvectors[2](0, 0);
609 eval.template apply<0, true, false>(S0, src, t);
610 eval.template apply<1, true, false>(S1, t, dst);
611 eval.template apply<2, true, false>(S2, dst, t);
612 for (unsigned int i2 = 0, c = 0; i2 < n; ++i2)
613 for (unsigned int i1 = 0; i1 < n; ++i1)
614 for (unsigned int i0 = 0; i0 < n; ++i0, ++c)
615 t[c] /=
616 (eigenvalues[2][i2] + eigenvalues[1][i1] + eigenvalues[0][i0]);
617 eval.template apply<0, false, false>(S0, t, dst);
618 eval.template apply<1, false, false>(S1, dst, t);
619 eval.template apply<2, false, false>(S2, t, dst);
620 }
621
622 else
623 Assert(false, ExcNotImplemented());
624}
625
626
627//---------------------- TensorProductMatrixSymmetricSum ----------------------
628
629template <int dim, typename Number, int n_rows_1d>
632 const std::array<Table<2, Number>, dim> &mass_matrix,
633 const std::array<Table<2, Number>, dim> &derivative_matrix)
634{
635 reinit(mass_matrix, derivative_matrix);
636}
637
638
639
640template <int dim, typename Number, int n_rows_1d>
643 const std::array<FullMatrix<Number>, dim> &mass_matrix,
644 const std::array<FullMatrix<Number>, dim> &derivative_matrix)
645{
646 reinit(mass_matrix, derivative_matrix);
647}
648
649
650
651template <int dim, typename Number, int n_rows_1d>
654 const Table<2, Number> &derivative_matrix)
655{
656 reinit(mass_matrix, derivative_matrix);
657}
658
659
660
661template <int dim, typename Number, int n_rows_1d>
662template <typename MatrixArray>
663inline void
665 MatrixArray &&mass_matrices_,
666 MatrixArray &&derivative_matrices_)
667{
668 auto &&mass_matrices = std::forward<MatrixArray>(mass_matrices_);
669 auto &&derivative_matrices = std::forward<MatrixArray>(derivative_matrices_);
670 this->mass_matrix = mass_matrices;
671 this->derivative_matrix = derivative_matrices;
672
673 for (unsigned int dir = 0; dir < dim; ++dir)
674 {
675 Assert(n_rows_1d == -1 ||
676 (n_rows_1d > 0 && static_cast<unsigned int>(n_rows_1d) ==
677 mass_matrices[dir].n_rows()),
678 ExcDimensionMismatch(n_rows_1d, mass_matrices[dir].n_rows()));
679 AssertDimension(mass_matrices[dir].n_rows(), mass_matrices[dir].n_cols());
680 AssertDimension(mass_matrices[dir].n_rows(),
681 derivative_matrices[dir].n_rows());
682 AssertDimension(mass_matrices[dir].n_rows(),
683 derivative_matrices[dir].n_cols());
684
685 this->eigenvectors[dir].reinit(mass_matrices[dir].n_cols(),
686 mass_matrices[dir].n_rows());
687 this->eigenvalues[dir].resize(mass_matrices[dir].n_cols());
688 internal::TensorProductMatrix::spectral_assembly<Number>(
689 &(mass_matrices[dir](0, 0)),
690 &(derivative_matrices[dir](0, 0)),
691 mass_matrices[dir].n_rows(),
692 mass_matrices[dir].n_cols(),
693 this->eigenvalues[dir].begin(),
694 &(this->eigenvectors[dir](0, 0)));
695 }
696}
697
698
699
700template <int dim, typename Number, int n_rows_1d>
701inline void
703 const std::array<Table<2, Number>, dim> &mass_matrix,
704 const std::array<Table<2, Number>, dim> &derivative_matrix)
705{
706 reinit_impl(mass_matrix, derivative_matrix);
707}
708
709
710
711template <int dim, typename Number, int n_rows_1d>
712inline void
714 const std::array<FullMatrix<Number>, dim> &mass_matrix,
715 const std::array<FullMatrix<Number>, dim> &derivative_matrix)
716{
717 std::array<Table<2, Number>, dim> mass_copy;
718 std::array<Table<2, Number>, dim> deriv_copy;
719
720 std::transform(mass_matrix.cbegin(),
721 mass_matrix.cend(),
722 mass_copy.begin(),
723 [](const FullMatrix<Number> &m) -> Table<2, Number> {
724 return m;
725 });
726 std::transform(derivative_matrix.cbegin(),
727 derivative_matrix.cend(),
728 deriv_copy.begin(),
729 [](const FullMatrix<Number> &m) -> Table<2, Number> {
730 return m;
731 });
732
733 reinit_impl(std::move(mass_copy), std::move(deriv_copy));
734}
735
736
737
738template <int dim, typename Number, int n_rows_1d>
739inline void
741 const Table<2, Number> &mass_matrix,
742 const Table<2, Number> &derivative_matrix)
743{
744 std::array<Table<2, Number>, dim> mass_matrices;
745 std::array<Table<2, Number>, dim> derivative_matrices;
746
747 std::fill(mass_matrices.begin(), mass_matrices.end(), mass_matrix);
748 std::fill(derivative_matrices.begin(),
749 derivative_matrices.end(),
750 derivative_matrix);
751
752 reinit_impl(std::move(mass_matrices), std::move(derivative_matrices));
753}
754
755
756
757//------------- vectorized spec.: TensorProductMatrixSymmetricSum -------------
758
759template <int dim, typename Number, int n_rows_1d>
762 n_rows_1d>::
763 TensorProductMatrixSymmetricSum(
764 const std::array<Table<2, VectorizedArray<Number>>, dim> &mass_matrix,
765 const std::array<Table<2, VectorizedArray<Number>>, dim> &derivative_matrix)
766{
767 reinit(mass_matrix, derivative_matrix);
768}
769
770
771
772template <int dim, typename Number, int n_rows_1d>
775 n_rows_1d>::
776 TensorProductMatrixSymmetricSum(
777 const Table<2, VectorizedArray<Number>> &mass_matrix,
778 const Table<2, VectorizedArray<Number>> &derivative_matrix)
779{
780 reinit(mass_matrix, derivative_matrix);
781}
782
783
784
785template <int dim, typename Number, int n_rows_1d>
786template <typename MatrixArray>
787inline void
789 reinit_impl(MatrixArray &&mass_matrices_, MatrixArray &&derivative_matrices_)
790{
791 auto &&mass_matrix = std::forward<MatrixArray>(mass_matrices_);
792 auto &&derivative_matrix = std::forward<MatrixArray>(derivative_matrices_);
793 this->mass_matrix = mass_matrix;
794 this->derivative_matrix = derivative_matrix;
795
796 constexpr unsigned int macro_size = VectorizedArray<Number>::size();
797 std::size_t n_rows_max = (n_rows_1d > 0) ? n_rows_1d : 0;
798 if (n_rows_1d == -1)
799 for (unsigned int d = 0; d < dim; ++d)
800 n_rows_max = std::max(n_rows_max, mass_matrix[d].n_rows());
801 const std::size_t nm_flat_size_max = n_rows_max * n_rows_max * macro_size;
802 const std::size_t n_flat_size_max = n_rows_max * macro_size;
803
804 std::vector<Number> mass_matrix_flat;
805 std::vector<Number> deriv_matrix_flat;
806 std::vector<Number> eigenvalues_flat;
807 std::vector<Number> eigenvectors_flat;
808 mass_matrix_flat.resize(nm_flat_size_max);
809 deriv_matrix_flat.resize(nm_flat_size_max);
810 eigenvalues_flat.resize(n_flat_size_max);
811 eigenvectors_flat.resize(nm_flat_size_max);
812 std::array<unsigned int, macro_size> offsets_nm;
813 std::array<unsigned int, macro_size> offsets_n;
814 for (unsigned int dir = 0; dir < dim; ++dir)
815 {
816 Assert(n_rows_1d == -1 ||
817 (n_rows_1d > 0 && static_cast<unsigned int>(n_rows_1d) ==
818 mass_matrix[dir].n_rows()),
819 ExcDimensionMismatch(n_rows_1d, mass_matrix[dir].n_rows()));
820 AssertDimension(mass_matrix[dir].n_rows(), mass_matrix[dir].n_cols());
821 AssertDimension(mass_matrix[dir].n_rows(),
822 derivative_matrix[dir].n_rows());
823 AssertDimension(mass_matrix[dir].n_rows(),
824 derivative_matrix[dir].n_cols());
825
826 const unsigned int n_rows = mass_matrix[dir].n_rows();
827 const unsigned int n_cols = mass_matrix[dir].n_cols();
828 const unsigned int nm = n_rows * n_cols;
829 for (unsigned int vv = 0; vv < macro_size; ++vv)
830 offsets_nm[vv] = nm * vv;
831
833 nm,
834 &(mass_matrix[dir](0, 0)),
835 offsets_nm.cbegin(),
836 mass_matrix_flat.data());
838 nm,
839 &(derivative_matrix[dir](0, 0)),
840 offsets_nm.cbegin(),
841 deriv_matrix_flat.data());
842
843 const Number *mass_cbegin = mass_matrix_flat.data();
844 const Number *deriv_cbegin = deriv_matrix_flat.data();
845 Number * eigenvec_begin = eigenvectors_flat.data();
846 Number * eigenval_begin = eigenvalues_flat.data();
847 for (unsigned int lane = 0; lane < macro_size; ++lane)
848 internal::TensorProductMatrix::spectral_assembly<Number>(
849 mass_cbegin + nm * lane,
850 deriv_cbegin + nm * lane,
851 n_rows,
852 n_cols,
853 eigenval_begin + n_rows * lane,
854 eigenvec_begin + nm * lane);
855
856 this->eigenvalues[dir].resize(n_rows);
857 this->eigenvectors[dir].reinit(n_rows, n_cols);
858 for (unsigned int vv = 0; vv < macro_size; ++vv)
859 offsets_n[vv] = n_rows * vv;
861 eigenvalues_flat.data(),
862 offsets_n.cbegin(),
863 this->eigenvalues[dir].begin());
865 eigenvectors_flat.data(),
866 offsets_nm.cbegin(),
867 &(this->eigenvectors[dir](0, 0)));
868 }
869}
870
871
872
873template <int dim, typename Number, int n_rows_1d>
874inline void
876 reinit(
877 const std::array<Table<2, VectorizedArray<Number>>, dim> &mass_matrix,
878 const std::array<Table<2, VectorizedArray<Number>>, dim> &derivative_matrix)
879{
880 reinit_impl(mass_matrix, derivative_matrix);
881}
882
883
884
885template <int dim, typename Number, int n_rows_1d>
886inline void
888 reinit(const Table<2, VectorizedArray<Number>> &mass_matrix,
889 const Table<2, VectorizedArray<Number>> &derivative_matrix)
890{
891 std::array<Table<2, VectorizedArray<Number>>, dim> mass_matrices;
892 std::array<Table<2, VectorizedArray<Number>>, dim> derivative_matrices;
893
894 std::fill(mass_matrices.begin(), mass_matrices.end(), mass_matrix);
895 std::fill(derivative_matrices.begin(),
896 derivative_matrices.end(),
897 derivative_matrix);
898
899 reinit_impl(std::move(mass_matrices), std::move(derivative_matrices));
900}
901
902
903
904#endif
905
907
908#endif
iterator begin() const
Definition: array_view.h:585
value_type * data() const noexcept
Definition: array_view.h:553
std::size_t size() const
Definition: array_view.h:576
std::array< Table< 2, Number >, dim > derivative_matrix
void apply_inverse(const ArrayView< Number > &dst, const ArrayView< const Number > &src) const
std::array< AlignedVector< Number >, dim > eigenvalues
std::array< Table< 2, Number >, dim > eigenvectors
void vmult(const ArrayView< Number > &dst, const ArrayView< const Number > &src) const
std::array< Table< 2, Number >, dim > mass_matrix
TensorProductMatrixSymmetricSum(const Table< 2, VectorizedArray< Number > > &mass_matrix, const Table< 2, VectorizedArray< Number > > &derivative_matrix)
void reinit(const Table< 2, VectorizedArray< Number > > &mass_matrix, const Table< 2, VectorizedArray< Number > > &derivative_matrix)
TensorProductMatrixSymmetricSum(const std::array< Table< 2, VectorizedArray< Number > >, dim > &mass_matrix, const std::array< Table< 2, VectorizedArray< Number > >, dim > &derivative_matrix)
void reinit(const std::array< Table< 2, VectorizedArray< Number > >, dim > &mass_matrix, const std::array< Table< 2, VectorizedArray< Number > >, dim > &derivative_matrix)
void reinit_impl(MatrixArray &&mass_matrix, MatrixArray &&derivative_matrix)
void reinit(const std::array< Table< 2, Number >, dim > &mass_matrix, const std::array< Table< 2, Number >, dim > &derivative_matrix)
TensorProductMatrixSymmetricSum(const std::array< FullMatrix< Number >, dim > &mass_matrix, const std::array< FullMatrix< Number >, dim > &derivative_matrix)
void reinit(const std::array< FullMatrix< Number >, dim > &mass_matrix, const std::array< FullMatrix< Number >, dim > &derivative_matrix)
TensorProductMatrixSymmetricSum(const std::array< Table< 2, Number >, dim > &mass_matrix, const std::array< Table< 2, Number >, dim > &derivative_matrix)
void reinit_impl(MatrixArray &&mass_matrix, MatrixArray &&derivative_matrix)
void reinit(const Table< 2, Number > &mass_matrix, const Table< 2, Number > &derivative_matrix)
TensorProductMatrixSymmetricSum(const Table< 2, Number > &mass_matrix, const Table< 2, Number > &derivative_matrix)
Definition: vector.h:109
#define DEAL_II_NAMESPACE_OPEN
Definition: config.h:442
#define DEAL_II_NAMESPACE_CLOSE
Definition: config.h:443
static ::ExceptionBase & ExcNotImplemented()
#define Assert(cond, exc)
Definition: exceptions.h:1473
#define AssertDimension(dim1, dim2)
Definition: exceptions.h:1667
static ::ExceptionBase & ExcDimensionMismatch(std::size_t arg1, std::size_t arg2)
#define AssertThrow(cond, exc)
Definition: exceptions.h:1583
void mass_matrix(FullMatrix< double > &M, const FEValuesBase< dim > &fe, const double factor=1.)
Definition: l2.h:58
SymmetricTensor< 2, dim, Number > d(const Tensor< 2, dim, Number > &F, const Tensor< 2, dim, Number > &dF_dt)
VectorType::value_type * begin(VectorType &V)
void reinit(MatrixBlock< MatrixType > &v, const BlockSparsityPattern &p)
Definition: matrix_block.h:618
::VectorizedArray< Number, width > max(const ::VectorizedArray< Number, width > &, const ::VectorizedArray< Number, width > &)
std::array< Number, 1 > eigenvalues(const SymmetricTensor< 2, 1, Number > &T)
std::array< std::pair< Number, Tensor< 1, dim, Number > >, std::integral_constant< int, dim >::value > eigenvectors(const SymmetricTensor< 2, dim, Number > &T, const SymmetricTensorEigenvectorMethod method=SymmetricTensorEigenvectorMethod::ql_implicit_shifts)
void vectorized_load_and_transpose(const unsigned int n_entries, const Number *in, const unsigned int *offsets, VectorizedArray< Number, width > *out)
void vectorized_transpose_and_store(const bool add_into, const unsigned int n_entries, const VectorizedArray< Number, width > *in, const unsigned int *offsets, Number *out)