10 #ifndef __Thyra_TsqrAdaptor_hpp
11 #define __Thyra_TsqrAdaptor_hpp
18 #include "Thyra_MultiVectorBase.hpp"
19 #include "Thyra_SpmdVectorSpaceBase.hpp"
22 # include "Teuchos_DefaultMpiComm.hpp"
24 #include "Teuchos_DefaultSerialComm.hpp"
25 #include "Teuchos_ParameterListAcceptorDefaultBase.hpp"
53 template<
class Scalar>
57 typedef Scalar scalar_type;
58 typedef int ordinal_type;
70 throw std::logic_error (
"Thyra adaptor for TSQR not implemented");
76 throw std::logic_error (
"Thyra adaptor for TSQR not implemented");
80 getValidParameters ()
const
82 throw std::logic_error (
"Thyra adaptor for TSQR not implemented");
88 throw std::logic_error (
"Thyra adaptor for TSQR not implemented");
118 throw std::logic_error (
"Thyra adaptor for TSQR not implemented");
154 const magnitude_type& )
156 throw std::logic_error (
"Thyra adaptor for TSQR not implemented");
171 getComm (
const MV& X)
175 using Teuchos::rcp_dynamic_cast;
176 using Teuchos::rcp_implicit_cast;
199 rcp_dynamic_cast<
const Teuchos::MpiComm<Thyra::Ordinal> > (thyraComm);
204 thyraSerialComm.
is_null (), std::runtime_error,
205 "Thyra's communicator is neither an MpiComm nor a SerialComm. "
206 "Sorry, I have no idea what to do with it in that case.");
213 RCP<const Teuchos::OpaqueWrapper<MPI_Comm> > rawMpiComm = thyraMpiComm->getRawMpiComm ();
219 #else // NOT HAVE_MPI
221 RCP<const Teuchos::SerialComm<Thyra::Ordinal> > thyraSerialComm =
224 thyraSerialComm.is_null (), std::runtime_error,
225 "Thyra's communicator is not a SerialComm, and MPI is not enabled, so "
226 "it can't be an MpiComm either. That means it must be some other "
227 "subclass of Comm, about which I don't know. "
228 "Sorry, I have no idea what to do with it in that case.");
249 prepareDistTsqr (
const MV& ) {}
271 prepareTsqr (
const MV& ) {}
276 #endif // __Thyra_TsqrAdaptor_hpp
void factorExplicit(MV &, MV &, dense_matrix_type &, const bool=false)
Compute QR factorization [Q,R] = qr(A,0).
Stub adaptor from Thyra::MultiVectorBase to TSQR.
#define TEUCHOS_TEST_FOR_EXCEPTION(throw_exception_test, Exception, msg)
TsqrAdaptor(const Teuchos::RCP< Teuchos::ParameterList > &)
Constructor (that accepts a parameter list).
TEUCHOS_DEPRECATED RCP< T > rcp(T *p, Dealloc_T dealloc, bool owns_mem)
int revealRank(MV &, dense_matrix_type &, const magnitude_type &)
Rank-revealing decomposition.
TsqrAdaptor()
Constructor (that uses default parameters).