libmesh解析
本工作只是尝试解析原libmesh的代码,供学习使用
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 
lumped_mass_matrix.h
浏览该文件的文档.
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 #ifndef LIBMESH_LUMPED_MASS_MATRIX_H
19 #define LIBMESH_LUMPED_MASS_MATRIX_H
20 
21 #include "libmesh/diagonal_matrix.h"
22 
23 namespace libMesh
24 {
25 
33 template <typename T>
35 {
36 public:
43  explicit LumpedMassMatrix(const Parallel::Communicator & comm);
44 
48  LumpedMassMatrix(LumpedMassMatrix &&) = default;
50 
56  virtual std::unique_ptr<SparseMatrix<T>> zero_clone() const override;
57 
63  virtual std::unique_ptr<SparseMatrix<T>> clone() const override;
64 
72  virtual void set(const numeric_index_type i,
73  const numeric_index_type j,
74  const T value) override;
75 
83  virtual void add(const numeric_index_type i,
84  const numeric_index_type j,
85  const T value) override;
86 
93  virtual void add(const T a, const SparseMatrix<T> & X) override;
94 
95 protected:
104 
113 };
114 
115 } // namespace libMesh
virtual void set(const numeric_index_type i, const numeric_index_type j, const T value) override
设置矩阵中指定位置 的值为 value。
LumpedMassMatrix(const Parallel::Communicator &comm)
构造函数;将矩阵初始化为空,没有任何结构,即矩阵完全无法使用。 因此,此构造函数仅适用于作为类的成员的矩阵。所有其他矩阵应在具有所有必要信息的数据流中创建。
virtual void add(const numeric_index_type i, const numeric_index_type j, const T value) override
将值 value 添加到矩阵中的指定位置 。
提供了不同线性代数库的向量存储方案的统一接口。
Definition: dof_map.h:67
这是一个通用的稀疏矩阵类。该类包含了必须在派生类中覆盖的纯虚拟成员。 使用一个公共的基类允许从不同的求解器包中以不同的格式统一访问稀疏矩阵。
Definition: dof_map.h:66
dof_id_type numeric_index_type
Definition: id_types.h:99
对角矩阵类,其底层存储是一个向量
virtual std::unique_ptr< SparseMatrix< T > > clone() const override
克隆当前矩阵的唯一指针。
LumpedMassMatrix & operator=(LumpedMassMatrix &&)=default
模板类用于构造集中质量矩阵。 可能还有用于计算与整体系统缩放相关的数量。每当在此类上调用 add 方法时,我们都会将提供的值的绝对值相加到行索引 i 中。
virtual std::unique_ptr< SparseMatrix< T > > zero_clone() const override
创建一个与当前矩阵相同的零矩阵的唯一指针。