NeoPZ
|
Implements a skyline storage format. More...
#include <pzskylnsymmat.h>
Public Member Functions | |
TPZSkylNSymMatrix () | |
TPZSkylNSymMatrix (const int64_t nrow, const int64_t ncol) | |
TPZSkylNSymMatrix (const int64_t dim, const TPZVec< int64_t > &skyline) | |
TPZSkylNSymMatrix (const TPZSkylNSymMatrix &A) | |
void | SetSkyline (const TPZVec< int64_t > &skyline) |
int | SkyHeight (int64_t col) |
virtual int | IsSimetric () const override |
virtual | ~TPZSkylNSymMatrix () |
int | PutVal (const int64_t row, const int64_t col, const TVar &element) override |
const TVar & | GetVal (const int64_t row, const int64_t col) const override |
const TVar & | GetValSup (const int64_t row, const int64_t col) const |
Pega o valor na diagonal ou parte de cima da diagonal. More... | |
const TVar & | GetValB (const int64_t row, const int64_t col) const |
Pega o valor abaixo da diagonal (below) More... | |
TVar & | operator() (const int64_t row, const int64_t col) |
virtual TVar & | s (const int64_t row, const int64_t col) override |
The operators check on the bounds if the DEBUG variable is defined. More... | |
TVar & | operator() (const int64_t row) |
virtual void | MultAdd (const TPZFMatrix< TVar > &x, const TPZFMatrix< TVar > &y, TPZFMatrix< TVar > &z, const TVar alpha, const TVar beta, const int opt=0) const override |
It computes z = beta * y + alpha * opt(this)*x but z and x can not overlap in memory. More... | |
virtual void | UpdateFrom (TPZAutoPointer< TPZMatrix< TVar > > mat) override |
Updates the values of the matrix based on the values of the matrix. More... | |
int | Decompose_LU () override |
int | Subst_Backward (TPZFMatrix< TVar > *b) const override |
int | Subst_LForward (TPZFMatrix< TVar > *b) const override |
int | ClassId () const override |
Return the id of the matrix defined pzmatrixid.h. 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... | |
void | AutoFill (int64_t nrow, int64_t ncol, int symmetric) |
Fill matrix storage with randomic values. 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... | |
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... | |
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_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 | Decompose_LDLt (std::list< int64_t > &singular) |
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... | |
virtual int | Decompose_LDLt () |
Decomposes the current matrix using LDLt. More... | |
virtual int | Substitution (TPZFMatrix< TVar > *B) const |
Computes Forward and Backward substitution for a "LU" decomposed matrix. More... | |
virtual int | Subst_Forward (TPZFMatrix< TVar > *b) const |
Computes B = Y, where A*Y = B, A is lower triangular. More... | |
virtual int | Subst_LBackward (TPZFMatrix< TVar > *b) const |
Computes B = Y, where A*Y = B, A is upper triangular with A(i,i)=1. More... | |
virtual int | Subst_Diag (TPZFMatrix< TVar > *b) const |
Computes B = Y, where A*Y = B, A is diagonal matrix. More... | |
virtual void | Input (std::istream &in=std::cin) |
Input operation. More... | |
virtual void | Print (std::ostream &out) const |
virtual void | Print (const char *name, std::ostream &out=std::cout, const MatrixOutputFormat form=EFormatted) const |
It prints the matrix data in a MatrixFormat Rows X Cols. More... | |
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 int | Resize (const int64_t newRows, const int64_t newCols) |
Redimensions a matriz keeping the previous values. More... | |
virtual int | Redim (const int64_t newRows, const int64_t newCols) |
Redimensions the matrix reinitializing it with zero. 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 | |
Protected Member Functions | |
TVar * | Diag (int64_t col) |
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... | |
Protected Attributes | |
TPZVec< TVar * > | fElem |
TPZVec< TVar * > | fElemb |
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... | |
Private Member Functions | |
int | Clear () override |
void | Copy (const TPZSkylNSymMatrix &) |
int | Size (const int64_t column) const |
virtual int | Zero () override |
Zeroes the matrix. More... | |
Static Private Member Functions | |
static int64_t | NumElements (const TPZVec< int64_t > &skyline) |
static void | InitializeElem (const TPZVec< int64_t > &skyline, TPZManVector< TVar > &storage, TPZVec< TVar *> &elem) |
static void | ComputeMaxSkyline (const TPZSkylNSymMatrix &first, const TPZSkylNSymMatrix &second, TPZVec< int > &res) |
Private Attributes | |
TPZManVector< TVar > | fStorage |
TPZManVector< TVar > | fStorageb |
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) |
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... | |
Static Protected Attributes inherited from TPZMatrix< TVar > | |
static TVar | gZero |
Initializing value to static variable. More... | |
Implements a skyline storage format.
Definition at line 33 of file pzskylnsymmat.h.
|
inline |
Definition at line 36 of file pzskylnsymmat.h.
TPZSkylNSymMatrix< TVar >::TPZSkylNSymMatrix | ( | const int64_t | row, |
const int64_t | col | ||
) |
Definition at line 61 of file pzskylnsymmat.cpp.
References DebugStop, TPZSkylNSymMatrix< TVar >::fElem, TPZSkylNSymMatrix< TVar >::fElemb, and TPZVec< T >::Fill().
TPZSkylNSymMatrix< TVar >::TPZSkylNSymMatrix | ( | const int64_t | dim, |
const TPZVec< int64_t > & | skyline | ||
) |
Construct a skyline matrix of dimension dim skyline indicates the minimum row number which will be accessed by each equation
Definition at line 75 of file pzskylnsymmat.cpp.
References TPZSkylNSymMatrix< TVar >::fElem, TPZSkylNSymMatrix< TVar >::fElemb, TPZVec< T >::Fill(), TPZSkylNSymMatrix< TVar >::fStorage, TPZSkylNSymMatrix< TVar >::fStorageb, and TPZSkylNSymMatrix< TVar >::InitializeElem().
|
inline |
Definition at line 46 of file pzskylnsymmat.h.
References CLONEDEF, TPZSkylNSymMatrix< TVar >::Copy(), and TPZSkylNSymMatrix< TVar >::SetSkyline().
|
inlinevirtual |
Definition at line 72 of file pzskylnsymmat.h.
References TPZSkylNSymMatrix< TVar >::AutoFill(), TPZSkylNSymMatrix< TVar >::ClassId(), TPZSkylNSymMatrix< TVar >::Clear(), TPZSkylNSymMatrix< TVar >::Decompose_LU(), TPZSkylNSymMatrix< TVar >::GetVal(), TPZSkylNSymMatrix< TVar >::GetValB(), TPZSkylNSymMatrix< TVar >::GetValSup(), TPZSkylNSymMatrix< TVar >::MultAdd(), TPZSkylNSymMatrix< TVar >::operator()(), TPZSkylNSymMatrix< TVar >::PutVal(), TPZSkylNSymMatrix< TVar >::Read(), TPZSkylNSymMatrix< TVar >::s(), TPZSkylNSymMatrix< TVar >::Subst_Backward(), TPZSkylNSymMatrix< TVar >::Subst_LForward(), TPZSkylNSymMatrix< TVar >::UpdateFrom(), and TPZSkylNSymMatrix< TVar >::Write().
void TPZSkylNSymMatrix< TVar >::AutoFill | ( | int64_t | nrow, |
int64_t | ncol, | ||
int | symmetric | ||
) |
Fill matrix storage with randomic values.
This method use GetVal and PutVal which are implemented by each type matrices
Fill the matrix with random values (non singular matrix)
Fill data
Making diagonally dominant and non zero in diagonal
Definition at line 1567 of file pzskylnsymmat.cpp.
References DebugStop, TPZMatrix< TVar >::Error(), fabs, TPZSkylNSymMatrix< TVar >::GetVal(), IsZero(), TPZSkylNSymMatrix< TVar >::PutVal(), TPZMatrix< TVar >::Resize(), TPZMatrix< TVar >::Rows(), TPZSkylNSymMatrix< TVar >::SetSkyline(), and val().
Referenced by TPZSkylNSymMatrix< TVar >::~TPZSkylNSymMatrix().
|
overridevirtual |
Return the id of the matrix defined pzmatrixid.h.
Reimplemented from TPZMatrix< TVar >.
Definition at line 249 of file pzskylnsymmat.h.
References TPZMatrix< TVar >::ClassId(), and Hash().
Referenced by TPZSkylNSymMatrix< TVar >::~TPZSkylNSymMatrix().
|
overrideprivatevirtual |
Reimplemented from TPZMatrix< TVar >.
Definition at line 1204 of file pzskylnsymmat.cpp.
References TPZMatrix< TVar >::fCol, TPZMatrix< TVar >::fDecomposed, TPZSkylNSymMatrix< TVar >::fElem, TPZSkylNSymMatrix< TVar >::fElemb, TPZMatrix< TVar >::fRow, TPZSkylNSymMatrix< TVar >::fStorage, TPZSkylNSymMatrix< TVar >::fStorageb, TPZManVector< T, NumExtAlloc >::Resize(), TPZVec< T >::Resize(), and TPZManVector< T, NumExtAlloc >::Shrink().
Referenced by TPZSkylNSymMatrix< TVar >::Diag(), and TPZSkylNSymMatrix< TVar >::~TPZSkylNSymMatrix().
|
staticprivate |
Computes the highest skyline of both objects
Definition at line 164 of file pzskylnsymmat.cpp.
References TPZVec< T >::Resize(), TPZMatrix< TVar >::Rows(), and TPZSkylNSymMatrix< TVar >::Size().
Referenced by TPZSkylNSymMatrix< TVar >::Size().
|
private |
Definition at line 1221 of file pzskylnsymmat.cpp.
References TPZMatrix< TVar >::Dim(), dimension, TPZMatrix< TVar >::fCol, TPZMatrix< TVar >::fDecomposed, TPZMatrix< TVar >::fDefPositive, TPZSkylNSymMatrix< TVar >::fElem, TPZSkylNSymMatrix< TVar >::fElemb, TPZMatrix< TVar >::fRow, TPZSkylNSymMatrix< TVar >::fStorage, TPZSkylNSymMatrix< TVar >::fStorageb, TPZVec< T >::NElements(), and TPZVec< T >::Resize().
Referenced by TPZSkylNSymMatrix< TVar >::Diag(), and TPZSkylNSymMatrix< TVar >::TPZSkylNSymMatrix().
|
overridevirtual |
****** Operacoes com matrizes SKY LINE ******* *************** * Operator = ** *************** * Operator + ** *************** * Operator - ** **************** * Operator += ** **************** * Operator -= ** ****** Operacoes com valores NUMERICOS ******* ************************** * Operator * ( REAL ) ** *************************** * Operator *= ( REAL ) ** *********** * Resize ** ********** * Redim ** ****************** * LU Decomposition **
Reimplemented from TPZMatrix< TVar >.
Definition at line 868 of file pzskylnsymmat.cpp.
References TPZMatrix< TVar >::Dim(), dimension, ELU, TPZMatrix< TVar >::Error(), fabs, TPZMatrix< TVar >::fDecomposed, TPZMatrix< TVar >::fDefPositive, TPZSkylNSymMatrix< TVar >::fElem, TPZSkylNSymMatrix< TVar >::fElemb, PZError, and TPZSkylNSymMatrix< TVar >::Size().
Referenced by TPZSkylNSymMatrix< TVar >::~TPZSkylNSymMatrix().
|
inlineprotected |
This method returns a pointer to the diagonal element of the matrix of the col column
Definition at line 174 of file pzskylnsymmat.h.
References TPZSkylNSymMatrix< TVar >::Clear(), TPZSkylNSymMatrix< TVar >::Copy(), and TPZSkylNSymMatrix< TVar >::fElem.
|
overridevirtual |
Reimplemented from TPZMatrix< TVar >.
Definition at line 500 of file pzskylnsymmat.cpp.
References DebugStop, TPZMatrix< TVar >::Dim(), TPZSkylNSymMatrix< TVar >::fElem, TPZSkylNSymMatrix< TVar >::fElemb, TPZMatrix< TVar >::gZero, and TPZSkylNSymMatrix< TVar >::Size().
Referenced by TPZSkylNSymMatrix< TVar >::AutoFill(), and TPZSkylNSymMatrix< TVar >::~TPZSkylNSymMatrix().
const TVar & TPZSkylNSymMatrix< TVar >::GetValB | ( | const int64_t | row, |
const int64_t | col | ||
) | const |
Pega o valor abaixo da diagonal (below)
Definition at line 580 of file pzskylnsymmat.cpp.
References DebugStop, TPZMatrix< TVar >::Dim(), TPZSkylNSymMatrix< TVar >::fElem, TPZMatrix< TVar >::gZero, and TPZSkylNSymMatrix< TVar >::Size().
Referenced by TPZSkylNSymMatrix< TVar >::~TPZSkylNSymMatrix().
const TVar & TPZSkylNSymMatrix< TVar >::GetValSup | ( | const int64_t | row, |
const int64_t | col | ||
) | const |
Pega o valor na diagonal ou parte de cima da diagonal.
Definition at line 559 of file pzskylnsymmat.cpp.
References DebugStop, TPZMatrix< TVar >::Dim(), TPZSkylNSymMatrix< TVar >::fElem, TPZMatrix< TVar >::gZero, and TPZSkylNSymMatrix< TVar >::Size().
Referenced by TPZSkylNSymMatrix< TVar >::~TPZSkylNSymMatrix().
|
staticprivate |
Definition at line 138 of file pzskylnsymmat.cpp.
References TPZVec< T >::Fill(), TPZVec< T >::NElements(), TPZSkylNSymMatrix< TVar >::NumElements(), TPZManVector< T, NumExtAlloc >::Resize(), and TPZVec< T >::Resize().
Referenced by TPZSkylNSymMatrix< TVar >::SetSkyline(), TPZSkylNSymMatrix< TVar >::Size(), and TPZSkylNSymMatrix< TVar >::TPZSkylNSymMatrix().
|
inlineoverridevirtual |
Add a skyline matrix B with same structure of this It makes this += k * Bdeclare the object as non-symmetric matrix
Reimplemented from TPZMatrix< TVar >.
Definition at line 70 of file pzskylnsymmat.h.
|
overridevirtual |
It computes z = beta * y + alpha * opt(this)*x but z and x can not overlap in memory.
x | Is x on the above operation |
y | Is y on the above operation |
z | Is z on the above operation |
alpha | Is alpha on the above operation |
beta | Is beta on the above operation |
opt | Indicates if is Transpose or not |
Reimplemented from TPZMatrix< TVar >.
Definition at line 272 of file pzskylnsymmat.cpp.
References TPZMatrix< TVar >::Cols(), TPZMatrix< TVar >::Error(), TPZSkylNSymMatrix< TVar >::fElem, TPZSkylNSymMatrix< TVar >::fElemb, TPZFMatrix< TVar >::g(), TPZMatrix< TVar >::PrepareZ(), TPZFMatrix< TVar >::Redim(), TPZMatrix< TVar >::Rows(), TPZSkylNSymMatrix< TVar >::Size(), and val().
Referenced by TPZSkylNSymMatrix< TVar >::~TPZSkylNSymMatrix().
|
staticprivate |
Definition at line 128 of file pzskylnsymmat.cpp.
References TPZVec< T >::NElements().
Referenced by TPZSkylNSymMatrix< TVar >::InitializeElem(), and TPZSkylNSymMatrix< TVar >::Size().
TVar & TPZSkylNSymMatrix< TVar >::operator() | ( | const int64_t | row, |
const int64_t | col | ||
) |
Definition at line 185 of file pzskylnsymmat.cpp.
References DebugStop, TPZMatrix< TVar >::Error(), TPZSkylNSymMatrix< TVar >::fElem, TPZSkylNSymMatrix< TVar >::fElemb, and TPZSkylNSymMatrix< TVar >::Size().
Referenced by TPZSkylNSymMatrix< TVar >::operator()(), TPZSkylNSymMatrix< TVar >::s(), and TPZSkylNSymMatrix< TVar >::~TPZSkylNSymMatrix().
TVar & TPZSkylNSymMatrix< TVar >::operator() | ( | const int64_t | row | ) |
Definition at line 221 of file pzskylnsymmat.cpp.
References TPZSkylNSymMatrix< TVar >::operator()().
|
overridevirtual |
Reimplemented from TPZMatrix< TVar >.
Definition at line 229 of file pzskylnsymmat.cpp.
References TPZMatrix< TVar >::Error(), TPZMatrix< TVar >::fDecomposed, TPZSkylNSymMatrix< TVar >::fElem, TPZSkylNSymMatrix< TVar >::fElemb, IsZero(), and TPZSkylNSymMatrix< TVar >::Size().
Referenced by TPZSkylNSymMatrix< TVar >::AutoFill(), and TPZSkylNSymMatrix< TVar >::~TPZSkylNSymMatrix().
|
overridevirtual |
Unpacks the object structure from a stream of bytes.
buf | The buffer containing the object in a packed form |
context |
Reimplemented from TPZMatrix< TVar >.
Definition at line 1524 of file pzskylnsymmat.cpp.
References TPZSkylNSymMatrix< TVar >::fElem, TPZSkylNSymMatrix< TVar >::fElemb, TPZSkylNSymMatrix< TVar >::fStorage, TPZSkylNSymMatrix< TVar >::fStorageb, TPZStream::Read(), TPZMatrix< TVar >::Read(), TPZVec< T >::Resize(), and TPZMatrix< TVar >::Rows().
Referenced by TPZSkylNSymMatrix< TVar >::~TPZSkylNSymMatrix().
|
overridevirtual |
The operators check on the bounds if the DEBUG variable is defined.
row | Row number. |
col | Column number. |
Reimplemented from TPZMatrix< TVar >.
Definition at line 215 of file pzskylnsymmat.cpp.
References TPZSkylNSymMatrix< TVar >::operator()().
Referenced by TPZSkylNSymMatrix< TVar >::~TPZSkylNSymMatrix().
void TPZSkylNSymMatrix< TVar >::SetSkyline | ( | const TPZVec< int64_t > & | skyline | ) |
modify the skyline of the matrix, throwing away its values skyline indicates the minimum row number which will be accessed by each equation
Definition at line 119 of file pzskylnsymmat.cpp.
References TPZSkylNSymMatrix< TVar >::fElem, TPZSkylNSymMatrix< TVar >::fElemb, TPZVec< T >::Fill(), TPZSkylNSymMatrix< TVar >::fStorage, TPZSkylNSymMatrix< TVar >::fStorageb, and TPZSkylNSymMatrix< TVar >::InitializeElem().
Referenced by TPZSkylNSymMatrix< TVar >::AutoFill(), and TPZSkylNSymMatrix< TVar >::TPZSkylNSymMatrix().
|
inlineprivate |
Definition at line 187 of file pzskylnsymmat.h.
References TPZSkylNSymMatrix< TVar >::ComputeMaxSkyline(), TPZSkylNSymMatrix< TVar >::fElem, substruct_tst15.test::first, TPZSkylNSymMatrix< TVar >::InitializeElem(), TPZSkylNSymMatrix< TVar >::NumElements(), and test::res.
Referenced by TPZSkylNSymMatrix< TVar >::ComputeMaxSkyline(), TPZSkylNSymMatrix< TVar >::Decompose_LU(), TPZSkylNSymMatrix< TVar >::GetVal(), TPZSkylNSymMatrix< TVar >::GetValB(), TPZSkylNSymMatrix< TVar >::GetValSup(), TPZSkylNSymMatrix< TVar >::MultAdd(), TPZSkylNSymMatrix< TVar >::operator()(), and TPZSkylNSymMatrix< TVar >::PutVal().
|
inline |
return the height of the skyline for a given column
Definition at line 62 of file pzskylnsymmat.h.
References TPZSkylNSymMatrix< TVar >::fElem.
|
overridevirtual |
Reimplemented from TPZMatrix< TVar >.
Definition at line 1027 of file pzskylnsymmat.cpp.
References TPZMatrix< TVar >::Cols(), TPZMatrix< TVar >::Dim(), ELU, TPZMatrix< TVar >::Error(), TPZMatrix< TVar >::fDecomposed, TPZSkylNSymMatrix< TVar >::fElem, TPZMatrix< TVar >::Rows(), and val().
Referenced by TPZSkylNSymMatrix< TVar >::~TPZSkylNSymMatrix().
|
overridevirtual |
Reimplemented from TPZMatrix< TVar >.
Definition at line 1078 of file pzskylnsymmat.cpp.
References TPZMatrix< TVar >::Cols(), TPZMatrix< TVar >::Dim(), dimension, ELDLt, ELU, TPZMatrix< TVar >::fDecomposed, TPZSkylNSymMatrix< TVar >::fElemb, and TPZMatrix< TVar >::Rows().
Referenced by TPZSkylNSymMatrix< TVar >::~TPZSkylNSymMatrix().
|
overridevirtual |
Updates the values of the matrix based on the values of the matrix.
Reimplemented from TPZMatrix< TVar >.
Definition at line 347 of file pzskylnsymmat.cpp.
References DebugStop, TPZMatrix< TVar >::fDecomposed, TPZMatrix< TVar >::fDefPositive, TPZSkylNSymMatrix< TVar >::fStorage, TPZSkylNSymMatrix< TVar >::fStorageb, matrix, and TPZVec< T >::NElements().
Referenced by TPZSkylNSymMatrix< TVar >::~TPZSkylNSymMatrix().
|
overridevirtual |
Packs the object structure in a stream of bytes.
buf | Buffer which will receive the bytes |
withclassid |
Reimplemented from TPZMatrix< TVar >.
Definition at line 1546 of file pzskylnsymmat.cpp.
References TPZSkylNSymMatrix< TVar >::fElem, TPZSkylNSymMatrix< TVar >::fElemb, TPZSkylNSymMatrix< TVar >::fStorage, TPZSkylNSymMatrix< TVar >::fStorageb, TPZMatrix< TVar >::Rows(), TPZStream::Write(), and TPZMatrix< TVar >::Write().
Referenced by TPZSkylNSymMatrix< TVar >::~TPZSkylNSymMatrix().
|
inlineoverrideprivatevirtual |
Zeroes the matrix.
Reimplemented from TPZMatrix< TVar >.
Definition at line 196 of file pzskylnsymmat.h.
References TPZVec< T >::Fill(), TPZSkylNSymMatrix< TVar >::fStorage, and TPZSkylNSymMatrix< TVar >::fStorageb.
|
protected |
fElem is of size number of equation+1 fElem[i] is the first element of the skyline of equation i fElem[Rows()] is one element beyond the last equation
Definition at line 209 of file pzskylnsymmat.h.
Referenced by TPZSkylNSymMatrix< TVar >::Clear(), TPZSkylNSymMatrix< TVar >::Copy(), TPZSkylNSymMatrix< TVar >::Decompose_LU(), TPZSkylNSymMatrix< TVar >::Diag(), TPZSkylNSymMatrix< TVar >::GetVal(), TPZSkylNSymMatrix< TVar >::GetValB(), TPZSkylNSymMatrix< TVar >::GetValSup(), TPZSkylNSymMatrix< TVar >::MultAdd(), TPZSkylNSymMatrix< TVar >::operator()(), TPZSkylNSymMatrix< TVar >::PutVal(), TPZSkylNSymMatrix< TVar >::Read(), TPZSkylNSymMatrix< TVar >::SetSkyline(), TPZSkylNSymMatrix< TVar >::Size(), TPZSkylNSymMatrix< TVar >::SkyHeight(), TPZSkylNSymMatrix< TVar >::Subst_Backward(), TPZSkylNSymMatrix< TVar >::TPZSkylNSymMatrix(), and TPZSkylNSymMatrix< TVar >::Write().
|
protected |
fElemb storages skyline Below diagonal fElemb is of size number of equation+1 fElemb[i] is the first element of the skyline of equation i fElemb[Rows()] is one element beyond the last equation
Definition at line 217 of file pzskylnsymmat.h.
Referenced by TPZSkylNSymMatrix< TVar >::Clear(), TPZSkylNSymMatrix< TVar >::Copy(), TPZSkylNSymMatrix< TVar >::Decompose_LU(), TPZSkylNSymMatrix< TVar >::GetVal(), TPZSkylNSymMatrix< TVar >::MultAdd(), TPZSkylNSymMatrix< TVar >::operator()(), TPZSkylNSymMatrix< TVar >::PutVal(), TPZSkylNSymMatrix< TVar >::Read(), TPZSkylNSymMatrix< TVar >::SetSkyline(), TPZSkylNSymMatrix< TVar >::Subst_LForward(), TPZSkylNSymMatrix< TVar >::TPZSkylNSymMatrix(), and TPZSkylNSymMatrix< TVar >::Write().
|
private |
fStorage is a unique vector which contains all the data of the skyline matrix
Definition at line 223 of file pzskylnsymmat.h.
Referenced by TPZSkylNSymMatrix< TVar >::Clear(), TPZSkylNSymMatrix< TVar >::Copy(), TPZSkylNSymMatrix< TVar >::Read(), TPZSkylNSymMatrix< TVar >::SetSkyline(), TPZSkylNSymMatrix< TVar >::TPZSkylNSymMatrix(), TPZSkylNSymMatrix< TVar >::UpdateFrom(), TPZSkylNSymMatrix< TVar >::Write(), and TPZSkylNSymMatrix< TVar >::Zero().
|
private |
fStorage is a unique vector which contains all the data of the skyline matrix below diagonal
Definition at line 228 of file pzskylnsymmat.h.
Referenced by TPZSkylNSymMatrix< TVar >::Clear(), TPZSkylNSymMatrix< TVar >::Copy(), TPZSkylNSymMatrix< TVar >::Read(), TPZSkylNSymMatrix< TVar >::SetSkyline(), TPZSkylNSymMatrix< TVar >::TPZSkylNSymMatrix(), TPZSkylNSymMatrix< TVar >::UpdateFrom(), TPZSkylNSymMatrix< TVar >::Write(), and TPZSkylNSymMatrix< TVar >::Zero().