52 ShouldEquilibrate_(false),
53 A_Equilibrated_(false),
54 B_Equilibrated_(false),
57 EstimateSolutionErrors_(false),
58 SolutionErrorsEstimated_(false),
61 ReciprocalConditionEstimated_(false),
62 RefineSolution_(false),
63 SolutionRefined_(false),
132 if (
R_ != 0 &&
R_ !=
C_) {
delete []
R_;
R_ = 0;}
134 if (
C_ != 0) {
delete []
C_;
C_ = 0;}
282 double DNRHS =
NRHS_;
321 double DNRHS =
NRHS_;
350 if (
R_!=0)
return(0);
381 for (j=0; j<
N_; j++) {
384 for (i=0; i<
M_; i++) {
385 *ptr = *ptr*s1*
R_[i];
394 for (j=0; j<
N_; j++) {
398 for (i=0; i<
M_; i++) {
399 *ptr = *ptr*s1*
R_[i];
401 *ptr1 = *ptr1*s1*R_[i];
427 for (j=0; j<
NRHS_; j++) {
429 for (i=0; i<
M_; i++) {
430 *ptr = *ptr*R_tmp[i];
453 for (j=0; j<
NRHS_; j++) {
455 for (i=0; i<
N_; i++) {
456 *ptr = *ptr*C_tmp[i];
524 if (
Matrix_!=0) os <<
"Solver Matrix" << std::endl << *
Matrix_ << std::endl;
525 if (
Factor_!=0) os <<
"Solver Factored Matrix" << std::endl << *
Factor_ << std::endl;
526 if (
LHS_ !=0) os <<
"Solver LHS" << std::endl << *
LHS_ << std::endl;
527 if (
RHS_ !=0) os <<
"Solver RHS" << std::endl << *
RHS_ << std::endl;
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)
#define EPETRA_CHK_ERR(a)
int SetVectors(Epetra_SerialDenseMatrix &X, Epetra_SerialDenseMatrix &B)
Sets the pointers for left and right hand side vector(s).
Epetra_SerialDenseMatrix: A class for constructing and using real double precision general dense matr...
int UnequilibrateLHS(void)
Unscales the solution vectors if equilibration was used to solve the system.
Epetra_SerialDenseMatrix * RHS_
void GETRF(const int M, const int N, float *A, const int LDA, int *IPIV, int *INFO) const
Epetra_LAPACK factorization for general matrix (SGETRF)
double * A() const
Returns pointer to the this matrix.
Epetra_BLAS: The Epetra BLAS Wrapper Class.
virtual int ApplyRefinement(void)
Apply Iterative Refinement.
void GECON(const char NORM, 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 general matrix (SGECON)
virtual double OneNorm() const
Computes the 1-Norm of the this matrix (identical to NormOne() method).
virtual bool ShouldEquilibrate()
Returns true if the LAPACK general rules for equilibration suggest you should equilibrate the system...
Epetra_SerialDenseMatrix * Matrix_
Epetra_CompObject: Functionality and data that is common to all computational classes.
bool Inverted()
Returns true if matrix inverse has been computed (inverse available via AF() and LDAF()).
virtual ~Epetra_SerialDenseSolver()
Epetra_SerialDenseSolver destructor.
void GETRS(const char TRANS, const int N, const int NRHS, const float *A, const int LDA, const int *IPIV, float *X, const int LDX, int *INFO) const
Epetra_LAPACK solve (after factorization) for general matrix (SGETRS)
void GETRI(const int N, float *A, const int LDA, int *IPIV, float *WORK, const int *LWORK, int *INFO) const
Epetra_LAPACK inversion for general matrix (SGETRI)
bool SolutionErrorsEstimated_
bool ReciprocalConditionEstimated()
Returns true if the condition number of the this matrix has been computed (value available via Recipr...
Epetra_LAPACK: The Epetra LAPACK Wrapper Class.
virtual int Solve(void)
Computes the solution X to AX = B for the this matrix and the B provided to SetVectors()..
void GEEQU(const int M, const int N, const float *A, const int LDA, float *R, float *C, float *ROWCND, float *COLCND, float *AMAX, int *INFO) const
Epetra_LAPACK equilibration for general matrix (SGEEQU)
virtual int Invert(void)
Inverts the this matrix.
int SetMatrix(Epetra_SerialDenseMatrix &A)
Sets the pointers for coefficient matrix.
int LDA() const
Returns the leading dimension of the this matrix.
virtual int EquilibrateMatrix(void)
Equilibrates the this matrix.
bool ReciprocalConditionEstimated_
virtual int ComputeEquilibrateScaling(void)
Computes the scaling vector S(i) = 1/sqrt(A(i,i)) of the this matrix.
void EstimateSolutionErrors(bool Flag)
Causes all solves to estimate the forward and backward solution error.
Epetra_SerialDenseMatrix * Factor_
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.
Epetra_SerialDenseSolver()
Default constructor; matrix should be set using SetMatrix(), LHS and RHS set with SetVectors()...
int N() const
Returns column dimension of system.
void GERFS(const char TRANS, const int N, const int NRHS, const float *A, const int LDA, const float *AF, const int LDAF, const int *IPIV, const float *B, const int LDB, float *X, const int LDX, float *FERR, float *BERR, float *WORK, int *IWORK, int *INFO) const
Epetra_LAPACK Refine solution (GERFS)
int EquilibrateRHS(void)
Equilibrates the current RHS.
Epetra_SerialDenseMatrix * LHS_
virtual int ReciprocalConditionEstimate(double &Value)
Returns the reciprocal of the 1-norm condition number of the this matrix.
virtual int Factor(void)
Computes the in-place LU factorization of the matrix using the LAPACK routine DGETRF.
int M() const
Returns row dimension of system.
virtual void Print(std::ostream &os) const
Print service methods; defines behavior of ostream << operator.
bool EstimateSolutionErrors_
void UpdateFlops(int Flops_in) const
Increment Flop count for this object.