NeoPZ
|
Implements symmetric band matrices. Matrix. More...
#include <pzsbndmat.h>
Public Member Functions | |
TPZSBMatrix () | |
TPZSBMatrix (const int64_t dim, const int64_t band) | |
TPZSBMatrix (const TPZSBMatrix< TVar > &A) | |
~TPZSBMatrix () | |
int | PutVal (const int64_t row, const int64_t col, const TVar &element) override |
Put values without bounds checking This method is faster than "Put" if DEBUG is defined. More... | |
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. More... | |
TVar & | operator() (int64_t row, int64_t col) |
virtual int | IsSimetric () const override |
Checks if the current matrix is symmetric. More... | |
template<class TVar2 > | |
void | CopyFrom (TPZSBMatrix< TVar2 > &orig) |
copy the values from a matrix with a different precision More... | |
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 |
Computes z = beta * y + alpha * opt(this)*x. More... | |
void | Print (const char *name=NULL, std::ostream &out=std::cout, const MatrixOutputFormat form=EFormatted) const override |
It prints the matrix data in a MatrixFormat Rows X Cols. More... | |
void | AutoFill (int64_t nrow, int64_t ncol, int symmetric) |
TPZSBMatrix< TVar > | operator* (const TVar v) const |
TPZSBMatrix< TVar > & | operator*= (const TVar v) |
TPZSBMatrix< TVar > | operator- () const |
int | Resize (const int64_t newDim, const int64_t) override |
Redimension the matrix keeping original elements. More... | |
int | Redim (const int64_t newDim) |
Redimension the matrix and zeroes its elements. More... | |
int | Redim (const int64_t newRows, const int64_t newCols) override |
Redimensions the matrix reinitializing it with zero. More... | |
int | Zero () override |
Zeroes the elements of the matrix. More... | |
int64_t | GetBand () const |
int | SetBand (const int64_t newBand) |
int | ClassId () const override |
Define the class id associated with the class. More... | |
template<> | |
int | PutVal (const int64_t r, const int64_t c, const std::complex< float > &value) |
template<> | |
int | PutVal (const int64_t r, const int64_t c, const std::complex< double > &value) |
template<> | |
const std::complex< float > & | GetVal (const int64_t r, const int64_t c) const |
Get values without bounds checking This method is faster than "Get" if DEBUG is defined. More... | |
template<> | |
const std::complex< double > & | GetVal (const int64_t r, const int64_t c) const |
Get values without bounds checking This method is faster than "Get" if DEBUG is defined. More... | |
template<> | |
std::complex< float > & | operator() (const int64_t r, const int64_t c) |
template<> | |
std::complex< double > & | operator() (const int64_t r, const int64_t c) |
TPZSBMatrix & | operator= (const TPZSBMatrix< TVar > &A) |
Operadores com matrizes SKY LINE. More... | |
TPZSBMatrix | operator+ (const TPZSBMatrix< TVar > &A) const |
TPZSBMatrix | operator- (const TPZSBMatrix< TVar > &A) const |
TPZSBMatrix & | operator+= (const TPZSBMatrix< TVar > &A) |
TPZSBMatrix & | operator-= (const TPZSBMatrix< TVar > &A) |
int | Subst_Forward (TPZFMatrix< TVar > *B) const override |
To solve linear systems. More... | |
int | Subst_Backward (TPZFMatrix< TVar > *b) const override |
Computes B = Y, where A*Y = B, A is upper triangular. More... | |
int | Decompose_LDLt (std::list< int64_t > &singular) override |
Decomposes the current matrix using LDLt. The current matrix has to be symmetric. "L" is lower triangular with 1.0 in its diagonal and "D" is a Diagonal matrix. More... | |
int | Decompose_LDLt () override |
Decomposes the current matrix using LDLt. More... | |
int | Subst_LForward (TPZFMatrix< TVar > *B) const override |
Computes B = Y, where A*Y = B, A is lower triangular with A(i,i)=1. More... | |
int | Subst_LBackward (TPZFMatrix< TVar > *B) const override |
Computes B = Y, where A*Y = B, A is upper triangular with A(i,i)=1. More... | |
int | Subst_Diag (TPZFMatrix< TVar > *B) const override |
Computes B = Y, where A*Y = B, A is diagonal matrix. More... | |
Public Member Functions inherited from TPZMatrix< TVar > | |
TPZMatrix () | |
Simple constructor. More... | |
TPZMatrix (const TPZMatrix< TVar > &cp) | |
virtual | ~TPZMatrix () |
Simple destructor. More... | |
virtual TPZMatrix< TVar > * | Clone () const =0 |
virtual int64_t | MemoryFootprint () const |
Returns the approximate size of the memory footprint (amount of memory required to store this object). More... | |
template<class TVar2 > | |
void | CopyFrom (TPZMatrix< TVar2 > ©) |
void | AutoFill (int64_t nrow, int64_t ncol, int symmetric) |
Fill matrix storage with randomic values. More... | |
virtual int | VerifySymmetry (REAL tol=1.e-13) const |
Checks if current matrix value is symmetric. More... | |
virtual int | Put (const int64_t row, const int64_t col, const TVar &value) |
Put values with bounds checking if DEBUG variable is defined. More... | |
virtual const TVar & | Get (const int64_t row, const int64_t col) const |
Get value with bound checking. More... | |
const TVar & | g (const int64_t row, const int64_t col) const |
Substitution for the () operator when const arguments are needed. More... | |
TVar & | operator() (const int64_t row, const int64_t col) |
The operators check on the bounds if the DEBUG variable is defined. More... | |
virtual TVar & | s (const int64_t row, const int64_t col) |
The operators check on the bounds if the DEBUG variable is defined. More... | |
TVar & | operator() (const int64_t row) |
The operators check on the bounds if the DEBUG variable is defined. More... | |
virtual void | AddKel (TPZFMatrix< TVar > &elmat, TPZVec< int64_t > &destinationindex) |
Add a contribution of a stiffness matrix. More... | |
virtual void | AddKel (TPZFMatrix< TVar > &elmat, TPZVec< int64_t > &sourceindex, TPZVec< int64_t > &destinationindex) |
Add a contribution of a stiffness matrix. More... | |
void | SetIsDecomposed (int val) |
Sets current matrix to decomposed state. More... | |
virtual bool | Compare (TPZSavable *copy, bool override=false) override |
Compare the object for identity with the object pointed to, eventually copy the object. More... | |
virtual bool | Compare (TPZSavable *copy, bool override=false) const override |
Compare the object for identity with the object pointed to, eventually copy the object. More... | |
virtual void | GetSub (const TPZVec< int64_t > &indices, TPZFMatrix< TVar > &block) const |
Extract the block indicated by the indices from the matrix. More... | |
bool | CompareValues (TPZMatrix< TVar > &M, TVar tol) |
Compare values of this to B, with a precision tolerance tol. More... | |
template<> | |
void | Print (const char *name, std::ostream &out, const MatrixOutputFormat form) const |
template<> | |
void | Print (const char *name, std::ostream &out, const MatrixOutputFormat form) const |
template<> | |
void | Print (const char *name, std::ostream &out, const MatrixOutputFormat form) const |
template<> | |
void | SolveCG (int64_t &numiterations, TPZSolver< std::complex< float > > &preconditioner, const TPZFMatrix< std::complex< float > > &F, TPZFMatrix< std::complex< float > > &result, TPZFMatrix< std::complex< float > > *residual, REAL &tol, const int FromCurrent) |
template<> | |
void | SolveCG (int64_t &numiterations, TPZSolver< std::complex< double > > &preconditioner, const TPZFMatrix< std::complex< double > > &F, TPZFMatrix< std::complex< double > > &result, TPZFMatrix< std::complex< double > > *residual, REAL &tol, const int FromCurrent) |
template<> | |
void | SolveCG (int64_t &numiterations, TPZSolver< std::complex< long double > > &preconditioner, const TPZFMatrix< std::complex< long double > > &F, TPZFMatrix< std::complex< long double > > &result, TPZFMatrix< std::complex< long double > > *residual, REAL &tol, const int FromCurrent) |
template<> | |
void | SolveGMRES (int64_t &numiterations, TPZSolver< std::complex< float > > &preconditioner, TPZFMatrix< std::complex< float > > &H, int &numvectors, const TPZFMatrix< std::complex< float > > &F, TPZFMatrix< std::complex< float > > &result, TPZFMatrix< std::complex< float > > *residual, REAL &tol, const int FromCurrent) |
template<> | |
void | SolveGMRES (int64_t &numiterations, TPZSolver< std::complex< double > > &preconditioner, TPZFMatrix< std::complex< double > > &H, int &numvectors, const TPZFMatrix< std::complex< double > > &F, TPZFMatrix< std::complex< double > > &result, TPZFMatrix< std::complex< double > > *residual, REAL &tol, const int FromCurrent) |
template<> | |
void | SolveGMRES (int64_t &numiterations, TPZSolver< std::complex< long double > > &preconditioner, TPZFMatrix< std::complex< long double > > &H, int &numvectors, const TPZFMatrix< std::complex< long double > > &F, TPZFMatrix< std::complex< long double > > &result, TPZFMatrix< std::complex< long double > > *residual, REAL &tol, const int FromCurrent) |
template<> | |
void | SolveBICG (int64_t &numiterations, TPZSolver< std::complex< float > > &preconditioner, const TPZFMatrix< std::complex< float > > &F, TPZFMatrix< std::complex< float > > &result, REAL &tol) |
template<> | |
void | SolveBICG (int64_t &numiterations, TPZSolver< std::complex< double > > &preconditioner, const TPZFMatrix< std::complex< double > > &F, TPZFMatrix< std::complex< double > > &result, REAL &tol) |
template<> | |
void | SolveBICG (int64_t &numiterations, TPZSolver< std::complex< long double > > &preconditioner, const TPZFMatrix< std::complex< long double > > &F, TPZFMatrix< std::complex< long double > > &result, REAL &tol) |
template<> | |
void | SolveBICGStab (int64_t &numiterations, TPZSolver< std::complex< float > > &preconditioner, const TPZFMatrix< std::complex< float > > &F, TPZFMatrix< std::complex< float > > &result, TPZFMatrix< std::complex< float > > *residual, REAL &tol, const int FromCurrent) |
template<> | |
void | SolveBICGStab (int64_t &numiterations, TPZSolver< std::complex< double > > &preconditioner, const TPZFMatrix< std::complex< double > > &F, TPZFMatrix< std::complex< double > > &result, TPZFMatrix< std::complex< double > > *residual, REAL &tol, const int FromCurrent) |
template<> | |
void | SolveBICGStab (int64_t &numiterations, TPZSolver< std::complex< long double > > &preconditioner, const TPZFMatrix< std::complex< long double > > &F, TPZFMatrix< std::complex< long double > > &result, TPZFMatrix< std::complex< long double > > *residual, REAL &tol, const int FromCurrent) |
template<> | |
void | SolveIR (int64_t &numiterations, TPZSolver< std::complex< float > > &preconditioner, const TPZFMatrix< std::complex< float > > &F, TPZFMatrix< std::complex< float > > &result, TPZFMatrix< std::complex< float > > *residual, REAL &tol, const int FromCurrent) |
template<> | |
void | SolveIR (int64_t &numiterations, TPZSolver< std::complex< double > > &preconditioner, const TPZFMatrix< std::complex< double > > &F, TPZFMatrix< std::complex< double > > &result, TPZFMatrix< std::complex< double > > *residual, REAL &tol, const int FromCurrent) |
template<> | |
void | SolveIR (int64_t &numiterations, TPZSolver< std::complex< long double > > &preconditioner, const TPZFMatrix< std::complex< long double > > &F, TPZFMatrix< std::complex< long double > > &result, TPZFMatrix< std::complex< long double > > *residual, REAL &tol, const int FromCurrent) |
template<> | |
bool | SolveEigenvaluesJacobi (int64_t &numiterations, REAL &tol, TPZVec< std::complex< float > > *Sort) |
template<> | |
bool | SolveEigenvaluesJacobi (int64_t &numiterations, REAL &tol, TPZVec< std::complex< double > > *Sort) |
template<> | |
bool | SolveEigenvaluesJacobi (int64_t &numiterations, REAL &tol, TPZVec< std::complex< long double > > *Sort) |
virtual void | Multiply (const TPZFMatrix< TVar > &A, TPZFMatrix< TVar > &res, int opt=0) const |
It mutiplies itself by TPZMatrix<TVar>A putting the result in res. More... | |
virtual void | Add (const TPZMatrix< TVar > &A, TPZMatrix< TVar > &res) const |
It adds itself to TPZMatrix<TVar>A putting the result in res. More... | |
virtual void | Residual (const TPZFMatrix< TVar > &x, const TPZFMatrix< TVar > &rhs, TPZFMatrix< TVar > &res) |
Computes res = rhs - this * x. More... | |
virtual void | Substract (const TPZMatrix< TVar > &A, TPZMatrix< TVar > &result) const |
It substracts A from storing the result in result. More... | |
virtual void | Identity () |
Converts the matrix in an identity matrix. More... | |
virtual void | Transpose (TPZMatrix< TVar > *const T) const |
It makes *T the transpose of current matrix. More... | |
int | Inverse (TPZFMatrix< TVar > &Inv, DecomposeType dec) |
It makes Inv =[this]. IMPORTANT OBSERVATION –> The original matrix (calling object) no is more equal. It containts the some decomposition (LU or Cholesky or ...) More... | |
TVar | MatrixNorm (int p, int64_t numiter=2000000, REAL tol=1.e-10) const |
Computes the matrix norm of this. More... | |
TVar | ConditionNumber (int p, int64_t numiter=2000000, REAL tol=1.e-10) |
Computes the matrix condition number of this. More... | |
virtual int | PutSub (const int64_t sRow, const int64_t sCol, const TPZFMatrix< TVar > &Source) |
It puts submatrix Source on actual matrix structure. More... | |
virtual int | GetSub (const int64_t sRow, const int64_t sCol, const int64_t rowSize, const int64_t colSize, TPZFMatrix< TVar > &Target) const |
Gets submatrix storing it on Target. More... | |
virtual int | AddSub (const int64_t sRow, const int64_t sCol, const TPZFMatrix< TVar > &Source) |
It adds Source matrix on current matrix from position (sRow, sCol) More... | |
virtual int | InsertSub (const int64_t sRow, const int64_t sCol, const int64_t rowSize, const int64_t colSize, const int64_t pRow, const int64_t pCol, TPZMatrix< TVar > *Target) const |
Inserts a submatrix from current object on matrix *Target with no redimentioning. More... | |
virtual int | AddSub (const int64_t sRow, const int64_t sCol, const int64_t rowSize, const int64_t colSize, const int64_t pRow, const int64_t pCol, TPZMatrix< TVar > *pA) const |
Adds a submatrix from current object in *Target. More... | |
virtual void | UpdateFrom (TPZAutoPointer< TPZMatrix< TVar > >) |
Updates the values of the matrix based on the values of the matrix. More... | |
int | IsSquare () const |
Checks if current matrix is square. More... | |
virtual void | Simetrize () |
Simetrizes copies upper plan to the lower plan, making its data simetric. More... | |
virtual int | IsDefPositive () const |
Checks if current matrix is definite positive. More... | |
int | IsDecomposed () const |
Checks if current matrix is already decomposed. More... | |
virtual int | Decompose_LU (std::list< int64_t > &singular) |
Decomposes the current matrix using LU decomposition. More... | |
virtual int | Decompose_LU () |
virtual int | Decompose_Cholesky () |
Decomposes the current matrix using Cholesky method. The current matrix has to be symmetric. More... | |
virtual int | Decompose_Cholesky (std::list< int64_t > &singular) |
Decomposes the current matrix using Cholesky method. More... | |
virtual int | Substitution (TPZFMatrix< TVar > *B) const |
Computes Forward and Backward substitution for a "LU" decomposed matrix. More... | |
void | Read (TPZStream &buf, void *context) override |
Unpacks the object structure from a stream of bytes. More... | |
void | Write (TPZStream &buf, int withclassid) const override |
Packs the object structure in a stream of bytes. More... | |
virtual void | Input (std::istream &in=std::cin) |
Input operation. More... | |
virtual void | Print (std::ostream &out) const |
int64_t | Rows () const |
Returns number of rows. More... | |
int64_t | Cols () const |
Returns number of cols. More... | |
virtual int64_t | Dim () const |
Returns the dimension of the matrix if the matrix is square. More... | |
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) |
Solves the linear system using Jacobi method. . More... | |
virtual void | SolveSOR (int64_t &numiterations, const TPZFMatrix< TVar > &F, TPZFMatrix< TVar > &result, TPZFMatrix< TVar > *residual, TPZFMatrix< TVar > &scratch, const REAL overrelax, REAL &tol, const int FromCurrent=0, const int direction=1) |
Solves the linear system using Successive Over Relaxation method (Gauss Seidel). . More... | |
virtual void | SolveSSOR (int64_t &numiterations, const TPZFMatrix< TVar > &F, TPZFMatrix< TVar > &result, TPZFMatrix< TVar > *residual, TPZFMatrix< TVar > &scratch, const REAL overrelax, REAL &tol, const int FromCurrent=0) |
Solves the linear system using Symmetric Successive Over Relaxation method (Gauss Seidel). . More... | |
virtual void | SolveCG (int64_t &numiterations, TPZSolver< TVar > &preconditioner, const TPZFMatrix< TVar > &F, TPZFMatrix< TVar > &result, TPZFMatrix< TVar > *residual, REAL &tol, const int FromCurrent=0) |
Solves the linear system using Conjugate Gradient method. . More... | |
virtual void | SolveBICG (int64_t &numiterations, TPZSolver< TVar > &preconditioner, const TPZFMatrix< TVar > &F, TPZFMatrix< TVar > &result, REAL &tol) |
Solves the linear system using Bi-Conjugate Gradient method. . More... | |
virtual void | SolveBICGStab (int64_t &numiterations, TPZSolver< TVar > &preconditioner, const TPZFMatrix< TVar > &F, TPZFMatrix< TVar > &result, TPZFMatrix< TVar > *residual, REAL &tol, const int FromCurrent=0) |
Solves the linear system using Bi-Conjugate Gradient stabilized method. . More... | |
virtual void | SolveGMRES (int64_t &numiterations, TPZSolver< TVar > &preconditioner, TPZFMatrix< TVar > &H, int &numvectors, const TPZFMatrix< TVar > &F, TPZFMatrix< TVar > &result, TPZFMatrix< TVar > *residual, REAL &tol, const int FromCurrent) |
Solves the linear system using Generalized Minimal Residual (GMRES) method. . More... | |
virtual void | SolveIR (int64_t &numiterations, TPZSolver< TVar > &preconditioner, const TPZFMatrix< TVar > &F, TPZFMatrix< TVar > &result, TPZFMatrix< TVar > *residual, REAL &tol, const int FromCurrent=0) |
Solves the linear system using IR method. . More... | |
virtual bool | SolveEigenvaluesJacobi (int64_t &numiterations, REAL &tol, TPZVec< TVar > *Sort=0) |
Transforms this matrix in a diagonal matrix, where the diagonal values are its eigenvalues. This method is efficient only for small matrices. More... | |
virtual bool | SolveEigensystemJacobi (int64_t &numiterations, REAL &tol, TPZVec< TVar > &Eigenvalues, TPZFMatrix< TVar > &Eigenvectors) const |
Compute Eigenvalues and Eigenvectors of this matrix. This method is efficient only for small matrices. More... | |
virtual int | SolveDirect (TPZFMatrix< TVar > &F, const DecomposeType dt, std::list< int64_t > &singular) |
Solves the linear system using Direct methods. More... | |
virtual int | SolveDirect (TPZFMatrix< TVar > &F, const DecomposeType dt) |
Solves the linear system using Direct methods. More... | |
virtual int | Decompose (const DecomposeType dt, std::list< int64_t > &singular) |
decompose the system of equations acording to the decomposition scheme More... | |
int | Solve_LU (TPZFMatrix< TVar > *B, std::list< int64_t > &singular) |
Solves the linear system using LU method . More... | |
int | Solve_LU (TPZFMatrix< TVar > *B) |
Solves the linear system using LU method . More... | |
virtual int | Solve_Cholesky (TPZFMatrix< TVar > *B) |
Solves the linear system using Cholesky method . More... | |
int | Solve_Cholesky (TPZFMatrix< TVar > *B, std::list< int64_t > &singular) |
Solves the linear system using Cholesky method . More... | |
int | Solve_LDLt (TPZFMatrix< TVar > *B, std::list< int64_t > &singular) |
Solves the linear system using LDLt method . More... | |
int | Solve_LDLt (TPZFMatrix< TVar > *B) |
Solves the linear system using LDLt method . 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 |
Public Member Functions inherited from TPZRegisterClassId | |
template<typename T > | |
TPZRegisterClassId (int(T::*)() const) | |
TPZRegisterClassId ()=default | |
Private Member Functions | |
int64_t | Size () const |
int | Clear () override |
It clears data structure. More... | |
void | Copy (const TPZSBMatrix< TVar > &) |
int64_t | Index (int64_t i, int64_t j) const |
Private Attributes | |
TPZVec< TVar > | fDiag |
int64_t | fBand |
Friends | |
class | TPZSBMatrix< float > |
class | TPZSBMatrix< double > |
template<class TT > | |
std::ostream & | operator<< (std::ostream &out, const TPZSBMatrix< TT > &A) |
Additional Inherited Members | |
Static Public Member Functions inherited from TPZMatrix< TVar > | |
static int | Error (const char *msg, const char *msg2=0) |
Returns error messages. More... | |
static TVar | ReturnNearestValue (TVar val, TPZVec< TVar > &Vec, TVar tol) |
Retorna o valor mais proximo a "val" (exceto valores no intervalo -tol <= val <= +tol) contido no vetor Vec. More... | |
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) |
Protected Member Functions inherited from TPZMatrix< TVar > | |
void | PrepareZ (const TPZFMatrix< TVar > &y, TPZFMatrix< TVar > &z, const TVar beta, const int opt) const |
Is an auxiliar method used by MultiplyAdd. More... | |
TPZMatrix (const int64_t row, const int64_t col) | |
Constructor. More... | |
Static Protected Member Functions inherited from TPZMatrix< TVar > | |
static void | Swap (int64_t *a, int64_t *b) |
Swaps contents of a in b and b in a. More... | |
Protected Attributes inherited from TPZMatrix< TVar > | |
int64_t | fRow |
Number of rows in matrix. More... | |
int64_t | fCol |
Number of cols in matrix. More... | |
char | fDecomposed |
Decomposition type used to decompose the current matrix. More... | |
char | fDefPositive |
Definite Posistiveness of current matrix. More... | |
Static Protected Attributes inherited from TPZMatrix< TVar > | |
static TVar | gZero |
Initializing value to static variable. More... | |
Implements symmetric band matrices. Matrix.
Definition at line 25 of file pzsbndmat.h.
|
inline |
Definition at line 28 of file pzsbndmat.h.
References TPZSBMatrix< TVar >::fBand.
TPZSBMatrix< TVar >::TPZSBMatrix | ( | const int64_t | dim, |
const int64_t | band | ||
) |
Definition at line 35 of file pzsbndmat.cpp.
References TPZSBMatrix< TVar >::fBand, TPZSBMatrix< TVar >::fDiag, TPZVec< T >::resize(), TPZSBMatrix< TVar >::Size(), and TPZSBMatrix< TVar >::Zero().
|
inline |
Definition at line 31 of file pzsbndmat.h.
References CLONEDEF, and TPZSBMatrix< TVar >::Copy().
|
inline |
Definition at line 36 of file pzsbndmat.h.
References TPZSBMatrix< TVar >::Clear(), TPZSBMatrix< TVar >::GetVal(), TPZSBMatrix< TVar >::operator()(), and TPZSBMatrix< TVar >::PutVal().
void TPZSBMatrix< TVar >::AutoFill | ( | int64_t | nrow, |
int64_t | ncol, | ||
int | symmetric | ||
) |
Fill the matrix with random values (non singular matrix)
Fill data
Making diagonally dominant and non zero in diagonal
Definition at line 63 of file pzsbndmat.cpp.
References TPZMatrix< TVar >::Cols(), DebugStop, fabs, TPZSBMatrix< TVar >::fBand, TPZSBMatrix< TVar >::GetVal(), IsZero(), TPZSBMatrix< TVar >::PutVal(), Random(), TPZSBMatrix< TVar >::Resize(), TPZMatrix< TVar >::Rows(), and val().
Referenced by TPZSBMatrix< TVar >::CopyFrom().
|
overridevirtual |
Define the class id associated with the class.
This id has to be unique for all classes A non unique id is flagged at the startup of the program
Reimplemented from TPZMatrix< TVar >.
Definition at line 1989 of file pzsbndmat.cpp.
References TPZMatrix< TVar >::ClassId(), and Hash().
Referenced by TPZSBMatrix< TVar >::GetBand().
|
overrideprivatevirtual |
It clears data structure.
Reimplemented from TPZMatrix< TVar >.
Definition at line 1275 of file pzsbndmat.cpp.
References TPZMatrix< TVar >::fCol, TPZMatrix< TVar >::fDecomposed, TPZSBMatrix< TVar >::fDiag, TPZMatrix< TVar >::fRow, and TPZVec< T >::resize().
Referenced by TPZSBMatrix< TVar >::operator=(), TPZSBMatrix< TVar >::Size(), and TPZSBMatrix< TVar >::~TPZSBMatrix().
|
private |
Definition at line 1288 of file pzsbndmat.cpp.
References TPZVec< T >::begin(), TPZMatrix< TVar >::Cols(), TPZMatrix< TVar >::Dim(), TPZMatrix< TVar >::Error(), TPZSBMatrix< TVar >::fBand, TPZMatrix< TVar >::fCol, TPZSBMatrix< TVar >::fDiag, TPZMatrix< TVar >::fRow, TPZVec< T >::Resize(), and TPZMatrix< TVar >::Rows().
Referenced by TPZSBMatrix< TVar >::operator=(), TPZSBMatrix< TVar >::Size(), and TPZSBMatrix< TVar >::TPZSBMatrix().
|
inline |
copy the values from a matrix with a different precision
Definition at line 54 of file pzsbndmat.h.
References TPZSBMatrix< TVar >::AutoFill(), TPZMatrix< TVar >::CopyFrom(), EFormatted, TPZSBMatrix< TVar >::fDiag, TPZSBMatrix< TVar >::MultAdd(), TPZSBMatrix< TVar >::operator*(), TPZSBMatrix< TVar >::operator*=(), TPZSBMatrix< TVar >::operator+(), TPZSBMatrix< TVar >::operator+=(), TPZSBMatrix< TVar >::operator-(), TPZSBMatrix< TVar >::operator-=(), TPZSBMatrix< TVar >::operator=(), TPZSBMatrix< TVar >::Print(), TPZVec< T >::resize(), and TPZVec< T >::size().
|
overridevirtual |
Decomposes the current matrix using LDLt.
The current matrix has to be symmetric. "L" is lower triangular with 1.0 in its diagonal and "D" is a Diagonal matrix.
Reimplemented from TPZMatrix< TVar >.
Definition at line 765 of file pzsbndmat.cpp.
References TPZSBMatrix< TVar >::Decompose_LDLt().
|
overridevirtual |
Decomposes the current matrix using LDLt.
Reimplemented from TPZMatrix< TVar >.
Definition at line 772 of file pzsbndmat.cpp.
References TPZMatrix< TVar >::Cols(), TPZMatrix< TVar >::Dim(), TPZMatrix< TVar >::Error(), TPZSBMatrix< TVar >::fBand, TPZMatrix< TVar >::fDecomposed, TPZMatrix< TVar >::fDefPositive, TPZSBMatrix< TVar >::fDiag, TPZSBMatrix< TVar >::GetVal(), IsZero(), MAX, MIN, TPZSBMatrix< TVar >::PutVal(), TPZMatrix< TVar >::Rows(), TPZSBMatrix< TVar >::Subst_Backward(), TPZSBMatrix< TVar >::Subst_Forward(), TPZSBMatrix< TVar >::Subst_LBackward(), and TPZSBMatrix< TVar >::Subst_LForward().
Referenced by TPZSBMatrix< TVar >::Decompose_LDLt(), and TPZSBMatrix< TVar >::GetBand().
|
inline |
Definition at line 100 of file pzsbndmat.h.
References TPZSBMatrix< TVar >::ClassId(), TPZMatrix< TVar >::Decompose_Cholesky(), TPZSBMatrix< TVar >::Decompose_LDLt(), TPZSBMatrix< TVar >::fBand, TPZSBMatrix< TVar >::SetBand(), TPZSBMatrix< TVar >::Subst_Backward(), TPZSBMatrix< TVar >::Subst_Diag(), TPZSBMatrix< TVar >::Subst_Forward(), TPZSBMatrix< TVar >::Subst_LBackward(), and TPZSBMatrix< TVar >::Subst_LForward().
|
overridevirtual |
Get values without bounds checking
This method is faster than "Get" if DEBUG is defined.
Reimplemented from TPZMatrix< TVar >.
Definition at line 244 of file pzsbndmat.cpp.
References TPZSBMatrix< TVar >::fBand, TPZSBMatrix< TVar >::fDiag, TPZMatrix< TVar >::gZero, TPZSBMatrix< TVar >::Index(), and TPZMatrix< TVar >::Swap().
Referenced by TPZSBMatrix< TVar >::AutoFill(), TPZSBMatrix< TVar >::Decompose_LDLt(), TPZSBMatrix< TVar >::MultAdd(), TPZSBMatrix< TVar >::Subst_Diag(), TPZSBMatrix< TVar >::Subst_LBackward(), TPZSBMatrix< TVar >::Subst_LForward(), and TPZSBMatrix< TVar >::~TPZSBMatrix().
|
virtual |
Get values without bounds checking
This method is faster than "Get" if DEBUG is defined.
Reimplemented from TPZMatrix< TVar >.
Definition at line 189 of file pzsbndmat.cpp.
References TPZSBMatrix< TVar >::fBand, TPZSBMatrix< TVar >::fDiag, TPZMatrix< TVar >::gZero, TPZSBMatrix< TVar >::Index(), and TPZMatrix< TVar >::Swap().
|
virtual |
Get values without bounds checking
This method is faster than "Get" if DEBUG is defined.
Reimplemented from TPZMatrix< TVar >.
Definition at line 217 of file pzsbndmat.cpp.
References TPZSBMatrix< TVar >::fBand, TPZSBMatrix< TVar >::fDiag, TPZMatrix< TVar >::gZero, TPZSBMatrix< TVar >::Index(), and TPZMatrix< TVar >::Swap().
|
inlineprivate |
Definition at line 164 of file pzsbndmat.h.
References DebugStop, and TPZSBMatrix< TVar >::fBand.
Referenced by TPZSBMatrix< TVar >::GetVal(), TPZSBMatrix< TVar >::operator()(), and TPZSBMatrix< TVar >::PutVal().
|
inlineoverridevirtual |
Checks if the current matrix is symmetric.
Reimplemented from TPZMatrix< TVar >.
Definition at line 44 of file pzsbndmat.h.
|
overridevirtual |
Computes z = beta * y + alpha * opt(this)*x.
z and x cannot overlap in memory
Reimplemented from TPZMatrix< TVar >.
Definition at line 460 of file pzsbndmat.cpp.
References TPZMatrix< TVar >::Cols(), TPZMatrix< TVar >::Error(), TPZSBMatrix< TVar >::fBand, TPZSBMatrix< TVar >::GetVal(), TPZFMatrix< TVar >::GetVal(), MAX, MIN, TPZMatrix< TVar >::PrepareZ(), TPZFMatrix< TVar >::PutVal(), TPZMatrix< TVar >::Rows(), and val().
Referenced by TPZSBMatrix< TVar >::CopyFrom().
TVar & TPZSBMatrix< TVar >::operator() | ( | int64_t | row, |
int64_t | col | ||
) |
Definition at line 311 of file pzsbndmat.cpp.
References TPZSBMatrix< TVar >::fBand, TPZSBMatrix< TVar >::fDiag, TPZMatrix< TVar >::gZero, TPZSBMatrix< TVar >::Index(), and TPZMatrix< TVar >::Swap().
Referenced by TPZSBMatrix< TVar >::~TPZSBMatrix().
std::complex< float > & TPZSBMatrix< std::complex< float > >::operator() | ( | const int64_t | r, |
const int64_t | c | ||
) |
Definition at line 261 of file pzsbndmat.cpp.
References TPZSBMatrix< TVar >::fBand, TPZSBMatrix< TVar >::fDiag, TPZMatrix< TVar >::gZero, TPZSBMatrix< TVar >::Index(), and TPZMatrix< TVar >::Swap().
std::complex< double > & TPZSBMatrix< std::complex< double > >::operator() | ( | const int64_t | r, |
const int64_t | c | ||
) |
Definition at line 286 of file pzsbndmat.cpp.
References TPZSBMatrix< TVar >::fBand, TPZSBMatrix< TVar >::fDiag, TPZMatrix< TVar >::gZero, TPZSBMatrix< TVar >::Index(), and TPZMatrix< TVar >::Swap().
TPZSBMatrix< TVar > TPZSBMatrix< TVar >::operator* | ( | const TVar | v | ) | const |
Definition at line 510 of file pzsbndmat.cpp.
References TPZSBMatrix< TVar >::fDiag, test::res, and TPZVec< T >::size().
Referenced by TPZSBMatrix< TVar >::CopyFrom(), and TPZSBMatrix< TVar >::operator-().
TPZSBMatrix< TVar > & TPZSBMatrix< TVar >::operator*= | ( | const TVar | v | ) |
Definition at line 530 of file pzsbndmat.cpp.
References TPZSBMatrix< TVar >::fDiag, and TPZVec< T >::size().
Referenced by TPZSBMatrix< TVar >::CopyFrom().
TPZSBMatrix< TVar > TPZSBMatrix< TVar >::operator+ | ( | const TPZSBMatrix< TVar > & | A | ) | const |
Definition at line 392 of file pzsbndmat.cpp.
References TPZMatrix< TVar >::Dim(), and TPZSBMatrix< TVar >::fBand.
Referenced by TPZSBMatrix< TVar >::CopyFrom().
TPZSBMatrix< TVar > & TPZSBMatrix< TVar >::operator+= | ( | const TPZSBMatrix< TVar > & | A | ) |
Definition at line 427 of file pzsbndmat.cpp.
References TPZMatrix< TVar >::Dim(), TPZMatrix< TVar >::Error(), TPZSBMatrix< TVar >::fBand, TPZSBMatrix< TVar >::fDiag, and TPZVec< T >::size().
Referenced by TPZSBMatrix< TVar >::CopyFrom().
TPZSBMatrix< TVar > TPZSBMatrix< TVar >::operator- | ( | const TPZSBMatrix< TVar > & | A | ) | const |
Definition at line 409 of file pzsbndmat.cpp.
References TPZMatrix< TVar >::Dim(), TPZMatrix< TVar >::Error(), TPZSBMatrix< TVar >::fBand, and test::res.
|
inline |
Definition at line 88 of file pzsbndmat.h.
References TPZSBMatrix< TVar >::operator*(), and TPZSBMatrix< TVar >::Resize().
Referenced by TPZSBMatrix< TVar >::CopyFrom().
TPZSBMatrix< TVar > & TPZSBMatrix< TVar >::operator-= | ( | const TPZSBMatrix< TVar > & | A | ) |
Definition at line 445 of file pzsbndmat.cpp.
References TPZMatrix< TVar >::Dim(), TPZMatrix< TVar >::Error(), TPZSBMatrix< TVar >::fBand, TPZSBMatrix< TVar >::fDiag, and TPZVec< T >::size().
Referenced by TPZSBMatrix< TVar >::CopyFrom().
TPZSBMatrix< TVar > & TPZSBMatrix< TVar >::operator= | ( | const TPZSBMatrix< TVar > & | A | ) |
Operadores com matrizes SKY LINE.
Definition at line 380 of file pzsbndmat.cpp.
References TPZSBMatrix< TVar >::Clear(), and TPZSBMatrix< TVar >::Copy().
Referenced by TPZSBMatrix< TVar >::CopyFrom().
|
overridevirtual |
It prints the matrix data in a MatrixFormat Rows X Cols.
Reimplemented from TPZMatrix< TVar >.
Definition at line 330 of file pzsbndmat.cpp.
References TPZMatrix< TVar >::Cols(), TPZSBMatrix< TVar >::fBand, TPZMatrix< TVar >::Print(), and TPZMatrix< TVar >::Rows().
Referenced by TPZSBMatrix< TVar >::CopyFrom().
|
overridevirtual |
Put values without bounds checking
This method is faster than "Put" if DEBUG is defined.
Reimplemented from TPZMatrix< TVar >.
Definition at line 163 of file pzsbndmat.cpp.
References DebugStop, TPZSBMatrix< TVar >::fBand, TPZMatrix< TVar >::fDecomposed, TPZSBMatrix< TVar >::fDiag, TPZMatrix< TVar >::gZero, TPZSBMatrix< TVar >::Index(), and TPZMatrix< TVar >::Swap().
Referenced by TPZSBMatrix< TVar >::AutoFill(), TPZSBMatrix< TVar >::Decompose_LDLt(), TPZMatrixMarket::Read(), and TPZSBMatrix< TVar >::~TPZSBMatrix().
int TPZSBMatrix< std::complex< float > >::PutVal | ( | const int64_t | r, |
const int64_t | c, | ||
const std::complex< float > & | value | ||
) |
Definition at line 116 of file pzsbndmat.cpp.
References DebugStop, TPZSBMatrix< TVar >::fBand, TPZMatrix< TVar >::fDecomposed, TPZSBMatrix< TVar >::fDiag, TPZMatrix< TVar >::gZero, and TPZSBMatrix< TVar >::Index().
int TPZSBMatrix< std::complex< double > >::PutVal | ( | const int64_t | r, |
const int64_t | c, | ||
const std::complex< double > & | value | ||
) |
Definition at line 140 of file pzsbndmat.cpp.
References DebugStop, TPZSBMatrix< TVar >::fBand, TPZMatrix< TVar >::fDecomposed, TPZSBMatrix< TVar >::fDiag, TPZMatrix< TVar >::gZero, TPZSBMatrix< TVar >::Index(), and TPZMatrix< TVar >::Swap().
|
inline |
Redimension the matrix and zeroes its elements.
Definition at line 94 of file pzsbndmat.h.
References TPZSBMatrix< TVar >::Redim(), and TPZSBMatrix< TVar >::Zero().
Referenced by TPZMatrixMarket::Read(), TPZSBMatrix< TVar >::Redim(), and TPZSBMatrix< TVar >::Resize().
|
overridevirtual |
Redimensions the matrix reinitializing it with zero.
newRows | Specifies the new number of rows in matrix. |
newCols | Specifies the new number of Columns in matrix. |
Reimplemented from TPZMatrix< TVar >.
Definition at line 564 of file pzsbndmat.cpp.
References DebugStop, TPZMatrix< TVar >::Dim(), TPZSBMatrix< TVar >::fBand, TPZMatrix< TVar >::fDecomposed, TPZMatrix< TVar >::fDefPositive, TPZSBMatrix< TVar >::fDiag, TPZMatrix< TVar >::Redim(), TPZVec< T >::resize(), TPZSBMatrix< TVar >::Size(), and TPZSBMatrix< TVar >::Zero().
|
overridevirtual |
Redimension the matrix keeping original elements.
Reimplemented from TPZMatrix< TVar >.
Definition at line 548 of file pzsbndmat.cpp.
References TPZMatrix< TVar >::Dim(), and TPZSBMatrix< TVar >::Redim().
Referenced by TPZSBMatrix< TVar >::AutoFill(), and TPZSBMatrix< TVar >::operator-().
int TPZSBMatrix< TVar >::SetBand | ( | const int64_t | newBand | ) |
Definition at line 605 of file pzsbndmat.cpp.
References TPZVec< T >::begin(), DebugStop, TPZMatrix< TVar >::Decompose_Cholesky(), TPZMatrix< TVar >::Dim(), ECholesky, ENoDecompose, TPZMatrix< TVar >::Error(), TPZSBMatrix< TVar >::fBand, TPZMatrix< TVar >::fDecomposed, TPZMatrix< TVar >::fDefPositive, TPZSBMatrix< TVar >::fDiag, TPZVec< T >::resize(), TPZSBMatrix< TVar >::Size(), and TPZSBMatrix< TVar >::Zero().
Referenced by TPZSBMatrix< TVar >::GetBand(), and TPZMatrixMarket::Read().
|
inlineprivate |
Definition at line 155 of file pzsbndmat.h.
References TPZSBMatrix< TVar >::Clear(), TPZSBMatrix< TVar >::Copy(), TPZMatrix< TVar >::Dim(), and TPZSBMatrix< TVar >::fBand.
Referenced by TPZSBMatrix< TVar >::Redim(), TPZSBMatrix< TVar >::SetBand(), and TPZSBMatrix< TVar >::TPZSBMatrix().
|
overridevirtual |
Computes B = Y, where A*Y = B, A is upper triangular.
b | right hand side and result after all |
Reimplemented from TPZMatrix< TVar >.
Definition at line 1231 of file pzsbndmat.cpp.
References TPZMatrix< TVar >::Dim(), TPZMatrix< TVar >::Error(), TPZMatrix< TVar >::fDecomposed, TPZMatrix< TVar >::Rows(), and TPZMatrix< TVar >::Subst_Backward().
Referenced by TPZSBMatrix< TVar >::Decompose_LDLt(), and TPZSBMatrix< TVar >::GetBand().
|
overridevirtual |
Computes B = Y, where A*Y = B, A is diagonal matrix.
b | right hand side and result after all |
Reimplemented from TPZMatrix< TVar >.
Definition at line 1215 of file pzsbndmat.cpp.
References TPZMatrix< TVar >::Cols(), TPZMatrix< TVar >::Dim(), TPZMatrix< TVar >::Error(), TPZSBMatrix< TVar >::fBand, TPZMatrix< TVar >::fDecomposed, TPZSBMatrix< TVar >::GetVal(), TPZFMatrix< TVar >::GetVal(), TPZFMatrix< TVar >::PutVal(), and TPZMatrix< TVar >::Rows().
Referenced by TPZSBMatrix< TVar >::GetBand().
|
overridevirtual |
To solve linear systems.
Reimplemented from TPZMatrix< TVar >.
Definition at line 1163 of file pzsbndmat.cpp.
References TPZMatrix< TVar >::Dim(), TPZMatrix< TVar >::Error(), TPZMatrix< TVar >::fDecomposed, TPZMatrix< TVar >::Rows(), and TPZMatrix< TVar >::Subst_Forward().
Referenced by TPZSBMatrix< TVar >::Decompose_LDLt(), and TPZSBMatrix< TVar >::GetBand().
|
overridevirtual |
Computes B = Y, where A*Y = B, A is upper triangular with A(i,i)=1.
b | right hand side and result after all |
Reimplemented from TPZMatrix< TVar >.
Definition at line 1242 of file pzsbndmat.cpp.
References TPZMatrix< TVar >::Cols(), TPZMatrix< TVar >::Dim(), TPZMatrix< TVar >::Error(), TPZSBMatrix< TVar >::fBand, TPZMatrix< TVar >::fDecomposed, TPZSBMatrix< TVar >::GetVal(), TPZFMatrix< TVar >::GetVal(), and TPZMatrix< TVar >::Rows().
Referenced by TPZSBMatrix< TVar >::Decompose_LDLt(), and TPZSBMatrix< TVar >::GetBand().
|
overridevirtual |
Computes B = Y, where A*Y = B, A is lower triangular with A(i,i)=1.
b | right hand side and result after all |
Reimplemented from TPZMatrix< TVar >.
Definition at line 1178 of file pzsbndmat.cpp.
References TPZMatrix< TVar >::Cols(), TPZMatrix< TVar >::Dim(), TPZMatrix< TVar >::Error(), TPZSBMatrix< TVar >::fBand, TPZMatrix< TVar >::fDecomposed, TPZSBMatrix< TVar >::GetVal(), TPZFMatrix< TVar >::GetVal(), TPZFMatrix< TVar >::PutVal(), and TPZMatrix< TVar >::Rows().
Referenced by TPZSBMatrix< TVar >::Decompose_LDLt(), and TPZSBMatrix< TVar >::GetBand().
|
overridevirtual |
Zeroes the elements of the matrix.
Reimplemented from TPZMatrix< TVar >.
Definition at line 587 of file pzsbndmat.cpp.
References TPZMatrix< TVar >::fDecomposed, TPZMatrix< TVar >::fDefPositive, TPZSBMatrix< TVar >::fDiag, and TPZVec< T >::size().
Referenced by TPZSBMatrix< TVar >::Redim(), TPZSBMatrix< TVar >::SetBand(), and TPZSBMatrix< TVar >::TPZSBMatrix().
|
friend |
|
friend |
Definition at line 50 of file pzsbndmat.h.
|
friend |
Definition at line 49 of file pzsbndmat.h.
|
private |
Definition at line 174 of file pzsbndmat.h.
Referenced by TPZSBMatrix< TVar >::AutoFill(), TPZSBMatrix< TVar >::Copy(), TPZSBMatrix< TVar >::Decompose_LDLt(), TPZSBMatrix< TVar >::GetBand(), TPZSBMatrix< TVar >::GetVal(), TPZSBMatrix< TVar >::Index(), TPZSBMatrix< TVar >::MultAdd(), TPZSBMatrix< TVar >::operator()(), TPZSBMatrix< TVar >::operator+(), TPZSBMatrix< TVar >::operator+=(), TPZSBMatrix< TVar >::operator-(), TPZSBMatrix< TVar >::operator-=(), TPZSBMatrix< TVar >::Print(), TPZSBMatrix< TVar >::PutVal(), TPZSBMatrix< TVar >::Redim(), TPZSBMatrix< TVar >::SetBand(), TPZSBMatrix< TVar >::Size(), TPZSBMatrix< TVar >::Subst_Diag(), TPZSBMatrix< TVar >::Subst_LBackward(), TPZSBMatrix< TVar >::Subst_LForward(), and TPZSBMatrix< TVar >::TPZSBMatrix().
|
private |
Definition at line 173 of file pzsbndmat.h.
Referenced by TPZSBMatrix< TVar >::Clear(), TPZSBMatrix< TVar >::Copy(), TPZSBMatrix< TVar >::CopyFrom(), TPZSBMatrix< TVar >::Decompose_LDLt(), TPZSBMatrix< TVar >::GetVal(), TPZSBMatrix< TVar >::operator()(), TPZSBMatrix< TVar >::operator*(), TPZSBMatrix< TVar >::operator*=(), TPZSBMatrix< TVar >::operator+=(), TPZSBMatrix< TVar >::operator-=(), TPZSBMatrix< TVar >::PutVal(), TPZSBMatrix< TVar >::Redim(), TPZSBMatrix< TVar >::SetBand(), TPZSBMatrix< TVar >::TPZSBMatrix(), and TPZSBMatrix< TVar >::Zero().