44#ifndef EPETRA_SERIALDENSESOLVER_H
45#define EPETRA_SERIALDENSESOLVER_H
178 void EstimateSolutionErrors(
bool Flag) ;
188 virtual int Factor(
void);
194 virtual int Solve(
void);
200 virtual int Invert(
void);
206 virtual int ComputeEquilibrateScaling(
void);
212 virtual int EquilibrateMatrix(
void);
218 int EquilibrateRHS(
void);
225 virtual int ApplyRefinement(
void);
231 int UnequilibrateLHS(
void);
240 virtual int ReciprocalConditionEstimate(
double & Value);
293 int M()
const {
return(
M_);};
296 int N()
const {
return(
N_);};
299 double *
A()
const {
return(
A_);};
305 double *
B()
const {
return(
B_);};
314 double *
X()
const {
return(
X_);};
354 double *
R()
const {
return(
R_);};
357 double *
C()
const {
return(
C_);};
363 virtual void Print(std::ostream& os)
const;
Epetra_BLAS(void)
Epetra_BLAS Constructor.
Epetra_CompObject()
Basic Epetra_CompObject constuctor.
Epetra_LAPACK(void)
Epetra_LAPACK Constructor.
virtual void Print(std::ostream &os) const
Epetra_Object(int TracebackModeIn=-1, bool set_label=true)
Epetra_Object Constructor.
Epetra_SerialDenseMatrix: A class for constructing and using real double precision general dense matr...
int M() const
Returns row dimension of system.
bool ReciprocalConditionEstimated()
Returns true if the condition number of the this matrix has been computed (value available via Recipr...
int LDAF() const
Returns the leading dimension of the factored matrix.
int LDB() const
Returns the leading dimension of the RHS.
double * A() const
Returns pointer to the this matrix.
double * AF() const
Returns pointer to the factored matrix (may be the same as A() if factorization done in place).
int LDX() const
Returns the leading dimension of the solution.
double * R() const
Returns a pointer to the row scaling vector used for equilibration.
Epetra_SerialDenseMatrix * Factor_
double AMAX() const
Returns the absolute value of the largest entry of the this matrix (returns -1 if not yet computed).
double COLCND() const
Ratio of smallest to largest column scale factors for the this matrix (returns -1 if not yet computed...
Epetra_SerialDenseSolver(const Epetra_SerialDenseSolver &Source)
bool SolutionRefined()
Returns true if the current set of vectors has been refined.
void SolveToRefinedSolution(bool Flag)
Causes all solves to compute solution to best ability using iterative refinement.
int SetMatrix(Epetra_SerialDenseMatrix &A)
Sets the pointers for coefficient matrix.
Epetra_SerialDenseMatrix * Matrix_
bool Transpose()
Returns true if transpose of this matrix has and will be used.
bool ReciprocalConditionEstimated_
Epetra_SerialDenseMatrix * RHS() const
Returns pointer to current RHS.
Epetra_SerialDenseSolver & operator=(const Epetra_SerialDenseSolver &Source)
double * X() const
Returns pointer to current solution.
bool SolutionErrorsEstimated()
Returns true if forward and backward error estimated have been computed (available via FERR() and BER...
int N() const
Returns column dimension of system.
double ROWCND() const
Ratio of smallest to largest row scale factors for the this matrix (returns -1 if not yet computed).
void SolveWithTranspose(bool Flag)
If Flag is true, causes all subsequent function calls to work with the transpose of this matrix,...
Epetra_SerialDenseMatrix * RHS_
bool SolutionErrorsEstimated_
bool A_Equilibrated()
Returns true if factor is equilibrated (factor available via AF() and LDAF()).
int * IPIV() const
Returns pointer to pivot vector (if factorization has been computed), zero otherwise.
Epetra_SerialDenseMatrix * LHS() const
Returns pointer to current LHS.
Epetra_SerialDenseMatrix * FactoredMatrix() const
Returns pointer to factored matrix (assuming factorization has been performed).
double * FERR() const
Returns a pointer to the forward error estimates computed by LAPACK.
int NRHS() const
Returns the number of current right hand sides and solution vectors.
double * C() const
Returns a pointer to the column scale vector used for equilibration.
bool EstimateSolutionErrors_
virtual int ComputeEquilibrateScaling(void)
Computes the scaling vector S(i) = 1/sqrt(A(i,i)) of the this matrix.
double ANORM() const
Returns the 1-Norm of the this matrix (returns -1 if not yet computed).
virtual bool ShouldEquilibrate()
Returns true if the LAPACK general rules for equilibration suggest you should equilibrate the system.
double RCOND() const
Returns the reciprocal of the condition number of the this matrix (returns -1 if not yet computed).
int LDA() const
Returns the leading dimension of the this matrix.
Epetra_SerialDenseMatrix * Matrix() const
Returns pointer to current matrix.
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_SerialDenseSolver()
Default constructor; matrix should be set using SetMatrix(), LHS and RHS set with SetVectors().
Epetra_SerialDenseMatrix * LHS_
double * B() const
Returns pointer to current RHS.
bool B_Equilibrated()
Returns true if RHS is equilibrated (RHS available via B() and LDB()).
double * BERR() const
Returns a pointer to the backward error estimates computed by LAPACK.
bool Solved()
Returns true if the current set of vectors has been solved.
void FactorWithEquilibration(bool Flag)
Causes equilibration to be called just before the matrix factorization as part of the call to Factor.
int SetVectors(Epetra_SerialDenseMatrix &X, Epetra_SerialDenseMatrix &B)
Sets the pointers for left and right hand side vector(s).