Epetra Development

Epetra_SerialSymDenseMatrix: A class for constructing and using symmetric positive definite dense matrices. More...
#include <Epetra_SerialSymDenseMatrix.h>
Public Member Functions  
void  CopyUPLOMat (bool Upper, double *A, int LDA, int NumRows) 
Constructor/Destructor Methods  
Epetra_SerialSymDenseMatrix (void)  
Default constructor; defines a zero size object.  
Epetra_SerialSymDenseMatrix (Epetra_DataAccess CV, double *A, int LDA, int NumRowsCols)  
Set object values from twodimensional array.  
Epetra_SerialSymDenseMatrix (const Epetra_SerialSymDenseMatrix &Source)  
Epetra_SerialSymDenseMatrix copy constructor.  
virtual  ~Epetra_SerialSymDenseMatrix () 
Epetra_SerialSymDenseMatrix destructor.  
Set Methods  
int  Shape (int NumRowsCols) 
Set dimensions of a Epetra_SerialSymDenseMatrix object; init values to zero.  
int  Reshape (int NumRowsCols) 
Reshape a Epetra_SerialSymDenseMatrix object.  
void  SetLower () 
Specify that the lower triangle of the this matrix should be used.  
void  SetUpper () 
Specify that the upper triangle of the this matrix should be used.  
Query methods  
bool  Upper () const 
Returns true if upper triangle of this matrix has and will be used.  
char  UPLO () const 
Returns character value of UPLO used by LAPACK routines.  
Mathematical Methods  
int  Scale (double ScalarA) 
Inplace scalarmatrix product A = a A.  
double  NormOne () const 
Computes the 1Norm of the this matrix.  
double  NormInf () const 
Computes the InfinityNorm of the this matrix.  
Deprecated methods (will be removed in later versions of this class)  
double  OneNorm () const 
Computes the 1Norm of the this matrix (identical to NormOne() method).  
double  InfNorm () const 
Computes the InfinityNorm of the this matrix (identical to NormInf() method). 
Epetra_SerialSymDenseMatrix: A class for constructing and using symmetric positive definite dense matrices.
The Epetra_SerialSymDenseMatrix class enables the construction and use of realvalued, symmetric positive definite, doubleprecision dense matrices. It is built on the Epetra_SerialDenseMatrix class which in turn is built on the BLAS via the Epetra_BLAS class.
The Epetra_SerialSymDenseMatrix class is intended to provide fullfeatured support for solving linear and eigen system problems for symmetric positive definite matrices. It is written on top of BLAS and LAPACK and thus has excellent performance and numerical capabilities. Using this class, one can either perform simple factorizations and solves or apply all the tricks available in LAPACK to get the best possible solution for very illconditioned problems.
Epetra_SerialSymDenseMatrix vs. Epetra_LAPACK
The Epetra_LAPACK class provides access to most of the same functionality as Epetra_SerialSymDenseMatrix. The primary difference is that Epetra_LAPACK is a "thin" layer on top of LAPACK and Epetra_SerialSymDenseMatrix attempts to provide easy access to the more sophisticated aspects of solving dense linear and eigensystems.
When you should use Epetra_SerialSymDenseMatrix: If you want to (or potentially want to) solve illconditioned problems or want to work with a more objectoriented interface, you should probably use Epetra_SerialSymDenseMatrix.
Constructing Epetra_SerialSymDenseMatrix Objects
There are three Epetra_DenseMatrix constructors. The first constructs a zerosized object which should be made to appropriate length using the Shape() or Reshape() functions and then filled with the [] or () operators. The second is a constructor that accepts user data as a 2D array, the third is a copy constructor. The second constructor has two data access modes (specified by the Epetra_DataAccess argument):
Extracting Data from Epetra_SerialSymDenseMatrix Objects
Once a Epetra_SerialSymDenseMatrix is constructed, it is possible to view the data via access functions.
Vector and Utility Functions
Once a Epetra_SerialSymDenseMatrix is constructed, several mathematical functions can be applied to the object. Specifically:
Counting floating point operations The Epetra_SerialSymDenseMatrix class has Epetra_CompObject as a base class. Thus, floating point operations are counted and accumulated in the Epetra_Flop object (if any) that was set using the SetFlopCounter() method in the Epetra_CompObject base class.
Epetra_SerialSymDenseMatrix::Epetra_SerialSymDenseMatrix  (  void  ) 
Default constructor; defines a zero size object.
Epetra_SerialSymDenseMatrix objects defined by the default constructor should be sized with the Shape() or Reshape() functions. Values should be defined by using the [] or ()operators.
Note: By default the active part of the matrix is assumed to be in the lower triangle. To set the upper part as active, call SetUpper(). See Detailed Description section for further discussion.
Epetra_SerialSymDenseMatrix::Epetra_SerialSymDenseMatrix  (  Epetra_DataAccess  CV, 
double *  A,  
int  LDA,  
int  NumRowsCols  
) 
Set object values from twodimensional array.
In  Epetra_DataAccess  Enumerated type set to Copy or View. 
In  A  Pointer to an array of double precision numbers. The first vector starts at A. The second vector starts at A+LDA, the third at A+2*LDA, and so on. 
In  LDA  The "Leading Dimension", or stride between vectors in memory. 
In  NumRowsCols  Number of rows and columns in object. 
Note: By default the active part of the matrix is assumed to be in the lower triangle. To set the upper part as active, call SetUpper(). See Detailed Description section for further discussion.
double Epetra_SerialSymDenseMatrix::NormOne  (  )  const [virtual] 
Computes the 1Norm of the this matrix.
Reimplemented from Epetra_SerialDenseMatrix.
Referenced by OneNorm().
double Epetra_SerialSymDenseMatrix::OneNorm  (  )  const [inline, virtual] 
Computes the 1Norm of the this matrix (identical to NormOne() method).
Reimplemented from Epetra_SerialDenseMatrix.
References NormOne().
int Epetra_SerialSymDenseMatrix::Reshape  (  int  NumRowsCols  )  [inline] 
Reshape a Epetra_SerialSymDenseMatrix object.
In  NumRowsCols  Number of rows and columns in object. 
Allows user to define the dimensions of a Epetra_SerialSymDenseMatrix at any point. This function can be called at any point after construction. Any values that were previously in this object are copied into the new shape. If the new shape is smaller than the original, the upper left portion of the original matrix (the principal submatrix) is copied to the new matrix.
References Epetra_SerialDenseMatrix::Reshape().
int Epetra_SerialSymDenseMatrix::Scale  (  double  ScalarA  ) 
Inplace scalarmatrix product A = a A.
Scale a matrix, entrybyentry using the value ScalarA. This method is sensitive to the UPLO() parameter.
ScalarA  (In) Scalar to multiply with A. 
Reimplemented from Epetra_SerialDenseMatrix.
int Epetra_SerialSymDenseMatrix::Shape  (  int  NumRowsCols  )  [inline] 
Set dimensions of a Epetra_SerialSymDenseMatrix object; init values to zero.
In  NumRowsCols  Number of rows and columns in object. 
Allows user to define the dimensions of a Epetra_DenseMatrix at any point. This function can be called at any point after construction. Any values that were previously in this object are destroyed and the resized matrix starts off with all zero values.
References Epetra_SerialDenseMatrix::Shape().