This helper class can be called on multiple threads to compute the sparsity pattern (or graph) of the sparse matrix resulting from the discretization. 更多...
#include <sparsity_pattern.h>
Public 成员函数 | |
Build (const DofMap &dof_map_in, const CouplingMatrix *dof_coupling_in, const std::set< GhostingFunctor * > &coupling_functors_in, const bool implicit_neighbor_dofs_in, const bool need_full_sparsity_pattern_in, const bool calculate_constrained_in=false) | |
Build (const Build &)=default | |
Special functions. 更多... | |
Build & | operator= (const Build &)=delete |
Build (Build &&)=default | |
Build & | operator= (Build &&)=delete |
~Build ()=default | |
Build (Build &other, Threads::split) | |
Splitting constructor, for use in multithreaded loops. 更多... | |
void | operator() (const ConstElemRange &range) |
Add entries from a range of elements to this object's sparsity pattern. 更多... | |
void | join (const Build &other) |
Combine the sparsity pattern in other with this object's sparsity pattern. 更多... | |
void | parallel_sync () |
Send sparsity pattern data relevant to other processors to those processors, and receive and incorporate data relevant to us. 更多... | |
const SparsityPattern::Graph & | get_sparsity_pattern () const |
Rows of sparse matrix indices, indexed by the offset from the first DoF on this processor. 更多... | |
const SparsityPattern::NonlocalGraph & | get_nonlocal_pattern () const |
Rows of sparse matrix indices, mapped from global DoF number, which belong on other processors. 更多... | |
const std::vector< dof_id_type > & | get_n_nz () const |
The number of on-processor nonzeros in my portion of the global matrix. 更多... | |
const std::vector< dof_id_type > & | get_n_oz () const |
The number of off-processor nonzeros in my portion of the global matrix. 更多... | |
void | apply_extra_sparsity_object (SparsityPattern::AugmentSparsityPattern &asp) |
Let a user-provided AugmentSparsityPattern subclass modify our sparsity structure. 更多... | |
void | apply_extra_sparsity_function (void(*func)(SparsityPattern::Graph &sparsity, std::vector< dof_id_type > &n_nz, std::vector< dof_id_type > &n_oz, void *context), void *context) |
Let a user-provided function modify our sparsity structure. 更多... | |
void | clear_full_sparsity () |
Clear the "full" details of our sparsity structure, leaving only the counts of non-zero entries. 更多... | |
Private 成员函数 | |
void | handle_vi_vj (const std::vector< dof_id_type > &element_dofs_i, const std::vector< dof_id_type > &element_dofs_j) |
void | sorted_connected_dofs (const Elem *elem, std::vector< dof_id_type > &dofs_vi, unsigned int vi) |
Private 属性 | |
const DofMap & | dof_map |
const CouplingMatrix * | dof_coupling |
const std::set < GhostingFunctor * > & | coupling_functors |
const bool | implicit_neighbor_dofs |
const bool | need_full_sparsity_pattern |
const bool | calculate_constrained |
std::unordered_set< dof_id_type > | hashed_dof_sets |
SparsityPattern::Graph | sparsity_pattern |
SparsityPattern::NonlocalGraph | nonlocal_pattern |
std::vector< dof_id_type > | n_nz |
std::vector< dof_id_type > | n_oz |
This helper class can be called on multiple threads to compute the sparsity pattern (or graph) of the sparse matrix resulting from the discretization.
This pattern may be used directly by a particular sparse matrix format (e.g. LaspackMatrix
) or indirectly (e.g. PetscMatrix
). In the latter case the number of nonzeros per row of the matrix is needed for efficient preallocation. In this case it suffices to provide estimate (but bounding) values, and in this case the threaded method can take some short-cuts for efficiency.
在文件 sparsity_pattern.h 第 102 行定义.
libMesh::SparsityPattern::Build::Build | ( | const DofMap & | dof_map_in, |
const CouplingMatrix * | dof_coupling_in, | ||
const std::set< GhostingFunctor * > & | coupling_functors_in, | ||
const bool | implicit_neighbor_dofs_in, | ||
const bool | need_full_sparsity_pattern_in, | ||
const bool | calculate_constrained_in = false |
||
) |
在文件 sparsity_pattern.C 第 46 行定义.
|
default |
|
default |
|
default |
libMesh::SparsityPattern::Build::Build | ( | Build & | other, |
Threads::split | |||
) |
Splitting constructor, for use in multithreaded loops.
在文件 sparsity_pattern.C 第 67 行定义.
|
inline |
Let a user-provided function modify our sparsity structure.
在文件 sparsity_pattern.h 第 184 行定义.
参考 sparsity_pattern.
void libMesh::SparsityPattern::Build::apply_extra_sparsity_object | ( | SparsityPattern::AugmentSparsityPattern & | asp | ) |
Let a user-provided AugmentSparsityPattern subclass modify our sparsity structure.
在文件 sparsity_pattern.C 第 602 行定义.
参考 libMesh::SparsityPattern::AugmentSparsityPattern::augment_sparsity_pattern(), n_nz, n_oz , 以及 sparsity_pattern.
|
inline |
Clear the "full" details of our sparsity structure, leaving only the counts of non-zero entries.
在文件 sparsity_pattern.h 第 195 行定义.
参考 nonlocal_pattern , 以及 sparsity_pattern.
|
inline |
The number of on-processor nonzeros in my portion of the global matrix.
在文件 sparsity_pattern.h 第 165 行定义.
参考 n_nz.
|
inline |
The number of off-processor nonzeros in my portion of the global matrix.
在文件 sparsity_pattern.h 第 172 行定义.
参考 n_oz.
|
inline |
Rows of sparse matrix indices, mapped from global DoF number, which belong on other processors.
Stored here only temporarily until a parallel_sync() sends them where they belong.
在文件 sparsity_pattern.h 第 158 行定义.
参考 nonlocal_pattern.
|
inline |
Rows of sparse matrix indices, indexed by the offset from the first DoF on this processor.
在文件 sparsity_pattern.h 第 150 行定义.
参考 sparsity_pattern.
|
private |
在文件 sparsity_pattern.C 第 111 行定义.
参考 dof_map, libMesh::DofMap::end_dof(), libMesh::DofMap::first_dof(), hashed_dof_sets, nonlocal_pattern, libMesh::SparsityPattern::sort_row() , 以及 sparsity_pattern.
参考自 operator()().
void libMesh::SparsityPattern::Build::join | ( | const Build & | other | ) |
Combine the sparsity pattern in other
with this object's sparsity pattern.
Useful in multithreaded loops.
在文件 sparsity_pattern.C 第 363 行定义.
参考 dof_map, libMesh::DofMap::end_dof(), libMesh::DofMap::first_dof(), hashed_dof_sets, libMesh::DofMap::n_dofs(), libMesh::DofMap::n_dofs_on_processor(), n_nz, n_oz, need_full_sparsity_pattern, nonlocal_pattern , 以及 sparsity_pattern.
void libMesh::SparsityPattern::Build::operator() | ( | const ConstElemRange & | range | ) |
Add entries from a range of elements to this object's sparsity pattern.
在文件 sparsity_pattern.C 第 238 行定义.
参考 libMesh::DofMap::coupling_functors_begin(), libMesh::DofMap::coupling_functors_end(), dof_map, libMesh::DofMap::end_dof(), libMesh::DofMap::first_dof(), handle_vi_vj(), libMesh::DofObject::invalid_processor_id, libMesh::DofMap::merge_ghost_functor_outputs(), libMesh::DofMap::n_dofs_on_processor(), n_nz, n_oz, libMesh::DofMap::n_variables(), need_full_sparsity_pattern, sorted_connected_dofs() , 以及 sparsity_pattern.
void libMesh::SparsityPattern::Build::parallel_sync | ( | ) |
Send sparsity pattern data relevant to other processors to those processors, and receive and incorporate data relevant to us.
在文件 sparsity_pattern.C 第 469 行定义.
参考 dof_map, libMesh::DofMap::end_dof(), libMesh::DofMap::first_dof(), libMesh::DofMap::local_index(), libMesh::DofMap::n_dofs(), libMesh::DofMap::n_dofs_on_processor(), n_nz, n_oz, need_full_sparsity_pattern, nonlocal_pattern , 以及 sparsity_pattern.
|
private |
在文件 sparsity_pattern.C 第 92 行定义.
参考 libMesh::DofMap::dof_indices(), dof_map , 以及 libMesh::DofMap::find_connected_dofs().
参考自 operator()().
|
private |
在文件 sparsity_pattern.h 第 207 行定义.
|
private |
在文件 sparsity_pattern.h 第 204 行定义.
|
private |
在文件 sparsity_pattern.h 第 203 行定义.
|
private |
在文件 sparsity_pattern.h 第 202 行定义.
参考自 handle_vi_vj(), join(), operator()(), parallel_sync() , 以及 sorted_connected_dofs().
|
private |
在文件 sparsity_pattern.h 第 218 行定义.
参考自 handle_vi_vj() , 以及 join().
|
private |
在文件 sparsity_pattern.h 第 205 行定义.
|
private |
在文件 sparsity_pattern.h 第 235 行定义.
参考自 apply_extra_sparsity_object(), get_n_nz(), join(), operator()() , 以及 parallel_sync().
|
private |
在文件 sparsity_pattern.h 第 237 行定义.
参考自 apply_extra_sparsity_object(), get_n_oz(), join(), operator()() , 以及 parallel_sync().
|
private |
在文件 sparsity_pattern.h 第 206 行定义.
参考自 join(), operator()() , 以及 parallel_sync().
|
private |
在文件 sparsity_pattern.h 第 233 行定义.
参考自 clear_full_sparsity(), get_nonlocal_pattern(), handle_vi_vj(), join() , 以及 parallel_sync().
|
private |