13 #include "pzsaveable.h" 14 #include "pzmatdefs.h" 37 TPZFBMatrix (
const int64_t dim,
const int64_t band_width = 0 );
57 for (int64_t el=0; el<nel; el++) {
62 int64_t nwork = orig.fWork.size();
63 for (int64_t el=0; el<nwork; el++) {
64 fWork[el] = orig.fWork[el];
72 void AutoFill(int64_t nrow, int64_t ncol,
int symmetric);
75 int Put(
const int64_t row,
const int64_t col,
const TVar& value )
override;
76 const TVar &
Get(
const int64_t row,
const int64_t col )
const override;
78 TVar &
operator()(
const int64_t row,
const int64_t col);
79 virtual TVar &
s(
const int64_t row,
const int64_t col)
override;
81 inline int PutVal(
const int64_t row,
const int64_t col,
const TVar& value )
override;
82 inline const TVar &
GetVal(
const int64_t row,
const int64_t col )
const override;
85 const TVar alpha=1,
const TVar beta = 0,
const int opt = 0)
const override;
103 int64_t
Dim()
const override {
return this->
Rows(); }
124 int SetBand(
const int64_t newBand );
127 int Resize(
const int64_t newRows,
const int64_t newCols )
override;
130 int Redim(
const int64_t newRows,
const int64_t newCols )
override;
138 int Decompose_LU(std::list<int64_t> &singular)
override;
148 int64_t
Index(int64_t i, int64_t j)
const 152 int Clear()
override;
174 int64_t index =
Index(row,col);
175 fElem[index] = value;
192 if (row <0 || row > this->
fRow || col < 0 || col >= this->
fCol) {
212 static TVar
Zero = (TVar)(0);
void Transpose(TPZMatrix< TVar > *const T) const override
It makes *T the transpose of current matrix.
virtual TVar & s(const int64_t row, const int64_t col) override
The operators check on the bounds if the DEBUG variable is defined.
const TVar & Get(const int64_t row, const int64_t col) const override
Get value with bound checking.
bool IsZero(long double a)
Returns if the value a is close Zero as the allowable tolerance.
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.
int SetBand(const int64_t newBand)
Sets band size.
void AutoFill(int64_t nrow, int64_t ncol, int symmetric)
virtual void resize(const int64_t newsize)
int Resize(const int64_t newRows, const int64_t newCols) override
Redimension the matrix preserving its elements.
TPZFBMatrix & operator+=(const TPZFBMatrix< TVar > &A)
int64_t fRow
Number of rows in matrix.
TPZFBMatrix & operator*=(const TVar val)
TPZFBMatrix operator*(const TVar val) const
int64_t Dim() const override
Returns the dimension of the matrix if the matrix is square.
TPZFBMatrix()
Simple constructor.
REAL val(STATE &number)
Returns value of the variable.
virtual int Substitution(TPZFMatrix< TVar > *B) const override
Computes Forward and Backward substitution for a "LU" decomposed matrix.
int64_t size() const
Returns the number of elements of the vector.
TPZFBMatrix & operator-=(const TPZFBMatrix< TVar > &A)
void CopyFrom(TPZMatrix< TVar2 > ©)
int ClassId() const override
Define the class id associated with the class.
int64_t GetBandLower() const
Returns band size.
#define DebugStop()
Returns a message to user put a breakpoint in.
TPZFBMatrix operator+(const TPZFBMatrix< TVar > &A) const
int Redim(const int64_t newRows, const int64_t newCols) override
Redimension the matrix and make zero its elements.
~TPZFBMatrix()
Simple destructor.
int64_t Rows() const
Returns number of rows.
int Put(const int64_t row, const int64_t col, const TVar &value) override
Put values with bounds checking if DEBUG variable is defined.
int Clear() override
It clears data structure.
int64_t GetBandUpper() const
TPZFBMatrix & operator=(const TPZFBMatrix< TVar > &A)
Full matrix class. Matrix.
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.
Contains TPZMatrix<TVar>class, root matrix class.
int Zero() override
Zeroes the matrix.
int64_t fCol
Number of cols in matrix.
TVar & operator()(const int64_t row, const int64_t col)
Defines a non symmetric banded matrix. Matrix.
void CopyFrom(TPZFBMatrix< TVar2 > &orig)
copy the values from a matrix with a different precision
virtual int Decompose_LU()
TPZFBMatrix operator-() const
#define CLONEDEF(A)
To create clone matrix.
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 Index(int64_t i, int64_t j) const
Root matrix class (abstract). Matrix.