Thyra Package Browser (Single Doxygen Collection) Version of the Day
Thyra_TpetraThyraWrappers_decl.hpp
Go to the documentation of this file.
00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 //               Thyra: Trilinos Solver Framework Core
00005 //                 Copyright (2004) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
00028 
00029 #ifndef THYRA_TPETRA_THYRA_WRAPPERS_DECL_HPP
00030 #define THYRA_TPETRA_THYRA_WRAPPERS_DECL_HPP
00031 
00032 
00033 #include "Thyra_OperatorVectorTypes.hpp"
00034 #include "Thyra_TpetraVectorSpace_decl.hpp"
00035 #include "Thyra_TpetraVector_decl.hpp"
00036 #include "Thyra_TpetraMultiVector_decl.hpp"
00037 #include "Thyra_TpetraLinearOp_decl.hpp"
00038 
00039 
00040 namespace Thyra {
00041 
00042 
00050 RCP<const Teuchos::Comm<Ordinal> >
00051 convertTpetraToThyraComm( const RCP<const Teuchos::Comm<int> > &tpetraComm );
00052 
00053 
00058 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
00059 RCP<const VectorSpaceBase<Scalar> >
00060 createVectorSpace(const RCP<const Tpetra::Map<LocalOrdinal,GlobalOrdinal,Node> > &tpetraMap);
00061 
00062 
00067 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
00068 RCP<VectorBase<Scalar> >
00069 createVector(
00070   const RCP<Tpetra::Vector<Scalar,LocalOrdinal,GlobalOrdinal,Node> > &tpetraVector,
00071   const RCP<const VectorSpaceBase<Scalar> > space = Teuchos::null
00072   );
00073 
00074 
00079 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
00080 RCP<const VectorBase<Scalar> >
00081 createConstVector(
00082   const RCP<const Tpetra::Vector<Scalar,LocalOrdinal,GlobalOrdinal,Node> > &tpetraVector,
00083   const RCP<const VectorSpaceBase<Scalar> > space = Teuchos::null
00084   );
00085 
00086 
00091 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
00092 RCP<MultiVectorBase<Scalar> >
00093 createMultiVector(
00094   const RCP<Tpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> > &tpetraMultiVector,
00095   const RCP<const VectorSpaceBase<Scalar> > rangeSpace = Teuchos::null,
00096   const RCP<const VectorSpaceBase<Scalar> > domainSpace = Teuchos::null
00097   );
00098 
00099 
00104 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
00105 RCP<const MultiVectorBase<Scalar> >
00106 createConstMultiVector(
00107   const RCP<const Tpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> > &tpetraMultiVector,
00108   const RCP<const VectorSpaceBase<Scalar> > rangeSpace = Teuchos::null,
00109   const RCP<const VectorSpaceBase<Scalar> > domainSpace = Teuchos::null
00110   );
00111 
00112 
00117 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
00118 RCP<LinearOpBase<Scalar> >
00119 createLinearOp(
00120   const RCP<Tpetra::Operator<Scalar,LocalOrdinal,GlobalOrdinal,Node> > &tpetraOperator,
00121   const RCP<const VectorSpaceBase<Scalar> > rangeSpace = Teuchos::null,
00122   const RCP<const VectorSpaceBase<Scalar> > domainSpace = Teuchos::null
00123   );
00124 
00125 
00130 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
00131 RCP<const LinearOpBase<Scalar> >
00132 createConstLinearOp(
00133   const RCP<const Tpetra::Operator<Scalar,LocalOrdinal,GlobalOrdinal,Node> > &tpetraOperator,
00134   const RCP<const VectorSpaceBase<Scalar> > rangeSpace = Teuchos::null,
00135   const RCP<const VectorSpaceBase<Scalar> > domainSpace = Teuchos::null
00136   );
00137 
00138 
00159 template <class Scalar, class LocalOrdinal, class GlobalOrdinal=LocalOrdinal,
00160   class Node=Kokkos::DefaultNode::DefaultNodeType >
00161 class TpetraOperatorVectorExtraction {
00162 public:
00163 
00164   // ToDo: Get a Tpetra::Map from a Thyra::VectorSpaceBase?
00165 
00169   static RCP<Tpetra::Vector<Scalar,LocalOrdinal,GlobalOrdinal,Node> >
00170   getTpetraVector(const RCP<VectorBase<Scalar> > &v);
00171 
00175   static RCP<const Tpetra::Vector<Scalar,LocalOrdinal,GlobalOrdinal,Node> >
00176   getConstTpetraVector(const RCP<const VectorBase<Scalar> > &v);
00177 
00181   static RCP<Tpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> >
00182   getTpetraMultiVector(const RCP<MultiVectorBase<Scalar> > &mv);
00183 
00187   static RCP<const Tpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> >
00188   getConstTpetraMultiVector(const RCP<const MultiVectorBase<Scalar> > &mv);
00189 
00193   static RCP<Tpetra::Operator<Scalar,LocalOrdinal,GlobalOrdinal,Node> >
00194   getTpetraOperator(const RCP<LinearOpBase<Scalar> > &op);
00195 
00199   static RCP<const Tpetra::Operator<Scalar,LocalOrdinal,GlobalOrdinal,Node> >
00200   getConstTpetraOperator(const RCP<const LinearOpBase<Scalar> > &op);
00201 
00202 };
00203 
00204 
00205 } // namespace Thyra
00206 
00207 
00208 #endif // THYRA_TPETRA_THYRA_WRAPPERS_DECL_HPP
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines