NeoPZ
Public Member Functions | List of all members
TPZSolver< TVar > Class Template Referenceabstract

Defines a abstract class of solvers which will be used by matrix classes. Solver. More...

#include <pzmatrix.h>

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

Public Member Functions

int ClassId () const override
 Define the class id associated with the class. More...
 
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...
 
virtual void ResetMatrix ()
 This method will reset the matrix associated with the solver. More...
 
virtual void UpdateFrom (TPZAutoPointer< TPZMatrix< TVar > > matrix)
 Updates the values of the current matrix based on the values of the matrix. 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 void Write (TPZStream &buf, int withclassid) const
 Writes this object to the TPZStream buffer. Include the classid if withclassid = true. More...
 
virtual void Read (TPZStream &buf, void *context)
 read objects from the stream More...
 
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
 

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 TPZSolver< TVar >

Defines a abstract class of solvers which will be used by matrix classes. Solver.

Definition at line 32 of file pzmatrix.h.

Constructor & Destructor Documentation

◆ ~TPZSolver()

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

Destructor.

Destructor

Definition at line 19 of file pzsolve.cpp.

Referenced by TPZSolver< STATE >::Decompose().

Member Function Documentation

◆ ClassId()

template<class TVar >
int TPZSolver< TVar >::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.

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

Definition at line 61 of file pzsolve.h.

Referenced by TPZMatrixSolver< STATE >::ClassId().

◆ Clone()

template<class TVar>
virtual TPZSolver* TPZSolver< TVar >::Clone ( ) const
pure virtual

◆ Decompose()

template<class TVar>
virtual void TPZSolver< TVar >::Decompose ( )
inlinevirtual

Decompose the system of equations if a direct solver is used.

Reimplemented in TPZStepSolver< TVar >.

Definition at line 37 of file pzsolve.h.

◆ ResetMatrix()

template<class TVar>
virtual void TPZSolver< TVar >::ResetMatrix ( )
inlinevirtual

This method will reset the matrix associated with the solver.

This is useful when the matrix needs to be recomputed in a non linear problem

Reimplemented in TPZMatrixSolver< TVar >, TPZMatrixSolver< REAL >, TPZMatrixSolver< TTVar >, TPZMatrixSolver< STATE >, TPZStepSolver< TVar >, and TPZSequenceSolver< TVar >.

Definition at line 48 of file pzsolve.h.

Referenced by TPZMatrixSolver< STATE >::UpdateFrom().

◆ Solve()

template<class TVar>
virtual void TPZSolver< TVar >::Solve ( const TPZFMatrix< TVar > &  F,
TPZFMatrix< TVar > &  result,
TPZFMatrix< TVar > *  residual = 0 
)
pure virtual

Solves the system of linear equations.

Parameters
Fcontains Force vector
resultcontains the solution
residualcontains the residual for that linear system

Implemented in TPZStepSolver< TVar >, TPZMGSolver< TVar >, TPZCopySolve< TVar >, and TPZSequenceSolver< TVar >.

Referenced by TPZAnalysis::AnimateRun(), TPZMGAnalysis::Solve(), TPZEulerAnalysis::Solve(), and TPZAnalysis::Solve().

◆ UpdateFrom()

template<class TVar>
virtual void TPZSolver< TVar >::UpdateFrom ( TPZAutoPointer< TPZMatrix< TVar > >  matrix)
inlinevirtual

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

Reimplemented in TPZMatrixSolver< TVar >, TPZMatrixSolver< REAL >, TPZMatrixSolver< TTVar >, TPZMatrixSolver< STATE >, TPZStepSolver< TVar >, and TPZSequenceSolver< TVar >.

Definition at line 52 of file pzsolve.h.


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