6 #ifndef PAIRSTRUCTMATRIX 7 #define PAIRSTRUCTMATRIX Contains declaration of the TPZSemaphore class which implements semaphore to threads.
TPZSemaphore fAssembly2
Semaphore (to wake up the second assembly thread)
Implements semaphore to threads. Utility.
~ThreadData()
Destroy the mutex semaphores and others.
pthread_mutex_t fAccessElement
Mutexes (to choose which element is next)
Contains the thread data for matrices divided in sub structures.
TPZPairStructMatrix(TPZCompMesh *mesh, TPZVec< int > &permutescatter)
void TBBAssemble(TPZMatrix< STATE > *first, TPZMatrix< STATE > *second, TPZFMatrix< STATE > &rhs)
static void * ThreadWork(void *threaddata)
The function which will compute the matrices.
Templated vector implementation.
Contains declaration of TPZGuiInterface class.
std::set< int > fProcessed2
Elements which are being processed maintained by the second global matrix.
TPZMatrix< STATE > * fGlobMatrix2
Global matrix2.
ThreadData(TPZStructMatrix *strmatrix, TPZMatrix< STATE > &mat1, TPZMatrix< STATE > &mat2, TPZFMatrix< STATE > &rhs)
Initialize the mutex semaphores and others.
Contains the TPZStructMatrixOR class which responsible for a interface among Matrix and Finite Elemen...
void PermuteScatter(TPZVec< int > &index)
static void * ThreadAssembly2(void *threaddata)
The function which will compute the assembly.
std::map< int, TPZAutoPointer< TPZElementMatrix > > fSubmitted2
List of computed element matrices (autopointers?)
Refines geometrical mesh (all the elements) num times.
Contains declaration of TPZElementMatrix struct which associates an element matrix with the coeficien...
TPZFMatrix< STATE > * fGlobRhs
Global rhs.
virtual void SetNumThreads(int n)
TPZVec< int > fPermuteScatter
void MultiThread_Assemble(TPZMatrix< STATE > *first, TPZMatrix< STATE > *second, TPZFMatrix< STATE > &rhs)
Contains declaration of the TPZAutoPointer class which has Increment and Decrement actions are mutexe...
TPZVec< int > fPermuteScatter
Vector which defines the permutation of all equations to internal equations.
virtual bool ShouldCompute(int matid) const
Establish whether the element should be computed.
Contains declaration of TPZCompMesh class which is a repository for computational elements...
TPZMatrix< STATE > * fGlobMatrix1
Global matrix1.
TPZStructMatrix fStrMatrix
void PermuteScatter(TPZVec< int > &index)
std::set< int > fProcessed1
Elements which are being processed maintained by the first global matrix.
Contains TPZMatrix<TVar>class, root matrix class.
void SerialAssemble(TPZMatrix< STATE > *first, TPZMatrix< STATE > *second, TPZFMatrix< STATE > &rhs)
void Assemble(TPZMatrix< STATE > *first, TPZMatrix< STATE > *second, TPZFMatrix< STATE > &rhs)
bool ShouldCompute(int matid)
Establish whether the element should be computed.
void SetNumThreads(int numthreads)
int NextElement()
Look for an element index which needs to be computed and put it on the stack.
void SetMaterialIds(const std::set< int > &materialids)
Set the set of material ids which will be considered when assembling the system.
Implements computational mesh. Computational Mesh.
int fNextElement
Current element.
TPZSemaphore fAssembly1
Semaphore (to wake up the first assembly thread)
static void * ThreadAssembly1(void *threaddata)
The function which will compute the assembly.
TPZStructMatrix * fStrMatrix
Current structmatrix object.
std::map< int, std::pair< TPZAutoPointer< TPZElementMatrix >, TPZAutoPointer< TPZElementMatrix > > > fSubmitted1
List of computed element matrices (autopointers?)
void ComputedElementMatrix(int iel, TPZAutoPointer< TPZElementMatrix > &ek, TPZAutoPointer< TPZElementMatrix > &ef)
Put the computed element matrices in the map.
This class implements a reference counter mechanism to administer a dynamically allocated object...