Thyra
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
core
src
interfaces
operator_vector
extended
Thyra_ProductVectorBase.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_PRODUCT_VECTOR_BASE_HPP
11
#define THYRA_PRODUCT_VECTOR_BASE_HPP
12
13
14
#include "Thyra_ProductMultiVectorBase.hpp"
15
16
17
namespace
Thyra {
18
19
54
template
<
class
Scalar>
55
class
ProductVectorBase
56
:
virtual
public
VectorBase
<Scalar>
57
,
virtual
public
ProductMultiVectorBase
<Scalar>
58
{
59
public
:
60
82
virtual
RCP<VectorBase<Scalar>
>
83
getNonconstVectorBlock
(
const
int
k) = 0;
84
96
virtual
RCP<const VectorBase<Scalar>
>
97
getVectorBlock
(
const
int
k)
const
= 0;
98
99
private
:
100
101
// Not defined and not to be called
102
ProductVectorBase<Scalar>
&
103
operator=(
const
ProductVectorBase<Scalar>
&);
104
105
};
106
107
113
template
<
class
Scalar>
114
inline
115
RCP<Thyra::ProductVectorBase<Scalar>
>
116
nonconstProductVectorBase
(
117
const
RCP
<
Thyra::VectorBase<Scalar>
> &v
118
)
119
{
120
return
Teuchos::rcp_dynamic_cast<Thyra::ProductVectorBase<Scalar> >(v,
true
);
121
}
122
123
129
template
<
class
Scalar>
130
inline
131
RCP<const Thyra::ProductVectorBase<Scalar>
>
132
productVectorBase
(
133
const
RCP
<
const
Thyra::VectorBase<Scalar>
> &v
134
)
135
{
136
return
Teuchos::rcp_dynamic_cast<const Thyra::ProductVectorBase<Scalar> >(v,
true
);
137
}
138
139
140
}
// namespace Thyra
141
142
#endif
// THYRA_PRODUCT_VECTOR_BASE_HPP
Teuchos::RCP
Thyra::ProductMultiVectorBase
Base interface for product multi-vectors.
Definition
Thyra_ProductMultiVectorBase.hpp:34
Thyra::ProductVectorBase
Base interface for product vectors.
Definition
Thyra_ProductVectorBase.hpp:58
Thyra::ProductVectorBase::productVectorBase
RCP< const Thyra::ProductVectorBase< Scalar > > productVectorBase(const RCP< const Thyra::VectorBase< Scalar > > &v)
Dynamic cast from a const VectorBase to a const ProductVectorBase object and thow exception if this f...
Definition
Thyra_ProductVectorBase.hpp:132
Thyra::ProductVectorBase::nonconstProductVectorBase
RCP< Thyra::ProductVectorBase< Scalar > > nonconstProductVectorBase(const RCP< Thyra::VectorBase< Scalar > > &v)
Dynamic cast from a VectorBase to a ProductVectorBase object and thow exception if this fails.
Definition
Thyra_ProductVectorBase.hpp:116
Thyra::ProductVectorBase::getNonconstVectorBlock
virtual RCP< VectorBase< Scalar > > getNonconstVectorBlock(const int k)=0
Returns a non-persisting non-const view of the (zero-based) kth block vector.
Thyra::ProductVectorBase::getVectorBlock
virtual RCP< const VectorBase< Scalar > > getVectorBlock(const int k) const =0
Returns a non-persisting const view of the (zero-based) kth block vector.
Thyra::VectorBase
Abstract interface for finite-dimensional dense vectors.
Definition
Thyra_VectorBase.hpp:115
Generated by
1.17.0