NeoPZ
|
Defines a class of matrix solvers. Solver. More...
#include <pzanalysis.h>
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 TPZSolver * | Clone () 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 TPZSavable * | CreateInstance (const int &classId) |
Defines a class of matrix solvers. Solver.
Definition at line 24 of file pzanalysis.h.
enum TPZMatrixSolver::MSolver |
Defines a series of solvers available in PZ.
ENoSolver | No solver selected |
EJacobi | Jacobi solver selected |
ESOR | Successive Over Relaxation solver selected |
ESSOR | Symmetric Successive Over Relaxation solver selected |
ECG | Conjugate Gradiente solver selected |
EDirect | LU, LDLt or Cholesky selected |
Enumerator | |
---|---|
ENoSolver | |
EJacobi | |
ESOR | |
ESSOR | |
ECG | |
EGMRES | |
EBICGSTAB | |
EDirect | |
EMultiply |
TPZMatrixSolver< TVar >::TPZMatrixSolver | ( | TPZAutoPointer< TPZMatrix< TVar > > | Refmat | ) |
Constructor with initialization parameter.
Refmat | Sets reference matrix to 0 |
Definition at line 24 of file pzsolve.cpp.
TPZMatrixSolver< TVar >::TPZMatrixSolver | ( | ) |
Definition at line 31 of file pzsolve.cpp.
TPZMatrixSolver< TVar >::TPZMatrixSolver | ( | const TPZMatrixSolver< TVar > & | Source | ) |
Copy constructor.
Source | Model object to be copied from |
Definition at line 37 of file pzsolve.cpp.
|
virtual |
Destructor.
Definition at line 45 of file pzsolve.cpp.
|
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().
|
inline |
Returns a pointer to TPZMatrix<>
Definition at line 138 of file pzsolve.h.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::Assemble(), TPZSubMeshAnalysis::Assemble(), TPZEulerAnalysis::Assemble(), TPZAnalysis::Assemble(), TPZAnalysis::BuildPreconditioner(), TPZAnalysis::BuildSequenceSolver(), TPZNonLinMultGridAnalysis::CalcResidual(), TPZSubCompMesh::CalcStiff(), TPZTransientAnalysis< TRANSIENTCLASS >::ComputeFluxOnly(), Input::CreateCuboSkyMatrix(), TPZStepSolver< TVar >::Decompose(), TPZMatRed< TTVar, TPZFMatrix< TTVar > >::DecomposeK00(), TPZSubMeshFrontalAnalysis::LoadSolution(), main(), TPZSubMeshFrontalAnalysis::Run(), TPZSequenceSolver< TVar >::Solve(), TPZMGAnalysis::Solve(), TPZMGSolver< TVar >::Solve(), TPZStepSolver< TVar >::Solve(), TPZAnalysis::Solve(), and TPZElastoPlasticAnalysis::UpdatePrecond().
|
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().
|
inline |
|
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().
|
inlinevirtual |
Sets a matrix to the current object.
Refmat | Sets reference matrix to RefMat |
Definition at line 115 of file pzsolve.h.
Referenced by TPZTransientAnalysis< TRANSIENTCLASS >::Assemble(), TPZSubMeshAnalysis::Assemble(), TPZEulerAnalysis::Assemble(), TPZAnalysis::Assemble(), AssembleMatrices(), TPZTransientAnalysis< TRANSIENTCLASS >::ComputeLinearTangentMatrix(), TPZTransientAnalysis< TRANSIENTCLASS >::ComputeMassMatrix(), InitializeMatrices(), TPZGradientReconstruction::ProjectionL2GradientReconstructed(), TPZEulerAnalysis::RunNewton(), TPZElastoPlasticAnalysis::SetBiCGStab(), TPZElastoPlasticAnalysis::SetBiCGStab_Jacobi(), TPZEulerAnalysis::SetGMResBlock(), TPZEulerAnalysis::SetGMResFront(), and TPZElastoPlasticAnalysis::SetLU().
|
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().
void TPZMatrixSolver< TVar >::ShareMatrix | ( | TPZMatrixSolver< TVar > & | other | ) |
Shares the current matrix with another object of same type.
other | Object 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().
|
inlinevirtual |
Reimplemented in TPZStepSolver< TVar >.
|
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().
|
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().
|
private |
Container classes.
Definition at line 162 of file pzsolve.h.
Referenced by TPZMatrixSolver< STATE >::Read(), TPZMatrixSolver< STATE >::ResetMatrix(), TPZMatrixSolver< STATE >::ShareMatrix(), TPZMatrixSolver< STATE >::TPZMatrixSolver(), and TPZMatrixSolver< STATE >::Write().
|
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().
|
protected |
Manipulation matrix.
Definition at line 169 of file pzsolve.h.
Referenced by TPZSequenceSolver< TVar >::Solve(), and TPZStepSolver< TVar >::Solve().