NeoPZ
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TPZStructMatrixGCTP Class Reference

It is responsible for a interface between Matrix and Finite Element classes. Structural Matrix This class uses graph coloring and TPZThreadPool to assemble the matrix in parallel. More...

#include <TPZStrMatrixGCTP.h>

Inheritance diagram for TPZStructMatrixGCTP:
[legend]
Collaboration diagram for TPZStructMatrixGCTP:
[legend]

Public Member Functions

 TPZStructMatrixGCTP ()
 
 TPZStructMatrixGCTP (TPZCompMesh *)
 
 TPZStructMatrixGCTP (TPZAutoPointer< TPZCompMesh > cmesh)
 
 TPZStructMatrixGCTP (const TPZStructMatrixGCTP &copy)
 
virtual ~TPZStructMatrixGCTP ()
 
virtual TPZMatrix< STATE > * Create () override
 
virtual TPZMatrix< STATE > * CreateAssemble (TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface, unsigned numthreads_assemble, unsigned numthreads_decompose)
 
virtual TPZMatrix< STATE > * CreateAssemble (TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface) override
 
virtual TPZStructMatrixGCTP * Clone () override
 
virtual void Assemble (TPZMatrix< STATE > &mat, TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface) override
 Assemble the global system of equations into the matrix which has already been created. More...
 
virtual void Assemble (TPZMatrix< STATE > &mat, TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface, unsigned numthreads_assemble, unsigned numthreads_decompose)
 
virtual void Assemble (TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface) override
 Assemble the global right hand side. More...
 
int ClassId () const override
 Define the class id associated with the class. More...
 
void Read (TPZStream &buf, void *context) override
 read objects from the stream More...
 
void Write (TPZStream &buf, int withclassid) const override
 Writes this object to the TPZStream buffer. Include the classid if withclassid = true. More...
 
bool ShouldCompute (int matid) const override
 Establish whether the element should be computed. More...
 
const std::set< int > & MaterialIds () override
 Returns the material ids. More...
 
- Public Member Functions inherited from TPZStructMatrixBase
virtual void SetMesh (TPZCompMesh *)
 
virtual void SetMesh (TPZAutoPointer< TPZCompMesh >)
 
virtual void FilterEquations (TPZVec< int64_t > &origindex, TPZVec< int64_t > &destindex) const
 Filter out the equations which are out of the range. More...
 
virtual void SetMaterialIds (const std::set< int > &materialids)
 Set the set of material ids which will be considered when assembling the system. More...
 
virtual void SetNumThreads (int n)
 
virtual int GetNumThreads () const
 
virtual void SetEquationRange (int64_t mineq, int64_t maxeq)
 
virtual bool HasRange () const
 Verify if a range has been specified. More...
 
virtual TPZEquationFilter & EquationFilter ()
 access method for the equation filter More...
 
virtual int64_t NReducedEquations () const
 number of equations after applying the filter More...
 
virtual TPZCompMesh * Mesh () const
 Access method for the mesh pointer. More...
 
int ClassId () const override
 Define the class id associated with the class. More...
 
void Read (TPZStream &buf, void *context) override
 read objects from the stream More...
 
void Write (TPZStream &buf, int withclassid) const override
 Writes this object to the TPZStream buffer. Include the classid if withclassid = true. More...
 
virtual ~TPZStructMatrixBase ()
 
- Public Member Functions inherited from TPZSavable
 TPZSavable ()
 
virtual ~TPZSavable ()
 
virtual std::list< std::map< std::string, uint64_t > > VersionHistory () const
 
virtual std::pair< std::string, uint64_t > Version () const
 
virtual bool Compare (TPZSavable *copy, bool override=false)
 Compares the object for identity with the object pointed to, eventually copy the object. More...
 
virtual bool Compare (TPZSavable *copy, bool override=false) const
 Compares the object for identity with the object pointed to, eventually copy the object. More...
 
- Public Member Functions inherited from TPZRegisterClassId
template<typename T >
 TPZRegisterClassId (int(T::*)() const)
 
 TPZRegisterClassId ()=default
 

Static Public Member Functions

static void OrderElement (TPZCompMesh *cmesh, TPZVec< int64_t > &ElementOrder)
 Find the order to assemble the elements. More...
 
- Static Public Member Functions inherited from TPZSavable
static std::set< TPZRestoreClassBase * > & RestoreClassSet ()
 This static function guarantees that the gMap object is available when needed. More...
 
static std::map< int, TPZRestore_t > & ClassIdMap ()
 This static function guarantees that the gMap object is available when needed. More...
 
static std::pair< std::string, uint64_t > NeoPZVersion ()
 
static void Register (TPZRestoreClassBase *restore)
 
static void RegisterClassId (int classid, TPZRestore_t fun)
 
static TPZSavable * CreateInstance (const int &classId)
 

Protected Member Functions

virtual void Serial_Assemble (TPZMatrix< STATE > &mat, TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface)
 Assemble the global system of equations into the matrix which has already been created. More...
 
virtual void Serial_Assemble (TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface)
 Assemble the global right hand side. More...
 
virtual void MultiThread_Assemble (TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface)
 Assemble the global right hand side. More...
 
virtual void MultiThread_Assemble (TPZMatrix< STATE > &mat, TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface)
 Assemble the global system of equations into the matrix which has already been created. More...
 
- Protected Member Functions inherited from TPZStructMatrixBase
 TPZStructMatrixBase ()
 
 TPZStructMatrixBase (const TPZStructMatrixBase &)
 
 TPZStructMatrixBase (TPZCompMesh *)
 
 TPZStructMatrixBase (TPZAutoPointer< TPZCompMesh >)
 

Protected Attributes

TPZManVector< int64_t > fElementOrder
 
TPZVec< int64_t > fElementColors
 
int64_t fNColors
 
- Protected Attributes inherited from TPZStructMatrixBase
TPZCompMesh * fMesh
 Pointer to the computational mesh from which the matrix will be generated. More...
 
TPZAutoPointer< TPZCompMesh > fCompMesh
 Autopointer control of the computational mesh. More...
 
TPZEquationFilter fEquationFilter
 Object which will determine which equations will be assembled. More...
 
std::set< int > fMaterialIds
 Set of material ids to be considered. It is a private attribute. More...
 
int fNumThreads
 Number of threads in Assemble process. More...
 

Detailed Description

It is responsible for a interface between Matrix and Finite Element classes. Structural Matrix This class uses graph coloring and TPZThreadPool to assemble the matrix in parallel.

Definition at line 29 of file TPZStrMatrixGCTP.h.

Constructor & Destructor Documentation

◆ TPZStructMatrixGCTP() [1/4]

TPZStructMatrixGCTP::TPZStructMatrixGCTP ( )
inline

Definition at line 32 of file TPZStrMatrixGCTP.h.

◆ TPZStructMatrixGCTP() [2/4]

TPZStructMatrixGCTP::TPZStructMatrixGCTP ( TPZCompMesh *  mesh)

◆ TPZStructMatrixGCTP() [3/4]

TPZStructMatrixGCTP::TPZStructMatrixGCTP ( TPZAutoPointer< TPZCompMesh >  cmesh)

◆ TPZStructMatrixGCTP() [4/4]

TPZStructMatrixGCTP::TPZStructMatrixGCTP ( const TPZStructMatrixGCTP &  copy)

Definition at line 67 of file TPZStrMatrixGCTP.cpp.

◆ ~TPZStructMatrixGCTP()

virtual TPZStructMatrixGCTP::~TPZStructMatrixGCTP ( )
inlinevirtual

Definition at line 41 of file TPZStrMatrixGCTP.h.

References Create().

Member Function Documentation

◆ Assemble() [1/3]

void TPZStructMatrixGCTP::Assemble ( TPZMatrix< STATE > &  mat,
TPZFMatrix< STATE > &  rhs,
TPZAutoPointer< TPZGuiInterface >  guiInterface 
)
overridevirtual

◆ Assemble() [2/3]

virtual void TPZStructMatrixGCTP::Assemble ( TPZMatrix< STATE > &  mat,
TPZFMatrix< STATE > &  rhs,
TPZAutoPointer< TPZGuiInterface >  guiInterface,
unsigned  numthreads_assemble,
unsigned  numthreads_decompose 
)
inlinevirtual

◆ Assemble() [3/3]

void TPZStructMatrixGCTP::Assemble ( TPZFMatrix< STATE > &  rhs,
TPZAutoPointer< TPZGuiInterface >  guiInterface 
)
overridevirtual

◆ ClassId()

int TPZStructMatrixGCTP::ClassId ( ) const
overridevirtual

Define the class id associated with the class.

This id has to be unique for all classes A non unique id is flagged at the startup of the program

Implements TPZSavable.

Definition at line 612 of file TPZStrMatrixGCTP.cpp.

References TPZStructMatrixBase::ClassId(), and Hash().

Referenced by Assemble().

◆ Clone()

TPZStructMatrixGCTP * TPZStructMatrixGCTP::Clone ( )
overridevirtual

Implements TPZStructMatrixBase.

Definition at line 78 of file TPZStrMatrixGCTP.cpp.

References ass_rhs, and ass_stiff.

Referenced by CreateAssemble().

◆ Create()

TPZMatrix< STATE > * TPZStructMatrixGCTP::Create ( )
overridevirtual

Implements TPZStructMatrixBase.

Definition at line 73 of file TPZStrMatrixGCTP.cpp.

Referenced by CreateAssemble(), and ~TPZStructMatrixGCTP().

◆ CreateAssemble() [1/2]

virtual TPZMatrix<STATE>* TPZStructMatrixGCTP::CreateAssemble ( TPZFMatrix< STATE > &  rhs,
TPZAutoPointer< TPZGuiInterface >  guiInterface,
unsigned  numthreads_assemble,
unsigned  numthreads_decompose 
)
inlinevirtual

Definition at line 46 of file TPZStrMatrixGCTP.h.

References Assemble(), Clone(), and TPZStructMatrixBase::SetNumThreads().

◆ CreateAssemble() [2/2]

TPZMatrix< STATE > * TPZStructMatrixGCTP::CreateAssemble ( TPZFMatrix< STATE > &  rhs,
TPZAutoPointer< TPZGuiInterface >  guiInterface 
)
overridevirtual

◆ MaterialIds()

const std::set<int>& TPZStructMatrixGCTP::MaterialIds ( )
inlineoverridevirtual

Returns the material ids.

Reimplemented from TPZStructMatrixBase.

Definition at line 98 of file TPZStrMatrixGCTP.h.

References TPZStructMatrixBase::fMaterialIds.

◆ MultiThread_Assemble() [1/2]

void TPZStructMatrixGCTP::MultiThread_Assemble ( TPZFMatrix< STATE > &  rhs,
TPZAutoPointer< TPZGuiInterface >  guiInterface 
)
protectedvirtual

◆ MultiThread_Assemble() [2/2]

void TPZStructMatrixGCTP::MultiThread_Assemble ( TPZMatrix< STATE > &  mat,
TPZFMatrix< STATE > &  rhs,
TPZAutoPointer< TPZGuiInterface >  guiInterface 
)
protectedvirtual

◆ OrderElement()

void TPZStructMatrixGCTP::OrderElement ( TPZCompMesh *  cmesh,
TPZVec< int64_t > &  ElementOrder 
)
static

◆ Read()

void TPZStructMatrixGCTP::Read ( TPZStream &  buf,
void *  context 
)
overridevirtual

read objects from the stream

Reimplemented from TPZSavable.

Definition at line 616 of file TPZStrMatrixGCTP.cpp.

References fElementColors, fElementOrder, fNColors, TPZStructMatrixBase::Read(), and TPZStream::Read().

Referenced by Assemble().

◆ Serial_Assemble() [1/2]

void TPZStructMatrixGCTP::Serial_Assemble ( TPZMatrix< STATE > &  mat,
TPZFMatrix< STATE > &  rhs,
TPZAutoPointer< TPZGuiInterface >  guiInterface 
)
protectedvirtual

◆ Serial_Assemble() [2/2]

void TPZStructMatrixGCTP::Serial_Assemble ( TPZFMatrix< STATE > &  rhs,
TPZAutoPointer< TPZGuiInterface >  guiInterface 
)
protectedvirtual

◆ ShouldCompute()

bool TPZStructMatrixGCTP::ShouldCompute ( int  matid) const
inlineoverridevirtual

Establish whether the element should be computed.

Reimplemented from TPZStructMatrixBase.

Definition at line 92 of file TPZStrMatrixGCTP.h.

References TPZStructMatrixBase::fMaterialIds.

Referenced by Serial_Assemble().

◆ Write()

void TPZStructMatrixGCTP::Write ( TPZStream &  buf,
int  withclassid 
) const
overridevirtual

Writes this object to the TPZStream buffer. Include the classid if withclassid = true.

Writes this object to the TPZStream buffer. Include the classid if withclassid = true

Reimplemented from TPZSavable.

Definition at line 624 of file TPZStrMatrixGCTP.cpp.

References fElementColors, fElementOrder, fNColors, TPZStream::Write(), and TPZStructMatrixBase::Write().

Referenced by Assemble().

Member Data Documentation

◆ fElementColors

TPZVec<int64_t> TPZStructMatrixGCTP::fElementColors
protected

Definition at line 105 of file TPZStrMatrixGCTP.h.

Referenced by MultiThread_Assemble(), Read(), TPZStructMatrixGCTP(), and Write().

◆ fElementOrder

TPZManVector<int64_t> TPZStructMatrixGCTP::fElementOrder
protected

◆ fNColors

int64_t TPZStructMatrixGCTP::fNColors
protected

Definition at line 106 of file TPZStrMatrixGCTP.h.

Referenced by MultiThread_Assemble(), Read(), TPZStructMatrixGCTP(), and Write().


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