libmesh解析
本工作只是尝试解析原libmesh的代码,供学习使用
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 
dense_matrix.C
浏览该文件的文档.
1 // The libMesh Finite Element Library.
2 // Copyright (C) 2002-2023 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 LIBMESH_EXPORT 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 LIBMESH_EXPORT DenseMatrix<Real>;
36 template LIBMESH_EXPORT void DenseMatrix<Real>::cholesky_solve(const DenseVector<Real> &, DenseVector<Real> &);
37 template LIBMESH_EXPORT void DenseMatrix<Real>::_cholesky_back_substitute(const DenseVector<Real> &, DenseVector<Real> &) const;
38 template LIBMESH_EXPORT void DenseMatrix<Real>::cholesky_solve(const DenseVector<Complex> &, DenseVector<Complex> &);
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 LIBMESH_EXPORT DenseMatrix<Complex>;
52 template LIBMESH_EXPORT void DenseMatrix<Real>::vector_mult (DenseVector<CompareTypes<Real,Complex>::supertype> & dest,
53  const DenseVector<Complex> & arg) const;
54 template LIBMESH_EXPORT void DenseMatrix<Real>::vector_mult_transpose (DenseVector<CompareTypes<Real,Complex>::supertype> & dest,
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_VMA_INSTANTIATE(Real, int, Real)
void vector_mult_transpose(DenseVector< T > &dest, const DenseVector< T > &arg) const
执行矩阵-向量乘法,dest := (*this)^T * arg。
void _cholesky_back_substitute(const DenseVector< T2 > &b, DenseVector< T2 > &x) const
根据矩阵A的Cholesky分解解方程Ax=b,得到未知值x和rhs b。
std::complex< Real > Complex
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void cholesky_solve(const DenseVector< T2 > &b, DenseVector< T2 > &x)
对于对称正定矩阵(SPD),进行Cholesky分解。 分解为 A = L L^T,比标准LU分解大约快两倍。 因此,如果事先知道矩阵是SPD,则可以使用此方法。如果矩阵不是SPD,则会生成错误。 Ch...
定义用于有限元计算的稠密向量类。该类基本上是为了补充 DenseMatrix 类而设计的。 它相对于 std::vector 具有额外的功能,使其在有限元中特别有用,特别是对于方程组。 所有重写的虚拟函...
Definition: dof_map.h:64
void vector_mult(DenseVector< T > &dest, const DenseVector< T > &arg) const
执行矩阵-向量乘法,dest := (*this) * arg。
定义用于有限元类型计算的密集矩阵。 用于在求和成全局矩阵之前存储单元刚度矩阵。所有被覆盖的虚函数都记录在dense_matrix_base.h中。
Definition: dof_map.h:65