NeoPZ
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
TPZStructMatrixGC::ThreadData Struct Reference

Structure to manipulate thread to solve system equations. More...

#include <pzstrmatrixgc.h>

Collaboration diagram for TPZStructMatrixGC::ThreadData:
[legend]

Public Member Functions

 ThreadData (TPZStructMatrixGC *strmat, TPZMatrix< STATE > &mat, TPZFMatrix< STATE > &rhs, std::set< int > &MaterialIds, TPZAutoPointer< TPZGuiInterface > guiInterface)
 Initialize the mutex semaphores and others. More...
 
 ThreadData (TPZStructMatrixGC *strmat, TPZFMatrix< STATE > &rhs, std::set< int > &MaterialIds, TPZAutoPointer< TPZGuiInterface > guiInterface)
 Initialize the mutex semaphores and others. More...
 
 ~ThreadData ()
 Destructor: Destroy the mutex semaphores and others. More...
 
bool ShouldCompute (int matid)
 The function which will compute the assembly. More...
 

Static Public Member Functions

static void * ThreadWork (void *threaddata)
 The function which will compute the matrices. More...
 
static void * ThreadWorkResidual (void *datavoid)
 

Public Attributes

TPZStructMatrixGCfStruct
 Current structmatrix object. More...
 
TPZAutoPointer< TPZGuiInterfacefGuiInterface
 Gui interface object. More...
 
TPZMatrix< STATE > * fGlobMatrix
 Global matrix. More...
 
TPZFMatrix< STATE > * fGlobRhs
 Global rhs vector. More...
 
std::map< int, std::pair< TPZAutoPointer< TPZElementMatrix >, TPZAutoPointer< TPZElementMatrix > > > fSubmitted
 List of computed element matrices (autopointers?) More...
 
std::set< int > fProcessed
 Elements which are being processed. More...
 
int64_t fNextElement
 Current element. More...
 
pthread_mutex_t fAccessElement
 Mutexes (to choose which element is next) More...
 
TPZSemaphore fAssembly
 Semaphore (to wake up assembly thread) More...
 
pthread_cond_t fCondition
 
bool fSleeping
 
std::map< int, int > felBlocked
 
TPZVec< int64_t > * fnextBlocked
 Vector for mesh coloring. More...
 
TPZVec< int64_t > * felSequenceColor
 

Detailed Description

Structure to manipulate thread to solve system equations.

Definition at line 100 of file pzstrmatrixgc.h.

Constructor & Destructor Documentation

◆ ThreadData() [1/2]

TPZStructMatrixGC::ThreadData::ThreadData ( TPZStructMatrixGC strmat,
TPZMatrix< STATE > &  mat,
TPZFMatrix< STATE > &  rhs,
std::set< int > &  MaterialIds,
TPZAutoPointer< TPZGuiInterface guiInterface 
)

Initialize the mutex semaphores and others.

Definition at line 494 of file pzstrmatrixgc.cpp.

References fAccessElement, fCondition, and PZ_PTHREAD_MUTEX_INIT.

◆ ThreadData() [2/2]

TPZStructMatrixGC::ThreadData::ThreadData ( TPZStructMatrixGC strmat,
TPZFMatrix< STATE > &  rhs,
std::set< int > &  MaterialIds,
TPZAutoPointer< TPZGuiInterface guiInterface 
)

Initialize the mutex semaphores and others.

Definition at line 528 of file pzstrmatrixgc.cpp.

References fAccessElement, fCondition, and PZ_PTHREAD_MUTEX_INIT.

◆ ~ThreadData()

TPZStructMatrixGC::ThreadData::~ThreadData ( )

Destructor: Destroy the mutex semaphores and others.

Definition at line 562 of file pzstrmatrixgc.cpp.

References fAccessElement, fCondition, and PZ_PTHREAD_MUTEX_DESTROY.

Member Function Documentation

◆ ShouldCompute()

bool TPZStructMatrixGC::ThreadData::ShouldCompute ( int  matid)
inline

The function which will compute the assembly.

Definition at line 111 of file pzstrmatrixgc.h.

References fStruct, and TPZStructMatrixBase::ShouldCompute().

◆ ThreadWork()

void * TPZStructMatrixGC::ThreadData::ThreadWork ( void *  threaddata)
static

◆ ThreadWorkResidual()

void * TPZStructMatrixGC::ThreadData::ThreadWorkResidual ( void *  datavoid)
static

Member Data Documentation

◆ fAccessElement

pthread_mutex_t TPZStructMatrixGC::ThreadData::fAccessElement

Mutexes (to choose which element is next)

Definition at line 131 of file pzstrmatrixgc.h.

Referenced by ThreadData(), ThreadWork(), ThreadWorkResidual(), and ~ThreadData().

◆ fAssembly

TPZSemaphore TPZStructMatrixGC::ThreadData::fAssembly

Semaphore (to wake up assembly thread)

Definition at line 133 of file pzstrmatrixgc.h.

◆ fCondition

pthread_cond_t TPZStructMatrixGC::ThreadData::fCondition

Definition at line 135 of file pzstrmatrixgc.h.

Referenced by ThreadData(), ThreadWork(), ThreadWorkResidual(), and ~ThreadData().

◆ felBlocked

std::map<int,int> TPZStructMatrixGC::ThreadData::felBlocked

Definition at line 139 of file pzstrmatrixgc.h.

Referenced by ThreadWork(), and ThreadWorkResidual().

◆ felSequenceColor

TPZVec<int64_t> * TPZStructMatrixGC::ThreadData::felSequenceColor

◆ fGlobMatrix

TPZMatrix<STATE>* TPZStructMatrixGC::ThreadData::fGlobMatrix

Global matrix.

Definition at line 121 of file pzstrmatrixgc.h.

Referenced by ThreadWork().

◆ fGlobRhs

TPZFMatrix<STATE>* TPZStructMatrixGC::ThreadData::fGlobRhs

Global rhs vector.

Definition at line 123 of file pzstrmatrixgc.h.

Referenced by ThreadWork(), and ThreadWorkResidual().

◆ fGuiInterface

TPZAutoPointer<TPZGuiInterface> TPZStructMatrixGC::ThreadData::fGuiInterface

Gui interface object.

Definition at line 119 of file pzstrmatrixgc.h.

Referenced by ThreadWork(), and ThreadWorkResidual().

◆ fnextBlocked

TPZVec<int64_t>* TPZStructMatrixGC::ThreadData::fnextBlocked

◆ fNextElement

int64_t TPZStructMatrixGC::ThreadData::fNextElement

Current element.

Definition at line 129 of file pzstrmatrixgc.h.

Referenced by ThreadWork(), and ThreadWorkResidual().

◆ fProcessed

std::set<int> TPZStructMatrixGC::ThreadData::fProcessed

Elements which are being processed.

Definition at line 127 of file pzstrmatrixgc.h.

◆ fSleeping

bool TPZStructMatrixGC::ThreadData::fSleeping

Definition at line 136 of file pzstrmatrixgc.h.

Referenced by ThreadWork(), and ThreadWorkResidual().

◆ fStruct

TPZStructMatrixGC* TPZStructMatrixGC::ThreadData::fStruct

Current structmatrix object.

Definition at line 117 of file pzstrmatrixgc.h.

Referenced by ShouldCompute(), ThreadWork(), and ThreadWorkResidual().

◆ fSubmitted

std::map<int, std::pair< TPZAutoPointer<TPZElementMatrix>, TPZAutoPointer<TPZElementMatrix> > > TPZStructMatrixGC::ThreadData::fSubmitted

List of computed element matrices (autopointers?)

Definition at line 125 of file pzstrmatrixgc.h.


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