https://mooseframework.inl.gov
DenseMatrixADReal.C
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://mooseframework.inl.gov
3 //*
4 //* All rights reserved, see COPYRIGHT for full restrictions
5 //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
6 //*
7 //* Licensed under LGPL 2.1, please see LICENSE for details
8 //* https://www.gnu.org/licenses/lgpl-2.1.html
9 
10 #include "DenseMatrix.h"
11 #include "ADReal.h"
12 #include "MooseError.h"
13 
14 #include "libmesh/dense_matrix_base_impl.h"
15 #include "libmesh/dense_matrix_impl.h"
16 
17 namespace libMesh
18 {
19 template <>
20 void
21 DenseMatrix<ADReal>::_multiply_blas(const DenseMatrixBase<ADReal> &, _BLAS_Multiply_Flag)
22 {
23  mooseError("No blas/lapack support for type ", demangle(typeid(ADReal).name()));
24 }
25 
26 template <>
27 void
29 {
30  mooseError("No blas/lapack support for type ", demangle(typeid(ADReal).name()));
31 }
32 
33 template <>
34 void
36 {
37  mooseError("No blas/lapack support for type ", demangle(typeid(ADReal).name()));
38 }
39 
40 template <>
41 void
43 {
44  mooseError("No blas/lapack support for type ", demangle(typeid(ADReal).name()));
45 }
46 
47 template <>
48 void
50  char, char, std::vector<Real> &, std::vector<Number> &, std::vector<Number> &)
51 {
52  mooseError("No blas/lapack support for type ", demangle(typeid(ADReal).name()));
53 }
54 
55 template <>
56 void
57 DenseMatrix<ADReal>::_svd_solve_lapack(const DenseVector<ADReal> & /*rhs*/,
58  DenseVector<ADReal> & /*x*/,
59  Real /*rcond*/) const
60 {
61  mooseError("No blas/lapack support for type ", demangle(typeid(ADReal).name()));
62 }
63 
64 template <>
65 void
66 DenseMatrix<ADReal>::_evd_lapack(DenseVector<ADReal> &,
67  DenseVector<ADReal> &,
68  DenseMatrix<ADReal> *,
69  DenseMatrix<ADReal> *)
70 {
71  mooseError("No blas/lapack support for type ", demangle(typeid(ADReal).name()));
72 }
73 
74 template <>
75 void
76 DenseMatrix<ADReal>::_lu_back_substitute_lapack(const DenseVector<ADReal> &, DenseVector<ADReal> &)
77 {
78  mooseError("No blas/lapack support for type ", demangle(typeid(ADReal).name()));
79 }
80 
81 template <>
82 void
84  ADReal, ADReal, DenseVector<ADReal> &, const DenseVector<ADReal> &, bool) const
85 {
86  mooseError("No blas/lapack support for type ", demangle(typeid(ADReal).name()));
87 }
88 
89 template <>
90 DenseMatrix<ADReal>::DenseMatrix(const unsigned int new_m, const unsigned int new_n)
91  : DenseMatrixBase<ADReal>(new_m, new_n), use_blas_lapack(false), _val(), _decomposition_type(NONE)
92 {
93  this->resize(new_m, new_n);
94 }
95 
96 template class DenseMatrixBase<ADReal>;
97 template class DenseMatrix<ADReal>;
98 
99 template void DenseMatrix<ADReal>::vector_mult_add(DenseVector<ADReal> &,
100  const int,
101  const DenseVector<ADReal> &) const;
102 template void DenseMatrix<ADReal>::vector_mult_add(DenseVector<ADReal> &,
103  const double,
104  const DenseVector<ADReal> &) const;
105 
106 template void DenseMatrix<Real>::vector_mult(DenseVector<ADReal> &,
107  const DenseVector<ADReal> &) const;
108 template void DenseMatrix<ADReal>::vector_mult(DenseVector<ADReal> &,
109  const DenseVector<Real> &) const;
110 
111 template void DenseMatrix<ADReal>::cholesky_solve(const DenseVector<ADReal> & b,
112  DenseVector<ADReal> & x);
113 }
std::string name(const ElemQuality q)
void _matvec_blas(T alpha, T beta, DenseVector< T > &dest, const DenseVector< T > &arg, bool trans=false) const
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:302
template class LIBMESH_EXPORT DenseVector< Real >
void _svd_solve_lapack(const DenseVector< T > &rhs, DenseVector< T > &x, Real rcond) const
The following methods are specializations for using the libMesh::Parallel::packed_range_* routines fo...
DualNumber< Real, DNDerivativeType, true > ADReal
Definition: ADRealForward.h:47
void _multiply_blas(const DenseMatrixBase< T > &other, _BLAS_Multiply_Flag flag)
DenseMatrix(const unsigned int new_m=0, const unsigned int new_n=0)
void _lu_back_substitute_lapack(const DenseVector< T > &b, DenseVector< T > &x)
void _svd_lapack(DenseVector< Real > &sigma)
std::string demangle(const char *name)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void _evd_lapack(DenseVector< T > &lambda_real, DenseVector< T > &lambda_imag, DenseMatrix< T > *VL=nullptr, DenseMatrix< T > *VR=nullptr)
void _svd_helper(char JOBU, char JOBVT, std::vector< Real > &sigma_val, std::vector< Number > &U_val, std::vector< Number > &VT_val)
void vector_mult(DenseVector< Real > &dest, const DenseVector< Real > &arg) const