33 #ifndef ANASAZI_SPECIALIZED_EPETRA_ADAPTER_HPP
34 #define ANASAZI_SPECIALIZED_EPETRA_ADAPTER_HPP
37 #include "Anasaziepetra_DLLExportMacro.h"
43 #include "Teuchos_Assert.hpp"
44 #include "Teuchos_SerialDenseMatrix.hpp"
45 #include "Teuchos_RCP.hpp"
46 #include "Epetra_MultiVector.h"
47 #include "Epetra_Vector.h"
48 #include "Epetra_Operator.h"
49 #include "Epetra_Map.h"
50 #include "Epetra_LocalMap.h"
52 #if defined(HAVE_ANASAZI_TPETRA) && defined(HAVE_ANASAZI_TSQR)
53 # include <Tpetra_ConfigDefs.hpp>
54 # if defined(HAVE_TPETRA_EPETRA)
55 # include <Epetra_TsqrAdaptor.hpp>
56 # endif // defined(HAVE_TPETRA_EPETRA)
57 #endif // defined(HAVE_ANASAZI_TPETRA) && defined(HAVE_ANASAZI_TSQR)
97 EpetraOpMultiVec(
const Teuchos::RCP<Epetra_Operator> &Op,
const Epetra_BlockMap& Map_in,
const int numvecs);
109 EpetraOpMultiVec(
const Teuchos::RCP<Epetra_Operator> &Op,
const Epetra_BlockMap& Map_in,
double * array,
const int numvecs,
const int stride=0);
118 EpetraOpMultiVec(
const Teuchos::RCP<Epetra_Operator> &Op, Epetra_DataAccess CV,
const Epetra_MultiVector& P_vec,
const std::vector<int>& index);
174 Teuchos::RCP<Epetra_MultiVector> GetEpetraMultiVector() {
return Epetra_MV; }
186 if ( Epetra_MV->Map().GlobalIndicesLongLong() )
187 return static_cast<ptrdiff_t>( Epetra_MV->GlobalLength64() );
189 return static_cast<ptrdiff_t
>( Epetra_MV->GlobalLength() );
202 const Teuchos::SerialDenseMatrix<int,double>& B,
212 void MvTransMv (
double alpha,
const MultiVec<double>& A, Teuchos::SerialDenseMatrix<int,double>& B
213 #ifdef HAVE_ANASAZI_EXPERIMENTAL
221 #ifdef HAVE_ANASAZI_EXPERIMENTAL
230 "Anasazi::EpetraOpMultiVec::MvScale call to Epetra_MultiVector::Scale() returned a nonzero value.");
235 void MvScale (
const std::vector<double>& alpha );
244 void MvNorm ( std::vector<double> & normvec )
const;
261 "Anasazi::EpetraOpMultiVec::MvRandom call to Epetra_MultiVector::Random() returned a nonzero value.");
268 "Anasazi::EpetraOpMultiVec::MvInit call to Epetra_MultiVector::PutScalar() returned a nonzero value.");
287 void MvPrint( std::ostream& os )
const { Epetra_MV->Print( os ); }
295 #pragma warning(push)
296 #pragma warning(disable:4251)
298 Teuchos::RCP<Epetra_Operator> Epetra_OP;
299 Teuchos::RCP<Epetra_MultiVector> Epetra_MV;
300 Teuchos::RCP<Epetra_MultiVector> Epetra_MV_Temp;
309 #endif // end of file ANASAZI_SPECIALIZED_EPETRA_ADAPTER_HPP
EpetraMultiVecAccessor is an interfaceto allow any Anasazi::MultiVec implementation that is based on ...
EpetraSpecializedMultiVecFailure is thrown when a return value from an Epetra call on an Epetra_Multi...
ptrdiff_t GetGlobalLength() const
void MvInit(double alpha)
Replace each element of the vectors in *this with alpha.
virtual ~EpetraOpMultiVec()
Destructor.
int GetNumberVecs() const
Obtain the vector length of *this.
An exception class parent to all Anasazi exceptions.
Interface for multivectors used by Anasazi' linear solvers.
ConjType
Enumerated types used to specify conjugation arguments.
void MvScale(double alpha)
Scale each element of the vectors in *this with alpha.
Specialized adapter class for Anasazi::MultiVec that uses Epetra_MultiVector and Epetra_Operator to d...
const Epetra_MultiVector * GetEpetraMultiVec() const
Return the pointer to the Epetra_MultiVector object.
Anasazi header file which uses auto-configuration information to include necessary C++ headers...
void MvPrint(std::ostream &os) const
Print *this EpetraOpMultiVec.
Epetra_MultiVector * GetEpetraMultiVec()
Return the pointer to the Epetra_MultiVector object.
Templated virtual class for creating operators that can interface with the Anasazi::OperatorTraits cl...
Types and exceptions used within Anasazi solvers and interfaces.
void MvRandom()
Fill the vectors in *this with random numbers.
int GetVecLength() const
Obtain the number of vectors in *this.
Interface for multivectors used by Anasazi's linear solvers.
Declarations of Anasazi multi-vector and operator classes using Epetra_MultiVector and Epetra_Operato...