NeoPZ
pzseqsolver.h
Go to the documentation of this file.
1 
6 #ifndef TPZSEQUENCESOLVER_H
7 #define TPZSEQUENCESOLVER_H
8 #include "pzsolve.h"
9 #include "pzstack.h"
10 #include "pzfmatrix.h"
11 
16 #define TPZSQUENCESOLVER_ID 29281006
17 
22 template <class TVar>
23 class TPZSequenceSolver : public TPZMatrixSolver<TVar> {
24 public:
35 
36  void Solve(const TPZFMatrix<TVar> &F, TPZFMatrix<TVar> &result, TPZFMatrix<TVar> *residual = 0) override;
37 
39  void ResetSolver();
40 
45  virtual void ResetMatrix() override;
46 
48  virtual void UpdateFrom(TPZAutoPointer<TPZMatrix<TVar> > mat) override;
49 
51 
52  virtual TPZSolver<TVar> * Clone() const override;
53 
56  int ClassId() const override;
57  void Write(TPZStream &buf, int withclassid) const override;
58  void Read(TPZStream &buf, void *context) override;
59 
60 
61 private:
63 };
64 
65 template <class TVar>
67  return Hash("TPZSequenceSolver") ^ TPZMatrixSolver<TVar>::ClassId() << 1;
68 }
69 
70 #endif //TPZSEQUENCESOLVER_H
void ResetSolver()
This method will reinitialize the solver object, including the solution procedure.
Definition: pzseqsolver.cpp:35
TPZSequenceSolver(TPZMatrix< TVar > *refmat=0)
Constructor with initialization parameter.
Definition: pzseqsolver.cpp:12
TPZStack< TPZMatrixSolver< TVar > *> fSolvers
Definition: pzseqsolver.h:62
Defines a abstract class of solvers which will be used by matrix classes. Solver. ...
Definition: pzmatrix.h:32
Defines a class of matrix solvers. Solver.
Definition: pzanalysis.h:24
void AppendSolver(TPZMatrixSolver< TVar > &solve)
Definition: pzseqsolver.cpp:30
virtual TPZSolver< TVar > * Clone() const override
Clones the current object returning a pointer of type TPZSolver.
Definition: pzseqsolver.cpp:25
void Write(TPZStream &buf, int withclassid) const override
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
Definition: pzseqsolver.cpp:99
void Solve(const TPZFMatrix< TVar > &F, TPZFMatrix< TVar > &result, TPZFMatrix< TVar > *residual=0) override
Solves the system of linear equations.
Definition: pzseqsolver.cpp:42
virtual void ResetMatrix() override
This method will reset the matrix associated with the solver.
Definition: pzseqsolver.cpp:74
Contains TPZMatrixclass which implements full matrix (using column major representation).
void Read(TPZStream &buf, void *context) override
read objects from the stream
virtual void UpdateFrom(TPZAutoPointer< TPZMatrix< TVar > > mat) override
Updates the values of the preconditioner based on the values of the matrix.
Definition: pzseqsolver.cpp:88
Full matrix class. Matrix.
Definition: pzfmatrix.h:32
int ClassId() const override
Saveable specific methods.
Definition: pzseqsolver.h:66
A simple stack.
int32_t Hash(std::string str)
Definition: TPZHash.cpp:10
This class implements a stack object. Utility.
Definition: pzcheckmesh.h:14
Defines sequence solvers. Solver.
Definition: pzseqsolver.h:23
Contains TPZSolver class which defines a abstract class of solvers which will be used by matrix class...
int ClassId() const override
Saveable specific methods.
Definition: pzsolve.h:180
Defines the interface for saving and reading data. Persistency.
Definition: TPZStream.h:50
Root matrix class (abstract). Matrix.
Definition: pzmatrix.h:60
This class implements a reference counter mechanism to administer a dynamically allocated object...