Thyra Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Thyra_EpetraThyraWrappers.hpp
Go to the documentation of this file.
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_EPETRA_THYRA_WRAPPERS_HPP
11 #define THYRA_EPETRA_THYRA_WRAPPERS_HPP
12 
13 
14 #include "Thyra_EpetraTypes.hpp"
15 
17 
18 namespace Teuchos { template<class Ordinal> class Comm; }
19 
20 
21 namespace Thyra {
22 
23 
32 RCP<const Teuchos::Comm<Ordinal> >
33 create_Comm( const RCP<const Epetra_Comm> &epetraComm );
34 
35 
69 RCP<const VectorSpaceBase<double> >
71  const RCP<const Epetra_Map> &epetra_map
72  );
73 
74 
88 RCP<const VectorSpaceBase<double> >
90  const RCP<const VectorSpaceBase<double> > &parentSpace,
91  const int dim
92  );
93 
94 
119 RCP<VectorBase<double> >
121  const RCP<Epetra_Vector> &epetra_v,
122  const RCP<const VectorSpaceBase<double> > &space = Teuchos::null
123  );
124 
125 
148 RCP<const VectorBase<double> >
150  const RCP<const Epetra_Vector> &epetra_v,
151  const RCP<const VectorSpaceBase<double> > &space = Teuchos::null
152  );
153 
154 
178 RCP<MultiVectorBase<double> >
180  const RCP<Epetra_MultiVector> &epetra_mv,
181  const RCP<const VectorSpaceBase<double> > &range = Teuchos::null,
182  const RCP<const VectorSpaceBase<double> > &domain = Teuchos::null
183  );
184 
185 
211 RCP<const MultiVectorBase<double> >
213  const RCP<const Epetra_MultiVector> &epetra_mv,
214  const RCP<const VectorSpaceBase<double> > &range = Teuchos::null,
215  const RCP<const VectorSpaceBase<double> > &domain = Teuchos::null
216  );
217 
218 
234 RCP<const Epetra_Comm>
236 
237 
246 RCP<const Epetra_Map>
247 get_Epetra_Map(const VectorSpaceBase<double>& vs, const RCP<const Epetra_Comm>& comm);
248 
249 // Almost like the above one, but working on an RCP vs as input, we can check for the
250 // presence of RCP<const Epetra_Map> in the RCP extra data, to save us time.
251 RCP<const Epetra_Map>
252 get_Epetra_Map(const RCP<const VectorSpaceBase<double>>& vs,
253  const RCP<const Epetra_Comm>& comm = Teuchos::null);
254 
277 RCP<Epetra_Vector>
279  const Epetra_Map &map,
280  const RCP<VectorBase<double> > &v
281  );
282 
283 // Same as above, except allows to not pass the map (in case the RCP of v
284 // already has an attached RCP<Epetra_Vector>)
285 RCP<Epetra_Vector>
287  const RCP<VectorBase<double> > &v,
288  const RCP<const Epetra_Map>& map = Teuchos::null
289  );
290 
291 
311 RCP<const Epetra_Vector>
313  const Epetra_Map &map,
314  const RCP<const VectorBase<double> > &v
315  );
316 
317 // Same as above, except allows to not pass the map (in case the RCP of v
318 // already has an attached RCP<const Epetra_Vector>)
319 RCP<const Epetra_Vector>
321  const RCP<const VectorBase<double> > &v,
322  const RCP<const Epetra_Map>& map = Teuchos::null
323  );
324 
348 RCP<Epetra_MultiVector>
350  const Epetra_Map &map,
351  const RCP<MultiVectorBase<double> > &mv
352  );
353 
354 // Same as above, except allows to not pass the map (in case the RCP of v
355 // already has an attached RCP<Epetra_MultiVector>)
356 RCP<Epetra_MultiVector>
358  const RCP<MultiVectorBase<double> > &mv,
359  const RCP<const Epetra_Map>& map = Teuchos::null
360  );
361 
362 
382 RCP<const Epetra_MultiVector>
384  const Epetra_Map &map,
385  const RCP<const MultiVectorBase<double> > &mv
386  );
387 
388 // Same as above, except allows to not pass the map (in case the RCP of v
389 // already has an attached RCP<const Epetra_MultiVector>)
390 RCP<const Epetra_MultiVector>
392  const RCP<const MultiVectorBase<double> > &mv,
393  const RCP<const Epetra_Map>& map = Teuchos::null
394  );
395 
396 
422  const Epetra_Map &map,
423  MultiVectorBase<double> &mv
424  );
425 
426 
448  const Epetra_Map &map,
449  const MultiVectorBase<double> &mv
450  );
451 
452 
453 } // namespace Thyra
454 
455 
456 #endif // THYRA_EPETRA_THYRA_WRAPPERS_HPP
457 
458 #if defined(Thyra_SHOW_DEPRECATED_WARNINGS)
459 #ifdef __GNUC__
460 #warning "The ThyraEpetraAdapters package is deprecated"
461 #endif
462 #endif
463 
RCP< Epetra_MultiVector > get_Epetra_MultiVector(const Epetra_Map &map, const RCP< MultiVectorBase< double > > &mv)
Get a non-const Epetra_MultiVector view from a non-const MultiVectorBase object if possible...
RCP< const Epetra_Map > get_Epetra_Map(const VectorSpaceBase< double > &vs, const RCP< const Epetra_Comm > &comm)
Get (or create) an Epetra_Map object given an VectorSpaceBase object an optionally an extra Epetra_Co...
RCP< const VectorSpaceBase< double > > create_VectorSpace(const RCP< const Epetra_Map > &epetra_map)
Create an VectorSpaceBase object given an Epetra_Map object.
RCP< MultiVectorBase< double > > create_MultiVector(const RCP< Epetra_MultiVector > &epetra_mv, const RCP< const VectorSpaceBase< double > > &range=Teuchos::null, const RCP< const VectorSpaceBase< double > > &domain=Teuchos::null)
Create a non-const MultiVectorBase object from a non-const Epetra_MultiVector object.
RCP< VectorBase< double > > create_Vector(const RCP< Epetra_Vector > &epetra_v, const RCP< const VectorSpaceBase< double > > &space=Teuchos::null)
Create a non-const VectorBase object from a non-const Epetra_Vector object.
RCP< Epetra_Vector > get_Epetra_Vector(const Epetra_Map &map, const RCP< VectorBase< double > > &v)
Get a non-const Epetra_Vector view from a non-const VectorBase object if possible.
RCP< const Epetra_Comm > get_Epetra_Comm(const Teuchos::Comm< Ordinal > &comm)
Get (or create) and Epetra_Comm given a Teuchos::Comm object.
RCP< const VectorSpaceBase< double > > create_LocallyReplicatedVectorSpace(const RCP< const VectorSpaceBase< double > > &parentSpace, const int dim)
Create a VectorSpaceBase object that creates locally replicated vector objects.
RCP< const Teuchos::Comm< Ordinal > > create_Comm(const RCP< const Epetra_Comm > &epetraComm)
Given an Epetra_Comm object, return an equivalent Teuchos::Comm object.