29 npmesh.getMaximumNConnectedNodesToNode();
43 std::vector<std::vector<GlobalIndexType>> global_idcs;
57 auto const& an = node_adjacency_table.getAdjacentNodes(n);
58 auto const n_connected_dof =
59 std::accumulate(cbegin(an), cend(an), 0,
60 [&](
auto const result,
auto const i)
61 {
return result + global_idcs[i].size(); });
62 for (
auto global_index : global_idcs[n])
64 sparsity_pattern[global_index] = n_connected_dof;
68 return sparsity_pattern;
80 return computeSparsityPatternNonPETSc(dof_table, mesh);
GlobalSparsityPattern computeSparsityPatternPETSc(NumLib::LocalToGlobalIndexMap const &dof_table, MeshLib::Mesh const &mesh)
MathLib::SparsityPattern< GlobalIndexType > GlobalSparsityPattern
Definition of mesh class for partitioned mesh (by node) for parallel computing within the framework o...
std::size_t getID() const
Get id of the mesh.
std::size_t getNumberOfNodes() const
Get the number of nodes.
std::size_t dofSizeWithGhosts() const
int getNumberOfGlobalComponents() const
std::vector< GlobalIndexType > getGlobalIndices(const MeshLib::Location &l) const
Forwards the respective method from MeshComponentMap.
GlobalSparsityPattern computeSparsityPattern(LocalToGlobalIndexMap const &dof_table, MeshLib::Mesh const &mesh)
Computes a sparsity pattern for the given inputs.