NeoPZ
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
TPZNodesetCompute Class Reference

Computes the cardinality of a nodegraph, identifying nodes as vertices, lines, faces or volumes. Utility. More...

#include <tpznodesetcompute.h>

Collaboration diagram for TPZNodesetCompute:
[legend]

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...
 

Detailed Description

Computes the cardinality of a nodegraph, identifying nodes as vertices, lines, faces or volumes. Utility.

Author
Philippe R. B. Devloo It will also compress the nodegraph for nodes with identical connectivity graph

Definition at line 32 of file tpznodesetcompute.h.

Constructor & Destructor Documentation

◆ TPZNodesetCompute()

TPZNodesetCompute::TPZNodesetCompute ( )

Definition at line 32 of file tpznodesetcompute.cpp.

References fMaxLevel, and fMaxSeqNum.

◆ ~TPZNodesetCompute()

TPZNodesetCompute::~TPZNodesetCompute ( )

Definition at line 39 of file tpznodesetcompute.cpp.

Member Function Documentation

◆ AnalyseForElements()

void TPZNodesetCompute::AnalyseForElements ( std::set< int64_t > &  vertices,
std::set< std::set< int64_t > > &  elements 
)
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().

◆ AnalyseGraph()

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().

◆ AnalyseNode()

void TPZNodesetCompute::AnalyseNode ( int64_t  node,
TPZVec< std::set< int64_t > > &  nodeset 
)
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().

◆ BuildElementGraph()

void TPZNodesetCompute::BuildElementGraph ( TPZStack< int64_t > &  blockgraph,
TPZStack< int64_t > &  blockgraphindex 
)

◆ BuildNodeGraph()

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().

◆ BuildNodeSet()

void TPZNodesetCompute::BuildNodeSet ( int64_t  node,
std::set< int64_t > &  nodeset 
)

◆ BuildVertexGraph()

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().

◆ ColorGraph()

int TPZNodesetCompute::ColorGraph ( TPZVec< int64_t > &  graph,
TPZVec< int64_t > &  graphindex,
int64_t  neq,
TPZVec< int > &  colors 
)
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().

◆ ExpandGraph()

void TPZNodesetCompute::ExpandGraph ( TPZVec< int64_t > &  graph,
TPZVec< int64_t > &  graphindex,
TPZBlock< STATE > &  block,
TPZVec< int64_t > &  expgraph,
TPZVec< int64_t > &  expgraphindex 
)
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().

◆ IsIncluded()

TPZVec<int>& TPZNodesetCompute::IsIncluded ( )
inline

Definition at line 86 of file tpznodesetcompute.h.

References fIsIncluded.

◆ Levels()

TPZVec<int>& TPZNodesetCompute::Levels ( )
inline

Returns the level of the nodes.

Definition at line 61 of file tpznodesetcompute.h.

References fLevel.

Referenced by TPZGenSubStruct::IdentifyCornerNodes().

◆ MaxLevel()

int TPZNodesetCompute::MaxLevel ( )
inline

Returns the maximum level.

Definition at line 67 of file tpznodesetcompute.h.

References fMaxLevel, and Print().

Referenced by TPZGenSubStruct::IdentifyCornerNodes().

◆ Nodegraph()

TPZManVector<int64_t>& TPZNodesetCompute::Nodegraph ( )
inline

◆ Nodegraphindex()

TPZManVector<int64_t>& TPZNodesetCompute::Nodegraphindex ( )
inline

◆ Print() [1/3]

void TPZNodesetCompute::Print ( std::ostream &  file) const

◆ Print() [2/3]

void TPZNodesetCompute::Print ( std::ostream &  file,
const TPZVec< int64_t > &  graphindex,
const TPZVec< int64_t > &  graph 
)
static

Definition at line 499 of file tpznodesetcompute.cpp.

References substruct_tst15.test::first, and TPZVec< T >::NElements().

◆ Print() [3/3]

void TPZNodesetCompute::Print ( std::ostream &  file,
const std::set< int64_t > &  nodeset,
const char *  text 
)
static

Definition at line 514 of file tpznodesetcompute.cpp.

◆ SubstractLowerNodes()

void TPZNodesetCompute::SubstractLowerNodes ( int64_t  node,
std::set< int64_t > &  nodeset 
)
private

working a set of vertex nodes with nodes which have to be intersected (tested)

Parameters
nodenode whose intersection need to be considered
nodesetthe 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().

Member Data Documentation

◆ fIsIncluded

TPZVec<int> TPZNodesetCompute::fIsIncluded
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().

◆ fLevel

TPZVec<int> TPZNodesetCompute::fLevel
private

Inclusion relation ship between nodes.

Definition at line 107 of file tpznodesetcompute.h.

Referenced by AnalyseGraph(), AnalyseNode(), BuildVertexGraph(), Levels(), and Print().

◆ fMaxLevel

int TPZNodesetCompute::fMaxLevel
private

◆ fMaxSeqNum

int64_t TPZNodesetCompute::fMaxSeqNum
private

Counter for the condensed node graph.

Definition at line 99 of file tpznodesetcompute.h.

Referenced by AnalyseGraph(), AnalyseNode(), and TPZNodesetCompute().

◆ fNodegraph

TPZManVector<int64_t> TPZNodesetCompute::fNodegraph
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().

◆ fNodegraphindex

TPZManVector<int64_t> TPZNodesetCompute::fNodegraphindex
private

◆ fSeqCard

TPZStack<int64_t> TPZNodesetCompute::fSeqCard
private

Number of nodes associated with each sequence number.

Definition at line 105 of file tpznodesetcompute.h.

Referenced by AnalyseNode(), and BuildNodeGraph().

◆ fSeqNumber

TPZVec<int64_t> TPZNodesetCompute::fSeqNumber
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().


The documentation for this class was generated from the following files: