NeoPZ
|
Responsible for a interface among Finite Element Package and Matrices package to frontal method. Structural Matrix Frontal. More...
#include <TPZFrontStructMatrix.h>
Public Member Functions | |
TPZFrontStructMatrix (TPZCompMesh *) | |
Class constructor < href="http://www.fec.unicamp.br/~longhin">link text < href="http://www.fec.unicamp.br/~phil">link text More... | |
TPZFrontStructMatrix (const TPZFrontStructMatrix ©) | |
virtual void | SetDecomposeType (DecomposeType dectype) |
Set the decomposition type. More... | |
virtual | ~TPZFrontStructMatrix () |
Class destructor. More... | |
TPZMatrix< STATE > * | Create () |
Returns a pointer to TPZMatrix<STATE> More... | |
TPZStructMatrix * | Clone () |
Clones a TPZFrontStructMatrix. More... | |
void | AssembleNew (TPZMatrix< STATE > &stiffness, TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface) |
Assemble a stiffness matrix according to rhs. More... | |
void | Assemble (TPZMatrix< STATE > &stiffness, TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface) |
Assemble a stiffness matrix. More... | |
void | AssembleElement (TPZCompEl *el, TPZElementMatrix &ek, TPZElementMatrix &ef, TPZMatrix< STATE > &stiffness, TPZFMatrix< STATE > &rhs) |
Computes element matrices. More... | |
TPZMatrix< STATE > * | CreateAssemble (TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface) |
Returns a pointer to TPZMatrix. More... | |
void | SetQuiet (int quiet) |
Public Member Functions inherited from TPZStructMatrixOR | |
TPZStructMatrixOR () | |
TPZStructMatrixOR (TPZCompMesh *) | |
TPZStructMatrixOR (TPZAutoPointer< TPZCompMesh > cmesh) | |
TPZStructMatrixOR (const TPZStructMatrixOR ©) | |
virtual | ~TPZStructMatrixOR () |
virtual TPZMatrix< STATE > * | CreateAssemble (TPZFMatrix< STATE > &rhs, TPZAutoPointer< TPZGuiInterface > guiInterface, unsigned numthreads_assemble, unsigned numthreads_decompose) |
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... | |
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... | |
virtual bool | ShouldCompute (int matid) const |
Establish whether the element should be computed. More... | |
virtual const std::set< int > & | MaterialIds () |
Returns the material ids. 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 int | main () |
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 | |
void | GetNumElConnected (TPZVec< int > &numelconnected) |
Returns a vector containing all elements connected to a degree of freedom. More... | |
void | OrderElement () |
It is applied over fElementOrder putting it in the correct order. More... | |
void | AdjustSequenceNumbering () |
Resequence the connects according to the element order. More... | |
Protected Member Functions inherited from TPZStructMatrixOR | |
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 | |
TPZVec< int > | fElementOrder |
This vector contains an ordered list. More... | |
int | f_quiet |
DecomposeType | fDecomposeType |
Used Decomposition method. More... | |
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... | |
Private Member Functions | |
TPZFrontStructMatrix () | |
Private Attributes | |
friend | TPZPersistenceManager |
Responsible for a interface among Finite Element Package and Matrices package to frontal method. Structural Matrix Frontal.
Definition at line 30 of file TPZFrontStructMatrix.h.
TPZFrontStructMatrix< front >::TPZFrontStructMatrix | ( | TPZCompMesh * | mesh | ) |
Class constructor < href="http://www.fec.unicamp.br/~longhin">link text < href="http://www.fec.unicamp.br/~phil">link text
Definition at line 75 of file TPZFrontStructMatrix.cpp.
|
inline |
Definition at line 62 of file TPZFrontStructMatrix.h.
|
virtual |
Class destructor.
Definition at line 80 of file TPZFrontStructMatrix.cpp.
Referenced by TPZFrontStructMatrix< front >::SetDecomposeType().
|
private |
Definition at line 71 of file TPZFrontStructMatrix.cpp.
Referenced by TPZFrontStructMatrix< front >::SetDecomposeType().
|
protected |
Resequence the connects according to the element order.
Resequence the connects according to the element order
Definition at line 645 of file TPZFrontStructMatrix.cpp.
References TPZCompEl::BuildConnectList(), TPZCompMesh::ComputeNodElCon(), TPZCompMesh::ConnectVec(), DebugStop, TPZConnect::DecrementElConnected(), TPZCompMesh::ElementVec(), TPZFrontStructMatrix< front >::fElementOrder, TPZStructMatrixBase::fMesh, LOGPZ_DEBUG, TPZConnect::NElConnected(), TPZVec< T >::NElements(), TPZChunkVector< T, EXP >::NElements(), TPZCompMesh::Permute(), and TPZConnect::SequenceNumber().
|
virtual |
Assemble a stiffness matrix.
stiffness | Stiffness matrix to assembled |
rhs | Vector containing loads |
guiInterface | pointer to user interface |
Rearange elements order
Reimplemented from TPZStructMatrixOR.
Reimplemented in TPZParFrontStructMatrix< front >.
Definition at line 340 of file TPZFrontStructMatrix.cpp.
References TPZFrontStructMatrix< front >::AssembleElement(), TPZCompEl::CalcStiff(), TPZElementMatrix::EF, TPZElementMatrix::EK, TPZCompMesh::ElementVec(), TPZFrontStructMatrix< front >::f_quiet, TPZFrontStructMatrix< front >::fElementOrder, TPZStructMatrixBase::fMesh, TPZMaterial::Id(), LOGPZ_DEBUG, TPZCompEl::Material(), TPZCompMesh::NElements(), TPZCompMesh::NEquations(), numel, TPZFrontStructMatrix< front >::OrderElement(), and TPZStructMatrixBase::ShouldCompute().
Referenced by TPZFrontStructMatrix< front >::CreateAssemble(), and TPZFrontStructMatrix< front >::SetDecomposeType().
void TPZFrontStructMatrix< front >::AssembleElement | ( | TPZCompEl * | el, |
TPZElementMatrix & | ek, | ||
TPZElementMatrix & | ef, | ||
TPZMatrix< STATE > & | stiffness, | ||
TPZFMatrix< STATE > & | rhs | ||
) |
Computes element matrices.
el | Actual element being computed |
ek | Formed element matrix |
ef | Global element load matrix |
stiffness | Global stiffness matrix |
rhs | Global load matrix Each computed element matrices would then be added to Stiffness matrix |
Definition at line 416 of file TPZFrontStructMatrix.cpp.
References TPZFMatrix< TVar >::AddFel(), TPZMatrix< TVar >::AddKel(), TPZElementMatrix::ApplyConstraints(), TPZElementMatrix::ComputeDestinationIndices(), TPZElementMatrix::fConstrMat, TPZElementMatrix::fDestinationIndex, TPZStructMatrixBase::FilterEquations(), TPZElementMatrix::fMat, TPZElementMatrix::fSourceIndex, TPZCompEl::HasDependency(), TPZCompEl::Index(), and LOGPZ_DEBUG.
Referenced by TPZFrontStructMatrix< front >::Assemble(), TPZParFrontStructMatrix< front >::GlobalAssemble(), and TPZFrontStructMatrix< front >::SetDecomposeType().
void TPZFrontStructMatrix< front >::AssembleNew | ( | TPZMatrix< STATE > & | stiffness, |
TPZFMatrix< STATE > & | rhs, | ||
TPZAutoPointer< TPZGuiInterface > | guiInterface | ||
) |
Assemble a stiffness matrix according to rhs.
stiffness | Stiffness matrix to assembled |
rhs | Vector containing loads |
guiInterface | pointer to user interface |
Rearange elements order
Definition at line 269 of file TPZFrontStructMatrix.cpp.
References TPZFMatrix< TVar >::AddFel(), TPZMatrix< TVar >::AddKel(), TPZGuiInterface::AmIKilled(), TPZElementMatrix::ApplyConstraints(), TPZCompEl::CalcStiff(), TPZElementMatrix::EF, TPZElementMatrix::EK, TPZCompMesh::ElementVec(), TPZFrontStructMatrix< front >::f_quiet, TPZElementMatrix::fConstrMat, TPZFrontStructMatrix< front >::fElementOrder, TPZStructMatrixBase::FilterEquations(), TPZElementMatrix::fMat, TPZStructMatrixBase::fMesh, TPZCompEl::HasDependency(), TPZCompMesh::NElements(), TPZCompMesh::NEquations(), numel, and TPZFrontStructMatrix< front >::OrderElement().
Referenced by TPZFrontStructMatrix< front >::SetDecomposeType().
|
virtual |
Clones a TPZFrontStructMatrix.
Reimplemented from TPZStructMatrixOR.
Reimplemented in TPZParFrontStructMatrix< front >.
Definition at line 98 of file TPZFrontStructMatrix.cpp.
Referenced by TPZFrontStructMatrix< front >::SetDecomposeType().
|
virtual |
Returns a pointer to TPZMatrix<STATE>
Reimplemented from TPZStructMatrixOR.
Definition at line 85 of file TPZFrontStructMatrix.cpp.
Referenced by TPZFrontStructMatrix< front >::SetDecomposeType().
|
virtual |
Returns a pointer to TPZMatrix.
rhs | Load matrix |
guiInterface | pointer to user interface This is a mandatory function, it is neded by all StructMatrix. Except in frontal matrices, the returned matrix is not in its decomposed form. |
Reimplemented from TPZStructMatrixBase.
Reimplemented in TPZParFrontStructMatrix< front >.
Definition at line 227 of file TPZFrontStructMatrix.cpp.
References TPZFrontStructMatrix< front >::Assemble(), TPZFrontStructMatrix< front >::fDecomposeType, TPZStructMatrixBase::fEquationFilter, TPZFrontMatrix< TVar, store, front >::FinishWriting(), TPZStructMatrixBase::fMesh, TPZFrontMatrix< TVar, store, front >::GetFront(), TPZFrontStructMatrix< front >::GetNumElConnected(), LOGPZ_DEBUG, TPZEquationFilter::NActiveEquations(), TPZSubCompMesh::NumberRigidBodyModes(), TPZFrontStructMatrix< front >::OrderElement(), TPZFrontMatrix< TVar, store, front >::ReOpen(), TPZFront< TVar >::SetDecomposeType(), TPZFrontMatrix< TVar, store, front >::SetNumElConnected(), and TPZFront< TVar >::SetNumRigidBodyModes().
Referenced by TPZEulerAnalysis::RunNewton(), TPZFrontStructMatrix< front >::SetDecomposeType(), and TPZEulerAnalysis::SetGMResFront().
|
protected |
Returns a vector containing all elements connected to a degree of freedom.
numelconnected | Vector containing the number of connections for every ith dof |
Definition at line 42 of file TPZFrontStructMatrix.cpp.
References DebugStop, TPZConnect::HasDependency(), TPZConnect::IsCondensed(), TPZConnect::SequenceNumber(), and TPZVec< T >::size().
Referenced by TPZParFrontStructMatrix< front >::Assemble(), and TPZFrontStructMatrix< front >::CreateAssemble().
|
static |
Definition at line 471 of file TPZFrontStructMatrix.cpp.
References TPZCompMesh::AutoBuild(), TPZCompMesh::Block(), TPZGeoMesh::BuildConnectivity(), TPZCompMesh::ConnectVec(), TPZMaterial::CreateBC(), TPZGeoMesh::CreateGeoElement(), DebugStop, ECholesky, EQuadrilateral, TPZConnect::HasDependency(), TPZCompMesh::InitializeBlock(), TPZCompMesh::InsertMaterialObject(), TPZChunkVector< T, EXP >::NElements(), TPZCompMesh::NEquations(), TPZGeoMesh::NodeVec(), TPZBlock< TVar >::Position(), TPZCompMesh::Print(), TPZAnalysis::Print(), TPZAnalysis::Run(), TPZConnect::SequenceNumber(), TPZCompMesh::SetDefaultOrder(), TPZStepSolver< TVar >::SetDirect(), TPZMat2dLin::SetMaterial(), TPZAnalysis::SetSolver(), TPZAnalysis::SetStructuralMatrix(), and TPZBlock< TVar >::Size().
Referenced by TPZFrontStructMatrix< front >::SetDecomposeType().
|
protected |
It is applied over fElementOrder putting it in the correct order.
Definition at line 104 of file TPZFrontStructMatrix.cpp.
References TPZCompEl::BuildConnectList(), TPZCompMesh::ConnectVec(), TPZCompMesh::ElementVec(), TPZFrontStructMatrix< front >::fElementOrder, TPZVec< T >::Fill(), TPZStructMatrixBase::fMesh, LOGPZ_DEBUG, TPZVec< T >::NElements(), TPZChunkVector< T, EXP >::NElements(), and TPZVec< T >::Resize().
Referenced by TPZParFrontStructMatrix< front >::Assemble(), TPZFrontStructMatrix< front >::Assemble(), TPZFrontStructMatrix< front >::AssembleNew(), and TPZFrontStructMatrix< front >::CreateAssemble().
|
inlinevirtual |
Set the decomposition type.
Definition at line 67 of file TPZFrontStructMatrix.h.
References TPZFrontStructMatrix< front >::Assemble(), TPZFrontStructMatrix< front >::AssembleElement(), TPZFrontStructMatrix< front >::AssembleNew(), TPZFrontStructMatrix< front >::Clone(), TPZFrontStructMatrix< front >::Create(), TPZStructMatrixOR::CreateAssemble(), TPZFrontStructMatrix< front >::CreateAssemble(), TPZFrontStructMatrix< front >::main(), TPZFrontStructMatrix< front >::SetQuiet(), TPZFrontStructMatrix< front >::TPZFrontStructMatrix(), and TPZFrontStructMatrix< front >::~TPZFrontStructMatrix().
Referenced by Hdiv2dPaper201504::SolveSyst(), hdivCurvedJCompAppMath::SolveSyst(), and Hdiv3dPaper201504::SolveSyst().
void TPZFrontStructMatrix< front >::SetQuiet | ( | int | quiet | ) |
Definition at line 462 of file TPZFrontStructMatrix.cpp.
References TPZFrontStructMatrix< front >::f_quiet.
Referenced by TPZEulerAnalysis::RunNewton(), TPZFrontStructMatrix< front >::SetDecomposeType(), TPZEulerAnalysis::SetFrontalSolver(), and TPZEulerAnalysis::SetGMResFront().
|
protected |
Definition at line 36 of file TPZFrontStructMatrix.h.
Referenced by TPZFrontStructMatrix< front >::Assemble(), TPZFrontStructMatrix< front >::AssembleNew(), and TPZFrontStructMatrix< front >::SetQuiet().
|
protected |
Used Decomposition method.
Definition at line 51 of file TPZFrontStructMatrix.h.
Referenced by TPZParFrontStructMatrix< front >::CreateAssemble(), and TPZFrontStructMatrix< front >::CreateAssemble().
|
protected |
This vector contains an ordered list.
The elements must be asssembled in that order so the frontal works on its best performance
Definition at line 35 of file TPZFrontStructMatrix.h.
Referenced by TPZFrontStructMatrix< front >::AdjustSequenceNumbering(), TPZFrontStructMatrix< front >::Assemble(), TPZFrontStructMatrix< front >::AssembleNew(), TPZParFrontStructMatrix< front >::ElementAssemble(), TPZParFrontStructMatrix< front >::GlobalAssemble(), and TPZFrontStructMatrix< front >::OrderElement().
|
private |
Definition at line 135 of file TPZFrontStructMatrix.h.