NeoPZ
|
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>
Public Member Functions | |
TPZStructMatrixGCTP () | |
TPZStructMatrixGCTP (TPZCompMesh *) | |
TPZStructMatrixGCTP (TPZAutoPointer< TPZCompMesh > cmesh) | |
TPZStructMatrixGCTP (const TPZStructMatrixGCTP ©) | |
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... | |
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.
|
inline |
Definition at line 32 of file TPZStrMatrixGCTP.h.
TPZStructMatrixGCTP::TPZStructMatrixGCTP | ( | TPZCompMesh * | mesh | ) |
Definition at line 53 of file TPZStrMatrixGCTP.cpp.
References TPZRenumbering::ColorElements(), fElementColors, fElementOrder, fNColors, TPZStructMatrixBase::Mesh(), OrderElement(), RunStatsTable::start(), stat_ass_graph_gctp, and RunStatsTable::stop().
TPZStructMatrixGCTP::TPZStructMatrixGCTP | ( | TPZAutoPointer< TPZCompMesh > | cmesh | ) |
Definition at line 60 of file TPZStrMatrixGCTP.cpp.
References TPZRenumbering::ColorElements(), fElementColors, fElementOrder, fNColors, TPZStructMatrixBase::Mesh(), OrderElement(), RunStatsTable::start(), stat_ass_graph_gctp, and RunStatsTable::stop().
TPZStructMatrixGCTP::TPZStructMatrixGCTP | ( | const TPZStructMatrixGCTP & | copy | ) |
Definition at line 67 of file TPZStrMatrixGCTP.cpp.
|
inlinevirtual |
Definition at line 41 of file TPZStrMatrixGCTP.h.
References Create().
|
overridevirtual |
Assemble the global system of equations into the matrix which has already been created.
Implements TPZStructMatrixBase.
Definition at line 86 of file TPZStrMatrixGCTP.cpp.
References TPZMatrix< TVar >::Cols(), DebugStop, TPZStructMatrixBase::fEquationFilter, TPZStructMatrixBase::fNumThreads, TPZEquationFilter::IsActive(), MultiThread_Assemble(), TPZEquationFilter::NActiveEquations(), TPZMatrix< TVar >::Rows(), TPZEquationFilter::Scatter(), Serial_Assemble(), RunStatsTable::start(), and RunStatsTable::stop().
Referenced by Assemble(), and CreateAssemble().
|
inlinevirtual |
Definition at line 59 of file TPZStrMatrixGCTP.h.
References Assemble(), ClassId(), MultiThread_Assemble(), OrderElement(), Read(), Serial_Assemble(), and Write().
|
overridevirtual |
Assemble the global right hand side.
Implements TPZStructMatrixBase.
Definition at line 113 of file TPZStrMatrixGCTP.cpp.
References TPZMatrix< TVar >::Cols(), DebugStop, TPZStructMatrixBase::fEquationFilter, TPZStructMatrixBase::fNumThreads, TPZEquationFilter::IsActive(), MultiThread_Assemble(), TPZEquationFilter::NActiveEquations(), TPZEquationFilter::NEqExpand(), Norm(), TPZMatrix< TVar >::Rows(), TPZEquationFilter::Scatter(), Serial_Assemble(), RunStatsTable::start(), and RunStatsTable::stop().
|
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().
|
overridevirtual |
Implements TPZStructMatrixBase.
Definition at line 78 of file TPZStrMatrixGCTP.cpp.
References ass_rhs, and ass_stiff.
Referenced by CreateAssemble().
|
overridevirtual |
Implements TPZStructMatrixBase.
Definition at line 73 of file TPZStrMatrixGCTP.cpp.
Referenced by CreateAssemble(), and ~TPZStructMatrixGCTP().
|
inlinevirtual |
Definition at line 46 of file TPZStrMatrixGCTP.h.
References Assemble(), Clone(), and TPZStructMatrixBase::SetNumThreads().
|
overridevirtual |
Reimplemented from TPZStructMatrixBase.
Definition at line 357 of file TPZStrMatrixGCTP.cpp.
References Assemble(), TPZMatrix< TVar >::Cols(), Create(), TPZStructMatrixBase::fEquationFilter, LOGPZ_DEBUG, MAX, TPZEquationFilter::NEqExpand(), TPZMatrix< TVar >::Print(), and TPZFMatrix< TVar >::Redim().
|
inlineoverridevirtual |
Returns the material ids.
Reimplemented from TPZStructMatrixBase.
Definition at line 98 of file TPZStrMatrixGCTP.h.
References TPZStructMatrixBase::fMaterialIds.
|
protectedvirtual |
Assemble the global right hand side.
Definition at line 457 of file TPZStrMatrixGCTP.cpp.
References TPZFMatrix< TVar >::AddFel(), TPZGuiInterface::AmIKilled(), TPZElementMatrix::ApplyConstraints(), TPZCompEl::CalcResidual(), TPZElementMatrix::ComputeDestinationIndices(), DebugStop, TPZElementMatrix::EF, EMathematicaInput, TPZStructMatrixBase::EquationFilter(), TPZElementMatrix::fConstrMat, TPZElementMatrix::fDestinationIndex, fElementColors, fElementOrder, TPZStructMatrixBase::FilterEquations(), TPZElementMatrix::fMat, fNColors, TPZStructMatrixBase::fNumThreads, TPZElementMatrix::fSourceIndex, TPZThreadPool::globalInstance(), TPZElementMatrix::HasDependency(), TPZCompEl::HasDependency(), LOGPZ_DEBUG, TPZStructMatrixBase::Mesh(), TPZMatrix< TVar >::Print(), TPZThreadPool::run(), TPZVec< T >::size(), and TPZTaskGroup::Wait().
Referenced by Assemble().
|
protectedvirtual |
Assemble the global system of equations into the matrix which has already been created.
Definition at line 377 of file TPZStrMatrixGCTP.cpp.
References TPZFMatrix< TVar >::AddFel(), TPZMatrix< TVar >::AddKel(), TPZGuiInterface::AmIKilled(), TPZElementMatrix::ApplyConstraints(), TPZCompEl::CalcStiff(), TPZElementMatrix::ComputeDestinationIndices(), DebugStop, TPZElementMatrix::EF, TPZElementMatrix::EK, EMathematicaInput, TPZStructMatrixBase::EquationFilter(), TPZElementMatrix::fConstrMat, TPZElementMatrix::fDestinationIndex, fElementColors, fElementOrder, TPZStructMatrixBase::FilterEquations(), TPZElementMatrix::fMat, fNColors, TPZStructMatrixBase::fNumThreads, TPZElementMatrix::fSourceIndex, TPZThreadPool::globalInstance(), TPZElementMatrix::HasDependency(), TPZCompEl::HasDependency(), LOGPZ_DEBUG, TPZStructMatrixBase::Mesh(), TPZMatrix< TVar >::Print(), TPZThreadPool::run(), TPZVec< T >::size(), and TPZTaskGroup::Wait().
|
static |
Find the order to assemble the elements.
Definition at line 532 of file TPZStrMatrixGCTP.cpp.
References TPZCompEl::BuildConnectList(), TPZCompMesh::ConnectVec(), TPZCompMesh::ElementVec(), TPZVec< T >::Fill(), TPZCompMesh::NConnects(), TPZCompMesh::NElements(), TPZVec< T >::NElements(), TPZChunkVector< T, EXP >::NElements(), and TPZVec< T >::Resize().
Referenced by Assemble(), and TPZStructMatrixGCTP().
|
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().
|
protectedvirtual |
Assemble the global system of equations into the matrix which has already been created.
Definition at line 138 of file TPZStrMatrixGCTP.cpp.
References TPZFMatrix< TVar >::AddFel(), TPZMatrix< TVar >::AddKel(), TPZGuiInterface::AmIKilled(), TPZElementMatrix::ApplyConstraints(), TPZCompEl::CalcStiff(), TPZGeoEl::CenterPoint(), DebugStop, TPZGeoEl::Dimension(), TPZElementMatrix::EF, TPZElementMatrix::EK, TPZCompMesh::ElementVec(), EMathematicaInput, TPZElementMatrix::fConstrMat, TPZStructMatrixBase::fEquationFilter, TPZEquationFilter::Filter(), TPZElementMatrix::fMat, TPZStructMatrixBase::fMaterialIds, TPZStructMatrixBase::fMesh, TPZMaterial::Id(), TPZCompEl::Index(), TPZGeoEl::Index(), LOGPZ_DEBUG, LOGPZ_ERROR, TPZCompEl::Material(), TPZEquationFilter::NActiveEquations(), TPZSubCompMesh::NeedsComputing(), TPZCompMesh::NElements(), TPZGeoEl::NSides(), TPZElementMatrix::Print(), TPZMatrix< TVar >::Print(), TPZCompEl::Reference(), TPZElementMatrix::Reset(), TPZMatrix< TVar >::Rows(), ShouldCompute(), TPZTimer::start(), TPZTimer::stop(), and TPZGeoEl::X().
Referenced by Assemble().
|
protectedvirtual |
Assemble the global right hand side.
Definition at line 304 of file TPZStrMatrixGCTP.cpp.
References TPZFMatrix< TVar >::AddFel(), TPZElementMatrix::ApplyConstraints(), TPZCompEl::CalcResidual(), TPZElementMatrix::ComputeDestinationIndices(), TPZElementMatrix::EF, TPZCompMesh::ElementVec(), TPZElementMatrix::fConstrMat, TPZElementMatrix::fDestinationIndex, fElementOrder, TPZStructMatrixBase::fEquationFilter, TPZEquationFilter::Filter(), TPZElementMatrix::fMat, TPZStructMatrixBase::fMesh, TPZElementMatrix::fSourceIndex, TPZElementMatrix::HasDependency(), TPZMaterial::Id(), LOGPZ_DEBUG, TPZCompEl::Material(), TPZTimer::processName(), TPZElementMatrix::Reset(), ShouldCompute(), TPZTimer::start(), and TPZTimer::stop().
|
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().
|
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().
|
protected |
Definition at line 105 of file TPZStrMatrixGCTP.h.
Referenced by MultiThread_Assemble(), Read(), TPZStructMatrixGCTP(), and Write().
|
protected |
Definition at line 104 of file TPZStrMatrixGCTP.h.
Referenced by MultiThread_Assemble(), Read(), Serial_Assemble(), TPZStructMatrixGCTP(), and Write().
|
protected |
Definition at line 106 of file TPZStrMatrixGCTP.h.
Referenced by MultiThread_Assemble(), Read(), TPZStructMatrixGCTP(), and Write().