53 #ifndef AMESOS2_EPETRA_MULTIVEC_ADAPTER_DECL_HPP
54 #define AMESOS2_EPETRA_MULTIVEC_ADAPTER_DECL_HPP
56 #include <Teuchos_RCP.hpp>
57 #include <Teuchos_Array.hpp>
58 #include <Teuchos_as.hpp>
60 #include <Tpetra_Vector.hpp>
61 #include <Tpetra_Map.hpp>
63 #include <Epetra_MultiVector.h>
65 #include "Amesos2_MultiVecAdapter_decl.hpp"
80 typedef double scalar_t;
81 typedef int local_ordinal_t;
82 typedef Tpetra::Map<>::global_ordinal_type global_ordinal_t;
83 typedef size_t global_size_t;
84 typedef Tpetra::Map<>::node_type node_t;
85 typedef Epetra_MultiVector multivec_t;
87 friend Teuchos::RCP<MultiVecAdapter<multivec_t> > createMultiVecAdapter<>(Teuchos::RCP<multivec_t>);
88 friend Teuchos::RCP<const MultiVecAdapter<multivec_t> > createConstMultiVecAdapter<>(Teuchos::RCP<const multivec_t>);
91 static const char* name;
112 bool isLocallyIndexed()
const;
114 bool isGloballyIndexed()
const;
123 Teuchos::RCP<const Tpetra::Map<local_ordinal_t, global_ordinal_t, node_t> >
127 const Teuchos::RCP<const Teuchos::Comm<int> > getComm()
const;
131 size_t getLocalLength()
const;
135 size_t getLocalNumVectors()
const;
139 global_size_t getGlobalLength()
const;
143 size_t getGlobalNumVectors()
const;
147 size_t getStride()
const;
151 bool isConstantStride()
const;
155 Teuchos::RCP<const Tpetra::Vector<scalar_t,local_ordinal_t,global_ordinal_t,node_t> >
156 getVector(
size_t j )
const;
166 Teuchos::RCP<Tpetra::Vector<scalar_t,local_ordinal_t,global_ordinal_t,node_t> >
167 getVectorNonConst(
size_t j );
171 double * getMVPointer_impl()
const;
178 void get1dCopy(
const Teuchos::ArrayView<scalar_t>& A,
181 const Tpetra::Map<local_ordinal_t,
183 node_t> > distribution_map,
204 Teuchos::ArrayRCP<scalar_t> get1dViewNonConst(
bool local =
false );
217 void put1dData(
const Teuchos::ArrayView<const scalar_t>& new_data,
220 const Tpetra::Map<local_ordinal_t,
222 node_t> > source_map,
228 std::string description()
const;
232 void describe( Teuchos::FancyOStream& os,
233 const Teuchos::EVerbosityLevel verbLevel = Teuchos::Describable::verbLevel_default)
const;
239 Teuchos::RCP<multivec_t>
mv_;
241 mutable Teuchos::RCP<Epetra_Import> importer_;
242 mutable Teuchos::RCP<Epetra_Export> exporter_;
244 mutable Teuchos::RCP<const Epetra_BlockMap> mv_map_;
251 #endif // AMESOS2_EPETRA_MULTIVEC_ADAPTER_DECL_HPP
Teuchos::RCP< multivec_t > mv_
The multi-vector this adapter wraps.
Definition: Amesos2_EpetraMultiVecAdapter_decl.hpp:239
EDistribution
Definition: Amesos2_TypeDecl.hpp:123
A templated MultiVector class adapter for Amesos2.
Definition: Amesos2_MultiVecAdapter_decl.hpp:176