6 #ifndef PZDOHRSTRUCTMATRIX 7 #define PZDOHRSTRUCTMATRIX 54 unsigned numthreads_assemble,
unsigned numthreads_decompose)
override;
60 unsigned numthreads_assemble,
unsigned numthreads_decompose)
override;
161 enum MTask {ENone, EComputeMatrix, EDecomposeInternal, EDecomposeBig};
171 fTask(ENone), fMesh(mesh), fSubMeshIndex(submesh), fSubstruct(substruct), fAssembly(assembly)
177 fSubstruct(copy.fSubstruct),fAssembly(copy.fAssembly)
182 fSubstruct(copy->fSubstruct),fAssembly(copy->fAssembly)
211 std::list<TPZAutoPointer<ThreadDohrmanAssembly<TVar> > >
fList;
218 static void *ThreadWork(
void *voidptr);
void IdentifySubCornerEqs(std::map< int, int > &globaltolocal, TPZVec< int > &cornereqs, TPZVec< int > &coarseindex)
Identify the corner equations associated with a substructure.
Assembling using Dohrmann algorithm. Sub structure.
void ComputeInternalEquationPermutation(TPZSubCompMesh *sub, TPZVec< int > &scatterpermute, TPZVec< int > &gatherpermute)
Computes the permutation vectors from the subcompmesh ordening to the "internal first" ordering...
void CorrectNeighbourDomainIndex(TPZCompMesh *cmesh, TPZVec< int > &domainindex)
Set the domain index of the lower dimension elements equal to the domain index of their neighbour...
friend TPZPersistenceManager
TPZAutoPointer< TPZDohrAssembly< STATE > > fDohrAssembly
void Append(TPZVec< TVar > &u1, TPZVec< TVar > &u2, TPZVec< TVar > &u12)
Append u2 vector after u1 vector in u12 vector.
clarg::argInt nsub("-nsub", "number of substructs", 4)
TPZAutoPointer< TPZDohrAssembly< TVar > > fAssembly
TPZAutoPointer< TPZCompMesh > fMesh
TPZAutoPointer< TPZDohrAssembly< STATE > > Assembly()
Implements assembling by Dohrman algorithm.
void IdentifyCornerNodes()
Identify cornernodes.
Contains the TPZStructMatrixOR class which responsible for a interface among Matrix and Finite Elemen...
Contains the TPZDohrAssembly class which implements assembling using Dohrmann algorithm.
pthread_mutex_t fAccessElement
Mutexes (to choose which submesh is next)
std::set< int > fCornerEqs
The global equations defining the coarse matrix.
void IdentifyEqNumbers(TPZSubCompMesh *sub, std::map< int, int > &global, std::map< int, int > &globinv)
Refines geometrical mesh (all the elements) num times.
ThreadDohrmanAssembly(TPZAutoPointer< ThreadDohrmanAssembly > copy)
int NumberCornerEqs() const
Return the number of cornereqs.
TPZAutoPointer< TPZMatrix< STATE > > Preconditioner()
This will return the pointer to the preconditioner AND abandon the pointer.
void AssembleTBB(TPZMatrix< STATE > &mat, TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface)
void Write(TPZStream &str, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
TPZAutoPointer< TPZMatrix< STATE > > fDohrPrecond
To condense matrix divided in sub structures. Sub Structure.
Implements a group of computational elements as a mesh and an element. Computational Mesh...
int ClusterIslands(TPZVec< int > &domain_index, int nsub, int connectdimension)
Eliminates subdomains who are embedded in other subdomains.
virtual void Assemble(TPZMatrix< STATE > &mat, TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface, unsigned numthreads_assemble, unsigned numthreads_decompose) override
Assemble the global system of equations into the matrix which has already been created.
ThreadDohrmanAssembly(const ThreadDohrmanAssembly ©)
virtual TPZMatrix< STATE > * Create() override
This will create a DohrMatrix.
Contains the TPZDohrSubstructCondense class which condenses matrix divided in sub structures...
void IdentifyExternalConnectIndexes()
Identify the external connects.
virtual TPZStructMatrix * Clone() override
Creates a copy of itself.
pthread_mutex_t fAccessElement
Mutexes (to choose which submesh is next)
static void AssembleMatrices(TPZSubCompMesh *submesh, TPZAutoPointer< TPZDohrSubstructCondense< STATE > > substruct, TPZAutoPointer< TPZDohrAssembly< STATE > > dohrassembly, pthread_mutex_t *TestThread)
Contains declaration of TPZSubCompMesh class which implements a group of computational elements as a ...
ThreadDohrmanAssembly & operator=(const ThreadDohrmanAssembly ©)
TPZManVector< int > fExternalConnectIndexes
The connect indexes which are external.
Implements computational mesh. Computational Mesh.
pthread_mutex_t fTestThreads
mutex to debug the assembly process
TPZAutoPointer< TPZDohrSubstructCondense< TVar > > fSubstruct
virtual ~TPZDohrStructMatrix()
Defines the interface for saving and reading data. Persistency.
int SeparateUnconnected(TPZVec< int > &domain_index, int nsub, int connectdimension)
Verifies if the subdomains are connected by sides of connectdimension and separate them if not...
Implements a list of Dohrman assembling and control thread and semaphores.
virtual TPZMatrix< STATE > * CreateAssemble(TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface, unsigned numthreads_assemble, unsigned numthreads_decompose) override
This will create a DohrMatrix and compute its matrices.
std::list< TPZAutoPointer< ThreadDohrmanAssembly< TVar > > > fList
ThreadDohrmanAssembly(TPZAutoPointer< TPZCompMesh > mesh, int submesh, TPZAutoPointer< TPZDohrSubstructCondense< TVar > > substruct, TPZAutoPointer< TPZDohrAssembly< TVar > > assembly)
void Read(TPZStream &str, void *context) override
read objects from the stream
void SubStructure(int nsub)
Partition the mesh in submeshes.
Implements structural matrix divided in sub structures. Structural Matrix Sub structure.