NeoPZ
Public Types | Public Member Functions | Protected Attributes | Private Attributes | List of all members
TPZMatrixSolver< TVar > Class Template Reference

Defines a class of matrix solvers. Solver. More...

#include <pzanalysis.h>

Inheritance diagram for TPZMatrixSolver< TVar >:
[legend]
Collaboration diagram for TPZMatrixSolver< TVar >:
[legend]

Public Types

enum  MSolver {
  ENoSolver, EJacobi, ESOR, ESSOR,
  ECG, EGMRES, EBICGSTAB, EDirect,
  EMultiply
}
 Defines a series of solvers available in PZ. More...
 

Public Member Functions

 TPZMatrixSolver (TPZAutoPointer< TPZMatrix< TVar > > Refmat)
 Constructor with initialization parameter. More...
 
 TPZMatrixSolver ()
 
 TPZMatrixSolver (const TPZMatrixSolver< TVar > &Source)
 Copy constructor. More...
 
virtual ~TPZMatrixSolver ()
 Destructor. More...
 
virtual void SetMatrix (TPZAutoPointer< TPZMatrix< TVar > > Refmat)
 Sets a matrix to the current object. More...
 
virtual void UpdateFrom (TPZAutoPointer< TPZMatrix< TVar > > matrix) override
 Updates the values of the current matrix based on the values of the matrix. More...
 
void ResetMatrix () override
 Resets current object. More...
 
virtual void SetReferenceMatrix (TPZAutoPointer< TPZMatrix< TVar > > matrix)
 This method gives a preconditioner to share a matrix with the referring solver object. More...
 
TPZAutoPointer< TPZMatrix< TVar > > Matrix () const
 Returns a pointer to TPZMatrix<> More...
 
void ReallocMatrix ()
 
void ShareMatrix (TPZMatrixSolver< TVar > &other)
 Shares the current matrix with another object of same type. More...
 
virtual MSolver Solver ()
 
int ClassId () const override
 Saveable specific methods. More...
 
void Write (TPZStream &buf, int withclassid) const override
 Writes this object to the TPZStream buffer. Include the classid if withclassid = true. More...
 
void Read (TPZStream &buf, void *context) override
 read objects from the stream More...
 
- Public Member Functions inherited from TPZSolver< TVar >
virtual void Solve (const TPZFMatrix< TVar > &F, TPZFMatrix< TVar > &result, TPZFMatrix< TVar > *residual=0)=0
 Solves the system of linear equations. More...
 
virtual void Decompose ()
 Decompose the system of equations if a direct solver is used. More...
 
virtual TPZSolverClone () const =0
 Clones the current object returning a pointer of type TPZSolver. More...
 
virtual ~TPZSolver ()
 Destructor. More...
 
- 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
 

Protected Attributes

TPZAutoPointer< TPZMatrix< TVar > > fReferenceMatrix
 Reference matrix used to update the current matrix. More...
 
TPZFMatrix< TVar > fScratch
 Manipulation matrix. More...
 

Private Attributes

TPZAutoPointer< TPZMatrix< TVar > > fContainer
 Container classes. More...
 

Additional Inherited Members

- 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 TPZSavableCreateInstance (const int &classId)
 

Detailed Description

template<class TVar>
class TPZMatrixSolver< TVar >

Defines a class of matrix solvers. Solver.

Definition at line 24 of file pzanalysis.h.

Member Enumeration Documentation

◆ MSolver

template<class TVar>
enum TPZMatrixSolver::MSolver

Defines a series of solvers available in PZ.

Parameters
ENoSolverNo solver selected
EJacobiJacobi solver selected
ESORSuccessive Over Relaxation solver selected
ESSORSymmetric Successive Over Relaxation solver selected
ECGConjugate Gradiente solver selected
EDirectLU, LDLt or Cholesky selected
Enumerator
ENoSolver 
EJacobi 
ESOR 
ESSOR 
ECG 
EGMRES 
EBICGSTAB 
EDirect 
EMultiply 

Definition at line 88 of file pzsolve.h.

Constructor & Destructor Documentation

◆ TPZMatrixSolver() [1/3]

template<class TVar>
TPZMatrixSolver< TVar >::TPZMatrixSolver ( TPZAutoPointer< TPZMatrix< TVar > >  Refmat)

Constructor with initialization parameter.

Parameters
RefmatSets reference matrix to 0

Definition at line 24 of file pzsolve.cpp.

◆ TPZMatrixSolver() [2/3]

template<class TVar>
TPZMatrixSolver< TVar >::TPZMatrixSolver ( )

Definition at line 31 of file pzsolve.cpp.

◆ TPZMatrixSolver() [3/3]

template<class TVar>
TPZMatrixSolver< TVar >::TPZMatrixSolver ( const TPZMatrixSolver< TVar > &  Source)

Copy constructor.

Parameters
SourceModel object to be copied from

Definition at line 37 of file pzsolve.cpp.

◆ ~TPZMatrixSolver()

template<class TVar >
TPZMatrixSolver< TVar >::~TPZMatrixSolver ( )
virtual

Destructor.

Definition at line 45 of file pzsolve.cpp.

Member Function Documentation

◆ ClassId()

template<class TVar >
int TPZMatrixSolver< TVar >::ClassId ( ) const
overridevirtual

Saveable specific methods.

Reimplemented from TPZSolver< TVar >.

Reimplemented in TPZStepSolver< TVar >, and TPZMGSolver< TVar >.

Definition at line 180 of file pzsolve.h.

Referenced by TPZMGSolver< TVar >::ClassId(), TPZSequenceSolver< TVar >::ClassId(), and TPZStepSolver< TVar >::ClassId().

◆ Matrix()

template<class TVar>
TPZAutoPointer<TPZMatrix<TVar> > TPZMatrixSolver< TVar >::Matrix ( ) const
inline

◆ Read()

template<class TVar >
void TPZMatrixSolver< TVar >::Read ( TPZStream buf,
void *  context 
)
overridevirtual

read objects from the stream

Reimplemented from TPZSavable.

Reimplemented in TPZStepSolver< TVar >, and TPZMGSolver< TVar >.

Definition at line 106 of file pzsolve.cpp.

Referenced by TPZMGSolver< TVar >::Read(), TPZSequenceSolver< TVar >::Read(), and TPZStepSolver< TVar >::Read().

◆ ReallocMatrix()

template<class TVar>
void TPZMatrixSolver< TVar >::ReallocMatrix ( )
inline

Definition at line 143 of file pzsolve.h.

◆ ResetMatrix()

template<class TVar >
void TPZMatrixSolver< TVar >::ResetMatrix ( )
overridevirtual

Resets current object.

Reimplemented from TPZSolver< TVar >.

Reimplemented in TPZStepSolver< TVar >.

Definition at line 50 of file pzsolve.cpp.

Referenced by TPZSequenceSolver< TVar >::ResetMatrix(), TPZStepSolver< TVar >::ResetMatrix(), TPZEulerAnalysis::Run(), and TPZAnalysis::SetCompMesh().

◆ SetMatrix()

template<class TVar>
virtual void TPZMatrixSolver< TVar >::SetMatrix ( TPZAutoPointer< TPZMatrix< TVar > >  Refmat)
inlinevirtual

◆ SetReferenceMatrix()

template<class TVar>
virtual void TPZMatrixSolver< TVar >::SetReferenceMatrix ( TPZAutoPointer< TPZMatrix< TVar > >  matrix)
inlinevirtual

This method gives a preconditioner to share a matrix with the referring solver object.

Definition at line 132 of file pzsolve.h.

Referenced by TPZCondensedCompEl::Resequence(), TPZSubCompMesh::SetAnalysisSkyline(), Hdiv2dPaper201504::SolveSyst(), hdivCurvedJCompAppMath::SolveSyst(), and Hdiv3dPaper201504::SolveSyst().

◆ ShareMatrix()

template<class TVar>
void TPZMatrixSolver< TVar >::ShareMatrix ( TPZMatrixSolver< TVar > &  other)

Shares the current matrix with another object of same type.

Parameters
otherObject that will share current matrix

Definition at line 57 of file pzsolve.cpp.

Referenced by TPZAnalysis::AnimateRun(), TPZMGAnalysis::AppendMesh(), TPZAnalysis::BuildSequenceSolver(), and TPZAnalysisError::hp_Adaptive_Mesh_Design().

◆ Solver()

template<class TVar>
virtual MSolver TPZMatrixSolver< TVar >::Solver ( )
inlinevirtual

Reimplemented in TPZStepSolver< TVar >.

Definition at line 153 of file pzsolve.h.

◆ UpdateFrom()

template<class TVar>
virtual void TPZMatrixSolver< TVar >::UpdateFrom ( TPZAutoPointer< TPZMatrix< TVar > >  matrix)
inlineoverridevirtual

Updates the values of the current matrix based on the values of the matrix.

Reimplemented from TPZSolver< TVar >.

Reimplemented in TPZStepSolver< TVar >, and TPZSequenceSolver< TVar >.

Definition at line 121 of file pzsolve.h.

Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::Assemble(), TPZAnalysis::Assemble(), TPZSequenceSolver< TVar >::UpdateFrom(), and TPZStepSolver< TVar >::UpdateFrom().

◆ Write()

template<class TVar >
void TPZMatrixSolver< TVar >::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.

Reimplemented in TPZStepSolver< TVar >, and TPZMGSolver< TVar >.

Definition at line 65 of file pzsolve.cpp.

Referenced by TPZMGSolver< TVar >::Write(), TPZSequenceSolver< TVar >::Write(), and TPZStepSolver< TVar >::Write().

Member Data Documentation

◆ fContainer

template<class TVar>
TPZAutoPointer<TPZMatrix<TVar> > TPZMatrixSolver< TVar >::fContainer
private

◆ fReferenceMatrix

template<class TVar>
TPZAutoPointer<TPZMatrix<TVar> > TPZMatrixSolver< TVar >::fReferenceMatrix
protected

Reference matrix used to update the current matrix.

Definition at line 165 of file pzsolve.h.

Referenced by TPZMatrixSolver< STATE >::Read(), TPZMatrixSolver< STATE >::TPZMatrixSolver(), and TPZMatrixSolver< STATE >::Write().

◆ fScratch

template<class TVar>
TPZFMatrix<TVar> TPZMatrixSolver< TVar >::fScratch
protected

Manipulation matrix.

Definition at line 169 of file pzsolve.h.

Referenced by TPZSequenceSolver< TVar >::Solve(), and TPZStepSolver< TVar >::Solve().


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