14 #ifndef ANASAZI_EPETRA_ADAPTER_HPP
15 #define ANASAZI_EPETRA_ADAPTER_HPP
18 #include "Anasaziepetra_DLLExportMacro.h"
24 #include "Teuchos_Assert.hpp"
26 #include "Teuchos_FancyOStream.hpp"
28 #include "Epetra_MultiVector.h"
29 #include "Epetra_Vector.h"
30 #include "Epetra_Operator.h"
31 #include "Epetra_Map.h"
32 #include "Epetra_LocalMap.h"
33 #include "Epetra_Comm.h"
35 #if defined(HAVE_ANASAZI_TPETRA) && defined(HAVE_ANASAZI_TSQR)
36 # include <Tpetra_ConfigDefs.hpp>
37 # if defined(HAVE_TPETRA_EPETRA)
38 # include <Epetra_TsqrAdaptor.hpp>
39 # endif // defined(HAVE_TPETRA_EPETRA)
40 #endif // defined(HAVE_ANASAZI_TPETRA) && defined(HAVE_ANASAZI_TSQR)
185 if ( Map().GlobalIndicesLongLong() )
186 return static_cast<ptrdiff_t
>( GlobalLength64() );
188 return static_cast<ptrdiff_t
>( GlobalLength() );
213 #ifdef HAVE_ANASAZI_EXPERIMENTAL
221 #ifdef HAVE_ANASAZI_EXPERIMENTAL
230 "Anasazi::EpetraMultiVec::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 {
245 if (((
int)normvec.size() >= GetNumberVecs()) ) {
247 "Anasazi::EpetraMultiVec::MvNorm call to Epetra_MultiVector::Norm2() returned a nonzero value.");
265 "Anasazi::EpetraMultiVec::MvRandom call to Epetra_MultiVector::Random() returned a nonzero value.");
272 "Anasazi::EpetraMultiVec::MvInit call to Epetra_MultiVector::PutScalar() returned a nonzero value.");
291 void MvPrint( std::ostream& os )
const { os << *
this << std::endl; };
335 #pragma warning(push)
336 #pragma warning(disable:4251)
372 bool isAInverse =
true );
393 const char*
Label()
const {
return "Epetra_Operator applying A^{-1}M"; };
422 #pragma warning(push)
423 #pragma warning(disable:4251)
477 const char*
Label()
const {
return "Epetra_Operator applying A^TA or AA^T"; };
504 #pragma warning(push)
505 #pragma warning(disable:4251)
540 bool isTrans =
false );
555 #pragma warning(push)
556 #pragma warning(disable:4251)
604 #pragma warning(push)
605 #pragma warning(disable:4251)
653 #pragma warning(push)
654 #pragma warning(disable:4251)
699 "Belos::MultiVecTraits<double, Epetra_MultiVector>::"
700 "Clone(mv, outNumVecs = " << outNumVecs <<
"): "
701 "outNumVecs must be positive.");
728 const int outNumVecs = index.size();
732 "Anasazi::MultiVecTraits<double,Epetra_MultiVector>::"
733 "CloneCopy(mv, index = {}): At least one vector must be"
735 if (outNumVecs > inNumVecs)
737 std::ostringstream os;
738 os <<
"Anasazi::MultiVecTraits<double,Epetra_MultiVector>::"
739 "CloneCopy(mv, index = {";
740 for (
int k = 0; k < outNumVecs - 1; ++k)
741 os << index[k] <<
", ";
742 os << index[outNumVecs-1] <<
"}): There are " << outNumVecs
743 <<
" indices to copy, but only " << inNumVecs <<
" columns of mv.";
751 const int minIndex = *std::min_element (index.begin(), index.end());
752 const int maxIndex = *std::max_element (index.begin(), index.end());
756 std::ostringstream os;
757 os <<
"Anasazi::MultiVecTraits<double,Epetra_MultiVector>::"
758 "CloneCopy(mv, index = {";
759 for (
int k = 0; k < outNumVecs - 1; ++k)
760 os << index[k] <<
", ";
761 os << index[outNumVecs-1] <<
"}): Indices must be nonnegative, but "
762 "the smallest index " << minIndex <<
" is negative.";
765 if (maxIndex >= inNumVecs)
767 std::ostringstream os;
768 os <<
"Anasazi::MultiVecTraits<double,Epetra_MultiVector>::"
769 "CloneCopy(mv, index = {";
770 for (
int k = 0; k < outNumVecs - 1; ++k)
771 os << index[k] <<
", ";
772 os << index[outNumVecs-1] <<
"}): Indices must be strictly less than "
773 "the number of vectors " << inNumVecs <<
" in mv; the largest index "
774 << maxIndex <<
" is out of bounds.";
777 #endif // TEUCHOS_DEBUG
781 std::vector<int>& tmpind =
const_cast< std::vector<int>&
> (index);
789 const int outNumVecs = index.
size();
790 const bool validRange = outNumVecs > 0 && index.
lbound() >= 0 &&
791 index.
ubound() < inNumVecs;
794 std::ostringstream os;
795 os <<
"Anasazi::MultiVecTraits<double,Epetra_MultiVector>::Clone(mv,"
796 "index=[" << index.
lbound() <<
", " << index.
ubound() <<
"]): ";
798 os.str() <<
"Column index range must be nonempty.");
800 os.str() <<
"Column index range must be nonnegative.");
802 os.str() <<
"Column index range must not exceed "
803 "number of vectors " << inNumVecs <<
" in the "
804 "input multivector.");
818 const int outNumVecs = index.size();
822 "Anasazi::MultiVecTraits<double,Epetra_MultiVector>::"
823 "CloneViewNonConst(mv, index = {}): The output view "
824 "must have at least one column.");
825 if (outNumVecs > inNumVecs)
827 std::ostringstream os;
828 os <<
"Anasazi::MultiVecTraits<double,Epetra_MultiVector>::"
829 "CloneViewNonConst(mv, index = {";
830 for (
int k = 0; k < outNumVecs - 1; ++k)
831 os << index[k] <<
", ";
832 os << index[outNumVecs-1] <<
"}): There are " << outNumVecs
833 <<
" indices to view, but only " << inNumVecs <<
" columns of mv.";
841 const int minIndex = *std::min_element (index.begin(), index.end());
842 const int maxIndex = *std::max_element (index.begin(), index.end());
846 std::ostringstream os;
847 os <<
"Anasazi::MultiVecTraits<double,Epetra_MultiVector>::"
848 "CloneViewNonConst(mv, index = {";
849 for (
int k = 0; k < outNumVecs - 1; ++k)
850 os << index[k] <<
", ";
851 os << index[outNumVecs-1] <<
"}): Indices must be nonnegative, but "
852 "the smallest index " << minIndex <<
" is negative.";
855 if (maxIndex >= inNumVecs)
857 std::ostringstream os;
858 os <<
"Anasazi::MultiVecTraits<double,Epetra_MultiVector>::"
859 "CloneViewNonConst(mv, index = {";
860 for (
int k = 0; k < outNumVecs - 1; ++k)
861 os << index[k] <<
", ";
862 os << index[outNumVecs-1] <<
"}): Indices must be strictly less than "
863 "the number of vectors " << inNumVecs <<
" in mv; the largest index "
864 << maxIndex <<
" is out of bounds.";
867 #endif // TEUCHOS_DEBUG
871 std::vector<int>& tmpind =
const_cast< std::vector<int>&
> (index);
878 const bool validRange = index.
size() > 0 &&
880 index.
ubound() < mv.NumVectors();
883 std::ostringstream os;
884 os <<
"Anasazi::MultiVecTraits<double,Epetra_MultiVector>::CloneView"
885 "NonConst(mv,index=[" << index.
lbound() <<
", " << index.
ubound()
888 os.str() <<
"Column index range must be nonempty.");
890 os.str() <<
"Column index range must be nonnegative.");
892 std::invalid_argument,
893 os.str() <<
"Column index range must not exceed "
894 "number of vectors " << mv.NumVectors() <<
" in "
895 "the input multivector.");
909 const int outNumVecs = index.size();
913 "Belos::MultiVecTraits<double,Epetra_MultiVector>::"
914 "CloneView(mv, index = {}): The output view "
915 "must have at least one column.");
916 if (outNumVecs > inNumVecs)
918 std::ostringstream os;
919 os <<
"Belos::MultiVecTraits<double,Epetra_MultiVector>::"
920 "CloneView(mv, index = {";
921 for (
int k = 0; k < outNumVecs - 1; ++k)
922 os << index[k] <<
", ";
923 os << index[outNumVecs-1] <<
"}): There are " << outNumVecs
924 <<
" indices to view, but only " << inNumVecs <<
" columns of mv.";
932 const int minIndex = *std::min_element (index.begin(), index.end());
933 const int maxIndex = *std::max_element (index.begin(), index.end());
937 std::ostringstream os;
938 os <<
"Belos::MultiVecTraits<double,Epetra_MultiVector>::"
939 "CloneView(mv, index = {";
940 for (
int k = 0; k < outNumVecs - 1; ++k)
941 os << index[k] <<
", ";
942 os << index[outNumVecs-1] <<
"}): Indices must be nonnegative, but "
943 "the smallest index " << minIndex <<
" is negative.";
946 if (maxIndex >= inNumVecs)
948 std::ostringstream os;
949 os <<
"Belos::MultiVecTraits<double,Epetra_MultiVector>::"
950 "CloneView(mv, index = {";
951 for (
int k = 0; k < outNumVecs - 1; ++k)
952 os << index[k] <<
", ";
953 os << index[outNumVecs-1] <<
"}): Indices must be strictly less than "
954 "the number of vectors " << inNumVecs <<
" in mv; the largest index "
955 << maxIndex <<
" is out of bounds.";
958 #endif // TEUCHOS_DEBUG
962 std::vector<int>& tmpind =
const_cast< std::vector<int>&
> (index);
969 const bool validRange = index.
size() > 0 &&
971 index.
ubound() < mv.NumVectors();
974 std::ostringstream os;
975 os <<
"Anasazi::MultiVecTraits<double,Epetra_MultiVector>::CloneView"
976 "(mv,index=[" << index.
lbound() <<
", " << index.
ubound()
979 os.str() <<
"Column index range must be nonempty.");
981 os.str() <<
"Column index range must be nonnegative.");
983 std::invalid_argument,
984 os.str() <<
"Column index range must not exceed "
985 "number of vectors " << mv.NumVectors() <<
" in "
986 "the input multivector.");
999 if (mv.Map().GlobalIndicesLongLong())
1000 return static_cast<ptrdiff_t>( mv.GlobalLength64() );
1002 return static_cast<ptrdiff_t
>( mv.GlobalLength() );
1007 {
return mv.NumVectors(); }
1010 {
return mv.ConstantStride(); }
1026 "Anasazi::MultiVecTraits<double, Epetra_MultiVector>::MvTimesMatAddMv call to Epetra_MultiVector::Multiply() returned a nonzero value.");
1065 "Anasazi::MultiVecTraits<double, Epetra_MultiVector>::MvAddMv call to Epetra_MultiVector::Update(alpha,A,0.0) returned a nonzero value.");
1068 else if (alpha == 0.0) {
1076 "Anasazi::MultiVecTraits<double, Epetra_MultiVector>::MvAddMv call to Epetra_MultiVector::Update(beta,B,0.0) returned a nonzero value.");
1082 "Anasazi::MultiVecTraits<double, Epetra_MultiVector>::MvAddMv call to Epetra_MultiVector::Update(alpha,A,beta,B,0.0) returned a nonzero value.");
1089 #ifdef HAVE_ANASAZI_EXPERIMENTAL
1095 Epetra_MultiVector B_Pvec(Epetra_DataAccess::View, LocalMap, B.values(), B.stride(), B.numCols());
1098 "Anasazi::MultiVecTraits<double, Epetra_MultiVector>::MvTransMv call to Epetra_MultiVector::Multiply() returned a nonzero value.");
1104 #ifdef HAVE_ANASAZI_EXPERIMENTAL
1109 #ifdef TEUCHOS_DEBUG
1111 "Anasazi::MultiVecTraits<double,Epetra_MultiVector>::MvDot(A,B,b): A and B must have the same number of vectors.");
1113 "Anasazi::MultiVecTraits<double,Epetra_MultiVector>::MvDot(A,B,b): b must have room for all dot products.");
1116 "Anasazi::MultiVecTraits<double, Epetra_MultiVector>::MvDot(A,B,b) call to Epetra_MultiVector::Dot() returned a nonzero value.");
1128 #ifdef TEUCHOS_DEBUG
1130 "Anasazi::MultiVecTraits<double,Epetra_MultiVector>::MvNorm(mv,normvec): normvec must be the same size of mv.");
1133 "Anasazi::MultiVecTraits<double, Epetra_MultiVector>::MvNorm call to Epetra_MultiVector::Norm2() returned a nonzero value.");
1144 const std::vector<int>& index,
1148 const int outNumVecs = index.size();
1156 if (inNumVecs != outNumVecs)
1158 std::ostringstream os;
1159 os <<
"Belos::MultiVecTraits<double,Epetra_MultiVector>::"
1160 "SetBlock(A, mv, index = {";
1163 for (
int k = 0; k < outNumVecs - 1; ++k)
1164 os << index[k] <<
", ";
1165 os << index[outNumVecs-1];
1167 os <<
"}): A has only " << inNumVecs <<
" columns, but there are "
1168 << outNumVecs <<
" indices in the index vector.";
1178 if (outNumVecs == inNumVecs)
1179 A_view = Teuchos::rcpFromRef (A);
1198 const int numColsA = A.NumVectors();
1199 const int numColsMv = mv.NumVectors();
1201 const bool validIndex = index.
lbound() >= 0 && index.
ubound() < numColsMv;
1203 const bool validSource = index.
size() <= numColsA;
1205 if (! validIndex || ! validSource)
1207 std::ostringstream os;
1208 os <<
"Anasazi::MultiVecTraits<double, Epetra_MultiVector>::SetBlock"
1209 "(A, index=[" << index.
lbound() <<
", " << index.
ubound() <<
"], "
1212 os.str() <<
"Range lower bound must be nonnegative.");
1214 os.str() <<
"Range upper bound must be less than "
1215 "the number of columns " << numColsA <<
" in the "
1216 "'mv' output argument.");
1218 os.str() <<
"Range must have no more elements than"
1219 " the number of columns " << numColsA <<
" in the "
1220 "'A' input argument.");
1229 if (index.
lbound() == 0 && index.
ubound()+1 == numColsMv)
1230 mv_view = Teuchos::rcpFromRef (mv);
1238 if (index.
size() == numColsA)
1239 A_view = Teuchos::rcpFromRef (A);
1259 if (numColsA > numColsMv)
1261 std::ostringstream os;
1262 os <<
"Anasazi::MultiVecTraits<double, Epetra_MultiVector>::Assign"
1265 os.str() <<
"Input multivector 'A' has "
1266 << numColsA <<
" columns, but output multivector "
1267 "'mv' has only " << numColsMv <<
" columns.");
1272 if (numColsMv == numColsA)
1273 mv_view = Teuchos::rcpFromRef (mv);
1292 "Anasazi::MultiVecTraits<double, Epetra_MultiVector>::MvScale call to Epetra_MultiVector::Scale(mv,double alpha) returned a nonzero value.");
1300 int numvecs = mv.NumVectors();
1301 #ifdef TEUCHOS_DEBUG
1303 "Anasazi::MultiVecTraits<double, Epetra_MultiVector>::MvScale(mv,vector alpha): size of alpha inconsistent with number of vectors in mv.")
1305 for (
int i=0; i<numvecs; i++) {
1307 "Anasazi::MultiVecTraits<double, Epetra_MultiVector>::MvScale call to Epetra_MultiVector::Scale() returned a nonzero value.");
1316 "Anasazi::MultiVecTraits<double, Epetra_MultiVector>::MvRandom call to Epetra_MultiVector::Random() returned a nonzero value.");
1324 "Anasazi::MultiVecTraits<double, Epetra_MultiVector>::MvInit call to Epetra_MultiVector::PutScalar() returned a nonzero value.");
1335 { os << mv << std::endl; }
1339 #if defined(HAVE_ANASAZI_TPETRA) && defined(HAVE_ANASAZI_TSQR)
1340 # if defined(HAVE_TPETRA_EPETRA)
1341 typedef Epetra::TsqrAdaptor tsqr_adaptor_type;
1347 # endif // defined(HAVE_TPETRA_EPETRA)
1348 #endif // defined(HAVE_ANASAZI_TPETRA) && defined(HAVE_ANASAZI_TSQR)
1380 #ifdef TEUCHOS_DEBUG
1382 "Anasazi::OperatorTraits<double,Epetra_MultiVector,Epetra_Operator>::Apply(Op,x,y): x and y must have the same number of columns.");
1384 int ret = Op.
Apply(x,y);
1386 "Anasazi::OperatorTraits<double,Epetra_Multivector,Epetra_Operator>::Apply(): Error in Epetra_Operator::Apply(). Code " << ret);
1401 int myRank = comm.
MyPID();
1402 int numProcs = comm.
NumProc();
1405 comm.
MinAll( &myRank, &rootRank, 1 );
ScalarType * values() const
basic_FancyOStream & setProcRankAndSize(const int procRank, const int numProcs)
void MvRandom()
Fill the vectors in *this with random numbers.
Adapter class for creating an operators often used in solving generalized eigenproblems.
EpetraMultiVecAccessor is an interfaceto allow any Anasazi::MultiVec implementation that is based on ...
const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
static void MvAddMv(double alpha, const Epetra_MultiVector &A, double beta, const Epetra_MultiVector &B, Epetra_MultiVector &mv)
Replace mv with .
void MvInit(double alpha)
Replace each element of the vectors in *this with alpha.
static void SetBlock(const Epetra_MultiVector &A, const std::vector< int > &index, Epetra_MultiVector &mv)
Copy the vectors in A to a set of vectors in mv indicated by the indices given in index...
virtual ~EpetraMultiVecAccessor()
Destructor.
~EpetraSymMVOp()
Destructor.
Adapter class for creating a weighted symmetric operator from an Epetra_MultiVector and Epetra_Operat...
static void MvInit(Epetra_MultiVector &mv, double alpha=Teuchos::ScalarTraits< double >::zero())
Replace each element of the vectors in mv with alpha.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
~EpetraWSymMVOp()
Destructor.
Virtual base class which defines basic traits for the operator type.
const char * Label() const
Returns a character string describing the operator.
void MvNorm(std::vector< double > &normvec) const
Compute the 2-norm of each individual vector of *this. Upon return, normvec[i] holds the 2-norm of th...
virtual Epetra_MultiVector * GetEpetraMultiVec()
Return the pointer to the Epetra_MultiVector object.
static void MvPrint(const Epetra_MultiVector &mv, std::ostream &os)
Print the mv multi-vector to the os output stream.
static void MvRandom(Epetra_MultiVector &mv)
Replace the vectors in mv with random vectors.
static void MvTransMv(double alpha, const Epetra_MultiVector &A, const Epetra_MultiVector &mv, Teuchos::SerialDenseMatrix< int, double > &B)
Compute a dense matrix B through the matrix-matrix multiply .
static void Assign(const MV &A, MV &mv)
mv := A
virtual int MinAll(double *PartialMins, double *GlobalMins, int Count) const =0
An exception class parent to all Anasazi exceptions.
virtual int MyPID() const =0
Interface for multivectors used by Anasazi' linear solvers.
Basic adapter class for Anasazi::Operator that uses Epetra_Operator.
static void MvDot(const Epetra_MultiVector &A, const Epetra_MultiVector &B, std::vector< double > &b)
Compute a vector b where the components are the individual dot-products of the i-th columns of A and ...
const char * Label() const
Returns a character string describing the operator.
bool HasNormInf() const
Returns true if this object can provide an approximate inf-norm [always false for this operator]...
ptrdiff_t GetGlobalLength() const
The number of rows in the multivector.
virtual int Apply(const Epetra_MultiVector &X, Epetra_MultiVector &Y) const =0
virtual const Epetra_Comm & Comm() const =0
ConjType
Enumerated types used to specify conjugation arguments.
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
static Teuchos::RCP< Epetra_MultiVector > CloneCopy(const Epetra_MultiVector &mv, const std::vector< int > &index)
Creates a new Epetra_MultiVector and copies the selected contents of mv into the new vector (deep cop...
Epetra_MultiVector * GetEpetraMultiVec()
Return the pointer to the Epetra_MultiVector object.
bool HasNormInf() const
Returns true if this object can provide an approximate inf-norm [always false for this operator]...
int GetNumberVecs() const
The number of vectors (i.e., columns) in the multivector.
static void MvScale(Epetra_MultiVector &mv, const std::vector< double > &alpha)
Scale each element of the i-th vector in mv with alpha[i].
const Epetra_Comm & Comm() const
Returns the Epetra_Comm communicator associated with this operator.
static void MvTimesMatAddMv(double alpha, const Epetra_MultiVector &A, const Teuchos::SerialDenseMatrix< int, double > &B, double beta, Epetra_MultiVector &mv)
Update mv with .
Traits class which defines basic operations on multivectors.
static Teuchos::RCP< MV > CloneCopy(const MV &mv)
Creates a new MV and copies contents of mv into the new vector (deep copy).
static Teuchos::RCP< const Epetra_MultiVector > CloneView(const Epetra_MultiVector &mv, const std::vector< int > &index)
Creates a new const Epetra_MultiVector that shares the selected contents of mv (shallow copy)...
Adapter class for creating a weighted operator from an Epetra_MultiVector and Epetra_Operator.
const Epetra_Map & OperatorDomainMap() const
Returns the Epetra_Map object associated with the domain of this operator.
bool UseTranspose() const
Returns the current UseTranspose setting [always false for this operator].
const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
const Epetra_MultiVector * GetEpetraMultiVec() const
Return the pointer to the Epetra_MultiVector object.
static Teuchos::RCP< Epetra_MultiVector > Clone(const Epetra_MultiVector &mv, const int outNumVecs)
Creates a new empty Epetra_MultiVector containing numVecs columns.
Anasazi header file which uses auto-configuration information to include necessary C++ headers...
double NormInf() const
Returns the infinity norm of the global matrix [not functional for this operator].
basic_FancyOStream & setOutputToRootOnly(const int rootRank)
static Teuchos::RCP< MV > CloneViewNonConst(MV &mv, const std::vector< int > &index)
Creates a new MV that shares the selected contents of mv (shallow copy).
static ptrdiff_t GetGlobalLength(const Epetra_MultiVector &mv)
Obtain the vector length of mv.
int SetUseTranspose(bool)
If set true, the transpose of this operator will be applied [not functional for this operator]...
const Epetra_Map & OperatorRangeMap() const
Returns the Epetra_Map object associated with the range of this operator.
Adapter class for creating a symmetric operator from an Epetra_Operator.
static Teuchos::RCP< const MV > CloneView(const MV &mv, const std::vector< int > &index)
Creates a new const MV that shares the selected contents of mv (shallow copy).
void MvScale(double alpha)
Scale each element of the vectors in *this with alpha.
static void MvScale(Epetra_MultiVector &mv, double alpha)
Scale each element of the vectors in mv with alpha.
static void SetBlock(const MV &A, const std::vector< int > &index, MV &mv)
Copy the vectors in A to a set of vectors in mv indicated by the indices given in index...
static void Apply(const Epetra_Operator &Op, const Epetra_MultiVector &x, Epetra_MultiVector &y)
This method takes the Epetra_MultiVector x and applies the Epetra_Operator Op to it resulting in the ...
~EpetraW2SymMVOp()
Destructor.
static int GetNumberVecs(const MV &mv)
Obtain the number of vectors in mv.
OrdinalType numCols() const
const Epetra_Comm & Comm() const
Returns the Epetra_Comm communicator associated with this operator.
Templated virtual class for creating operators that can interface with the Anasazi::OperatorTraits cl...
virtual int NumProc() const =0
static Teuchos::RCP< Epetra_MultiVector > CloneViewNonConst(Epetra_MultiVector &mv, const std::vector< int > &index)
Creates a new Epetra_MultiVector that shares the selected contents of mv (shallow copy)...
EpetraMultiVecFailure is thrown when a return value from an Epetra call on an Epetra_MultiVector is n...
Types and exceptions used within Anasazi solvers and interfaces.
Abstract class definition for Anasazi output stream.
bool UseTranspose() const
Returns the current UseTranspose setting [always false for this operator].
virtual const Epetra_MultiVector * GetEpetraMultiVec() const
Return the pointer to the Epetra_MultiVector object.
Interface for multivectors used by Anasazi's linear solvers.
Adapter class for creating a symmetric operator from an Epetra_MultiVector.
static void MvNorm(const Epetra_MultiVector &mv, std::vector< double > &normvec)
Compute the 2-norm of each individual vector of mv. Upon return, normvec[i] holds the value of ...
static int GetNumberVecs(const Epetra_MultiVector &mv)
Obtain the number of vectors in mv.
static Teuchos::RCP< Epetra_MultiVector > CloneCopy(const Epetra_MultiVector &mv)
Creates a new Epetra_MultiVector and copies contents of mv into the new vector (deep copy)...
Anasazi's templated virtual class for constructing an operator that can interface with the OperatorTr...
virtual ~EpetraMultiVec()
Destructor.
int SetUseTranspose(bool)
If set true, the transpose of this operator will be applied [not functional for this operator]...
double NormInf() const
Returns the infinity norm of the global matrix [not functional for this operator].
OrdinalType stride() const
OrdinalType numRows() const
EpetraOpFailure is thrown when a return value from an Epetra call on an Epetra_Operator is non-zero...
void MvPrint(std::ostream &os) const
Print *this EpetraMultiVec.
Exceptions thrown to signal error in operator application.
Basic adapter class for Anasazi::MultiVec that uses Epetra_MultiVector.