130 double DNRHS =
NRHS_;
170 double DNRHS =
NRHS_;
199 if (
R_!=0)
return(0);
227 for (j=0; j<
N_; j++) {
230 for (i=0; i<=j; i++) {
231 *ptr = *ptr*s1*
R_[i];
239 for (j=0; j<
N_; j++) {
243 for (i=0; i<=j; i++) {
244 *ptr = *ptr*s1*
R_[i];
246 *ptr1 = *ptr1*s1*R_[i];
255 for (j=0; j<
N_; j++) {
258 for (i=j; i<
N_; i++) {
259 *ptr = *ptr*s1*
R_[i];
267 for (j=0; j<
N_; j++) {
271 for (i=j; i<
N_; i++) {
272 *ptr = *ptr*s1*
R_[i];
274 *ptr1 = *ptr1*s1*R_[i];
281 double NumFlops = (double) ((
N_+1)*
N_/2);
282 if (
A_==
AF_) NumFlops += NumFlops;
void GEMM(const char TRANSA, const char TRANSB, const int M, const int N, const int K, const float ALPHA, const float *A, const int LDA, const float *B, const int LDB, const float BETA, float *C, const int LDC) const
Epetra_BLAS matrix-matrix multiply function (SGEMM)
Epetra_SerialSymDenseMatrix * SymFactor_
int Invert(void)
Inverts the this matrix.
double OneNorm() const
Computes the 1-Norm of the this matrix (identical to NormOne() method).
Epetra_SerialSpdDenseSolver()
Default constructor; matrix should be set using SetMatrix(), LHS and RHS set with SetVectors()...
virtual ~Epetra_SerialSpdDenseSolver()
Epetra_SerialDenseSolver destructor.
#define EPETRA_CHK_ERR(a)
int SetMatrix(Epetra_SerialSymDenseMatrix &A_in)
Sets the pointers for coefficient matrix; special version for symmetric matrices. ...
Epetra_SerialDenseMatrix: A class for constructing and using real double precision general dense matr...
Epetra_SerialSymDenseMatrix: A class for constructing and using symmetric positive definite dense mat...
int UnequilibrateLHS(void)
Unscales the solution vectors if equilibration was used to solve the system.
void POCON(const char UPLO, const int N, const float *A, const int LDA, const float ANORM, float *RCOND, float *WORK, int *IWORK, int *INFO) const
Epetra_LAPACK condition number estimator for positive definite matrix (SPOCON)
Epetra_SerialDenseMatrix * RHS_
void CopyUPLOMat(bool Upper, double *A, int LDA, int NumRows)
double * A() const
Returns pointer to the this matrix.
int ApplyRefinement(void)
Apply Iterative Refinement.
int Solve(void)
Computes the solution X to AX = B for the this matrix and the B provided to SetVectors()..
bool ShouldEquilibrate()
Returns true if the LAPACK general rules for equilibration suggest you should equilibrate the system...
int ReciprocalConditionEstimate(double &Value)
Returns the reciprocal of the 1-norm condition number of the this matrix.
void POEQU(const int N, const float *A, const int LDA, float *S, float *SCOND, float *AMAX, int *INFO) const
Epetra_LAPACK equilibration for positive definite matrix (SPOEQU)
Epetra_SerialSymDenseMatrix * SymMatrix_
char UPLO() const
Returns character value of UPLO used by LAPACK routines.
bool Inverted()
Returns true if matrix inverse has been computed (inverse available via AF() and LDAF()).
bool SolutionErrorsEstimated_
bool ReciprocalConditionEstimated()
Returns true if the condition number of the this matrix has been computed (value available via Recipr...
int ComputeEquilibrateScaling(void)
Computes the scaling vector S(i) = 1/sqrt(A(i,i) of the this matrix.
bool Upper() const
Returns true if upper triangle of this matrix has and will be used.
int SetMatrix(Epetra_SerialDenseMatrix &A)
Sets the pointers for coefficient matrix.
int LDA() const
Returns the leading dimension of the this matrix.
void POTRF(const char UPLO, const int N, float *A, const int LDA, int *INFO) const
Epetra_LAPACK factorization for positive definite matrix (SPOTRF)
bool ReciprocalConditionEstimated_
void PORFS(const char UPLO, const int N, const int NRHS, const float *A, const int LDA, const float *AF, const int LDAF, const float *B, const int LDB, float *X, const int LDX, float *FERR, float *BERR, float *WORK, int *IWORK, int *INFO) const
Epetra_LAPACK solve driver for positive definite matrix (SPOSVX)
Epetra_SerialDenseMatrix * Factor_
void POTRS(const char UPLO, const int N, const int NRHS, const float *A, const int LDA, float *X, const int LDX, int *INFO) const
Epetra_LAPACK solve (after factorization) for positive definite matrix (SPOTRS)
const double Epetra_Overflow
bool Factored()
Returns true if matrix is factored (factor available via AF() and LDAF()).
bool Solved()
Returns true if the current set of vectors has been solved.
int EquilibrateRHS(void)
Equilibrates the current RHS.
Epetra_SerialDenseMatrix * LHS_
int Factor(void)
Computes the in-place Cholesky factorization of the matrix using the LAPACK routine DPOTRF...
void POTRI(const char UPLO, const int N, float *A, const int LDA, int *INFO) const
Epetra_LAPACK inversion for positive definite matrix (SPOTRI)
Epetra_SerialDenseSolver: A class for solving dense linear problems.
void UpdateFlops(int Flops_in) const
Increment Flop count for this object.
int EquilibrateMatrix(void)
Equilibrates the this matrix.