Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Thyra_TpetraThyraWrappers_decl.hpp
1 // @HEADER
2 // *****************************************************************************
3 // Thyra: Interfaces and Support for Abstract Numerical Algorithms
4 //
5 // Copyright 2004 NTESS and the Thyra contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef THYRA_TPETRA_THYRA_WRAPPERS_DECL_HPP
11 #define THYRA_TPETRA_THYRA_WRAPPERS_DECL_HPP
12 
13 
14 #include "Thyra_OperatorVectorTypes.hpp"
15 #include "Thyra_TpetraVectorSpace_decl.hpp"
16 #include "Thyra_TpetraVector_decl.hpp"
17 #include "Thyra_TpetraMultiVector_decl.hpp"
18 #include "Thyra_TpetraLinearOp_decl.hpp"
19 
20 
21 namespace Thyra {
22 
23 
31 RCP<const Teuchos::Comm<Ordinal> >
32 convertTpetraToThyraComm( const RCP<const Teuchos::Comm<int> > &tpetraComm );
33 
34 
39 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
40 RCP<const VectorSpaceBase<Scalar> >
42 
43 
48 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
49 RCP<VectorBase<Scalar> >
52  const RCP<const VectorSpaceBase<Scalar> > space = Teuchos::null
53  );
54 
55 
60 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
61 RCP<const VectorBase<Scalar> >
63  const RCP<const Tpetra::Vector<Scalar,LocalOrdinal,GlobalOrdinal,Node> > &tpetraVector,
64  const RCP<const VectorSpaceBase<Scalar> > space = Teuchos::null
65  );
66 
67 
72 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
73 RCP<MultiVectorBase<Scalar> >
76  const RCP<const VectorSpaceBase<Scalar> > rangeSpace = Teuchos::null,
77  const RCP<const VectorSpaceBase<Scalar> > domainSpace = Teuchos::null
78  );
79 
80 
85 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
86 RCP<const MultiVectorBase<Scalar> >
88  const RCP<const Tpetra::MultiVector<Scalar,LocalOrdinal,GlobalOrdinal,Node> > &tpetraMultiVector,
89  const RCP<const VectorSpaceBase<Scalar> > rangeSpace = Teuchos::null,
90  const RCP<const VectorSpaceBase<Scalar> > domainSpace = Teuchos::null
91  );
92 
93 
98 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
99 RCP<LinearOpBase<Scalar> >
102  const RCP<const VectorSpaceBase<Scalar> > rangeSpace = Teuchos::null,
103  const RCP<const VectorSpaceBase<Scalar> > domainSpace = Teuchos::null
104  );
105 
106 
111 template <class Scalar, class LocalOrdinal, class GlobalOrdinal, class Node>
112 RCP<const LinearOpBase<Scalar> >
114  const RCP<const Tpetra::Operator<Scalar,LocalOrdinal,GlobalOrdinal,Node> > &tpetraOperator,
115  const RCP<const VectorSpaceBase<Scalar> > rangeSpace = Teuchos::null,
116  const RCP<const VectorSpaceBase<Scalar> > domainSpace = Teuchos::null
117  );
118 
119 
140 template <class Scalar = Tpetra::Vector<>::scalar_type,
141  class LocalOrdinal = Tpetra::Vector<>::local_ordinal_type,
142  class GlobalOrdinal = Tpetra::Vector<>::global_ordinal_type,
143  class Node = Tpetra::Vector<>::node_type>
145 public:
146 
150  getTpetraMap(const RCP<const VectorSpaceBase<Scalar> > &vs);
151 
157 
162  getConstTpetraVector(const RCP<const VectorBase<Scalar> > &v);
163 
169 
175 
181 
187 
188 };
189 
190 
191 } // namespace Thyra
192 
193 
194 #endif // THYRA_TPETRA_THYRA_WRAPPERS_DECL_HPP
Teuchos::RCP< MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > createMultiVector(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map, const size_t numVectors)
static RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > getTpetraMap(const RCP< const VectorSpaceBase< Scalar > > &vs)
Get a const Tpetra::Map from a const Thyra::VectorSpaceBase object.
RCP< const MultiVectorBase< Scalar > > createConstMultiVector(const RCP< const Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &tpetraMultiVector, const RCP< const VectorSpaceBase< Scalar > > rangeSpace=Teuchos::null, const RCP< const VectorSpaceBase< Scalar > > domainSpace=Teuchos::null)
RCP< const VectorBase< Scalar > > createConstVector(const RCP< const Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &tpetraVector, const RCP< const VectorSpaceBase< Scalar > > space=Teuchos::null)
Abstract interface for objects that represent a space for vectors.
Traits class that enables the extraction of Tpetra operator/vector objects wrapped in Thyra operator/...
GlobalOrdinal global_ordinal_type
static RCP< const Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getConstTpetraVector(const RCP< const VectorBase< Scalar > > &v)
Get a const Tpetra::Vector from a const Thyra::VectorBase object.
static RCP< Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetraMultiVector(const RCP< MultiVectorBase< Scalar > > &mv)
Get a non-const Tpetra::MultiVector from a non-const Thyra::MultiVectorBase object.
RCP< const LinearOpBase< Scalar > > createConstLinearOp(const RCP< const Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &tpetraOperator, const RCP< const VectorSpaceBase< Scalar > > rangeSpace=Teuchos::null, const RCP< const VectorSpaceBase< Scalar > > domainSpace=Teuchos::null)
Interface for a collection of column vectors called a multi-vector.
Teuchos::RCP< Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > createVector(const Teuchos::RCP< const Map< LocalOrdinal, GlobalOrdinal, Node > > &map)
Abstract interface for finite-dimensional dense vectors.
static RCP< Tpetra::Vector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetraVector(const RCP< VectorBase< Scalar > > &v)
Get a non-const Tpetra::Vector from a non-const Thyra::VectorBase object.
LocalOrdinal local_ordinal_type
RCP< const VectorSpaceBase< Scalar > > createVectorSpace(const RCP< const Tpetra::Map< LocalOrdinal, GlobalOrdinal, Node > > &tpetraMap)
Create a Thyra::VectorSpaceBase object given a Tpetra::Map.
RCP< const Teuchos::Comm< Ordinal > > convertTpetraToThyraComm(const RCP< const Teuchos::Comm< int > > &tpetraComm)
Given an Tpetra Teuchos::Comm&lt;int&gt; object, return an equivalent Teuchos::Comm&lt;Ordinal&gt; object...
Base class for all linear operators.
static RCP< const Tpetra::MultiVector< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getConstTpetraMultiVector(const RCP< const MultiVectorBase< Scalar > > &mv)
Get a const Tpetra::MultiVector from a const Thyra::MultiVectorBase object.
static RCP< const Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getConstTpetraOperator(const RCP< const LinearOpBase< Scalar > > &op)
Get a const Tpetra::Operator from a const Thyra::LinearOpBase object.
static RCP< Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > > getTpetraOperator(const RCP< LinearOpBase< Scalar > > &op)
Get a non-const Tpetra::Operator from a non-const Thyra::LinearOpBase object.
RCP< LinearOpBase< Scalar > > createLinearOp(const RCP< Tpetra::Operator< Scalar, LocalOrdinal, GlobalOrdinal, Node > > &tpetraOperator, const RCP< const VectorSpaceBase< Scalar > > rangeSpace=Teuchos::null, const RCP< const VectorSpaceBase< Scalar > > domainSpace=Teuchos::null)