NeoPZ
tpzdohrassemblelist.h
Go to the documentation of this file.
1 
7 #ifndef TPZDOHRASSEMBLELIST
8 #define TPZDOHRASSEMBLELIST
9 
10 #include "pzfmatrix.h"
11 #include "tpzautopointer.h"
12 #include "tpzdohrassembly.h"
13 #include "TPZSemaphore.h"
14 
15 #include <pthread.h>
16 #include <list>
17 #include <semaphore.h>
18 
23 template<class TVar>
26  TPZDohrAssembleItem(int subindex, int size) : fSubIndex(subindex), fAssembleData(size,1,0.)
27  {
28  }
30  TPZDohrAssembleItem(int subindex, int nrow, int ncol) : fSubIndex(subindex), fAssembleData(nrow,ncol,0.)
31  {
32  }
34  int fSubIndex;
37 };
38 
43 template<class TVar>
50  int fNumItems;
54  pthread_mutex_t fListAccessLock;
56  pthread_mutex_t fAssemblyLock;
58  std::list<TPZAutoPointer<TPZDohrAssembleItem<TVar> > > fWork;
60  void AddItem(TPZAutoPointer<TPZDohrAssembleItem<TVar> > assembleItem);
68  static void *Assemble(void *voidptr);
69 };
70 
71 #endif
Assembling using Dohrmann algorithm. Sub structure.
Contains declaration of the TPZSemaphore class which implements semaphore to threads.
Implements semaphore to threads. Utility.
Definition: TPZSemaphore.h:15
TPZAutoPointer< TPZDohrAssembly< TVar > > fAssembleIndexes
Assembly indexes.
std::list< TPZAutoPointer< TPZDohrAssembleItem< TVar > > > fWork
List of objects needed to be assembled.
Contains the TPZDohrAssembly class which implements assembling using Dohrmann algorithm.
TPZFMatrix< TVar > fAssembleData
The data which should be assembled.
Contains TPZMatrixclass which implements full matrix (using column major representation).
TPZSemaphore fSemaphore
Semaphore (to wake up assembly thread)
To assembling one item using Dohrmann algorithm. Sub structure.
int fSubIndex
Substructure index.
List of items to assembling using Dohrmann algorithm.
Contains declaration of the TPZAutoPointer class which has Increment and Decrement actions are mutexe...
Full matrix class. Matrix.
Definition: pzfmatrix.h:32
int fNumItems
The number of items that will be assembled before returning.
TPZDohrAssembleItem(int subindex, int size)
Initialize the assemble item based on the submesh index and size of the local contribution.
pthread_mutex_t fAssemblyLock
This is the mutex which controls the assembly.
TPZFMatrix< TVar > * fOutput
Target Matrix.
pthread_mutex_t fListAccessLock
This is the mutex which controls the access to the list.
TPZDohrAssembleItem(int subindex, int nrow, int ncol)
Initialize the assemble item based on the submesh index and size of the local contribution.
This class implements a reference counter mechanism to administer a dynamically allocated object...