FemProcess
The GeMA Fem Process Plugin
Public Member Functions | Private Member Functions | Private Attributes | List of all members
GmpFemLocker Class Reference

A lock manager to be used by GmpFemAssemblerMatrixAdder and GmpFemAssemblerVectorAdder objects when working with multiple threads. More...

#include <gmpFemLocker.h>

Collaboration diagram for GmpFemLocker:
Collaboration graph
[legend]

Public Member Functions

 GmpFemLocker ()
 Constructor.
 
 ~GmpFemLocker ()
 Destructor.
 
void setNumPartitions (int numdof, int npart)
 Adjusts the number of locks according to the number of degrees of freedom and partitions.
 
int numPartitions () const
 Returns the number of configured partitions.
 
void lockDof (int dofIndex)
 Aquires the lock protecting the given dof index.
 
void unlockDof (int dofIndex)
 Releases the lock protecting the given dof index.
 

Private Member Functions

int dofToLockIndex (int dofIndex)
 Translate a dofIndex to a _lockList index. Accepts negative dofs, all mapped to the first _lockList bin.
 

Private Attributes

int _psize
 The number of dofs in each partition.
 
int _npart
 The number of partitions (including the extra partition for negative numbers)
 
QVector< GmSpinLock * > _lockList
 The set of available locks.
 

Detailed Description

A lock manager to be used by GmpFemAssemblerMatrixAdder and GmpFemAssemblerVectorAdder objects when working with multiple threads.


The documentation for this class was generated from the following file: