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;
const double Epetra_Overflow
#define EPETRA_CHK_ERR(a)
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)
void UpdateFlops(int Flops_in) const
Increment Flop count for this object.
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)
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)
void POTRI(const char UPLO, const int N, float *A, const int LDA, int *INFO) const
Epetra_LAPACK inversion for positive definite matrix (SPOTRI)
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)
void POTRF(const char UPLO, const int N, float *A, const int LDA, int *INFO) const
Epetra_LAPACK factorization for positive definite matrix (SPOTRF)
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_SerialDenseMatrix: A class for constructing and using real double precision general dense matr...
double * A() const
Returns pointer to the this matrix.
int LDA() const
Returns the leading dimension of the this matrix.
Epetra_SerialDenseSolver: A class for solving dense linear problems.
bool ReciprocalConditionEstimated()
Returns true if the condition number of the this matrix has been computed (value available via Recipr...
int EquilibrateRHS(void)
Equilibrates the current RHS.
Epetra_SerialDenseMatrix * Factor_
int SetMatrix(Epetra_SerialDenseMatrix &A)
Sets the pointers for coefficient matrix.
bool ReciprocalConditionEstimated_
Epetra_SerialDenseMatrix * RHS_
bool SolutionErrorsEstimated_
int UnequilibrateLHS(void)
Unscales the solution vectors if equilibration was used to solve the system.
bool Factored()
Returns true if matrix is factored (factor available via AF() and LDAF()).
bool Inverted()
Returns true if matrix inverse has been computed (inverse available via AF() and LDAF()).
Epetra_SerialDenseMatrix * LHS_
bool Solved()
Returns true if the current set of vectors has been solved.
int Invert(void)
Inverts the this matrix.
int Solve(void)
Computes the solution X to AX = B for the this matrix and the B provided to SetVectors()....
int Factor(void)
Computes the in-place Cholesky factorization of the matrix using the LAPACK routine DPOTRF.
bool ShouldEquilibrate()
Returns true if the LAPACK general rules for equilibration suggest you should equilibrate the system.
Epetra_SerialSymDenseMatrix * SymFactor_
int SetMatrix(Epetra_SerialSymDenseMatrix &A_in)
Sets the pointers for coefficient matrix; special version for symmetric matrices.
Epetra_SerialSpdDenseSolver()
Default constructor; matrix should be set using SetMatrix(), LHS and RHS set with SetVectors().
int EquilibrateMatrix(void)
Equilibrates the this matrix.
virtual ~Epetra_SerialSpdDenseSolver()
Epetra_SerialDenseSolver destructor.
int ComputeEquilibrateScaling(void)
Computes the scaling vector S(i) = 1/sqrt(A(i,i) of the this matrix.
int ReciprocalConditionEstimate(double &Value)
Returns the reciprocal of the 1-norm condition number of the this matrix.
Epetra_SerialSymDenseMatrix * SymMatrix_
int ApplyRefinement(void)
Apply Iterative Refinement.
Epetra_SerialSymDenseMatrix: A class for constructing and using symmetric positive definite dense mat...
void CopyUPLOMat(bool Upper, double *A, int LDA, int NumRows)
char UPLO() const
Returns character value of UPLO used by LAPACK routines.
bool Upper() const
Returns true if upper triangle of this matrix has and will be used.
double OneNorm() const
Computes the 1-Norm of the this matrix (identical to NormOne() method).