Skip to content
Snippets Groups Projects
Commit 10b54e0d authored by Christoph Lehmann's avatar Christoph Lehmann
Browse files

[Asm] CompSparsPat now also computes NodeAdjTable

parent 5614a2c2
No related branches found
No related tags found
No related merge requests found
...@@ -7,18 +7,22 @@ ...@@ -7,18 +7,22 @@
* *
*/ */
#include "MeshLib/NodeAdjacencyTable.h"
#include "LocalToGlobalIndexMap.h"
#include "ComputeSparsityPattern.h" #include "ComputeSparsityPattern.h"
namespace AssemblerLib namespace AssemblerLib
{ {
SparsityPattern SparsityPattern
computeSparsityPattern( computeSparsityPattern(LocalToGlobalIndexMap const& dof_table,
MeshLib::NodeAdjacencyTable const& node_adjacency_table,
LocalToGlobalIndexMap const& dof_table,
MeshLib::Mesh const& mesh MeshLib::Mesh const& mesh
) )
{ {
MeshLib::NodeAdjacencyTable node_adjacency_table;
node_adjacency_table.createTable(mesh.getNodes());
std::vector<std::vector<GlobalIndexType> > global_idcs; std::vector<std::vector<GlobalIndexType> > global_idcs;
global_idcs.reserve(mesh.getNNodes()); global_idcs.reserve(mesh.getNNodes());
for (std::size_t n=0; n<mesh.getNNodes(); ++n) for (std::size_t n=0; n<mesh.getNNodes(); ++n)
......
...@@ -12,19 +12,18 @@ ...@@ -12,19 +12,18 @@
#include <vector> #include <vector>
#include "MeshLib/NodeAdjacencyTable.h"
#include "LocalToGlobalIndexMap.h"
#include "ProcessLib/NumericsConfig.h" #include "ProcessLib/NumericsConfig.h"
namespace AssemblerLib namespace AssemblerLib
{ {
class LocalToGlobalIndexMap;
using SparsityPattern = std::vector<GlobalIndexType>; using SparsityPattern = std::vector<GlobalIndexType>;
/** /**
* @brief Computes a sparsity pattern for the given inputs. * @brief Computes a sparsity pattern for the given inputs.
* *
* @param node_adjacency_table describes the mesh topology
* @param dof_table maps mesh nodes to global indices * @param dof_table maps mesh nodes to global indices
* @param mesh mesh for which the two parameters above are defined * @param mesh mesh for which the two parameters above are defined
* *
...@@ -32,7 +31,6 @@ using SparsityPattern = std::vector<GlobalIndexType>; ...@@ -32,7 +31,6 @@ using SparsityPattern = std::vector<GlobalIndexType>;
*/ */
SparsityPattern SparsityPattern
computeSparsityPattern( computeSparsityPattern(
MeshLib::NodeAdjacencyTable const& node_adjacency_table,
LocalToGlobalIndexMap const& dof_table, LocalToGlobalIndexMap const& dof_table,
MeshLib::Mesh const& mesh MeshLib::Mesh const& mesh
); );
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment