44#ifndef EPETRA_SERIALDENSESOLVER_H
45#define EPETRA_SERIALDENSESOLVER_H
169 void SolveWithTranspose(
bool Flag) {Transpose_ = Flag;
if (Flag) TRANS_ =
'T';
else TRANS_ =
'N';
return;};
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_);};
302 int LDA()
const {
return(LDA_);};
305 double *
B()
const {
return(B_);};
308 int LDB()
const {
return(LDB_);};
311 int NRHS()
const {
return(NRHS_);};
314 double *
X()
const {
return(X_);};
317 int LDX()
const {
return(LDX_);};
320 double *
AF()
const {
return(AF_);};
323 int LDAF()
const {
return(LDAF_);};
326 int *
IPIV()
const {
return(IPIV_);};
329 double ANORM()
const {
return(ANORM_);};
332 double RCOND()
const {
return(RCOND_);};
337 double ROWCND()
const {
return(ROWCND_);};
342 double COLCND()
const {
return(COLCND_);};
345 double AMAX()
const {
return(AMAX_);};
348 double *
FERR()
const {
return(FERR_);};
351 double *
BERR()
const {
return(BERR_);};
354 double *
R()
const {
return(R_);};
357 double *
C()
const {
return(C_);};
363 virtual void Print(std::ostream& os)
const;
367 void AllocateWORK() {
if (WORK_==0) {LWORK_ = 4*N_; WORK_ =
new double[LWORK_];}
return;};
Epetra_BLAS: The Epetra BLAS Wrapper Class.
Epetra_CompObject: Functionality and data that is common to all computational classes.
Epetra_LAPACK: The Epetra LAPACK Wrapper Class.
Epetra_Object: The base Epetra class.
virtual void Print(std::ostream &os) const
Print object to an output stream Print method.
Epetra_SerialDenseMatrix: A class for constructing and using real double precision general dense matr...
Epetra_SerialDenseSolver: A class for solving dense linear problems.
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.
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_
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_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.