KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
|
This file computes the graph representing the connectivity of a modelpart. More...
#include <model_part_graph_utilities.h>
Public Member Functions | |
Life Cycle | |
ModelPartGraphUtilities ()=delete | |
no constructor. More... | |
ModelPartGraphUtilities (ModelPartGraphUtilities const &rOther)=delete | |
Copy constructor. More... | |
Operators | |
ModelPartGraphUtilities & | operator= (ModelPartGraphUtilities const &rOther)=delete |
Assignment operator. More... | |
Static Public Member Functions | |
Operations | |
static Kratos::unique_ptr< SparseContiguousRowGraph<> > | ComputeGraph (const ModelPart &rModelPart) |
static std::pair< DenseVector< IndexType >, DenseVector< IndexType > > | ComputeCSRGraph (const ModelPart &rModelPart) |
static std::pair< IndexType, DenseVector< double > > | ComputeConnectedComponents (const ModelPart::NodesContainerType &rNodes, const DenseVector< IndexType > &rRowIndices, const DenseVector< IndexType > &rColIndices) |
static std::pair< IndexType, DenseVector< double > > | ComputeConnectedComponentsWithActiveNodesCheck (const ModelPart::NodesContainerType &rNodes, const DenseVector< IndexType > &rRowIndices, const DenseVector< IndexType > &rColIndices, const std::vector< bool > &active_nodes_list) |
static std::vector< IndexType > | ApplyMinimalScalarFixity (ModelPart::NodesContainerType &rNodes, const Variable< double > &rVar, const DenseVector< double > &colors, const IndexType ncolors) |
Static Protected Member Functions | |
Protected Operations | |
static void | BreadthFirstSearch (const int startVertex, const int color, const DenseVector< IndexType > &rRowIndices, const DenseVector< IndexType > &rColIndices, std::unordered_map< IndexType, int > &rVisited) |
static void | BreadthFirstSearchWithActiveNodesCheck (const int startVertex, const int color, const DenseVector< IndexType > &rRowIndices, const DenseVector< IndexType > &rColIndices, std::unordered_map< IndexType, int > &rVisited, const std::unordered_map< IndexType, bool > &rActiveNodes) |
Type Definitions | |
typedef unsigned int | IndexType |
KRATOS_CLASS_POINTER_DEFINITION (ModelPartGraphUtilities) | |
Pointer definition of ModelPartGraphUtilities. More... | |
This file computes the graph representing the connectivity of a modelpart.
Given a modelpart, it returns the csr_representation of its graph.
typedef unsigned int Kratos::ModelPartGraphUtilities::IndexType |
|
delete |
no constructor.
|
delete |
Copy constructor.
|
static |
|
staticprotected |
|
staticprotected |
|
static |
This function computes the Connected Components for a given graph, expressed in terms of its CSR representation it returns a pair containing the number of columns identified and the "color" associated to each of the nodes the returned "colors" array is such that one can directly employ the function VariableUtils.SetSolutionStepValue(model_part.Nodes(), colors) to set the value on the nodes in the modelpart for which it was
|
static |
|
static |
The following function computes the connectivity graph (based on node.Id()-1 so that ids start in 0) expressed as CSR arrays for the modelpart used as input.
rModelPart | modelpart of which we will compute the graph |
the | row and col arrays in CSR form |
NOTE: this function is suboptimal if discontinuous or very large ids are employed (the graph will have empty rows from 0 to the id of the largest node)
|
static |
The following function computes the connectivity graph (based on node.Id()-1 so that ids start in 0) for the mesh used as input.
rModelPart | modelpart of which we will compute the graph |
the | Graph being computed |
NOTE: this function is suboptimal if discontinuous or very large ids are employed (the graph will have empty rows from 0 to the id of the largest node)
Kratos::ModelPartGraphUtilities::KRATOS_CLASS_POINTER_DEFINITION | ( | ModelPartGraphUtilities | ) |
Pointer definition of ModelPartGraphUtilities.
|
delete |
Assignment operator.