Thyra
Version of the Day
Toggle main menu visibility
Loading...
Searching...
No Matches
core
src
support
operator_vector
adapter_support
Thyra_SpmdMultiVectorDefaultBase_decl.hpp
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_SPMD_MULTI_VECTOR_DEFAULT_BASE_DECL_HPP
43
#define THYRA_SPMD_MULTI_VECTOR_DEFAULT_BASE_DECL_HPP
44
45
#include "Thyra_SpmdMultiVectorBase.hpp"
46
#include "Thyra_MultiVectorAdapterBase_decl.hpp"
47
#include "
Teuchos_BLAS.hpp
"
48
49
50
namespace
Thyra {
51
52
97
template
<
class
Scalar>
98
class
SpmdMultiVectorDefaultBase
99
:
virtual
public
SpmdMultiVectorBase
<Scalar>,
100
virtual
public
MultiVectorAdapterBase
<Scalar>
101
{
102
public
:
103
106
108
SpmdMultiVectorDefaultBase
();
109
111
114
116
RCP< const ScalarProdVectorSpaceBase<Scalar>
>
rangeScalarProdVecSpc
()
const
;
117
119
120
protected
:
121
124
126
RTOpPack::SubMultiVectorView<Scalar>
getNonconstLocalSubMultiVectorImpl
();
127
129
RTOpPack::ConstSubMultiVectorView<Scalar>
getLocalSubMultiVectorImpl
()
const
;
130
132
135
136
void
mvMultiReductApplyOpImpl
(
137
const
RTOpPack::RTOpT<Scalar>
&primary_op,
138
const
ArrayView
<
const
Ptr
<
const
MultiVectorBase<Scalar>
> > &multi_vecs,
139
const
ArrayView
<
const
Ptr
<
MultiVectorBase<Scalar>
> > &targ_multi_vecs,
140
const
ArrayView
<
const
Ptr<RTOpPack::ReductTarget>
> &reduct_objs,
141
const
Ordinal primary_global_offset
142
)
const
;
144
void
acquireDetachedMultiVectorViewImpl
(
145
const
Range1D
&rowRng,
146
const
Range1D
&colRng
147
,
RTOpPack::ConstSubMultiVectorView<Scalar>
*sub_mv
148
)
const
;
150
void
releaseDetachedMultiVectorViewImpl
(
151
RTOpPack::ConstSubMultiVectorView<Scalar>
* sub_mv
152
)
const
;
154
void
acquireNonconstDetachedMultiVectorViewImpl
(
155
const
Range1D
&rowRng,
156
const
Range1D
&colRng,
157
RTOpPack::SubMultiVectorView<Scalar>
*sub_mv
158
);
160
void
commitNonconstDetachedMultiVectorViewImpl
(
161
RTOpPack::SubMultiVectorView<Scalar>
* sub_mv
162
);
164
167
173
void
euclideanApply
(
174
const
EOpTransp M_trans,
175
const
MultiVectorBase<Scalar>
&X,
176
const
Ptr
<
MultiVectorBase<Scalar>
> &Y,
177
const
Scalar alpha,
178
const
Scalar beta
179
)
const
;
180
182
185
194
virtual
void
updateSpmdSpace
();
195
200
Range1D
validateRowRange
(
const
Range1D
& rowRng )
const
;
201
206
Range1D
validateColRange
(
const
Range1D
& rowCol )
const
;
207
209
210
private
:
211
212
// ///////////////////////////////////////
213
// Private data members
214
215
mutable
bool
in_applyOp_;
216
217
mutable
Teuchos::BLAS<int,Scalar>
blas_;
218
219
// cached
220
Ordinal globalDim_;
221
Ordinal localOffset_;
222
Ordinal localSubDim_;
223
Ordinal numCols_;
224
225
};
// end class SpmdMultiVectorDefaultBase
226
227
228
}
// end namespace Thyra
229
230
231
#endif
// THYRA_SPMD_MULTI_VECTOR_DEFAULT_BASE_DECL_HPP
Teuchos_BLAS.hpp
RTOpPack::ConstSubMultiVectorView
RTOpPack::RTOpT
RTOpPack::SubMultiVectorView
Teuchos::ArrayView
Teuchos::BLAS
Teuchos::Ptr
Teuchos::RCP
Thyra::MultiVectorAdapterBase
Node subclass for MultiVectorBase subclasses that allows the insertion of an application defined scal...
Definition
Thyra_MultiVectorAdapterBase_decl.hpp:68
Thyra::MultiVectorBase
Interface for a collection of column vectors called a multi-vector.
Definition
Thyra_MultiVectorBase_decl.hpp:496
Thyra::SpmdMultiVectorBase
Base interface class for SPMD multi-vectors.
Definition
Thyra_SpmdMultiVectorBase.hpp:68
Thyra::SpmdMultiVectorDefaultBase::rangeScalarProdVecSpc
RCP< const ScalarProdVectorSpaceBase< Scalar > > rangeScalarProdVecSpc() const
Returns spmdSpace.
Definition
Thyra_SpmdMultiVectorDefaultBase_def.hpp:91
Thyra::SpmdMultiVectorDefaultBase::SpmdMultiVectorDefaultBase
SpmdMultiVectorDefaultBase()
Definition
Thyra_SpmdMultiVectorDefaultBase_def.hpp:77
Thyra::SpmdMultiVectorDefaultBase::validateRowRange
Range1D validateRowRange(const Range1D &rowRng) const
Validate and resize the row range.
Definition
Thyra_SpmdMultiVectorDefaultBase_def.hpp:686
Thyra::SpmdMultiVectorDefaultBase::validateColRange
Range1D validateColRange(const Range1D &rowCol) const
Validate and resize the column range.
Definition
Thyra_SpmdMultiVectorDefaultBase_def.hpp:702
Thyra::SpmdMultiVectorDefaultBase::releaseDetachedMultiVectorViewImpl
void releaseDetachedMultiVectorViewImpl(RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const
Definition
Thyra_SpmdMultiVectorDefaultBase_def.hpp:265
Thyra::SpmdMultiVectorDefaultBase::acquireDetachedMultiVectorViewImpl
void acquireDetachedMultiVectorViewImpl(const Range1D &rowRng, const Range1D &colRng, RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const
Definition
Thyra_SpmdMultiVectorDefaultBase_def.hpp:232
Thyra::SpmdMultiVectorDefaultBase::getNonconstLocalSubMultiVectorImpl
RTOpPack::SubMultiVectorView< Scalar > getNonconstLocalSubMultiVectorImpl()
Definition
Thyra_SpmdMultiVectorDefaultBase_def.hpp:104
Thyra::SpmdMultiVectorDefaultBase::euclideanApply
void euclideanApply(const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const
Uses GEMM() and Teuchos::reduceAll() to implement.
Definition
Thyra_SpmdMultiVectorDefaultBase_def.hpp:344
Thyra::SpmdMultiVectorDefaultBase::acquireNonconstDetachedMultiVectorViewImpl
void acquireNonconstDetachedMultiVectorViewImpl(const Range1D &rowRng, const Range1D &colRng, RTOpPack::SubMultiVectorView< Scalar > *sub_mv)
Definition
Thyra_SpmdMultiVectorDefaultBase_def.hpp:284
Thyra::SpmdMultiVectorDefaultBase::updateSpmdSpace
virtual void updateSpmdSpace()
Subclasses should call whenever the structure of the VectorSpaceBase changes.
Definition
Thyra_SpmdMultiVectorDefaultBase_def.hpp:665
Thyra::SpmdMultiVectorDefaultBase::mvMultiReductApplyOpImpl
void mvMultiReductApplyOpImpl(const RTOpPack::RTOpT< Scalar > &primary_op, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &multi_vecs, const ArrayView< const Ptr< MultiVectorBase< Scalar > > > &targ_multi_vecs, const ArrayView< const Ptr< RTOpPack::ReductTarget > > &reduct_objs, const Ordinal primary_global_offset) const
Definition
Thyra_SpmdMultiVectorDefaultBase_def.hpp:144
Thyra::SpmdMultiVectorDefaultBase::getLocalSubMultiVectorImpl
RTOpPack::ConstSubMultiVectorView< Scalar > getLocalSubMultiVectorImpl() const
Definition
Thyra_SpmdMultiVectorDefaultBase_def.hpp:123
Thyra::SpmdMultiVectorDefaultBase::commitNonconstDetachedMultiVectorViewImpl
void commitNonconstDetachedMultiVectorViewImpl(RTOpPack::SubMultiVectorView< Scalar > *sub_mv)
Definition
Thyra_SpmdMultiVectorDefaultBase_def.hpp:322
Thyra::Range1D
Teuchos::Range1D Range1D
Definition
Thyra_OperatorVectorTypes.hpp:97
Generated by
1.17.0