14 #ifndef ANASAZI_TRACEMIN_HPP
15 #define ANASAZI_TRACEMIN_HPP
21 #ifdef HAVE_ANASAZI_EPETRA
22 #include "Epetra_Operator.h"
43 namespace Experimental {
95 template <
class ScalarType,
class MV,
class OP>
158 const MagnitudeType ONE;
159 const MagnitudeType ZERO;
160 const MagnitudeType NANVAL;
179 template <
class ScalarType,
class MV,
class OP>
188 TraceMinBase<ScalarType,MV,OP>(problem,sorter,printer,tester,ortho,params),
189 ONE(Teuchos::ScalarTraits<MagnitudeType>::one()),
190 ZERO(Teuchos::ScalarTraits<MagnitudeType>::zero()),
191 NANVAL(Teuchos::ScalarTraits<MagnitudeType>::nan())
196 template <
class ScalarType,
class MV,
class OP>
199 MVT::MvAddMv(ONE,*this->X_,-ONE,*Delta,*this->V_);
203 #ifdef ANASAZI_TEUCHOS_TIME_MONITOR
206 this->count_ApplyM_+= this->blockSize_;
208 OPT::Apply(*this->MOp_,*this->V_,*this->MV_);
213 #ifdef ANASAZI_TEUCHOS_TIME_MONITOR
217 if(this->numAuxVecs_ > 0)
219 rank = this->orthman_->projectAndNormalizeMat(*this->V_,this->auxVecs_,
221 Teuchos::null,this->MV_,this->MauxVecs_);
225 rank = this->orthman_->normalizeMat(*this->V_,Teuchos::null,this->MV_);
234 if(this->Op_ != Teuchos::null)
236 #ifdef ANASAZI_TEUCHOS_TIME_MONITOR
239 this->count_ApplyOp_+= this->blockSize_;
240 OPT::Apply(*this->Op_,*this->V_,*this->KV_);
246 template <
class ScalarType,
class MV,
class OP>
250 MVT::MvAddMv(ONE,*this->X_,-ONE,*Delta,*this->V_);
253 if(this->numAuxVecs_ > 0)
255 #ifdef ANASAZI_TEUCHOS_TIME_MONITOR
258 this->orthman_->projectMat(*this->V_,this->auxVecs_);
262 if(this->Op_ != Teuchos::null)
264 #ifdef ANASAZI_TEUCHOS_TIME_MONITOR
267 this->count_ApplyOp_+= this->blockSize_;
269 OPT::Apply(*this->Op_,*this->V_,*this->KV_);
274 int rank = this->orthman_->normalizeMat(*this->KV_,gamma);
282 RCP<MV> tempMV = MVT::CloneCopy(*this->V_);
283 MVT::MvTimesMatAddMv(ONE,*tempMV,*gamma,ZERO,*this->V_);
288 #ifdef ANASAZI_TEUCHOS_TIME_MONITOR
291 this->count_ApplyM_+= this->blockSize_;
293 OPT::Apply(*this->MOp_,*this->V_,*this->MV_);
Abstract base class for trace minimization eigensolvers.
This class implements a TraceMIN iteration, a preconditioned iteration for solving linear symmetric p...
Templated virtual class for providing orthogonalization/orthonormalization methods with matrix-based ...
This class defines the interface required by an eigensolver and status test class to compute solution...
Declaration of basic traits for the multivector type.
Virtual base class which defines basic traits for the operator type.
TraceMin(const Teuchos::RCP< Eigenproblem< ScalarType, MV, OP > > &problem, const Teuchos::RCP< SortManager< typename Teuchos::ScalarTraits< ScalarType >::magnitudeType > > &sorter, const Teuchos::RCP< OutputManager< ScalarType > > &printer, const Teuchos::RCP< StatusTest< ScalarType, MV, OP > > &tester, const Teuchos::RCP< MatOrthoManager< ScalarType, MV, OP > > &ortho, Teuchos::ParameterList ¶ms)
TraceMin constructor with eigenproblem, solver utilities, and parameter list of solver options...
Basic implementation of the Anasazi::SortManager class.
Pure virtual base class which describes the basic interface to the iterative eigensolver.
Anasazi's templated, static class providing utilities for the solvers.
Anasazi's templated virtual class for providing routines for orthogonalization and orthonormalization...
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
Output managers remove the need for the eigensolver to know any information about the required output...
Traits class which defines basic operations on multivectors.
Virtual base class which defines basic traits for the operator type.
Types and exceptions used within Anasazi solvers and interfaces.
This is an abstract base class for the trace minimization eigensolvers.
Anasazi's templated pure virtual class for managing the sorting of approximate eigenvalues computed b...
Common interface of stopping criteria for Anasazi's solvers.
int setMatrix(const RCP< SerialDenseMatrix< OrdinalType, ScalarType > > &A)
Class which provides internal utilities for the Anasazi solvers.