44 #ifndef _EPETRA_SERIALDENSESVD_H_
45 #define _EPETRA_SERIALDENSESVD_H_
47 #if defined(Epetra_SHOW_DEPRECATED_WARNINGS)
49 #warning "The Epetra package is deprecated"
157 void SolveWithTranspose(
bool Flag) {Transpose_ = Flag;
if (Flag) TRANS_ =
'T';
else TRANS_ =
'N';
return;};
179 virtual int Factor(
void);
185 virtual int Solve(
void);
191 virtual int Invert(
double rthresh = 0.0,
double athresh = 0.0 );
300 int M()
const {
return(M_);};
303 int N()
const {
return(N_);};
306 double *
A()
const {
return(A_);};
309 int LDA()
const {
return(LDA_);};
312 double *
B()
const {
return(B_);};
315 int LDB()
const {
return(LDB_);};
318 int NRHS()
const {
return(NRHS_);};
321 double *
X()
const {
return(X_);};
324 int LDX()
const {
return(LDX_);};
326 double *
S()
const {
return(S_);};
337 double *
AI()
const {
return(AI_);};
340 int LDAI()
const {
return(LDAI_);};
347 double ANORM()
const {
return(ANORM_);};
388 virtual void Print(std::ostream& os)
const;
405 virtual int SetUseTranspose(
bool use_transpose) { UseTranspose_ = use_transpose;
return (0); }
417 {
return Ymat.
Multiply( UseTranspose_,
false, 1.0, *Matrix(), Xmat, 0.0 ); }
430 { SetVectors(const_cast<Epetra_SerialDenseMatrix&>(Xmat),Ymat);
431 SolveWithTranspose(UseTranspose_);
440 virtual double NormInf()
const {
return Matrix()->NormInf(); }
452 virtual int RowDim()
const {
return M(); }
455 virtual int ColDim()
const {
return N(); }
459 void AllocateWORK() {
if (WORK_==0) {LWORK_ = 4*N_; WORK_ =
new double[LWORK_];}
return;};
double * B() const
Returns pointer to current RHS.
virtual void Print(std::ostream &os) const
Print object to an output stream Print method.
virtual bool UseTranspose() const
Returns the current UseTranspose setting.
double * A() const
Returns pointer to the this matrix.
Epetra_SerialDenseMatrix * Inverse_
Epetra_SerialDenseMatrix * LHS() const
Returns pointer to current LHS.
Epetra_SerialDenseSVD: A class for SVDing dense linear problems.
double * X() const
Returns pointer to current solution.
Epetra_CompObject & operator=(const Epetra_CompObject &src)
Epetra_SerialDenseMatrix: A class for constructing and using real double precision general dense matr...
double * AI() const
Returns pointer to the inverted matrix (may be the same as A() if factorization done in place)...
int NRHS() const
Returns the number of current right hand sides and solution vectors.
bool Solved()
Returns true if the current set of vectors has been solved.
Epetra_SerialDenseMatrix * Matrix_
virtual int RowDim() const
Returns the row dimension of operator.
int N() const
Returns column dimension of system.
double ANORM() const
Returns the 1-Norm of the this matrix (returns -1 if not yet computed).
int LDA() const
Returns the leading dimension of the this matrix.
Epetra_SerialDenseMatrix * RHS() const
Returns pointer to current RHS.
Epetra_SerialDenseMatrix * InvertedMatrix() const
Returns pointer to inverted matrix (assuming inverse has been performed).
Epetra_BLAS: The Epetra BLAS Wrapper Class.
virtual const char * Label() const
Epetra_Object Label access funtion.
Epetra_Object: The base Epetra class.
Epetra_SerialDenseMatrix * RHS_
Epetra_CompObject: Functionality and data that is common to all computational classes.
virtual const char * Label() const
Returns a character string describing the operator.
Epetra_LAPACK: The Epetra LAPACK Wrapper Class.
Epetra_SerialDenseOperator: A pure virtual class for using real-valued double-precision operators...
virtual bool HasNormInf() const
Returns true if the this object can provide an approximate Inf-norm, false otherwise.
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.
int LDX() const
Returns the leading dimension of the solution.
bool Inverted()
Returns true if matrix inverse has been computed (inverse available via AF() and LDAF()).
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...
Epetra_SerialDenseMatrix * Matrix() const
Returns pointer to current matrix.
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...
int Solve(int, TYPE *, TYPE *, TYPE *)
void SolveWithTranspose(bool Flag)
Causes equilibration to be called just before the matrix factorization as part of the call to Factor...
virtual int ColDim() const
Returns the column dimension of operator.
bool Transpose()
Returns true if transpose of this matrix has and will be used.
virtual double NormInf() const
Returns the infinity norm of the global matrix.
int LDAI() const
Returns the leading dimension of the inverted matrix.
Epetra_SerialDenseMatrix * LHS_
int M() const
Returns row dimension of system.
virtual int SetUseTranspose(bool use_transpose)
If set true, transpose of this operator will be applied.
bool Factored()
Returns true if matrix is factored (factor available via AF() and LDAF()).
int LDB() const
Returns the leading dimension of the RHS.