这个类提供了一个接口,用于使用Trilinos提供的预条件器套件。 所有重写的虚拟函数在preconditioner.h中有文档说明。 更多...
#include <trilinos_preconditioner.h>
Public 成员函数 | |
TrilinosPreconditioner (const libMesh::Parallel::Communicator &comm) | |
构造函数。初始化 PetscPreconditioner 数据结构 更多... | |
virtual | ~TrilinosPreconditioner () |
析构函数。 更多... | |
virtual void | apply (const NumericVector< T > &x, NumericVector< T > &y) override |
应用预条件器。 更多... | |
virtual void | clear () override |
清除预条件器。 更多... | |
virtual void | init () override |
初始化预条件器。 更多... | |
void | set_params (Teuchos::ParameterList &list) |
存储 ParameterList list 的副本。 更多... | |
Epetra_FECrsMatrix * | mat () |
返回实际的 Trilinos 预条件器对象。 更多... | |
void | set_preconditioner_type (const PreconditionerType &preconditioner_type) |
根据 libMesh PreconditionerType 设置 Trilinos 预条件器。 更多... | |
void | compute () |
计算预条件器。在 Trilinos 中,我们需要显式调用此函数。 更多... | |
bool | initialized () const |
virtual void | setup () |
每当 "操作可能已更改" 时都会调用此函数。 更多... | |
void | set_matrix (SparseMatrix< Number > &mat) |
设置要进行预处理的矩阵。 更多... | |
PreconditionerType | type () const |
void | set_type (const PreconditionerType pct) |
设置要使用的预处理器类型。 更多... | |
静态 Public 成员函数 | |
static std::unique_ptr < Preconditioner< T > > | build_preconditioner (const libMesh::Parallel::Communicator &comm, const SolverPackage solver_package=libMesh::default_solver_package()) |
构建一个 Preconditioner,使用由 solver_package 指定的线性求解器软件包, 并以 std::unique_ptr 包装结果以确保安全性。 更多... | |
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 成员函数 | |
virtual int | SetUseTranspose (bool UseTranspose) override |
virtual int | Apply (const Epetra_MultiVector &X, Epetra_MultiVector &Y) const override |
virtual int | ApplyInverse (const Epetra_MultiVector &r, Epetra_MultiVector &z) const override |
virtual double | NormInf () const override |
virtual const char * | Label () const override |
virtual bool | UseTranspose () const override |
virtual bool | HasNormInf () const override |
virtual const Epetra_Comm & | Comm () const override |
virtual const Epetra_Map & | OperatorDomainMap () const override |
virtual const Epetra_Map & | OperatorRangeMap () const override |
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 属性 | |
Epetra_Operator * | _prec |
Trilinos 预条件器。 更多... | |
Epetra_FECrsMatrix * | _mat |
从 _matrix 对象中提取出来的 Trilinos 矩阵。 更多... | |
Teuchos::ParameterList | _param_list |
用于构建预条件器的参数列表。 更多... | |
SparseMatrix< T > * | _matrix |
要进行预处理的矩阵 P... 更多... | |
PreconditionerType | _preconditioner_type |
枚举类型,表示要使用的预处理器类型。 更多... | |
bool | _is_initialized |
指示数据结构是否已初始化的标志。 更多... | |
静态 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. 更多... | |
这个类提供了一个接口,用于使用Trilinos提供的预条件器套件。 所有重写的虚拟函数在preconditioner.h中有文档说明。
在文件 trilinos_preconditioner.h 第 61 行定义.
|
protectedinherited |
Data structure to log the information.
The log is identified by the class name.
在文件 reference_counter.h 第 119 行定义.
|
inline |
构造函数。初始化 PetscPreconditioner 数据结构
comm | 通信器对象,用于并行通信。 |
在文件 trilinos_preconditioner.h 第 181 行定义.
|
inlinevirtual |
析构函数。
在文件 trilinos_preconditioner.h 第 192 行定义.
|
overridevirtual |
|
overrideprotectedvirtual |
在文件 trilinos_preconditioner.C 第 197 行定义.
|
overrideprotectedvirtual |
在文件 trilinos_preconditioner.C 第 204 行定义.
|
staticinherited |
构建一个 Preconditioner,使用由
solver_package
指定的线性求解器软件包, 并以 std::unique_ptr 包装结果以确保安全性。
comm | 通信器对象 |
solver_package | 求解器软件包(默认为 libMesh 的默认求解器软件包) |
在文件 preconditioner.C 第 50 行定义.
参考 libMesh::EIGEN_SOLVERS, libMesh::libmesh_ignore() , 以及 libMesh::TRILINOS_SOLVERS.
|
inlineoverridevirtual |
|
overrideprotectedvirtual |
在文件 trilinos_preconditioner.C 第 239 行定义.
void libMesh::TrilinosPreconditioner< T >::compute | ( | ) |
计算预条件器。在 Trilinos 中,我们需要显式调用此函数。
在文件 trilinos_preconditioner.C 第 85 行定义.
|
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.
|
staticinherited |
Gets a string containing the reference information.
在文件 reference_counter.C 第 47 行定义.
参考 libMesh::ReferenceCounter::_counts.
参考自 libMesh::ReferenceCounter::print_info().
|
overrideprotectedvirtual |
在文件 trilinos_preconditioner.C 第 232 行定义.
|
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::Preconditioner< T > .
在文件 trilinos_preconditioner.C 第 58 行定义.
参考 libMesh::libMeshPrivateData::_is_initialized , 以及 libMesh::EpetraMatrix< T >::mat().
|
inlineinherited |
true,否则返回
false。
在文件 preconditioner.h 第 87 行定义.
参考 libMesh::Preconditioner< T >::_is_initialized.
|
overrideprotectedvirtual |
在文件 trilinos_preconditioner.C 第 218 行定义.
|
inline |
返回实际的 Trilinos 预条件器对象。
在文件 trilinos_preconditioner.h 第 109 行定义.
参考 libMesh::TrilinosPreconditioner< T >::_mat.
|
inlinestaticinherited |
Prints the number of outstanding (created, but not yet destroyed) objects.
在文件 reference_counter.h 第 85 行定义.
参考 libMesh::ReferenceCounter::_n_objects.
参考自 libMesh::LibMeshInit::~LibMeshInit().
|
overrideprotectedvirtual |
在文件 trilinos_preconditioner.C 第 211 行定义.
|
overrideprotectedvirtual |
在文件 trilinos_preconditioner.C 第 246 行定义.
|
overrideprotectedvirtual |
在文件 trilinos_preconditioner.C 第 253 行定义.
|
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().
|
inherited |
设置要进行预处理的矩阵。
mat | 要进行预处理的稀疏矩阵 |
在文件 preconditioner.h 第 174 行定义.
参考 libMesh::libMeshPrivateData::_is_initialized.
void libMesh::TrilinosPreconditioner< T >::set_params | ( | Teuchos::ParameterList & | list | ) |
存储 ParameterList list
的副本。
list | 参数列表对象。 |
在文件 trilinos_preconditioner.C 第 77 行定义.
void libMesh::TrilinosPreconditioner< T >::set_preconditioner_type | ( | const PreconditionerType & | preconditioner_type | ) |
根据 libMesh PreconditionerType 设置 Trilinos 预条件器。
preconditioner_type | libMesh 预条件器类型。 |
在文件 trilinos_preconditioner.C 第 125 行定义.
|
inherited |
设置要使用的预处理器类型。
pct | 预处理器类型 |
在文件 preconditioner.h 第 183 行定义.
参考 libMesh::libMeshPrivateData::_is_initialized.
|
inlinevirtualinherited |
|
overrideprotectedvirtual |
在文件 trilinos_preconditioner.C 第 190 行定义.
|
inlineinherited |
在文件 preconditioner.h 第 133 行定义.
参考 libMesh::Preconditioner< T >::_preconditioner_type.
|
overrideprotectedvirtual |
在文件 trilinos_preconditioner.C 第 225 行定义.
|
staticprotectedinherited |
Actually holds the data.
在文件 reference_counter.h 第 124 行定义.
|
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().
|
protectedinherited |
|
protected |
从 _matrix 对象中提取出来的 Trilinos 矩阵。
在文件 trilinos_preconditioner.h 第 135 行定义.
|
protectedinherited |
|
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().
|
protected |
用于构建预条件器的参数列表。
在文件 trilinos_preconditioner.h 第 140 行定义.
|
protected |
Trilinos 预条件器。
在文件 trilinos_preconditioner.h 第 130 行定义.
|
protectedinherited |