NeoPZ
|
Implements a skyline storage format. A Skyline matrix is symmetric so square. Matrix. More...
#include <pzskylmat.h>
Public Member Functions | |
TPZSkylMatrix () | |
TPZSkylMatrix (const int64_t dim) | |
TPZSkylMatrix (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. More... | |
TPZSkylMatrix (const TPZSkylMatrix< TVar > &A) | |
virtual int64_t | MemoryFootprint () const override |
Returns the approximate size of the memory footprint (amount of memory required to store this object). More... | |
void | 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 More... | |
int64_t | SkyHeight (int64_t col) |
return the height of the skyline for a given column More... | |
void | AddSameStruct (TPZSkylMatrix< TVar > &B, double k=1.) |
Add a skyline matrix B with same structure of this It makes this += k * B. More... | |
virtual int | IsSimetric () const override |
declare the object as simetric matrix More... | |
virtual | ~TPZSkylMatrix () |
destructor of the skyline matrix More... | |
virtual void | UpdateFrom (TPZAutoPointer< TPZMatrix< TVar > > mat) override |
Updates the values of the matrix based on the values of the matrix. More... | |
template<class TVar2 > | |
void | CopyFrom (TPZSkylMatrix< TVar2 > &orig) |
copy the values from a matrix with a different precision More... | |
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() (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... | |
TPZSkylMatrix & | operator= (const TPZSkylMatrix< TVar > &A) |
TPZSkylMatrix | operator+ (const TPZSkylMatrix< TVar > &A) const |
TPZSkylMatrix | operator- (const TPZSkylMatrix< TVar > &A) const |
TPZSkylMatrix & | operator+= (const TPZSkylMatrix< TVar > &A) |
TPZSkylMatrix & | operator-= (const TPZSkylMatrix< TVar > &A) |
TPZSkylMatrix | operator* (const TVar v) const |
TPZSkylMatrix & | operator*= (TVar value) |
TPZSkylMatrix | operator- () const |
int | Resize (const int64_t newDim, const int64_t) override |
Redimensions a matriz keeping the previous values. More... | |
int | Redim (const int64_t newDim, const int64_t) override |
Redimensions the matrix reinitializing it with zero. More... | |
int | Redim (const int64_t newDim) |
int | Zero () override |
Zeroes the matrix. More... | |
void | AddKel (TPZFMatrix< TVar > &elmat, TPZVec< int64_t > &sourceindex, TPZVec< int64_t > &destinationindex) override |
Add a contribution of a stiffness matrix. More... | |
virtual void | AutoFill (int64_t nrow, int64_t ncol, int symmetric) |
int | ClassId () const override |
Define the class id associated with the class. 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 std::string | ClassName () const |
int64_t | Size (const int64_t column) const |
int64_t | GetNelemts () |
template<> | |
void | AddKel (TPZFMatrix< double > &elmat, TPZVec< int64_t > &source, TPZVec< int64_t > &destination) |
template<> | |
void | AddKel (TPZFMatrix< float > &elmat, TPZVec< int64_t > &source, TPZVec< int64_t > &destination) |
template<> | |
int | Decompose_Cholesky (std::list< int64_t > &singular) |
Decomposes the current matrix using Cholesky method. More... | |
template<> | |
int | Decompose_Cholesky (std::list< int64_t > &singular) |
Decomposes the current matrix using Cholesky method. More... | |
template<> | |
int | Decompose_Cholesky (std::list< int64_t > &singular) |
Decomposes the current matrix using Cholesky method. More... | |
template<> | |
int | Decompose_Cholesky () |
Decomposes the current matrix using Cholesky method. The current matrix has to be symmetric. More... | |
template<> | |
int | Decompose_Cholesky () |
Decomposes the current matrix using Cholesky method. The current matrix has to be symmetric. More... | |
template<> | |
int | Decompose_Cholesky () |
Decomposes the current matrix using Cholesky method. The current matrix has to be symmetric. More... | |
template<> | |
int | Decompose_Cholesky_blk (int64_t blk_sz) |
template<> | |
int | Decompose_Cholesky_blk (int64_t blk_sz) |
template<> | |
int | Decompose_Cholesky_blk (int64_t blk_sz) |
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) override |
Solves the linear system using Successive Over Relaxation method (Gauss Seidel). . More... | |
int | Decompose_Cholesky () override |
Decomposes the current matrix using Cholesky method. The current matrix has to be symmetric. More... | |
int | Decompose_Cholesky_blk (int64_t blk_sz) |
int | Decompose_LDLt () override |
Decomposes the current matrix using LDLt. More... | |
int | Decompose_Cholesky (std::list< int64_t > &singular) override |
Decomposes the current matrix using Cholesky method. 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 | Subst_Forward (TPZFMatrix< TVar > *b) const override |
Computes B = Y, where A*Y = B, A is lower triangular. More... | |
int | Subst_Backward (TPZFMatrix< TVar > *b) const override |
Computes B = Y, where A*Y = B, A is upper triangular. 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 |
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... | |
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_LU () |
virtual int | Substitution (TPZFMatrix< TVar > *B) const |
Computes Forward and Backward substitution for a "LU" decomposed 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 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 | 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) |
This method returns a pointer to the diagonal element of the matrix of the col column. More... | |
void | DecomposeColumn (int64_t col, int64_t prevcol) |
void | DecomposeColumn (int64_t col, int64_t prevcol, std::list< int64_t > &singular) |
void | DecomposeColumn2 (int64_t col, int64_t prevcol) |
template<> | |
void | DecomposeColumn (int64_t col, int64_t prevcol, std::list< int64_t > &singular) |
template<> | |
void | DecomposeColumn (int64_t col, int64_t prevcol, std::list< int64_t > &singular) |
template<> | |
void | DecomposeColumn (int64_t col, int64_t prevcol, std::list< int64_t > &singular) |
template<> | |
void | DecomposeColumn2 (int64_t col, int64_t prevcol) |
template<> | |
void | DecomposeColumn2 (int64_t col, int64_t prevcol) |
template<> | |
void | DecomposeColumn2 (int64_t col, int64_t prevcol) |
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 |
Storage to keep the first elements to each equation. 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... | |
Private Member Functions | |
int | Clear () override |
It clears data structure. More... | |
void | Copy (const TPZSkylMatrix< TVar > &) |
void | MigratePages () |
void | ReallocForNuma () |
Static Private Member Functions | |
static int64_t | NumElements (const TPZVec< int64_t > &skyline) |
static void | InitializeElem (const TPZVec< int64_t > &skyline, TPZVec< TVar > &storage, TPZVec< TVar *> &elem) |
static void | ComputeMaxSkyline (const TPZSkylMatrix< TVar > &first, const TPZSkylMatrix< TVar > &second, TPZVec< int64_t > &res) |
Computes the highest skyline of both objects. More... | |
Private Attributes | |
TPZVec< TVar > | fStorage |
fStorage is a unique vector which contains all the data of the skyline matrix More... | |
Friends | |
class | TPZSkylMatrix< float > |
class | TPZSkylMatrix< double > |
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. A Skyline matrix is symmetric so square. Matrix.
Definition at line 394 of file pzskylmat.h.
|
inline |
Definition at line 397 of file pzskylmat.h.
TPZSkylMatrix< TVar >::TPZSkylMatrix | ( | const int64_t | dim | ) |
Definition at line 1729 of file pzskylmat.cpp.
References TPZSkylMatrix< TVar >::fElem, and TPZVec< T >::Fill().
TPZSkylMatrix< TVar >::TPZSkylMatrix | ( | 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 1737 of file pzskylmat.cpp.
References TPZSkylMatrix< TVar >::fElem, TPZVec< T >::Fill(), TPZSkylMatrix< TVar >::fStorage, and TPZSkylMatrix< TVar >::InitializeElem().
|
inline |
Definition at line 404 of file pzskylmat.h.
References CLONEDEF, and TPZSkylMatrix< TVar >::Copy().
|
inlinevirtual |
destructor of the skyline matrix
Definition at line 433 of file pzskylmat.h.
References TPZSkylMatrix< TVar >::Clear(), and TPZSkylMatrix< TVar >::UpdateFrom().
|
overridevirtual |
Add a contribution of a stiffness matrix.
elmat | Element matrix to be contributed |
sourceindex | Contains source indexes on current matrix |
destinationindex | Contains destine indexes on current matrix |
Reimplemented from TPZMatrix< TVar >.
Definition at line 2259 of file pzskylmat.cpp.
References DebugStop, TPZMatrix< TVar >::Dim(), TPZSkylMatrix< TVar >::fElem, TPZVec< T >::NElements(), TPZSkylMatrix< TVar >::Size(), and TPZMatrix< TVar >::Swap().
Referenced by TPZSkylMatrix< TVar >::Redim().
void TPZSkylMatrix< double >::AddKel | ( | TPZFMatrix< double > & | elmat, |
TPZVec< int64_t > & | source, | ||
TPZVec< int64_t > & | destination | ||
) |
Definition at line 2300 of file pzskylmat.cpp.
References DebugStop, TPZMatrix< TVar >::Dim(), TPZSkylMatrix< TVar >::fElem, TPZVec< T >::NElements(), TPZSkylMatrix< TVar >::Size(), and TPZMatrix< TVar >::Swap().
void TPZSkylMatrix< float >::AddKel | ( | TPZFMatrix< float > & | elmat, |
TPZVec< int64_t > & | source, | ||
TPZVec< int64_t > & | destination | ||
) |
Definition at line 2345 of file pzskylmat.cpp.
References DebugStop, TPZMatrix< TVar >::Dim(), TPZSkylMatrix< TVar >::fElem, TPZVec< T >::NElements(), TPZSkylMatrix< TVar >::Size(), and TPZMatrix< TVar >::Swap().
void TPZSkylMatrix< TVar >::AddSameStruct | ( | TPZSkylMatrix< TVar > & | B, |
double | k = 1. |
||
) |
Add a skyline matrix B with same structure of this It makes this += k * B.
Definition at line 1747 of file pzskylmat.cpp.
References DebugStop, TPZSkylMatrix< TVar >::fElem, TPZSkylMatrix< TVar >::fStorage, TPZVec< T >::NElements(), and PZError.
Referenced by TPZSkylMatrix< TVar >::SkyHeight().
|
virtual |
Definition at line 3474 of file pzskylmat.cpp.
References DebugStop, fabs, TPZSkylMatrix< TVar >::fElem, TPZVec< T >::Fill(), TPZSkylMatrix< TVar >::fStorage, clarg::argT< T >::get_value(), TPZSkylMatrix< TVar >::GetVal(), TPZSkylMatrix< TVar >::InitializeElem(), m, TPZBFileStream::OpenWrite(), TPZSkylMatrix< TVar >::PutVal(), PZ_PTHREAD_MUTEX_LOCK, PZ_PTHREAD_MUTEX_UNLOCK, TPZMatrix< TVar >::Redim(), TPZVec< T >::resize(), val(), clarg::arg_base::was_set(), and TPZMatrix< TVar >::Write().
Referenced by TPZSkylMatrix< TVar >::Redim().
|
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 >.
Reimplemented in TPZSkylParMatrix< TVar >.
Definition at line 629 of file pzskylmat.h.
References TPZMatrix< TVar >::ClassId(), and Hash().
Referenced by TPZSkylParMatrix< TVar >::ClassId(), and TPZSkylMatrix< TVar >::Redim().
|
inlinevirtual |
Definition at line 555 of file pzskylmat.h.
|
overrideprivatevirtual |
It clears data structure.
Reimplemented from TPZMatrix< TVar >.
Definition at line 3234 of file pzskylmat.cpp.
References TPZMatrix< TVar >::fCol, TPZMatrix< TVar >::fDecomposed, TPZSkylMatrix< TVar >::fElem, TPZSkylMatrix< TVar >::fStorage, and TPZVec< T >::Resize().
Referenced by TPZSkylMatrix< TVar >::Diag(), TPZSkylMatrix< TVar >::operator=(), TPZSkylMatrix< TVar >::Redim(), and TPZSkylMatrix< TVar >::~TPZSkylMatrix().
|
staticprivate |
Computes the highest skyline of both objects.
Computes the highest skyline of both objects
Definition at line 1838 of file pzskylmat.cpp.
References TPZVec< T >::Resize(), TPZMatrix< TVar >::Rows(), and TPZSkylMatrix< TVar >::Size().
Referenced by TPZSkylMatrix< TVar >::Diag(), TPZSkylMatrix< TVar >::operator+(), and TPZSkylMatrix< TVar >::operator-().
|
private |
Definition at line 3249 of file pzskylmat.cpp.
References TPZMatrix< TVar >::Dim(), dimension, TPZMatrix< TVar >::fCol, TPZMatrix< TVar >::fDecomposed, TPZMatrix< TVar >::fDefPositive, TPZSkylMatrix< TVar >::fElem, TPZSkylMatrix< TVar >::fStorage, TPZVec< T >::NElements(), and TPZVec< T >::Resize().
Referenced by TPZSkylMatrix< TVar >::Diag(), TPZSkylMatrix< TVar >::operator=(), and TPZSkylMatrix< TVar >::TPZSkylMatrix().
|
inline |
copy the values from a matrix with a different precision
Definition at line 445 of file pzskylmat.h.
References TPZMatrix< TVar >::CopyFrom(), TPZSkylMatrix< TVar >::fElem, TPZSkylMatrix< TVar >::fStorage, TPZSkylMatrix< TVar >::GetVal(), TPZSkylMatrix< TVar >::MultAdd(), TPZSkylMatrix< TVar >::operator()(), TPZSkylMatrix< TVar >::operator*(), TPZSkylMatrix< TVar >::operator*=(), TPZSkylMatrix< TVar >::operator+(), TPZSkylMatrix< TVar >::operator+=(), TPZSkylMatrix< TVar >::operator-(), TPZSkylMatrix< TVar >::operator-=(), TPZSkylMatrix< TVar >::operator=(), TPZSkylMatrix< TVar >::PutVal(), TPZSkylMatrix< TVar >::Redim(), TPZVec< T >::resize(), TPZSkylMatrix< TVar >::Resize(), TPZSkylMatrix< TVar >::s(), and TPZVec< T >::size().
|
overridevirtual |
Decomposes the current matrix using Cholesky method. The current matrix has to be symmetric.
Reimplemented from TPZMatrix< TVar >.
Reimplemented in TPZSkylParMatrix< TVar >.
Definition at line 2668 of file pzskylmat.cpp.
References TPZMatrix< TVar >::Dim(), dimension, ECholesky, TPZMatrix< TVar >::Error(), TPZMatrix< TVar >::fDecomposed, TPZMatrix< TVar >::fDefPositive, TPZSkylMatrix< TVar >::fElem, IsZero(), TPZSkylMatrix< TVar >::MigratePages(), PZError, TPZSkylMatrix< TVar >::ReallocForNuma(), TPZSkylMatrix< TVar >::Size(), sqrt, tmp, and clarg::arg_base::was_set().
Referenced by main(), and TPZSkylMatrix< TVar >::Redim().
|
overridevirtual |
Decomposes the current matrix using Cholesky method.
singular |
Reimplemented from TPZMatrix< TVar >.
Reimplemented in TPZSkylParMatrix< TVar >.
Definition at line 2557 of file pzskylmat.cpp.
References TPZMatrix< TVar >::Dim(), dimension, ECholesky, TPZMatrix< TVar >::Error(), fabs, TPZMatrix< TVar >::fDecomposed, TPZMatrix< TVar >::fDefPositive, TPZSkylMatrix< TVar >::fElem, TPZSkylMatrix< TVar >::GetVal(), TPZSkylMatrix< TVar >::PutVal(), TPZMatrix< TVar >::Rows(), TPZSkylMatrix< TVar >::Size(), sqrt, tmp, and ZeroTolerance().
|
virtual |
Decomposes the current matrix using Cholesky method.
singular |
Reimplemented from TPZMatrix< TVar >.
Definition at line 2534 of file pzskylmat.cpp.
References DebugStop.
|
virtual |
Decomposes the current matrix using Cholesky method.
singular |
Reimplemented from TPZMatrix< TVar >.
Definition at line 2541 of file pzskylmat.cpp.
References DebugStop.
|
virtual |
Decomposes the current matrix using Cholesky method.
singular |
Reimplemented from TPZMatrix< TVar >.
Definition at line 2548 of file pzskylmat.cpp.
References DebugStop.
|
virtual |
Decomposes the current matrix using Cholesky method. The current matrix has to be symmetric.
Reimplemented from TPZMatrix< TVar >.
Definition at line 2645 of file pzskylmat.cpp.
References DebugStop.
|
virtual |
Decomposes the current matrix using Cholesky method. The current matrix has to be symmetric.
Reimplemented from TPZMatrix< TVar >.
Definition at line 2651 of file pzskylmat.cpp.
References DebugStop.
|
virtual |
Decomposes the current matrix using Cholesky method. The current matrix has to be symmetric.
Reimplemented from TPZMatrix< TVar >.
Definition at line 2657 of file pzskylmat.cpp.
int TPZSkylMatrix< TVar >::Decompose_Cholesky_blk | ( | int64_t | blk_sz | ) |
Definition at line 2811 of file pzskylmat.cpp.
References TPZMatrix< TVar >::Dim(), dimension, ECholesky, TPZMatrix< TVar >::Error(), TPZMatrix< TVar >::fDecomposed, TPZMatrix< TVar >::fDefPositive, TPZSkylMatrix< TVar >::fElem, IsZero(), MAX, MIN, TPZSkylMatrix< TVar >::Size(), sqrt, and tmp.
Referenced by TPZSkylMatrix< TVar >::Redim().
int TPZSkylMatrix< std::complex< float > >::Decompose_Cholesky_blk | ( | int64_t | blk_sz | ) |
Definition at line 2790 of file pzskylmat.cpp.
References DebugStop.
int TPZSkylMatrix< std::complex< double > >::Decompose_Cholesky_blk | ( | int64_t | blk_sz | ) |
Definition at line 2796 of file pzskylmat.cpp.
References DebugStop.
int TPZSkylMatrix< std::complex< long double > >::Decompose_Cholesky_blk | ( | int64_t | blk_sz | ) |
Definition at line 2802 of file pzskylmat.cpp.
References DebugStop.
|
overridevirtual |
Decomposes the current matrix using LDLt.
Reimplemented from TPZMatrix< TVar >.
Reimplemented in TPZSkylParMatrix< TVar >.
Definition at line 2952 of file pzskylmat.cpp.
References TPZMatrix< TVar >::Dim(), dimension, ELDLt, TPZMatrix< TVar >::Error(), TPZMatrix< TVar >::fDecomposed, TPZMatrix< TVar >::fDefPositive, TPZSkylMatrix< TVar >::fElem, IsZero(), LOGPZ_DEBUG, and TPZSkylMatrix< TVar >::Size().
Referenced by main(), TPZSkylParMatrix< TVar >::main_nada(), and TPZSkylMatrix< TVar >::Redim().
|
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 >.
Reimplemented in TPZSkylParMatrix< TVar >.
Definition at line 2893 of file pzskylmat.cpp.
References TPZMatrix< TVar >::Dim(), ELDLt, TPZMatrix< TVar >::Error(), TPZMatrix< TVar >::fDecomposed, TPZMatrix< TVar >::fDefPositive, TPZSkylMatrix< TVar >::fElem, TPZSkylMatrix< TVar >::GetVal(), IsZero(), TPZSkylMatrix< TVar >::PutVal(), TPZMatrix< TVar >::Rows(), and TPZSkylMatrix< TVar >::Size().
|
protected |
Definition at line 3304 of file pzskylmat.cpp.
References TPZSkylMatrix< TVar >::Diag(), TPZSkylMatrix< TVar >::SkyHeight(), and sqrt.
Referenced by TPZSkylMatrix< TVar >::Diag(), and TPZSkylParMatrix< TVar >::ParallelCholesky().
|
protected |
Definition at line 3357 of file pzskylmat.cpp.
References TPZSkylMatrix< TVar >::Diag(), fabs, LOGPZ_WARN, TPZSkylMatrix< TVar >::SkyHeight(), and sqrt.
|
protected |
Definition at line 3341 of file pzskylmat.cpp.
References DebugStop.
|
protected |
Definition at line 3346 of file pzskylmat.cpp.
References DebugStop.
|
protected |
Definition at line 3351 of file pzskylmat.cpp.
References DebugStop.
|
protected |
Definition at line 3424 of file pzskylmat.cpp.
References TPZSkylMatrix< TVar >::Diag(), fabs, TPZSkylMatrix< TVar >::SkyHeight(), and sqrt.
Referenced by TPZSkylMatrix< TVar >::Diag().
|
protected |
Definition at line 3406 of file pzskylmat.cpp.
References DebugStop.
|
protected |
Definition at line 3411 of file pzskylmat.cpp.
References DebugStop.
|
protected |
Definition at line 3417 of file pzskylmat.cpp.
References DebugStop.
|
inlineprotected |
This method returns a pointer to the diagonal element of the matrix of the col column.
Definition at line 577 of file pzskylmat.h.
References TPZSkylMatrix< TVar >::Clear(), TPZSkylMatrix< TVar >::ComputeMaxSkyline(), TPZSkylMatrix< TVar >::Copy(), TPZSkylMatrix< TVar >::DecomposeColumn(), TPZSkylMatrix< TVar >::DecomposeColumn2(), TPZSkylMatrix< TVar >::fElem, TPZSkylMatrix< TVar >::InitializeElem(), TPZSkylMatrix< TVar >::NumElements(), and test::res.
Referenced by TPZSkylMatrix< TVar >::DecomposeColumn(), TPZSkylMatrix< TVar >::DecomposeColumn2(), TPZSkylParMatrix< TVar >::DecomposeColumnCholesky(), TPZSkylParMatrix< TVar >::DecomposeColumnLDLt(), and TPZSkylParMatrix< TVar >::DecomposeColumnLDLt2().
|
inline |
Definition at line 568 of file pzskylmat.h.
References TPZSkylMatrix< TVar >::fStorage, and TPZVec< T >::size().
|
overridevirtual |
Get values without bounds checking
This method is faster than "Get" if DEBUG is defined.
Reimplemented from TPZMatrix< TVar >.
Definition at line 2130 of file pzskylmat.cpp.
References DebugStop, TPZMatrix< TVar >::Dim(), TPZSkylMatrix< TVar >::fElem, TPZMatrix< TVar >::gZero, TPZSkylMatrix< TVar >::Size(), and TPZMatrix< TVar >::Swap().
Referenced by TPZSkylMatrix< TVar >::AutoFill(), TPZSkylMatrix< TVar >::CopyFrom(), CopyTo(), TPZSkylMatrix< TVar >::Decompose_Cholesky(), TPZSkylMatrix< TVar >::Decompose_LDLt(), and TPZSkylMatrix< TVar >::SolveSOR().
|
staticprivate |
Definition at line 1814 of file pzskylmat.cpp.
References TPZVec< T >::Fill(), TPZVec< T >::NElements(), TPZSkylMatrix< TVar >::NumElements(), and TPZVec< T >::Resize().
Referenced by TPZSkylMatrix< TVar >::AutoFill(), TPZSkylMatrix< TVar >::Diag(), TPZSkylMatrix< TVar >::SetSkyline(), and TPZSkylMatrix< TVar >::TPZSkylMatrix().
|
inlineoverridevirtual |
declare the object as simetric matrix
Reimplemented from TPZMatrix< TVar >.
Definition at line 430 of file pzskylmat.h.
|
inlineoverridevirtual |
Returns the approximate size of the memory footprint (amount of memory required to store this object).
Reimplemented from TPZMatrix< TVar >.
Definition at line 408 of file pzskylmat.h.
References TPZSkylMatrix< TVar >::fElem, TPZSkylMatrix< TVar >::fStorage, TPZSkylMatrix< TVar >::SetSkyline(), and TPZVec< T >::size().
Referenced by wayToSort().
|
inlineprivate |
Definition at line 598 of file pzskylmat.h.
References TPZSkylMatrix< TVar >::fElem, TPZSkylMatrix< TVar >::fStorage, and TPZVec< T >::MigratePages().
Referenced by TPZSkylMatrix< TVar >::Decompose_Cholesky().
|
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 1944 of file pzskylmat.cpp.
References TPZMatrix< TVar >::Cols(), ENoDecompose, TPZMatrix< TVar >::Error(), TPZMatrix< TVar >::fDecomposed, TPZSkylMatrix< TVar >::fElem, TPZFMatrix< TVar >::g(), TPZMatrix< TVar >::PrepareZ(), TPZFMatrix< TVar >::Redim(), TPZMatrix< TVar >::Rows(), TPZSkylMatrix< TVar >::Size(), and val().
Referenced by TPZSkylMatrix< TVar >::CopyFrom(), and main().
|
staticprivate |
Definition at line 1803 of file pzskylmat.cpp.
References TPZVec< T >::NElements().
Referenced by TPZSkylMatrix< TVar >::Diag(), and TPZSkylMatrix< TVar >::InitializeElem().
TVar & TPZSkylMatrix< TVar >::operator() | ( | const int64_t | row, |
const int64_t | col | ||
) |
Definition at line 1856 of file pzskylmat.cpp.
References DebugStop, TPZMatrix< TVar >::Error(), TPZSkylMatrix< TVar >::fElem, TPZSkylMatrix< TVar >::Size(), and TPZMatrix< TVar >::Swap().
Referenced by TPZSkylMatrix< TVar >::CopyFrom(), TPZSkylMatrix< TVar >::operator()(), and TPZSkylMatrix< TVar >::s().
TVar & TPZSkylMatrix< TVar >::operator() | ( | const int64_t | row | ) |
Definition at line 1877 of file pzskylmat.cpp.
References TPZSkylMatrix< TVar >::operator()().
TPZSkylMatrix< TVar > TPZSkylMatrix< TVar >::operator* | ( | const TVar | v | ) | const |
Definition at line 2431 of file pzskylmat.cpp.
References TPZMatrix< TVar >::Dim(), TPZSkylMatrix< TVar >::fElem, test::res, and TPZSkylMatrix< TVar >::Size().
Referenced by TPZSkylMatrix< TVar >::CopyFrom(), and TPZSkylMatrix< TVar >::operator-().
TPZSkylMatrix< TVar > & TPZSkylMatrix< TVar >::operator*= | ( | TVar | value | ) |
Definition at line 2457 of file pzskylmat.cpp.
References TPZMatrix< TVar >::Dim(), TPZMatrix< TVar >::fDecomposed, TPZSkylMatrix< TVar >::fElem, IsZero(), and TPZSkylMatrix< TVar >::Zero().
Referenced by TPZSkylMatrix< TVar >::CopyFrom().
TPZSkylMatrix< TVar > TPZSkylMatrix< TVar >::operator+ | ( | const TPZSkylMatrix< TVar > & | A | ) | const |
Definition at line 2176 of file pzskylmat.cpp.
References TPZSkylMatrix< TVar >::ComputeMaxSkyline(), TPZMatrix< TVar >::Dim(), TPZSkylMatrix< TVar >::fElem, test::res, and TPZSkylMatrix< TVar >::Size().
Referenced by TPZSkylMatrix< TVar >::CopyFrom().
TPZSkylMatrix< TVar > & TPZSkylMatrix< TVar >::operator+= | ( | const TPZSkylMatrix< TVar > & | A | ) |
Definition at line 2391 of file pzskylmat.cpp.
References TPZMatrix< TVar >::Dim(), and test::res.
Referenced by TPZSkylMatrix< TVar >::CopyFrom().
TPZSkylMatrix< TVar > TPZSkylMatrix< TVar >::operator- | ( | const TPZSkylMatrix< TVar > & | A | ) | const |
Definition at line 2228 of file pzskylmat.cpp.
References TPZSkylMatrix< TVar >::ComputeMaxSkyline(), TPZMatrix< TVar >::Dim(), TPZSkylMatrix< TVar >::fElem, TPZMatrix< TVar >::fRow, test::res, and TPZSkylMatrix< TVar >::Size().
TPZSkylMatrix< TVar > TPZSkylMatrix< TVar >::operator- | ( | ) | const |
Definition at line 3267 of file pzskylmat.cpp.
References TPZSkylMatrix< TVar >::operator*().
Referenced by TPZSkylMatrix< TVar >::CopyFrom().
TPZSkylMatrix< TVar > & TPZSkylMatrix< TVar >::operator-= | ( | const TPZSkylMatrix< TVar > & | A | ) |
Definition at line 2406 of file pzskylmat.cpp.
References TPZMatrix< TVar >::Dim(), and test::res.
Referenced by TPZSkylMatrix< TVar >::CopyFrom().
TPZSkylMatrix< TVar > & TPZSkylMatrix< TVar >::operator= | ( | const TPZSkylMatrix< TVar > & | A | ) |
Definition at line 2164 of file pzskylmat.cpp.
References TPZSkylMatrix< TVar >::Clear(), and TPZSkylMatrix< TVar >::Copy().
Referenced by TPZSkylMatrix< 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 1920 of file pzskylmat.cpp.
References TPZMatrix< TVar >::Error(), TPZMatrix< TVar >::fDecomposed, TPZSkylMatrix< TVar >::fElem, IsZero(), TPZSkylMatrix< TVar >::Size(), and TPZMatrix< TVar >::Swap().
Referenced by TPZSkylMatrix< TVar >::AutoFill(), TPZSkylMatrix< TVar >::CopyFrom(), CopyTo(), TPZSkylMatrix< TVar >::Decompose_Cholesky(), TPZSkylMatrix< TVar >::Decompose_LDLt(), and TPZMatrixMarket::Read().
|
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 3270 of file pzskylmat.cpp.
References TPZSkylMatrix< TVar >::fElem, TPZSkylMatrix< TVar >::fStorage, TPZStream::Read(), TPZMatrix< TVar >::Read(), TPZVec< T >::Resize(), and TPZMatrix< TVar >::Rows().
Referenced by main(), read_input_matrix(), TPZSkylMatrix< TVar >::Redim(), and res_check().
|
inlineprivate |
Definition at line 603 of file pzskylmat.h.
References TPZSkylMatrix< TVar >::fElem, TPZSkylMatrix< TVar >::fStorage, TPZVec< T >::ReallocForNuma(), and TPZVec< T >::size().
Referenced by TPZSkylMatrix< TVar >::Decompose_Cholesky().
|
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 2516 of file pzskylmat.cpp.
References TPZSkylMatrix< TVar >::Clear(), TPZMatrix< TVar >::Dim(), TPZMatrix< TVar >::fCol, TPZMatrix< TVar >::fDecomposed, TPZSkylMatrix< TVar >::fElem, TPZVec< T >::Fill(), TPZVec< T >::Resize(), and TPZSkylMatrix< TVar >::Zero().
Referenced by TPZSkylMatrix< TVar >::CopyFrom(), CopyTo(), and TPZMatrixMarket::Read().
|
inline |
Definition at line 499 of file pzskylmat.h.
References TPZSkylMatrix< TVar >::AddKel(), TPZSkylMatrix< TVar >::AutoFill(), TPZSkylMatrix< TVar >::ClassId(), TPZSkylMatrix< TVar >::Decompose_Cholesky(), TPZSkylMatrix< TVar >::Decompose_Cholesky_blk(), TPZSkylMatrix< TVar >::Decompose_LDLt(), TPZSkylMatrix< TVar >::Read(), TPZSkylMatrix< TVar >::Redim(), TPZSkylMatrix< TVar >::SolveSOR(), TPZSkylMatrix< TVar >::Subst_Backward(), TPZSkylMatrix< TVar >::Subst_Diag(), TPZSkylMatrix< TVar >::Subst_Forward(), TPZSkylMatrix< TVar >::Subst_LBackward(), TPZSkylMatrix< TVar >::Subst_LForward(), pzgeom::tol, TPZSkylMatrix< TVar >::Write(), and TPZSkylMatrix< TVar >::Zero().
Referenced by TPZSkylMatrix< TVar >::Redim().
|
overridevirtual |
Redimensions a matriz keeping the previous values.
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 2487 of file pzskylmat.cpp.
References TPZMatrix< TVar >::Dim(), TPZMatrix< TVar >::fCol, TPZMatrix< TVar >::fDecomposed, TPZSkylMatrix< TVar >::fElem, TPZSkylMatrix< TVar >::fStorage, MIN, and TPZVec< T >::Resize().
Referenced by TPZSkylMatrix< TVar >::CopyFrom(), and main().
|
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 1871 of file pzskylmat.cpp.
References TPZSkylMatrix< TVar >::operator()().
Referenced by TPZSkylMatrix< TVar >::CopyFrom(), main(), and res_check().
void TPZSkylMatrix< 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 1792 of file pzskylmat.cpp.
References DebugStop, TPZSkylMatrix< TVar >::fElem, TPZVec< T >::Fill(), TPZSkylMatrix< TVar >::fStorage, TPZSkylMatrix< TVar >::InitializeElem(), and TPZMatrix< TVar >::Rows().
Referenced by CopyTo(), TPZSkylMatrix< TVar >::MemoryFootprint(), TPZMatrixMarket::Read(), and TPZSkylParMatrix< TVar >::SetSkyline().
|
inline |
Definition at line 558 of file pzskylmat.h.
References DebugStop, TPZSkylMatrix< TVar >::fElem, and TPZMatrix< TVar >::Rows().
Referenced by TPZSkylMatrix< TVar >::AddKel(), TPZSkylMatrix< TVar >::ComputeMaxSkyline(), CopyTo(), TPZSkylMatrix< TVar >::Decompose_Cholesky(), TPZSkylMatrix< TVar >::Decompose_Cholesky_blk(), TPZSkylMatrix< TVar >::Decompose_LDLt(), TPZSkylMatrix< TVar >::GetVal(), TPZSkylMatrix< TVar >::MultAdd(), TPZSkylMatrix< TVar >::operator()(), TPZSkylMatrix< TVar >::operator*(), TPZSkylMatrix< TVar >::operator+(), TPZSkylMatrix< TVar >::operator-(), TPZSkylMatrix< TVar >::PutVal(), and TPZSkylMatrix< TVar >::SolveSOR().
|
inline |
return the height of the skyline for a given column
Definition at line 422 of file pzskylmat.h.
References TPZSkylMatrix< TVar >::AddSameStruct(), and TPZSkylMatrix< TVar >::fElem.
Referenced by TPZSkylMatrix< TVar >::DecomposeColumn(), TPZSkylMatrix< TVar >::DecomposeColumn2(), TPZSkylParMatrix< TVar >::DecomposeColumnCholesky(), TPZSkylParMatrix< TVar >::DecomposeColumnLDLt(), TPZSkylParMatrix< TVar >::DecomposeColumnLDLt2(), dump_matrix_stats(), main(), and res_check().
|
overridevirtual |
Solves the linear system using Successive Over Relaxation method (Gauss Seidel).
.
numiterations | The number of interations for the process. |
F | The right hand side of the system. |
result | The solution. |
residual | Returns F - A*U which is the solution residual. |
scratch | Available manipulation area on memory. |
overrelax | The over relaxation parameter |
tol | The tolerance value.. |
FromCurrent | It starts the solution based on FromCurrent. Obtaining solution FromCurrent + 1. |
direction | Indicates interaction direction, from first to last (default 1) or from last to first (-1) |
Reimplemented from TPZMatrix< TVar >.
Definition at line 1988 of file pzskylmat.cpp.
References abs(), TPZMatrix< TVar >::Cols(), DebugStop, TPZMatrix< TVar >::Dim(), TPZSkylMatrix< TVar >::fElem, TPZSkylMatrix< TVar >::GetVal(), TPZMatrix< TVar >::gZero, Norm(), test::res, TPZMatrix< TVar >::Residual(), TPZSkylMatrix< TVar >::Size(), sqrt, pzgeom::tol, val(), and TPZFMatrix< TVar >::Zero().
Referenced by main(), and TPZSkylMatrix< TVar >::Redim().
|
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 3086 of file pzskylmat.cpp.
References TPZMatrix< TVar >::Cols(), TPZMatrix< TVar >::Dim(), ECholesky, TPZMatrix< TVar >::Error(), TPZMatrix< TVar >::fDecomposed, TPZSkylMatrix< TVar >::fElem, TPZMatrix< TVar >::Rows(), and val().
Referenced by main(), and TPZSkylMatrix< TVar >::Redim().
|
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 3167 of file pzskylmat.cpp.
References TPZMatrix< TVar >::Cols(), TPZMatrix< TVar >::Dim(), ELDLt, TPZMatrix< TVar >::fDecomposed, TPZSkylMatrix< TVar >::fElem, and TPZMatrix< TVar >::Rows().
Referenced by TPZSkylMatrix< TVar >::Redim().
|
overridevirtual |
Computes B = Y, where A*Y = B, A is lower triangular.
b | right hand side and result after all |
Reimplemented from TPZMatrix< TVar >.
Definition at line 3034 of file pzskylmat.cpp.
References TPZMatrix< TVar >::Cols(), TPZMatrix< TVar >::Dim(), dimension, ECholesky, TPZMatrix< TVar >::Error(), TPZMatrix< TVar >::fDecomposed, TPZSkylMatrix< TVar >::fElem, and TPZMatrix< TVar >::Rows().
Referenced by main(), and TPZSkylMatrix< TVar >::Redim().
|
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 3188 of file pzskylmat.cpp.
References TPZMatrix< TVar >::Cols(), TPZMatrix< TVar >::Dim(), ECholesky, TPZMatrix< TVar >::Error(), TPZMatrix< TVar >::fDecomposed, TPZSkylMatrix< TVar >::fElem, and TPZMatrix< TVar >::Rows().
Referenced by TPZSkylMatrix< TVar >::Redim().
|
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 3135 of file pzskylmat.cpp.
References TPZMatrix< TVar >::Cols(), TPZMatrix< TVar >::Dim(), dimension, ELDLt, ELU, TPZMatrix< TVar >::fDecomposed, TPZSkylMatrix< TVar >::fElem, and TPZMatrix< TVar >::Rows().
Referenced by TPZSkylMatrix< TVar >::Redim().
|
overridevirtual |
Updates the values of the matrix based on the values of the matrix.
Reimplemented from TPZMatrix< TVar >.
Definition at line 1775 of file pzskylmat.cpp.
References DebugStop, TPZMatrix< TVar >::fDecomposed, TPZMatrix< TVar >::fDefPositive, TPZSkylMatrix< TVar >::fStorage, matrix, and TPZVec< T >::NElements().
Referenced by TPZSkylMatrix< TVar >::~TPZSkylMatrix().
|
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 3287 of file pzskylmat.cpp.
References TPZSkylMatrix< TVar >::fElem, TPZSkylMatrix< TVar >::fStorage, TPZMatrix< TVar >::Rows(), TPZStream::Write(), and TPZMatrix< TVar >::Write().
Referenced by main(), TPZSkylMatrix< TVar >::Redim(), and res_dump().
|
overridevirtual |
Zeroes the matrix.
Reimplemented from TPZMatrix< TVar >.
Definition at line 3220 of file pzskylmat.cpp.
References TPZMatrix< TVar >::fDecomposed, TPZMatrix< TVar >::fDefPositive, TPZVec< T >::Fill(), and TPZSkylMatrix< TVar >::fStorage.
Referenced by TPZSkylMatrix< TVar >::operator*=(), and TPZSkylMatrix< TVar >::Redim().
|
friend |
Definition at line 441 of file pzskylmat.h.
|
friend |
Definition at line 440 of file pzskylmat.h.
|
protected |
Storage to keep the first elements to each equation.
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 620 of file pzskylmat.h.
Referenced by TPZSkylMatrix< TVar >::AddKel(), TPZSkylMatrix< TVar >::AddSameStruct(), TPZSkylMatrix< TVar >::AutoFill(), TPZSkylMatrix< TVar >::Clear(), TPZSkylMatrix< TVar >::Copy(), TPZSkylMatrix< TVar >::CopyFrom(), TPZSkylMatrix< TVar >::Decompose_Cholesky(), TPZSkylMatrix< TVar >::Decompose_Cholesky_blk(), TPZSkylMatrix< TVar >::Decompose_LDLt(), TPZSkylParMatrix< TVar >::DecomposeColumnLDLt(), TPZSkylParMatrix< TVar >::DecomposeColumnLDLt2(), TPZSkylMatrix< TVar >::Diag(), TPZSkylMatrix< TVar >::GetVal(), TPZSkylMatrix< TVar >::MemoryFootprint(), TPZSkylMatrix< TVar >::MigratePages(), TPZSkylMatrix< TVar >::MultAdd(), TPZSkylMatrix< TVar >::operator()(), TPZSkylMatrix< TVar >::operator*(), TPZSkylMatrix< TVar >::operator*=(), TPZSkylMatrix< TVar >::operator+(), TPZSkylMatrix< TVar >::operator-(), TPZSkylMatrix< TVar >::PutVal(), TPZSkylMatrix< TVar >::Read(), TPZSkylMatrix< TVar >::ReallocForNuma(), TPZSkylMatrix< TVar >::Redim(), TPZSkylMatrix< TVar >::Resize(), TPZSkylMatrix< TVar >::SetSkyline(), TPZSkylMatrix< TVar >::Size(), TPZSkylMatrix< TVar >::SkyHeight(), TPZSkylMatrix< TVar >::SolveSOR(), TPZSkylMatrix< TVar >::Subst_Backward(), TPZSkylMatrix< TVar >::Subst_Diag(), TPZSkylMatrix< TVar >::Subst_Forward(), TPZSkylMatrix< TVar >::Subst_LBackward(), TPZSkylMatrix< TVar >::Subst_LForward(), TPZSkylMatrix< TVar >::TPZSkylMatrix(), and TPZSkylMatrix< TVar >::Write().
|
private |
fStorage is a unique vector which contains all the data of the skyline matrix
Definition at line 625 of file pzskylmat.h.
Referenced by TPZSkylMatrix< TVar >::AddSameStruct(), TPZSkylMatrix< TVar >::AutoFill(), TPZSkylMatrix< TVar >::Clear(), TPZSkylMatrix< TVar >::Copy(), TPZSkylMatrix< TVar >::CopyFrom(), TPZSkylMatrix< TVar >::GetNelemts(), TPZSkylMatrix< TVar >::MemoryFootprint(), TPZSkylMatrix< TVar >::MigratePages(), TPZSkylMatrix< TVar >::Read(), TPZSkylMatrix< TVar >::ReallocForNuma(), TPZSkylMatrix< TVar >::Resize(), TPZSkylMatrix< TVar >::SetSkyline(), TPZSkylMatrix< TVar >::TPZSkylMatrix(), TPZSkylMatrix< TVar >::UpdateFrom(), TPZSkylMatrix< TVar >::Write(), and TPZSkylMatrix< TVar >::Zero().