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 //
4 // Thyra: Interfaces and Support for Abstract Numerical Algorithms
5 // Copyright (2004) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Roscoe A. Bartlett (bartlettra@ornl.gov)
38 //
39 // ***********************************************************************
40 // @HEADER
41 
42 #ifndef THYRA_EPETRA_THYRA_WRAPPERS_HPP
43 #define THYRA_EPETRA_THYRA_WRAPPERS_HPP
44 
45 
46 #include "Thyra_EpetraTypes.hpp"
47 
49 
50 namespace Teuchos { template<class Ordinal> class Comm; }
51 
52 
53 namespace Thyra {
54 
55 
64 RCP<const Teuchos::Comm<Ordinal> >
65 create_Comm( const RCP<const Epetra_Comm> &epetraComm );
66 
67 
101 RCP<const VectorSpaceBase<double> >
103  const RCP<const Epetra_Map> &epetra_map
104  );
105 
106 
120 RCP<const VectorSpaceBase<double> >
122  const RCP<const VectorSpaceBase<double> > &parentSpace,
123  const int dim
124  );
125 
126 
151 RCP<VectorBase<double> >
153  const RCP<Epetra_Vector> &epetra_v,
154  const RCP<const VectorSpaceBase<double> > &space = Teuchos::null
155  );
156 
157 
180 RCP<const VectorBase<double> >
182  const RCP<const Epetra_Vector> &epetra_v,
183  const RCP<const VectorSpaceBase<double> > &space = Teuchos::null
184  );
185 
186 
210 RCP<MultiVectorBase<double> >
212  const RCP<Epetra_MultiVector> &epetra_mv,
213  const RCP<const VectorSpaceBase<double> > &range = Teuchos::null,
214  const RCP<const VectorSpaceBase<double> > &domain = Teuchos::null
215  );
216 
217 
243 RCP<const MultiVectorBase<double> >
245  const RCP<const Epetra_MultiVector> &epetra_mv,
246  const RCP<const VectorSpaceBase<double> > &range = Teuchos::null,
247  const RCP<const VectorSpaceBase<double> > &domain = Teuchos::null
248  );
249 
250 
266 RCP<const Epetra_Comm>
268 
269 
278 RCP<const Epetra_Map>
279 get_Epetra_Map(const VectorSpaceBase<double>& vs, const RCP<const Epetra_Comm>& comm);
280 
281 // Almost like the above one, but working on an RCP vs as input, we can check for the
282 // presence of RCP<const Epetra_Map> in the RCP extra data, to save us time.
283 RCP<const Epetra_Map>
284 get_Epetra_Map(const RCP<const VectorSpaceBase<double>>& vs,
285  const RCP<const Epetra_Comm>& comm = Teuchos::null);
286 
309 RCP<Epetra_Vector>
311  const Epetra_Map &map,
312  const RCP<VectorBase<double> > &v
313  );
314 
315 // Same as above, except allows to not pass the map (in case the RCP of v
316 // already has an attached RCP<Epetra_Vector>)
317 RCP<Epetra_Vector>
319  const RCP<VectorBase<double> > &v,
320  const RCP<const Epetra_Map>& map = Teuchos::null
321  );
322 
323 
343 RCP<const Epetra_Vector>
345  const Epetra_Map &map,
346  const RCP<const VectorBase<double> > &v
347  );
348 
349 // Same as above, except allows to not pass the map (in case the RCP of v
350 // already has an attached RCP<const Epetra_Vector>)
351 RCP<const Epetra_Vector>
353  const RCP<const VectorBase<double> > &v,
354  const RCP<const Epetra_Map>& map = Teuchos::null
355  );
356 
380 RCP<Epetra_MultiVector>
382  const Epetra_Map &map,
383  const RCP<MultiVectorBase<double> > &mv
384  );
385 
386 // Same as above, except allows to not pass the map (in case the RCP of v
387 // already has an attached RCP<Epetra_MultiVector>)
388 RCP<Epetra_MultiVector>
390  const RCP<MultiVectorBase<double> > &mv,
391  const RCP<const Epetra_Map>& map = Teuchos::null
392  );
393 
394 
414 RCP<const Epetra_MultiVector>
416  const Epetra_Map &map,
417  const RCP<const MultiVectorBase<double> > &mv
418  );
419 
420 // Same as above, except allows to not pass the map (in case the RCP of v
421 // already has an attached RCP<const Epetra_MultiVector>)
422 RCP<const Epetra_MultiVector>
424  const RCP<const MultiVectorBase<double> > &mv,
425  const RCP<const Epetra_Map>& map = Teuchos::null
426  );
427 
428 
454  const Epetra_Map &map,
455  MultiVectorBase<double> &mv
456  );
457 
458 
480  const Epetra_Map &map,
481  const MultiVectorBase<double> &mv
482  );
483 
484 
485 } // namespace Thyra
486 
487 
488 #endif // THYRA_EPETRA_THYRA_WRAPPERS_HPP
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.