这个类允许使用 PETSc shell 矩阵。 所有覆盖的虚拟函数都在 shell_matrix.h 中有文档说明。 更多...
#include <petsc_shell_matrix.h>
Public 成员函数 | |
PetscShellMatrix (const Parallel::Communicator &comm_in) | |
构造函数。 更多... | |
virtual | ~PetscShellMatrix ()=default |
默认虚拟析构函数。 更多... | |
virtual numeric_index_type | m () const override |
获取矩阵的行数。 更多... | |
virtual numeric_index_type | n () const override |
获取矩阵的列数。 更多... | |
virtual numeric_index_type | local_m () const |
获取本地处理的矩阵行数。 更多... | |
virtual numeric_index_type | local_n () const |
获取本地处理的矩阵列数。 更多... | |
virtual void | vector_mult (NumericVector< T > &dest, const NumericVector< T > &arg) const override |
执行矩阵与向量的乘法。 更多... | |
virtual void | vector_mult_add (NumericVector< T > &dest, const NumericVector< T > &arg) const override |
执行矩阵与向量的乘法,并将结果添加到目标向量。 更多... | |
virtual void | get_diagonal (NumericVector< T > &dest) const override |
获取矩阵的对角线。 更多... | |
virtual void | clear () override |
清除矩阵的内部数据结构。 更多... | |
virtual void | init () override |
初始化矩阵。 更多... | |
virtual bool | initialized () const |
检查矩阵是否已初始化。 更多... | |
Mat | mat () |
返回指向底层 PETSc Mat 对象的指针。调用此函数前必须调用 init()。 更多... | |
void | attach_dof_map (const DofMap &dof_map) |
附加要使用的 DofMap 指针。 更多... | |
静态 Public 成员函数 | |
static std::unique_ptr < ShellMatrix< T > > | build (const Parallel::Communicator &comm, const SolverPackage solver_package=libMesh::default_solver_package()) |
使用指定的线性求解器包构建一个 ShellMatrix<T>。 更多... | |
static std::string | get_info () |
Gets a string containing the reference information. 更多... | |
static void | print_info (std::ostream &out_stream=libMesh::out) |
Prints the reference information, by default to libMesh::out . 更多... | |
static unsigned int | n_objects () |
Prints the number of outstanding (created, but not yet destroyed) objects. 更多... | |
static void | enable_print_counter_info () |
Methods to enable/disable the reference counter output from print_info() 更多... | |
static void | disable_print_counter_info () |
Protected 类型 | |
typedef std::map< std::string, std::pair< unsigned int, unsigned int > > | Counts |
Data structure to log the information. 更多... | |
Protected 成员函数 | |
void | increment_constructor_count (const std::string &name) noexcept |
Increments the construction counter. 更多... | |
void | increment_destructor_count (const std::string &name) noexcept |
Increments the destruction counter. 更多... | |
Protected 属性 | |
WrappedPetsc< Mat > | _mat |
PETSc Shell 矩阵。 更多... | |
bool | _is_initialized |
表示矩阵是否已初始化的标志。 更多... | |
DofMap const * | _dof_map |
与此对象关联的 DofMap 对象。 更多... | |
静态 Protected 属性 | |
static Counts | _counts |
Actually holds the data. 更多... | |
static Threads::atomic < unsigned int > | _n_objects |
The number of objects. 更多... | |
static Threads::spin_mutex | _mutex |
Mutual exclusion object to enable thread-safe reference counting. 更多... | |
static bool | _enable_print_counter = true |
Flag to control whether reference count information is printed when print_info is called. 更多... | |
这个类允许使用 PETSc shell 矩阵。 所有覆盖的虚拟函数都在 shell_matrix.h 中有文档说明。
在文件 petsc_shell_matrix.h 第 57 行定义.
|
protectedinherited |
Data structure to log the information.
The log is identified by the class name.
在文件 reference_counter.h 第 119 行定义.
|
inline |
构造函数。
comm_in | 用于初始化的并行通信器。 |
在文件 petsc_shell_matrix.h 第 168 行定义.
|
virtualdefault |
默认虚拟析构函数。
|
inlineinherited |
附加要使用的 DofMap
指针。
dof_map | 要附加的 DofMap 对象 |
在文件 shell_matrix.h 第 120 行定义.
参考 libMesh::ShellMatrix< T >::_dof_map.
|
staticinherited |
使用指定的线性求解器包构建一个 ShellMatrix<T>。
comm | 通信器对象 |
solver_package | 线性求解器包 |
ShellMatrix<T>
的 std::unique_ptr 在文件 shell_matrix.C 第 32 行定义.
|
overridevirtual |
清除矩阵的内部数据结构。
重载 libMesh::ShellMatrix< T > .
在文件 petsc_shell_matrix.C 第 53 行定义.
参考 libMesh::libMeshPrivateData::_is_initialized , 以及 libMesh::initialized().
|
staticinherited |
在文件 reference_counter.C 第 100 行定义.
参考 libMesh::ReferenceCounter::_enable_print_counter.
|
staticinherited |
Methods to enable/disable the reference counter output from print_info()
在文件 reference_counter.C 第 94 行定义.
参考 libMesh::ReferenceCounter::_enable_print_counter.
|
inlineoverridevirtual |
获取矩阵的对角线。
dest | 存储对角线的向量。 |
实现了 libMesh::ShellMatrix< T >.
在文件 petsc_shell_matrix.h 第 235 行定义.
参考 libMesh::PetscVector< T >::vec().
|
staticinherited |
Gets a string containing the reference information.
在文件 reference_counter.C 第 47 行定义.
参考 libMesh::ReferenceCounter::_counts.
参考自 libMesh::ReferenceCounter::print_info().
|
inlineprotectednoexceptinherited |
Increments the construction counter.
Should be called in the constructor of any derived class that will be reference counted.
在文件 reference_counter.h 第 183 行定义.
参考 libMesh::err.
参考自 libMesh::ReferenceCountedObject< SparseMatrix< T > >::ReferenceCountedObject().
|
inlineprotectednoexceptinherited |
Increments the destruction counter.
Should be called in the destructor of any derived class that will be reference counted.
在文件 reference_counter.h 第 207 行定义.
参考 libMesh::err.
参考自 libMesh::ReferenceCountedObject< SparseMatrix< T > >::~ReferenceCountedObject().
|
overridevirtual |
初始化矩阵。
重载 libMesh::ShellMatrix< T > .
在文件 petsc_shell_matrix.C 第 64 行定义.
参考 libMesh::libMeshPrivateData::_is_initialized , 以及 libMesh::initialized().
|
virtual |
检查矩阵是否已初始化。
在文件 petsc_shell_matrix.C 第 108 行定义.
参考 libMesh::libMeshPrivateData::_is_initialized.
|
inlinevirtual |
获取本地处理的矩阵行数。
在文件 petsc_shell_matrix.h 第 206 行定义.
|
inlinevirtual |
获取本地处理的矩阵列数。
在文件 petsc_shell_matrix.h 第 221 行定义.
|
inlineoverridevirtual |
获取矩阵的行数。
实现了 libMesh::ShellMatrix< T >.
在文件 petsc_shell_matrix.h 第 177 行定义.
Mat libMesh::PetscShellMatrix< T >::mat | ( | ) |
返回指向底层 PETSc Mat 对象的指针。调用此函数前必须调用 init()。
在文件 petsc_shell_matrix.C 第 114 行定义.
|
inlineoverridevirtual |
获取矩阵的列数。
实现了 libMesh::ShellMatrix< T >.
在文件 petsc_shell_matrix.h 第 192 行定义.
|
inlinestaticinherited |
Prints the number of outstanding (created, but not yet destroyed) objects.
在文件 reference_counter.h 第 85 行定义.
参考 libMesh::ReferenceCounter::_n_objects.
参考自 libMesh::LibMeshInit::~LibMeshInit().
|
staticinherited |
Prints the reference information, by default to libMesh::out
.
在文件 reference_counter.C 第 81 行定义.
参考 libMesh::ReferenceCounter::_enable_print_counter , 以及 libMesh::ReferenceCounter::get_info().
参考自 libMesh::LibMeshInit::~LibMeshInit().
|
overridevirtual |
执行矩阵与向量的乘法。
dest | 结果向量。 |
arg | 输入向量。 |
实现了 libMesh::ShellMatrix< T >.
在文件 petsc_shell_matrix.C 第 28 行定义.
参考 libMesh::PetscVector< T >::vec().
|
overridevirtual |
执行矩阵与向量的乘法,并将结果添加到目标向量。
dest | 结果向量。 |
arg | 输入向量。 |
实现了 libMesh::ShellMatrix< T >.
在文件 petsc_shell_matrix.C 第 41 行定义.
参考 libMesh::PetscVector< T >::vec().
|
staticprotectedinherited |
Actually holds the data.
在文件 reference_counter.h 第 124 行定义.
|
protectedinherited |
|
staticprotectedinherited |
Flag to control whether reference count information is printed when print_info is called.
在文件 reference_counter.h 第 143 行定义.
参考自 libMesh::ReferenceCounter::disable_print_counter_info(), libMesh::ReferenceCounter::enable_print_counter_info() , 以及 libMesh::ReferenceCounter::print_info().
|
protected |
表示矩阵是否已初始化的标志。
在文件 petsc_shell_matrix.h 第 160 行定义.
|
protected |
PETSc Shell 矩阵。
在文件 petsc_shell_matrix.h 第 155 行定义.
|
staticprotectedinherited |
Mutual exclusion object to enable thread-safe reference counting.
在文件 reference_counter.h 第 137 行定义.
|
staticprotectedinherited |
The number of objects.
Print the reference count information when the number returns to 0.
在文件 reference_counter.h 第 132 行定义.
参考自 libMesh::ReferenceCounter::n_objects(), libMesh::ReferenceCounter::ReferenceCounter() , 以及 libMesh::ReferenceCounter::~ReferenceCounter().