NeoPZ
tpzgensubstruct.h
Go to the documentation of this file.
1 
6 #ifndef TPZGENSUBSTRUCT_H
7 #define TPZGENSUBSTRUCT_H
8 
9 #include "tpzautopointer.h"
10 #include "pzcmesh.h"
11 #include "tpzdohrassembly.h"
12 #include "tpzdohrmatrix.h"
13 
14 class TPZSubCompMesh;
15 template<class TVar>
16 class TPZDohrSubstruct;
17 template<class TVar>
19 
28 public:
29  enum ETypemesh
30  {
32  };
33 
35 
43  TPZGenSubStruct(int dimension, int numlevels, int substructlevel);
44 
46 
47 #ifndef STATE_COMPLEX
48 
50 #endif
51 
56 
57  void ReorderInternalNodes(TPZSubCompMesh *sub, std::map<int,int> &globaltolocal,
58  TPZVec<int> &internalnodes);
59  static void ReorderInternalNodes2(TPZSubCompMesh *sub,
60  TPZVec<int> &internalnodes, TPZVec<int64_t> &invpermute);
61 
67  TPZVec<int> &scatterpermute, TPZVec<int> &gatherpermute);
68 
69 private:
76 
79 
81  std::set<int> fCornerEqs;
82 
84  void UniformRefine();
85 
86 public:
88  void SubStructure();
89 private:
91  void IdentifyCornerNodes();
92 
94  void IdentifyEqNumbers(TPZSubCompMesh *sub, TPZVec<std::pair<int,int> > &globaleq, std::map<int,int> &globinv);
95 
97  void IdentifyEqNumbers(TPZSubCompMesh *sub, TPZVec<int> &global, std::map<int,int> &globinv);
98 
100  void IdentifySubCornerEqs(std::map<int,int> &globaltolocal, TPZVec<int> &cornereqs,
101  TPZVec<int> &coarseindex);
102 
103  static int64_t NInternalEq(TPZSubCompMesh *sub);
104 
105 };
106 
109 
112 
114 int64_t NSubMesh(TPZAutoPointer<TPZCompMesh> compmesh);
115 
118 
121 #endif
void InitializeDohr(TPZAutoPointer< TPZMatrix< STATE > > dohr, TPZAutoPointer< TPZDohrAssembly< STATE > > assembly)
Initialize the TPZDohrMatrix structure.
TPZAutoPointer< TPZCompMesh > fCMesh
computational mesh
static void ReorderInternalNodes2(TPZSubCompMesh *sub, TPZVec< int > &internalnodes, TPZVec< int64_t > &invpermute)
std::set< int > fCornerEqs
The set of equations which correspond to corner nodes.
void InitializeMatrices(TPZSubCompMesh *sub, TPZAutoPointer< TPZDohrSubstruct< STATE > > substruct, TPZDohrAssembly< STATE > &dohrassembly)
This is a lengthy process which should run on the remote processor.
clarg::argInt dimension("-d", "Matrices dimension M x M", 1000)
Contains the TPZDohrMatrix class which implements a matrix divided into substructures. Also contains the TPZDohrThreadMultData and TPZDohrThreadMultList structs.
int fSubstructLevel
Level of substructures.
void InitializeDohrCondense(TPZAutoPointer< TPZMatrix< STATE > > dohr, TPZAutoPointer< TPZDohrAssembly< STATE > > assembly)
Initialize the TPZDohrMatrix structure.
int64_t NSubMesh(TPZAutoPointer< TPZCompMesh > compmesh)
Return the number of submeshes.
Implements sub structure matrices using Dohrman algorithm. Sub Structure.
Contains the TPZDohrAssembly class which implements assembling using Dohrmann algorithm.
An interface to "feed" the datastructure of the Dohrmann algorithm. Sub Structure.
TPZSubCompMesh * SubMesh(TPZAutoPointer< TPZCompMesh > compmesh, int isub)
Return a pointer to the isub submesh.
void ReorderInternalNodes(TPZSubCompMesh *sub, std::map< int, int > &globaltolocal, TPZVec< int > &internalnodes)
static int64_t NInternalEq(TPZSubCompMesh *sub)
void SubStructure()
Divide the elements in substructures.
void IdentifyEqNumbers(TPZSubCompMesh *sub, TPZVec< std::pair< int, int > > &globaleq, std::map< int, int > &globinv)
Identify the global equations as a pair of local equation and global equation.
To condense matrix divided in sub structures. Sub Structure.
Implements a group of computational elements as a mesh and an element. Computational Mesh...
Definition: pzsubcmesh.h:36
int fDimension
Dimension of the mesh.
Contains declaration of the TPZAutoPointer class which has Increment and Decrement actions are mutexe...
int fNumLevels
Number of uniform refinements.
void UniformRefine()
Divide the geometric elements till num levels is achieved.
Contains declaration of TPZCompMesh class which is a repository for computational elements...
void IdentifySubCornerEqs(std::map< int, int > &globaltolocal, TPZVec< int > &cornereqs, TPZVec< int > &coarseindex)
Identify the corner equations associated with a substructure.
ETypemesh fMatDist
void IdentifyCornerNodes()
Identify cornernodes.
TPZAutoPointer< TPZCompMesh > GenerateMesh()
Method which will generate the computational mesh.
TPZGenSubStruct(int dimension, int numlevels, int substructlevel)
Constructor.
TPZVec< REAL > fK
static void ComputeInternalEquationPermutation(TPZSubCompMesh *sub, TPZVec< int > &scatterpermute, TPZVec< int > &gatherpermute)
Computes the permutation vectors from the subcompmesh ordening to the "internal first" ordering...