libMesh
dense_matrix.C
Go to the documentation of this file.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2019 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
3 
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License, or (at your option) any later version.
8 
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
13 
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 
18 
19 // Local Includes
20 #include "libmesh/dense_matrix_impl.h"
21 
22 namespace libMesh
23 {
24 
25 //--------------------------------------------------------------
26 // Explicit instantiations
27 #define LIBMESH_VMA_INSTANTIATE(T1,T2,T3) \
28  template void DenseMatrix<T1>::vector_mult_add \
29  (DenseVector< \
30  CompareTypes<T1, \
31  CompareTypes<T2,T3>::supertype>::supertype> & dest, \
32  const T2 factor, \
33  const DenseVector<T3> & arg) const
34 
35 template class DenseMatrix<Real>;
36 template void DenseMatrix<Real>::cholesky_solve(const DenseVector<Real> &, DenseVector<Real> &);
37 template void DenseMatrix<Real>::_cholesky_back_substitute(const DenseVector<Real> &, DenseVector<Real> &) const;
38 template void DenseMatrix<Real>::cholesky_solve(const DenseVector<Complex> &, DenseVector<Complex> &);
39 template void DenseMatrix<Real>::_cholesky_back_substitute(const DenseVector<Complex> &, DenseVector<Complex> &) const;
41 #ifndef LIBMESH_DEFAULT_SINGLE_PRECISION
43 #endif
44 #ifndef LIBMESH_DEFAULT_DOUBLE_PRECISION
46 #endif
47 
48 #ifdef LIBMESH_USE_COMPLEX_NUMBERS
49 template class DenseMatrix<Complex>;
50 template void DenseMatrix<Complex>::cholesky_solve(const DenseVector<Complex> &,DenseVector<Complex> &);
51 template void DenseMatrix<Complex>::_cholesky_back_substitute(const DenseVector<Complex> &, DenseVector<Complex> &) const;
53  const DenseVector<Complex> & arg) const;
55  const DenseVector<Complex> & arg) const;
59 
60 // complex<int> and complex<float_foo> don't interact well
61 //LIBMESH_VMA_INSTANTIATE(Real,std::complex<int>,Complex);
62 //LIBMESH_VMA_INSTANTIATE(Complex,std::complex<int>,Complex);
63 //LIBMESH_VMA_INSTANTIATE(Complex,std::complex<int>,Real);
64 
68 LIBMESH_VMA_INSTANTIATE(Real,std::complex<float>,Complex);
69 #ifndef LIBMESH_DEFAULT_SINGLE_PRECISION
70 LIBMESH_VMA_INSTANTIATE(Complex,std::complex<float>,Complex);
71 #endif
72 LIBMESH_VMA_INSTANTIATE(Complex,std::complex<float>,Real);
73 
77 LIBMESH_VMA_INSTANTIATE(Real,std::complex<double>,Complex);
78 #ifndef LIBMESH_DEFAULT_DOUBLE_PRECISION
79 LIBMESH_VMA_INSTANTIATE(Complex,std::complex<double>,Complex);
80 #endif
81 LIBMESH_VMA_INSTANTIATE(Complex,std::complex<double>,Real);
82 #endif
83 
84 } // namespace libMesh
libMesh::LIBMESH_VMA_INSTANTIATE
LIBMESH_VMA_INSTANTIATE(Real, int, Real)
libMesh::DenseMatrix::_cholesky_back_substitute
void _cholesky_back_substitute(const DenseVector< T2 > &b, DenseVector< T2 > &x) const
Solves the equation Ax=b for the unknown value x and rhs b based on the Cholesky factorization of A.
Definition: dense_matrix_impl.h:1025
libMesh
The libMesh namespace provides an interface to certain functionality in the library.
Definition: factoryfunction.C:55
libMesh::DenseMatrix::vector_mult
void vector_mult(DenseVector< T > &dest, const DenseVector< T > &arg) const
Performs the matrix-vector multiplication, dest := (*this) * arg.
Definition: dense_matrix_impl.h:403
libMesh::DenseMatrix::vector_mult_transpose
void vector_mult_transpose(DenseVector< T > &dest, const DenseVector< T > &arg) const
Performs the matrix-vector multiplication, dest := (*this)^T * arg.
Definition: dense_matrix_impl.h:459
libMesh::CompareTypes::supertype
void supertype
Definition: compare_types.h:100
libMesh::Complex
std::complex< Real > Complex
Definition: libmesh_common.h:160
libMesh::DenseMatrix::cholesky_solve
void cholesky_solve(const DenseVector< T2 > &b, DenseVector< T2 > &x)
For symmetric positive definite (SPD) matrices.
Definition: dense_matrix_impl.h:947
libMesh::Real
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
Definition: libmesh_common.h:121