15 #include <Accelerate/Accelerate.h> 18 #include <Accelerate/Accelerate.h> 48 friend class TPZPardisoControl<TVar>;
89 void AutoFill(int64_t nrow, int64_t ncol,
int symmetric);
94 virtual const TVar &
GetVal(
const int64_t row,
const int64_t col )
const override;
101 int PutVal(
const int64_t row,
const int64_t col,
const TVar &Value)
override;
104 const TVar alpha=1.,
const TVar beta = 0.,
const int opt = 0)
const override;
107 const TVar alpha=1.,
const TVar beta = 0.,
const int opt = 0);
109 virtual int GetSub(
const int64_t sRow,
const int64_t sCol,
const int64_t rowSize,
115 virtual void SetData( int64_t *IA, int64_t *JA, TVar *A );
146 const REAL overrelax, REAL &tol,
147 const int FromCurrent = 0,
const int direction = 1 )
override;
165 virtual int Zero()
override;
175 virtual int Decompose_LU(std::list<int64_t> &singular)
override;
203 void RowLUUpdate(int64_t sourcerow, int64_t destrow);
215 TPZPardisoControl<TVar> fPardisoControl;
234 int nel = this->
Rows()+1;
236 memccpy(&
fIA[0], IA, nel,
sizeof(int64_t));
237 int64_t nval =
fIA[nel-1];
239 memccpy(&
fJA[0], JA, nval,
sizeof(int64_t));
241 memccpy(&
fA[0], A, nval,
sizeof(TVar));
249 if (IA.
size() != this->
Rows() + 1 ) {
253 if (JA.
size() != IA[this->
Rows()]) {
void AutoFill(int64_t nrow, int64_t ncol, int symmetric)
Fill matrix storage with randomic values.
void MultiplyDummy(TPZFYsmpMatrix< TVar > &B, TPZFYsmpMatrix< TVar > &Res)
virtual int Substitution(TPZFMatrix< TVar > *B) const override
Computes Forward and Backward substitution for a "LU" decomposed matrix.
An auxiliary structure to hold the data of the subset of equations used to multiply in a multi-thre...
virtual void Print(const char *title, std::ostream &out=std::cout, const MatrixOutputFormat form=EFormatted) const override
Print the matrix along with a identification title.
virtual void AddKel(TPZFMatrix< TVar > &elmat, TPZVec< int64_t > &destinationindex) override
Add a contribution of a stiffness matrix.
virtual void resize(const int64_t newsize)
virtual void AddKelOld(TPZFMatrix< TVar > &elmat, TPZVec< int > &destinationindex)
Add a contribution of a stiffness matrix putting it on destination indexes position.
int PutVal(const int64_t row, const int64_t col, const TVar &Value) override
Put values without bounds checking This method is faster than "Put" if DEBUG is defined.
MatrixOutputFormat
Defines output format.
void RowLUUpdate(int64_t sourcerow, int64_t destrow)
virtual ~TPZFYsmpMatrix()
Implements a non symmetric sparse matrix (Yale Sparse Matrix Storage). Matrix.
virtual int Zero() override
Zeroes the matrix.
virtual void SetData(int64_t *IA, int64_t *JA, TVar *A)
Pass the data to the class.
virtual void MultAdd(const TPZFMatrix< TVar > &x, const TPZFMatrix< TVar > &y, TPZFMatrix< TVar > &z, const TVar alpha=1., const TVar beta=0., const int opt=0) const override
It computes z = beta * y + alpha * opt(this)*x but z and x can not overlap in memory.
int64_t size() const
Returns the number of elements of the vector.
void InitializeData()
Implements a initialization method for the sparse structure. It sets the initial value for the fIA an...
virtual int Decompose_LU() override
Contains TPZMatrixclass which implements full matrix (using column major representation).
#define DebugStop()
Returns a message to user put a breakpoint in.
Implements a matrix whose nonzero elements are stored in binary tree. Matrix.
static void * ExecuteMT(void *entrydata)
int64_t Rows() const
Returns number of rows.
Full matrix class. Matrix.
virtual void MultAddMT(const TPZFMatrix< TVar > &x, const TPZFMatrix< TVar > &y, TPZFMatrix< TVar > &z, const TVar alpha=1., const TVar beta=0., const int opt=0)
virtual int GetSub(const int64_t sRow, const int64_t sCol, const int64_t rowSize, const int64_t colSize, TPZFMatrix< TVar > &A) const override
Gets submatrix storing it on Target.
Contains TPZMatrix<TVar>class, root matrix class.
virtual const TVar & GetVal(const int64_t row, const int64_t col) const override
Get the matrix entry at (row,col) without bound checking.
#define CLONEDEF(A)
To create clone matrix.
const TPZFMatrix< TVar > * fX
virtual void SolveJacobi(int64_t &numiterations, const TPZFMatrix< TVar > &F, TPZFMatrix< TVar > &result, TPZFMatrix< TVar > *residual, TPZFMatrix< TVar > &scratch, REAL &tol, const int FromCurrent=0) override
Solves the linear system using Jacobi method. .
int ClassId() const override
Define the class id associated with the class.
void SolveSOR(int64_t &numiterations, const TPZFMatrix< TVar > &rhs, TPZFMatrix< TVar > &x, TPZFMatrix< TVar > *residual, TPZFMatrix< TVar > &scratch, const REAL overrelax, REAL &tol, const int FromCurrent=0, const int direction=1) override
Solves the linear system using Successive Over Relaxation method (Gauss Seidel). ...
const TPZFYsmpMatrix< TVar > * target
TPZFYsmpMatrix & operator=(const TPZFYsmpMatrix< TVar > ©)
Root matrix class (abstract). Matrix.