NeoPZ
|
Computes the cardinality of a nodegraph, identifying nodes as vertices, lines, faces or volumes. Utility. More...
#include <tpznodesetcompute.h>
Public Member Functions | |
TPZNodesetCompute () | |
~TPZNodesetCompute () | |
void | AnalyseGraph () |
Group the node graph as passed by the parameters. More... | |
void | BuildNodeGraph (TPZVec< int64_t > &blockgraph, TPZVec< int64_t > &blockgraphindex) |
Build the graph which groups the equations of each node. More... | |
void | BuildVertexGraph (TPZStack< int64_t > &blockgraph, TPZVec< int64_t > &blockgraphindex) |
build the graph which builds the equations linked to vertices More... | |
void | BuildElementGraph (TPZStack< int64_t > &blockgraph, TPZStack< int64_t > &blockgraphindex) |
Build the graph which groups the equations grouped by elements. More... | |
void | BuildNodeSet (int64_t node, std::set< int64_t > &nodeset) |
TPZVec< int > & | Levels () |
Returns the level of the nodes. More... | |
int | MaxLevel () |
Returns the maximum level. More... | |
void | Print (std::ostream &file) const |
TPZManVector< int64_t > & | Nodegraph () |
TPZManVector< int64_t > & | Nodegraphindex () |
TPZVec< int > & | IsIncluded () |
Static Public Member Functions | |
static void | ExpandGraph (TPZVec< int64_t > &graph, TPZVec< int64_t > &graphindex, TPZBlock< STATE > &block, TPZVec< int64_t > &expgraph, TPZVec< int64_t > &expgraphindex) |
Expand the graph acording to the block structure. More... | |
static int | ColorGraph (TPZVec< int64_t > &graph, TPZVec< int64_t > &graphindex, int64_t neq, TPZVec< int > &colors) |
Color the graph into mutually independent blocks. More... | |
static void | Print (std::ostream &file, const TPZVec< int64_t > &graphindex, const TPZVec< int64_t > &graph) |
static void | Print (std::ostream &file, const std::set< int64_t > &nodeset, const char *text) |
Private Member Functions | |
void | AnalyseNode (int64_t node, TPZVec< std::set< int64_t > > &nodeset) |
This method will analyse the set inclusion of the current node, calling the method recursively if another node need to be analysed first. More... | |
void | AnalyseForElements (std::set< int64_t > &vertices, std::set< std::set< int64_t > > &elements) |
Look for elements formed by vertices, intersecting with the intersectvertices, one by one. More... | |
void | SubstractLowerNodes (int64_t node, std::set< int64_t > &nodeset) |
working a set of vertex nodes with nodes which have to be intersected (tested) More... | |
Private Attributes | |
TPZManVector< int64_t > | fNodegraph |
The node graph as passed on by the finite element mesh His node graph is organized by sequence numbers. More... | |
TPZManVector< int64_t > | fNodegraphindex |
int64_t | fMaxSeqNum |
Counter for the condensed node graph. More... | |
int | fMaxLevel |
TPZVec< int64_t > | fSeqNumber |
Sequence number associated with each node after condensing. More... | |
TPZStack< int64_t > | fSeqCard |
Number of nodes associated with each sequence number. More... | |
TPZVec< int > | fLevel |
Inclusion relation ship between nodes. More... | |
TPZVec< int > | fIsIncluded |
Vector indicating whether a node connectivity is included in another one. More... | |
Computes the cardinality of a nodegraph, identifying nodes as vertices, lines, faces or volumes. Utility.
Definition at line 32 of file tpznodesetcompute.h.
TPZNodesetCompute::TPZNodesetCompute | ( | ) |
Definition at line 32 of file tpznodesetcompute.cpp.
References fMaxLevel, and fMaxSeqNum.
TPZNodesetCompute::~TPZNodesetCompute | ( | ) |
Definition at line 39 of file tpznodesetcompute.cpp.
|
private |
Look for elements formed by vertices, intersecting with the intersectvertices, one by one.
If the intersection does not remove any of the intersectvertices, we found an element!
Look for elements formed by vertices, intersecting with the intersectvertices, one by one If the intersection does not remove any of the intersectvertices, we found an element!
Definition at line 288 of file tpznodesetcompute.cpp.
References BuildNodeSet(), LOGPZ_DEBUG, and Print().
Referenced by BuildElementGraph().
void TPZNodesetCompute::AnalyseGraph | ( | ) |
Group the node graph as passed by the parameters.
Group the node graph as passed by the parameters
Definition at line 47 of file tpznodesetcompute.cpp.
References AnalyseNode(), TPZVec< T >::Fill(), fIsIncluded, fLevel, fMaxLevel, fMaxSeqNum, fNodegraphindex, fSeqNumber, TPZVec< T >::NElements(), and TPZVec< T >::Resize().
Referenced by TPZAnalysis::BuildPreconditioner(), and TPZGenSubStruct::IdentifyCornerNodes().
|
private |
This method will analyse the set inclusion of the current node, calling the method
recursively if another node need to be analysed first.
This method will analyse the set inclusion of the current node, calling the method recursively if another node need to be analysed first
Definition at line 77 of file tpznodesetcompute.cpp.
References TPZVec< T >::clear(), DebugStop, fIsIncluded, fLevel, fMaxLevel, fMaxSeqNum, fNodegraph, fNodegraphindex, fSeqCard, fSeqNumber, LOGPZ_DEBUG, LOGPZ_ERROR, TPZVec< T >::NElements(), and TPZStack< T, NumExtAlloc >::Push().
Referenced by AnalyseGraph().
void TPZNodesetCompute::BuildElementGraph | ( | TPZStack< int64_t > & | blockgraph, |
TPZStack< int64_t > & | blockgraphindex | ||
) |
Build the graph which groups the equations grouped by elements.
Definition at line 391 of file tpznodesetcompute.cpp.
References AnalyseForElements(), BuildNodeSet(), fNodegraphindex, LOGPZ_DEBUG, TPZVec< T >::NElements(), Print(), TPZStack< T, NumExtAlloc >::Push(), TPZManVector< T, NumExtAlloc >::Resize(), and SubstractLowerNodes().
Referenced by TPZAnalysis::BuildPreconditioner().
void TPZNodesetCompute::BuildNodeGraph | ( | TPZVec< int64_t > & | blockgraph, |
TPZVec< int64_t > & | blockgraphindex | ||
) |
Build the graph which groups the equations of each node.
Definition at line 190 of file tpznodesetcompute.cpp.
References fSeqCard, fSeqNumber, TPZVec< T >::NElements(), and TPZVec< T >::Resize().
Referenced by TPZAnalysis::BuildPreconditioner().
void TPZNodesetCompute::BuildNodeSet | ( | int64_t | node, |
std::set< int64_t > & | nodeset | ||
) |
Definition at line 277 of file tpznodesetcompute.cpp.
References fNodegraph, and fNodegraphindex.
Referenced by AnalyseForElements(), BuildElementGraph(), BuildVertexGraph(), and SubstractLowerNodes().
void TPZNodesetCompute::BuildVertexGraph | ( | TPZStack< int64_t > & | blockgraph, |
TPZVec< int64_t > & | blockgraphindex | ||
) |
build the graph which builds the equations linked to vertices
Definition at line 211 of file tpznodesetcompute.cpp.
References BuildNodeSet(), fLevel, fMaxLevel, fSeqNumber, TPZVec< T >::NElements(), TPZStack< T, NumExtAlloc >::Push(), and TPZVec< T >::Resize().
Referenced by TPZAnalysis::BuildPreconditioner().
|
static |
Color the graph into mutually independent blocks.
Color the graph into mutually independent blocks
Definition at line 564 of file tpznodesetcompute.cpp.
References TPZVec< T >::Fill(), substruct_tst15.test::first, TPZVec< T >::NElements(), and TPZVec< T >::Resize().
Referenced by TPZAnalysis::BuildPreconditioner().
|
static |
Expand the graph acording to the block structure.
Expand the graph acording to the block structure
Definition at line 525 of file tpznodesetcompute.cpp.
References substruct_tst15.test::first, TPZVec< T >::NElements(), TPZBlock< TVar >::Position(), TPZVec< T >::Resize(), and TPZBlock< TVar >::Size().
Referenced by TPZAnalysis::BuildPreconditioner().
|
inline |
Definition at line 86 of file tpznodesetcompute.h.
References fIsIncluded.
|
inline |
Returns the level of the nodes.
Definition at line 61 of file tpznodesetcompute.h.
References fLevel.
Referenced by TPZGenSubStruct::IdentifyCornerNodes().
|
inline |
Returns the maximum level.
Definition at line 67 of file tpznodesetcompute.h.
References fMaxLevel, and Print().
Referenced by TPZGenSubStruct::IdentifyCornerNodes().
|
inline |
Definition at line 78 of file tpznodesetcompute.h.
References fNodegraph.
Referenced by TPZAnalysis::BuildPreconditioner(), and TPZGenSubStruct::IdentifyCornerNodes().
|
inline |
Definition at line 82 of file tpznodesetcompute.h.
References fNodegraphindex.
Referenced by TPZAnalysis::BuildPreconditioner(), and TPZGenSubStruct::IdentifyCornerNodes().
void TPZNodesetCompute::Print | ( | std::ostream & | file | ) | const |
Definition at line 487 of file tpznodesetcompute.cpp.
References fLevel, fNodegraph, fNodegraphindex, fSeqNumber, and TPZVec< T >::NElements().
Referenced by AnalyseForElements(), BuildElementGraph(), TPZGenSubStruct::IdentifyCornerNodes(), MaxLevel(), and SubstractLowerNodes().
|
static |
Definition at line 499 of file tpznodesetcompute.cpp.
References substruct_tst15.test::first, and TPZVec< T >::NElements().
|
static |
Definition at line 514 of file tpznodesetcompute.cpp.
|
private |
working a set of vertex nodes with nodes which have to be intersected (tested)
node | node whose intersection need to be considered |
nodeset | the set of nodes which need to form elements |
Definition at line 440 of file tpznodesetcompute.cpp.
References BuildNodeSet(), LOGPZ_DEBUG, and Print().
Referenced by BuildElementGraph().
|
private |
Vector indicating whether a node connectivity is included in another one.
Definition at line 109 of file tpznodesetcompute.h.
Referenced by AnalyseGraph(), AnalyseNode(), and IsIncluded().
|
private |
Inclusion relation ship between nodes.
Definition at line 107 of file tpznodesetcompute.h.
Referenced by AnalyseGraph(), AnalyseNode(), BuildVertexGraph(), Levels(), and Print().
|
private |
Definition at line 100 of file tpznodesetcompute.h.
Referenced by AnalyseGraph(), AnalyseNode(), BuildVertexGraph(), MaxLevel(), and TPZNodesetCompute().
|
private |
Counter for the condensed node graph.
Definition at line 99 of file tpznodesetcompute.h.
Referenced by AnalyseGraph(), AnalyseNode(), and TPZNodesetCompute().
|
private |
The node graph as passed on by the finite element mesh
His node graph is organized by sequence numbers.
Definition at line 96 of file tpznodesetcompute.h.
Referenced by AnalyseNode(), BuildNodeSet(), Nodegraph(), and Print().
|
private |
Definition at line 97 of file tpznodesetcompute.h.
Referenced by AnalyseGraph(), AnalyseNode(), BuildElementGraph(), BuildNodeSet(), Nodegraphindex(), and Print().
|
private |
Number of nodes associated with each sequence number.
Definition at line 105 of file tpznodesetcompute.h.
Referenced by AnalyseNode(), and BuildNodeGraph().
|
private |
Sequence number associated with each node after condensing.
Definition at line 103 of file tpznodesetcompute.h.
Referenced by AnalyseGraph(), AnalyseNode(), BuildNodeGraph(), BuildVertexGraph(), and Print().