Thyra  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Thyra_DefaultSerialVectorSpaceConverter.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_SERIAL_VECTOR_SPACE_CONVERTED_STD_DECL_HPP
11 #define THYRA_SERIAL_VECTOR_SPACE_CONVERTED_STD_DECL_HPP
12 
13 #include "Thyra_SerialVectorSpaceConverterBase.hpp"
14 
15 
16 namespace Thyra {
17 
18 
29 template<class ScalarFrom, class ScalarTo>
30 class DefaultSerialVectorSpaceConverter : virtual public SerialVectorSpaceConverterBase<ScalarFrom,ScalarTo> {
31 public:
32 
35 
37  virtual
40  const VectorSpaceBase<ScalarFrom> &vecSpc
41  ) const;
42 
44  virtual
47  const VectorSpaceBase<ScalarTo> &vecSpc
48  ) const;
49 
51 
52 };
53 
54 
55 // Implementation
56 
57 
58 template<class ScalarFrom, class ScalarTo>
61  const VectorSpaceBase<ScalarFrom> &vecSpc
62  ) const
63 {
64  return defaultSpmdVectorSpace<ScalarTo>(vecSpc.dim());
65 }
66 
67 
68 template<class ScalarFrom, class ScalarTo>
71  const VectorSpaceBase<ScalarTo> &vecSpc
72  ) const
73 {
74  return defaultSpmdVectorSpace<ScalarFrom>(vecSpc.dim());
75 }
76 
77 
78 } // namespace Thyra
79 
80 
81 #endif // THYRA_SERIAL_VECTOR_SPACE_CONVERTED_STD_DECL_HPP
Abstract interface for objects that represent a space for vectors.
Node base class for converting serial multi-vectors (and vectors) from one scalar type to another...
virtual Teuchos::RCP< const VectorSpaceBase< ScalarFrom > > createVectorSpaceFrom(const VectorSpaceBase< ScalarTo > &vecSpc) const
virtual Teuchos::RCP< const VectorSpaceBase< ScalarTo > > createVectorSpaceTo(const VectorSpaceBase< ScalarFrom > &vecSpc) const
Concrete subclass for a converter subclass for converting serial multi-vectors and vectors...
virtual Ordinal dim() const =0
Return the dimension of the vector space.