44#ifndef _EPETRA_SERIALDENSESVD_H_
45#define _EPETRA_SERIALDENSESVD_H_
149 void SolveWithTranspose(
bool Flag) {Transpose_ = Flag;
if (Flag) TRANS_ =
'T';
else TRANS_ =
'N';
return;};
171 virtual int Factor(
void);
177 virtual int Solve(
void);
183 virtual int Invert(
double rthresh = 0.0,
double athresh = 0.0 );
292 int M()
const {
return(M_);};
295 int N()
const {
return(N_);};
298 double *
A()
const {
return(A_);};
301 int LDA()
const {
return(LDA_);};
304 double *
B()
const {
return(B_);};
307 int LDB()
const {
return(LDB_);};
310 int NRHS()
const {
return(NRHS_);};
313 double *
X()
const {
return(X_);};
316 int LDX()
const {
return(LDX_);};
318 double *
S()
const {
return(S_);};
329 double *
AI()
const {
return(AI_);};
332 int LDAI()
const {
return(LDAI_);};
339 double ANORM()
const {
return(ANORM_);};
381 virtual void Print(std::ostream& os)
const;
397 virtual int SetUseTranspose(
bool use_transpose) { UseTranspose_ = use_transpose;
return (0); }
409 {
return Ymat.
Multiply( UseTranspose_,
false, 1.0, *Matrix(), Xmat, 0.0 ); }
423 SolveWithTranspose(UseTranspose_);
432 virtual double NormInf()
const {
return Matrix()->NormInf(); }
444 virtual int RowDim()
const {
return M(); }
447 virtual int ColDim()
const {
return N(); }
451 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.
virtual const char * Label() const
Epetra_Object Label access funtion.
Epetra_SerialDenseMatrix: A class for constructing and using real double precision general dense matr...
int Multiply(char TransA, char TransB, double ScalarAB, const Epetra_SerialDenseMatrix &A, const Epetra_SerialDenseMatrix &B, double ScalarThis)
Matrix-Matrix multiplication, this = ScalarThis*this + ScalarAB*A*B.
Epetra_SerialDenseOperator: A pure virtual class for using real-valued double-precision operators.
Epetra_SerialDenseSVD: A class for SVDing dense linear problems.
double * A() const
Returns pointer to the this matrix.
virtual const char * Label() const
Returns a character string describing the operator.
Epetra_SerialDenseMatrix * RHS_
Epetra_SerialDenseMatrix * LHS() const
Returns pointer to current LHS.
Epetra_SerialDenseMatrix * Inverse_
Epetra_SerialDenseMatrix * Matrix_
bool Transpose()
Returns true if transpose of this matrix has and will be used.
virtual bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
int LDX() const
Returns the leading dimension of the solution.
virtual int RowDim() const
Returns the row dimension of operator.
Epetra_SerialDenseMatrix * Matrix() const
Returns pointer to current matrix.
double ANORM() const
Returns the 1-Norm of the this matrix (returns -1 if not yet computed).
Epetra_SerialDenseSVD & operator=(const Epetra_SerialDenseSVD &Source)
double * AI() const
Returns pointer to the inverted matrix (may be the same as A() if factorization done in place).
Epetra_SerialDenseMatrix * RHS() const
Returns pointer to current RHS.
double * B() const
Returns pointer to current RHS.
int NRHS() const
Returns the number of current right hand sides and solution vectors.
virtual int ApplyInverse(const Epetra_SerialDenseMatrix &Xmat, Epetra_SerialDenseMatrix &Ymat)
Returns the result of a Epetra_SerialDenseOperator inverse applied to an Epetra_SerialDenseMatrix X i...
int M() const
Returns row dimension of system.
int N() const
Returns column dimension of system.
Epetra_SerialDenseMatrix * LHS_
virtual double NormInf() const
Returns the infinity norm of the global matrix.
Epetra_SerialDenseMatrix * InvertedMatrix() const
Returns pointer to inverted matrix (assuming inverse has been performed).
double * X() const
Returns pointer to current solution.
virtual int ColDim() const
Returns the column dimension of operator.
void SolveWithTranspose(bool Flag)
Causes equilibration to be called just before the matrix factorization as part of the call to Factor.
bool Inverted()
Returns true if matrix inverse has been computed (inverse available via AF() and LDAF()).
virtual int Apply(const Epetra_SerialDenseMatrix &Xmat, Epetra_SerialDenseMatrix &Ymat)
Returns the result of a Epetra_SerialDenseOperator applied to a Epetra_SerialDenseMatrix X in Y.
Epetra_SerialDenseSVD(const Epetra_SerialDenseSVD &Source)
int LDA() const
Returns the leading dimension of the this matrix.
int LDB() const
Returns the leading dimension of the RHS.
virtual int SetUseTranspose(bool use_transpose)
If set true, transpose of this operator will be applied.
virtual bool UseTranspose() const
Returns the current UseTranspose setting.
int LDAI() const
Returns the leading dimension of the inverted matrix.
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.