14 #include "pzsaveable.h" 15 #include "pzmatdefs.h" 53 int64_t nel = (this->
Rows()*(this->
Rows()+1))/2;
54 for (int64_t el=0; el<nel; el++) {
60 int PutVal(
const int64_t row,
const int64_t col,
const TVar &value )
override;
61 const TVar &
GetVal(
const int64_t row,
const int64_t col )
const override;
101 int Resize(
const int64_t newDim,
const int64_t )
override;
104 int Redim(
const int64_t newRows ,
const int64_t)
override;
106 int Redim(
const int64_t newDim) {
return Redim(newDim,newDim);}
119 virtual int Decompose_LDLt(std::list<int64_t> &singular)
override;
129 virtual int Unpack( TReceiveStorage *buf );
130 static TSaveable *Restore(TReceiveStorage *buf);
131 virtual int Pack( TSendStorage *buf )
const;
132 virtual std::string ClassName()
const {
return(
"TPZSFMatrix"); }
133 virtual int DerivedFrom(
const int64_t Classid)
const;
134 virtual int DerivedFrom(
const char *classname)
const;
142 int64_t
Size()
const {
return (this->
Dim() * (this->
Dim()+1)) >> 1; }
144 int Clear()
override;
155 int64_t locrow = row, loccol = col;
156 if ( locrow < loccol )
157 this->
Swap( &locrow, &loccol );
160 this->
fElem[ ((locrow*(locrow+1)) >> 1) + loccol ] = value;
170 int64_t locrow(row),loccol(col);
171 if ( locrow < loccol )
172 this->
Swap( &locrow, &loccol );
174 return(
fElem[ ((locrow*(locrow+1)) >> 1) + loccol ] );
int Zero() override
Resets all elements.
virtual int Subst_Forward(TPZFMatrix< TVar > *B) const override
Computes B = Y, where A*Y = B, A is lower triangular.
TPZSFMatrix operator*(const TVar val) const
int Clear() override
It clears data structure.
TPZSFMatrix & operator-=(const TVar val)
virtual int Decompose_LDLt() override
Decomposes the current matrix using LDLt.
char fDecomposed
Decomposition type used to decompose the current matrix.
REAL val(STATE &number)
Returns value of the variable.
virtual int Subst_Backward(TPZFMatrix< TVar > *B) const override
Computes B = Y, where A*Y = B, A is upper triangular.
TPZSFMatrix & operator-=(const TPZSFMatrix< TVar > &A)
TPZSFMatrix operator-() const
int Redim(const int64_t newDim)
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.
virtual int IsSimetric() const override
Checks if the current matrix is symmetric.
void CopyFrom(TPZMatrix< TVar2 > ©)
Contains TPZMatrixclass which implements full matrix (using column major representation).
virtual int Subst_Diag(TPZFMatrix< TVar > *B) const override
Computes B = Y, where A*Y = B, A is diagonal matrix.
TPZSFMatrix & operator*=(const TVar val)
TPZSFMatrix & operator+=(const TPZSFMatrix< TVar > &A)
int64_t Rows() const
Returns number of rows.
virtual int Subst_LBackward(TPZFMatrix< TVar > *B) const override
Computes B = Y, where A*Y = B, A is upper triangular with A(i,i)=1.
Full matrix class. Matrix.
virtual int64_t Dim() const
Returns the dimension of the matrix if the matrix is square.
void CopyFrom(TPZSFMatrix< TVar2 > &orig)
copy the values from a matrix with a different precision
Contains TPZMatrix<TVar>class, root matrix class.
virtual int Decompose_Cholesky() override
Decomposes the current matrix using Cholesky method. The current matrix has to be symmetric...
TPZSFMatrix & operator=(const TPZSFMatrix< TVar > &A)
int Resize(const int64_t newDim, const int64_t) override
Resize the array but keeps its entirety.
static void Swap(int64_t *a, int64_t *b)
Swaps contents of a in b and b in a.
virtual int Subst_LForward(TPZFMatrix< TVar > *B) const override
Computes B = Y, where A*Y = B, A is lower triangular with A(i,i)=1.
const TVar & GetVal(const int64_t row, const int64_t col) const override
Get values without bounds checking This method is faster than "Get" if DEBUG is defined.
int64_t Cols() const
Returns number of cols.
#define CLONEDEF(A)
To create clone matrix.
TPZSFMatrix operator+(const TPZSFMatrix< TVar > &A) const
Implements a symmetric full matrix. Matrix.
int Redim(const int64_t newRows, const int64_t) override
Resize the array and resets ist entirety.
int ClassId() const override
Define the class id associated with the class.
Root matrix class (abstract). Matrix.