OGS
ComputeSparsityPattern.cpp File Reference

Detailed Description

Definition in file ComputeSparsityPattern.cpp.

Include dependency graph for ComputeSparsityPattern.cpp:

Go to the source code of this file.

Namespaces

namespace  NumLib
 

Functions

GlobalSparsityPattern computeSparsityPatternPETSc (NumLib::LocalToGlobalIndexMap const &dof_table, MeshLib::Mesh const &mesh)
 
GlobalSparsityPattern NumLib::computeSparsityPattern (LocalToGlobalIndexMap const &dof_table, MeshLib::Mesh const &mesh)
 Computes a sparsity pattern for the given inputs.
 

Function Documentation

◆ computeSparsityPatternPETSc()

GlobalSparsityPattern computeSparsityPatternPETSc ( NumLib::LocalToGlobalIndexMap const & dof_table,
MeshLib::Mesh const & mesh )

Definition at line 21 of file ComputeSparsityPattern.cpp.

23{
24 assert(dynamic_cast<MeshLib::NodePartitionedMesh const*>(&mesh));
25 auto const& npmesh =
26 *static_cast<MeshLib::NodePartitionedMesh const*>(&mesh);
27
28 auto const max_nonzeroes = dof_table.getNumberOfGlobalComponents() *
30
31 // The sparsity pattern is misused here in the sense that it will only
32 // contain a single value.
33 return GlobalSparsityPattern(1, max_nonzeroes);
34}
MathLib::SparsityPattern< GlobalIndexType > GlobalSparsityPattern
std::size_t getMaximumNConnectedNodesToNode() const
Get the maximum number of connected nodes to node.

References NumLib::LocalToGlobalIndexMap::getNumberOfGlobalComponents().

Referenced by NumLib::computeSparsityPattern().