|
Thyra Version of the Day
|
Base class for SPMD vectors that can provide views of contiguous elements in a process. More...
#include <Thyra_SpmdVectorBase.hpp>

Public non-virtual interface functions | |
| RTOpPack::SubVectorView< Scalar > | getNonconstLocalSubVector () |
| Get a non-const generalized view of local vector data. | |
| RTOpPack::ConstSubVectorView< Scalar > | getLocalSubVector () const |
| Get a const generalized view of local vector data. | |
| void | getNonconstLocalData (const Ptr< ArrayRCP< Scalar > > &localValues) |
| Returns a non-const pointer to the beginning of the local vector data. | |
| void | getLocalData (const Ptr< ArrayRCP< const Scalar > > &localValues) const |
| Returns a const pointer to the beginning of the local vector data. | |
Protected pure virtual functions to be overridden | |
| virtual RTOpPack::SubVectorView< Scalar > | getNonconstLocalSubVectorImpl ()=0 |
| Virtual implementation for getNonconstLocalSubVector(). | |
| virtual RTOpPack::ConstSubVectorView< Scalar > | getLocalSubVectorImpl () const =0 |
| Virtual implementation for getLocalSubVector(). | |
| virtual void | getNonconstLocalVectorDataImpl (const Ptr< ArrayRCP< Scalar > > &localValues)=0 |
| Implementation of getNonconstLocalData(). | |
| virtual void | getLocalVectorDataImpl (const Ptr< ArrayRCP< const Scalar > > &localValues) const =0 |
| Implementation of getLocalData(). | |
Additional Inherited Members | |
| void | assign (const VectorBase< Scalar > &x) |
| Vector assignment: | |
| void | randomize (Scalar l, Scalar u) |
| Random vector generation: | |
| void | update (Scalar alpha, const VectorBase< Scalar > &x) |
| AXPY: | |
| void | linear_combination (const ArrayView< const Scalar > &alpha, const ArrayView< const Ptr< const VectorBase< Scalar > > > &x, const Scalar &beta) |
| Linear combination: | |
| Scalar | dot (const VectorBase< Scalar > &x) const |
| Euclidean dot product: result = x^H * this. | |
| Teuchos::ScalarTraits< Scalar >::magnitudeType | norm_1 () const |
| One (1) norm: result = ||v||1. | |
| Teuchos::ScalarTraits< Scalar >::magnitudeType | norm_2 () const |
| Euclidean (2) norm: result = ||v||2. | |
| Teuchos::ScalarTraits< Scalar >::magnitudeType | norm_2 (const VectorBase< Scalar > &x) const |
| Weighted Euclidean (2) norm: result = ||v||2. | |
| Teuchos::ScalarTraits< Scalar >::magnitudeType | norm_inf () const |
| Infinity norm: result = ||v||inf. | |
| virtual RCP< const VectorSpaceBase< Scalar > > | space () const =0 |
| Return a smart pointer to the vector space that this vector belongs to. | |
| void | applyOp (const RTOpPack::RTOpT< Scalar > &op, const ArrayView< const Ptr< const VectorBase< Scalar > > > &vecs, const ArrayView< const Ptr< VectorBase< Scalar > > > &targ_vecs, const Ptr< RTOpPack::ReductTarget > &reduct_obj, const Ordinal global_offset) const |
| Calls applyOpImpl(). | |
| virtual RCP< VectorBase< Scalar > > | clone_v () const =0 |
| Returns a seprate cloned copy of *this vector with the same values but different storage. | |
| void | acquireDetachedView (const Range1D &rng, RTOpPack::ConstSubVectorView< Scalar > *sub_vec) const |
| Calls acquireDetachedVectorViewImpl(). | |
| void | releaseDetachedView (RTOpPack::ConstSubVectorView< Scalar > *sub_vec) const |
| Calls releaseDetachedVectorViewImpl(). | |
| void | acquireDetachedView (const Range1D &rng, RTOpPack::SubVectorView< Scalar > *sub_vec) |
| Calls acquireNonconstDetachedVectorViewImpl(). | |
| void | commitDetachedView (RTOpPack::SubVectorView< Scalar > *sub_vec) |
| Calls commitDetachedView(). | |
| void | setSubVector (const RTOpPack::SparseSubVectorT< Scalar > &sub_vec) |
| Calls setSubVectorImpl(). | |
| void | assign (Scalar alpha) |
| V = alpha. | |
| void | assign (const MultiVectorBase< Scalar > &mv) |
| V = mv. | |
| void | scale (Scalar alpha) |
| void | update (Scalar alpha, const MultiVectorBase< Scalar > &mv) |
| void | linear_combination (const ArrayView< const Scalar > &alpha, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &mv, const Scalar &beta) |
| Y.col(j)(i) = beta*Y.col(j)(i) + sum( alpha[k]*X[k].col(j)(i),
| |
| void | dots (const MultiVectorBase< Scalar > &mv, const ArrayView< Scalar > &prods) const |
| Column-wise Euclidean dot product. | |
| void | norms_1 (const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const |
| Column-wise 1-norms. | |
| void | norms_2 (const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const |
| Column-wise 2-norms. | |
| void | norms_inf (const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const |
| Column-wise infinity-norms. | |
| RCP< const VectorBase< Scalar > > | col (Ordinal j) const |
| Calls colImpl(). | |
| RCP< VectorBase< Scalar > > | col (Ordinal j) |
| Calls nonconstColImpl(). | |
| RCP< const MultiVectorBase< Scalar > > | subView (const Range1D &colRng) const |
| Calls contigSubViewImpl(). | |
| RCP< MultiVectorBase< Scalar > > | subView (const Range1D &colRng) |
| Calls nonconstContigSubViewImpl(). | |
| RCP< const MultiVectorBase< Scalar > > | subView (const ArrayView< const int > &cols) const |
| nonContigSubViewImpl(). | |
| RCP< MultiVectorBase< Scalar > > | subView (const ArrayView< const int > &cols) |
| nonconstNonContigSubViewImpl(). | |
| void | applyOp (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 |
| Calls mvMultiReductApplyOpImpl(). | |
| void | applyOp (const RTOpPack::RTOpT< Scalar > &primary_op, const RTOpPack::RTOpT< Scalar > &secondary_op, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &multi_vecs, const ArrayView< const Ptr< MultiVectorBase< Scalar > > > &targ_multi_vecs, const Ptr< RTOpPack::ReductTarget > &reduct_obj, const Ordinal primary_global_offset) const |
| mvSingleReductApplyOpImpl(). | |
| void | acquireDetachedView (const Range1D &rowRng, const Range1D &colRng, RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const |
| Calls acquireDetachedMultiVectorViewImpl(). | |
| void | releaseDetachedView (RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const |
| Calls releaseDetachedMultiVectorViewImpl(). | |
| void | acquireDetachedView (const Range1D &rowRng, const Range1D &colRng, RTOpPack::SubMultiVectorView< Scalar > *sub_mv) |
| Calls acquireNonconstDetachedMultiVectorViewImpl(). | |
| void | commitDetachedView (RTOpPack::SubMultiVectorView< Scalar > *sub_mv) |
| Calls commitNonconstDetachedMultiVectorViewImpl(). | |
| virtual RCP< MultiVectorBase< Scalar > > | clone_mv () const =0 |
| Clone the multi-vector object (if supported). | |
| RCP< const LinearOpBase< Scalar > > | clone () const |
| This function is simply overridden to return this->clone_mv(). | |
| virtual RCP< const VectorSpaceBase< Scalar > > | range () const =0 |
| Return a smart pointer for the range space for this operator. | |
| virtual RCP< const VectorSpaceBase< Scalar > > | domain () const =0 |
| Return a smart pointer for the domain space for this operator. | |
| bool | opSupported (EOpTransp M_trans) const |
| Return if the M_trans operation of apply() is supported or not. | |
| void | apply (const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const |
| Apply the linear operator to a multi-vector : Y =
alpha*op(M)*X + beta*Y. | |
| bool | rowStatIsSupported (const RowStatLinearOpBaseUtils::ERowStat rowStat) const |
| Determine if a given row stat is supported. | |
| void | getRowStat (const RowStatLinearOpBaseUtils::ERowStat rowStat, const Ptr< VectorBase< Scalar > > &rowStatVec) const |
| Get some statistics about a supported row. | |
| bool | supportsScaleLeft () const |
| Determines if this objects supports left scaling. | |
| bool | supportsScaleRight () const |
| Determines if this objects supports right scaling. | |
| void | scaleLeft (const VectorBase< Scalar > &row_scaling) |
| Left scales operator with diagonal scaling operator. | |
| void | scaleRight (const VectorBase< Scalar > &col_scaling) |
| Right scales operator with diagonal scaling operator. | |
| RCP< const SpmdVectorSpaceBase< Scalar > > | spmdSpace () const |
| Returns the SPMD vector space object for the range of *this multi-vector. | |
| RTOpPack::SubMultiVectorView< Scalar > | getNonconstLocalSubMultiVector () |
| Get a non-const generalized view of local multi-vector data. | |
| RTOpPack::ConstSubMultiVectorView< Scalar > | getLocalSubMultiVector () const |
| Get a const generalized view of local multi-vector data. | |
| void | getNonconstLocalData (const Ptr< ArrayRCP< Scalar > > &localValues, const Ptr< Ordinal > &leadingDim) |
| Returns a non-const pointer to a Fortran-style view of the local multi-vector data. | |
| void | getLocalData (const Ptr< ArrayRCP< const Scalar > > &localValues, const Ptr< Ordinal > &leadingDim) const |
| Returns a const pointer to a Fortran-style view of the local multi-vector data. | |
| virtual void | assignVecImpl (const VectorBase< Scalar > &x)=0 |
| Virtual implementation for NVI assign. | |
| virtual void | randomizeImpl (Scalar l, Scalar u)=0 |
| Virtual implementation for NVI randomize. | |
| virtual void | absImpl (const VectorBase< Scalar > &x)=0 |
| Virtual implementation for NVI abs. | |
| virtual void | reciprocalImpl (const VectorBase< Scalar > &x)=0 |
| Virtual implementation for NVI reciprocal. | |
| virtual void | eleWiseScaleImpl (const VectorBase< Scalar > &x)=0 |
| Virtual implementation for NVI ele_wise_scale. | |
| virtual void | updateVecImpl (Scalar alpha, const VectorBase< Scalar > &x)=0 |
| Virtual implementation for NVI update. | |
| virtual void | linearCombinationVecImpl (const ArrayView< const Scalar > &alpha, const ArrayView< const Ptr< const VectorBase< Scalar > > > &x, const Scalar &beta)=0 |
| Virtual implementation for NVI linear_combination. | |
| virtual Scalar | dotImpl (const VectorBase< Scalar > &x) const =0 |
| Virtual implementation for NVI dot. | |
| virtual Teuchos::ScalarTraits< Scalar >::magnitudeType | norm1Impl () const =0 |
| Virtual implementation for NVI norm_1. | |
| virtual Teuchos::ScalarTraits< Scalar >::magnitudeType | norm2Impl () const =0 |
| Virtual implementation for NVI norm_2. | |
| virtual Teuchos::ScalarTraits< Scalar >::magnitudeType | norm2WeightedImpl (const VectorBase< Scalar > &x) const =0 |
| Virtual implementation for NVI norm_2 (weighted). | |
| virtual Teuchos::ScalarTraits< Scalar >::magnitudeType | normInfImpl () const =0 |
| Virtual implementation for NVI norm_inf. | |
| virtual void | applyOpImpl (const RTOpPack::RTOpT< Scalar > &op, const ArrayView< const Ptr< const VectorBase< Scalar > > > &vecs, const ArrayView< const Ptr< VectorBase< Scalar > > > &targ_vecs, const Ptr< RTOpPack::ReductTarget > &reduct_obj, const Ordinal global_offset) const =0 |
| Apply a reduction/transformation operator over a set of vectors: op(op(v[0]...v[nv-1],z[0]...z[nz-1]),(*reduct_obj)) ->
z[0]...z[nz-1],(*reduct_obj). | |
| virtual void | acquireDetachedVectorViewImpl (const Range1D &rng, RTOpPack::ConstSubVectorView< Scalar > *sub_vec) const =0 |
| Get a non-mutable explicit view of a sub-vector. | |
| virtual void | releaseDetachedVectorViewImpl (RTOpPack::ConstSubVectorView< Scalar > *sub_vec) const =0 |
| Free an explicit view of a sub-vector. | |
| virtual void | acquireNonconstDetachedVectorViewImpl (const Range1D &rng, RTOpPack::SubVectorView< Scalar > *sub_vec)=0 |
| Get a mutable explicit view of a sub-vector. | |
| virtual void | commitNonconstDetachedVectorViewImpl (RTOpPack::SubVectorView< Scalar > *sub_vec)=0 |
| Commit changes for a mutable explicit view of a sub-vector. | |
| virtual void | setSubVectorImpl (const RTOpPack::SparseSubVectorT< Scalar > &sub_vec)=0 |
| Set a specific sub-vector. | |
| virtual void | assignImpl (Scalar alpha)=0 |
| Virtual implementation for NVI assign(Scalar). | |
| virtual void | assignMultiVecImpl (const MultiVectorBase< Scalar > &mv)=0 |
| Virtual implementation for NVI assign(MV). | |
| virtual void | scaleImpl (Scalar alpha)=0 |
| Virtual implementation for NVI scale(). | |
| virtual void | updateImpl (Scalar alpha, const MultiVectorBase< Scalar > &mv)=0 |
| Virtual implementation for NVI update(). | |
| virtual void | linearCombinationImpl (const ArrayView< const Scalar > &alpha, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &mv, const Scalar &beta)=0 |
| Virtual implementation for NVI linear_combination(). | |
| virtual void | dotsImpl (const MultiVectorBase< Scalar > &mv, const ArrayView< Scalar > &prods) const =0 |
| Virtual implementation for NVI dots(). | |
| virtual void | norms1Impl (const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const =0 |
| Virtual implementation for NVI norms_1(). | |
| virtual void | norms2Impl (const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const =0 |
| Virtual implementation for NVI norms_2(). | |
| virtual void | normsInfImpl (const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) const =0 |
| Virtual implementation for NVI norms_inf(). | |
| virtual RCP< const VectorBase< Scalar > > | colImpl (Ordinal j) const |
| Return a non-changeable view of a constituent column vector. | |
| virtual RCP< VectorBase< Scalar > > | nonconstColImpl (Ordinal j)=0 |
| Return a changeable view of a constituent column vector. | |
| virtual RCP< const MultiVectorBase< Scalar > > | contigSubViewImpl (const Range1D &colRng) const =0 |
| Return a non-changeable sub-view of a contiguous set of columns of the this multi-vector. | |
| virtual RCP< MultiVectorBase< Scalar > > | nonconstContigSubViewImpl (const Range1D &colRng)=0 |
| Return a changeable sub-view of a contiguous set of columns of the this multi-vector. | |
| virtual RCP< const MultiVectorBase< Scalar > > | nonContigSubViewImpl (const ArrayView< const int > &cols) const =0 |
| Return a non-changeable sub-view of a non-contiguous set of columns of this multi-vector. | |
| virtual RCP< MultiVectorBase< Scalar > > | nonconstNonContigSubViewImpl (const ArrayView< const int > &cols)=0 |
| Return a changeable sub-view of a non-contiguous set of columns of this multi-vector. | |
| virtual 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 =0 |
| Apply a reduction/transformation operator column by column and return an array of the reduction objects. | |
| virtual void | mvSingleReductApplyOpImpl (const RTOpPack::RTOpT< Scalar > &primary_op, const RTOpPack::RTOpT< Scalar > &secondary_op, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &multi_vecs, const ArrayView< const Ptr< MultiVectorBase< Scalar > > > &targ_multi_vecs, const Ptr< RTOpPack::ReductTarget > &reduct_obj, const Ordinal primary_global_offset) const =0 |
| Apply a reduction/transformation operator column by column and reduce the intermediate reduction objects into a single reduction object. | |
| virtual void | acquireDetachedMultiVectorViewImpl (const Range1D &rowRng, const Range1D &colRng, RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const =0 |
| Get a non-changeable explicit view of a sub-multi-vector. | |
| virtual void | releaseDetachedMultiVectorViewImpl (RTOpPack::ConstSubMultiVectorView< Scalar > *sub_mv) const =0 |
| Free a non-changeable explicit view of a sub-multi-vector. | |
| virtual void | acquireNonconstDetachedMultiVectorViewImpl (const Range1D &rowRng, const Range1D &colRng, RTOpPack::SubMultiVectorView< Scalar > *sub_mv)=0 |
| Get a changeable explicit view of a sub-multi-vector. | |
| virtual void | commitNonconstDetachedMultiVectorViewImpl (RTOpPack::SubMultiVectorView< Scalar > *sub_mv)=0 |
| Commit changes for a changeable explicit view of a sub-multi-vector. | |
| virtual bool | rowStatIsSupportedImpl (const RowStatLinearOpBaseUtils::ERowStat rowStat) const |
| virtual void | getRowStatImpl (const RowStatLinearOpBaseUtils::ERowStat rowStat, const Ptr< VectorBase< Scalar > > &rowStatVec) const |
| virtual bool | supportsScaleLeftImpl () const |
| virtual bool | supportsScaleRightImpl () const |
| virtual void | scaleLeftImpl (const VectorBase< Scalar > &row_scaling) |
| virtual void | scaleRightImpl (const VectorBase< Scalar > &col_scaling) |
| void | absRowSum (const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &output) const |
| void | absColSum (const Teuchos::Ptr< Thyra::VectorBase< Scalar > > &output) const |
| virtual bool | opSupportedImpl (EOpTransp M_trans) const =0 |
| Override in subclass. | |
| virtual void | applyImpl (const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha, const Scalar beta) const =0 |
| Override in subclass. | |
| virtual RCP< const SpmdVectorSpaceBase< Scalar > > | spmdSpaceImpl () const =0 |
| Virtual implementation for spmdSpace(). | |
| virtual RTOpPack::SubMultiVectorView< Scalar > | getNonconstLocalSubMultiVectorImpl ()=0 |
| Virtual implementation for getNonconstLocalSubMultiVector(). | |
| virtual RTOpPack::ConstSubMultiVectorView< Scalar > | getLocalSubMultiVectorImpl () const =0 |
| Virtual implementation for getLocalSubMultiVector(). | |
| virtual void | getNonconstLocalMultiVectorDataImpl (const Ptr< ArrayRCP< Scalar > > &localValues, const Ptr< Ordinal > &leadingDim)=0 |
| Virtual implementation for getNonconstLocalData(). | |
| virtual void | getLocalMultiVectorDataImpl (const Ptr< ArrayRCP< const Scalar > > &localValues, const Ptr< Ordinal > &leadingDim) const =0 |
| Virtual implementation for getLocalData(). | |
| Related Symbols inherited from Thyra::VectorBase< Scalar > | |
| template<class Scalar> | |
| void | applyOp (const RTOpPack::RTOpT< Scalar > &op, const ArrayView< const Ptr< const VectorBase< Scalar > > > &vecs, const ArrayView< const Ptr< VectorBase< Scalar > > > &targ_vecs, const Ptr< RTOpPack::ReductTarget > &reduct_obj, const Ordinal global_offset=0) |
| Apply a reduction/transformation operator over a set of vectors: op(op(v[0]...v[nv-1],z[0]...z[nz-1]),(*reduct_obj)) ->
z[0]...z[nz-1],(*reduct_obj). | |
| template<class Scalar> | |
| Scalar | sum (const VectorBase< Scalar > &v) |
| Sum of vector elements: result = sum( v(i), i = 0...v.space()->dim()-1 ). | |
| template<class Scalar> | |
| Scalar | scalarProd (const VectorBase< Scalar > &x, const VectorBase< Scalar > &y) |
| Scalar product result = <x,y>. | |
| template<class Scalar> | |
| Scalar | inner (const VectorBase< Scalar > &x, const VectorBase< Scalar > &y) |
| Inner/Scalar product result = <x,y>. | |
| template<class Scalar> | |
| Teuchos::ScalarTraits< Scalar >::magnitudeType | norm (const VectorBase< Scalar > &v) |
| Natural norm: result = sqrt(<v,v>). | |
| template<class Scalar> | |
| Teuchos::ScalarTraits< Scalar >::magnitudeType | norm_1 (const VectorBase< Scalar > &v) |
| One (1) norm: result = ||v||1. | |
| template<class Scalar> | |
| Teuchos::ScalarTraits< Scalar >::magnitudeType | norm_2 (const VectorBase< Scalar > &v) |
| Euclidean (2) norm: result = ||v||2. | |
| template<class Scalar> | |
| Teuchos::ScalarTraits< Scalar >::magnitudeType | norm_2 (const VectorBase< Scalar > &w, const VectorBase< Scalar > &v) |
| Weighted Euclidean (2) norm: result = sqrt( sum( w(i)*conj(v(i))*v(i)) ). | |
| template<class Scalar> | |
| Teuchos::ScalarTraits< Scalar >::magnitudeType | norm_inf (const VectorBase< Scalar > &v_rhs) |
| Infinity norm: result = ||v||inf. | |
| template<class Scalar> | |
| Scalar | dot (const VectorBase< Scalar > &x, const VectorBase< Scalar > &y) |
| Dot product: result = conj(x)'*y. | |
| template<class Scalar> | |
| Scalar | get_ele (const VectorBase< Scalar > &v, Ordinal i) |
| Get single element: result = v(i). | |
| template<class Scalar> | |
| void | set_ele (Ordinal i, Scalar alpha, const Ptr< VectorBase< Scalar > > &v) |
| Set single element: v(i) = alpha. | |
| template<class Scalar> | |
| void | put_scalar (const Scalar &alpha, const Ptr< VectorBase< Scalar > > &y) |
| Assign all elements to a scalar: y(i) = alpha, i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | copy (const VectorBase< Scalar > &x, const Ptr< VectorBase< Scalar > > &y) |
| Vector assignment: y(i) = x(i), i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | add_scalar (const Scalar &alpha, const Ptr< VectorBase< Scalar > > &y) |
| Add a scalar to all elements: y(i) += alpha, i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | scale (const Scalar &alpha, const Ptr< VectorBase< Scalar > > &y) |
| Scale all elements by a scalar: y(i) *= alpha, i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | abs (const VectorBase< Scalar > &x, const Ptr< VectorBase< Scalar > > &y) |
| Element-wise absolute value: y(i) = abs(x(i)), i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | reciprocal (const VectorBase< Scalar > &x, const Ptr< VectorBase< Scalar > > &y) |
| Element-wise reciprocal: y(i) = 1/x(i), i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | ele_wise_prod (const Scalar &alpha, const VectorBase< Scalar > &x, const VectorBase< Scalar > &v, const Ptr< VectorBase< Scalar > > &y) |
| Element-wise product update: y(i) += alpha * x(i) * v(i), i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | pair_wise_max (const Scalar &alpha, const VectorBase< Scalar > &x, const VectorBase< Scalar > &v, const Ptr< VectorBase< Scalar > > &y) |
| Element-wise maximum: y(i) = alpha * max(x(i), v(i)), i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | ele_wise_conj_prod (const Scalar &alpha, const VectorBase< Scalar > &x, const VectorBase< Scalar > &v, const Ptr< VectorBase< Scalar > > &y) |
| Element-wise conjugate product update: y(i) += alpha * conj(x(i)) * v(i), i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | ele_wise_scale (const VectorBase< Scalar > &x, const Ptr< VectorBase< Scalar > > &y) |
| Element-wise scaling: y(i) *= x(i), i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | Vp_StVtV (const Ptr< VectorBase< Scalar > > &y, const Scalar &alpha, const VectorBase< Scalar > &x, const VectorBase< Scalar > &v) |
| Element-wise product update: y(i) += alpha * x(i) * v(i), i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | ele_wise_prod_update (const Scalar &alpha, const VectorBase< Scalar > &x, const Ptr< VectorBase< Scalar > > &y) |
| Element-wise product update: y(i) *= alpha * x(i), i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | pair_wise_max_update (const Scalar &alpha, const VectorBase< Scalar > &x, const Ptr< VectorBase< Scalar > > &y) |
| Element-wise maximum update: y(i) = alpha * max(x(i), y(i)), i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | Vt_StV (const Ptr< VectorBase< Scalar > > &y, const Scalar &alpha, const VectorBase< Scalar > &x) |
| Element-wise product update: y(i) *= alpha * x(i), i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | ele_wise_divide (const Scalar &alpha, const VectorBase< Scalar > &x, const VectorBase< Scalar > &v, const Ptr< VectorBase< Scalar > > &y) |
| Element-wise division update: y(i) += alpha * x(i) / v(i), i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | linear_combination (const ArrayView< const Scalar > &alpha, const ArrayView< const Ptr< const VectorBase< Scalar > > > &x, const Scalar &beta, const Ptr< VectorBase< Scalar > > &y) |
| Linear combination: y(i) = beta*y(i) + sum( alpha[k]*x[k](i), k=0...m-1 ), i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | seed_randomize (unsigned int s) |
| Seed the random number generator used in randomize(). | |
| template<class Scalar> | |
| void | randomize (Scalar l, Scalar u, const Ptr< VectorBase< Scalar > > &v) |
| Random vector generation: v(i) = rand(l,u), , i = 1...v->space()->dim(). | |
| template<class Scalar> | |
| void | assign (const Ptr< VectorBase< Scalar > > &y, const Scalar &alpha) |
| Assign all elements to a scalar: y(i) = alpha, i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | assign (const Ptr< VectorBase< Scalar > > &y, const VectorBase< Scalar > &x) |
| Vector assignment: y(i) = x(i), i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | Vp_S (const Ptr< VectorBase< Scalar > > &y, const Scalar &alpha) |
| Add a scalar to all elements: y(i) += alpha, i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | Vt_S (const Ptr< VectorBase< Scalar > > &y, const Scalar &alpha) |
| Scale all elements by a scalar: y(i) *= alpha, i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | V_StV (const Ptr< VectorBase< Scalar > > &y, const Scalar &alpha, const VectorBase< Scalar > &x) |
| Assign scaled vector: y(i) = alpha * x(i), i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | Vp_StV (const Ptr< VectorBase< Scalar > > &y, const Scalar &alpha, const VectorBase< Scalar > &x) |
| AXPY: y(i) = alpha * x(i) + y(i), i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | Vp_V (const Ptr< VectorBase< Scalar > > &y, const VectorBase< Scalar > &x, const Scalar &beta=static_cast< Scalar >(1.0)) |
| y(i) = x(i) + beta*y(i), i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | V_V (const Ptr< VectorBase< Scalar > > &y, const VectorBase< Scalar > &x) |
| y(i) = x(i), i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | V_S (const Ptr< VectorBase< Scalar > > &y, const Scalar &alpha) |
| y(i) = alpha, i = 0...y->space()->dim()-1. | |
| template<class Scalar> | |
| void | V_VpV (const Ptr< VectorBase< Scalar > > &z, const VectorBase< Scalar > &x, const VectorBase< Scalar > &y) |
| z(i) = x(i) + y(i), i = 0...z->space()->dim()-1. | |
| template<class Scalar> | |
| void | V_VmV (const Ptr< VectorBase< Scalar > > &z, const VectorBase< Scalar > &x, const VectorBase< Scalar > &y) |
| z(i) = x(i) - y(i), i = 0...z->space()->dim()-1. | |
| template<class Scalar> | |
| void | V_StVpV (const Ptr< VectorBase< Scalar > > &z, const Scalar &alpha, const VectorBase< Scalar > &x, const VectorBase< Scalar > &y) |
| z(i) = alpha*x(i) + y(i), i = 0...z->space()->dim()-1. | |
| template<class Scalar> | |
| void | V_VpStV (const Ptr< VectorBase< Scalar > > &z, const VectorBase< Scalar > &x, const Scalar &alpha, const VectorBase< Scalar > &y) |
| z(i) = x(i) + alpha*y(i), i = 0...z->space()->dim()-1. | |
| template<class Scalar> | |
| void | V_StVpStV (const Ptr< VectorBase< Scalar > > &z, const Scalar &alpha, const VectorBase< Scalar > &x, const Scalar &beta, const VectorBase< Scalar > &y) |
| z(i) = alpha*x(i) + beta*y(i), i = 0...z->space()->dim()-1. | |
| template<class Scalar> | |
| Scalar | min (const VectorBase< Scalar > &x) |
| Min element: result = min{ x(i), i = 0...x.space()->dim()-1 } . | |
| template<class Scalar> | |
| void | min (const VectorBase< Scalar > &x, const Ptr< Scalar > &maxEle, const Ptr< Ordinal > &maxIndex) |
| Min element and its index: Returns maxEle = x(k) and maxIndex = k such that x(k) <= x(i) for all i = 0...x.space()->dim()-1. | |
| template<class Scalar> | |
| void | minGreaterThanBound (const VectorBase< Scalar > &x, const Scalar &bound, const Ptr< Scalar > &minEle, const Ptr< Ordinal > &minIndex) |
| Minimum element greater than some bound and its index: Returns minEle = x(k) and minIndex = k such that x(k) <= x(i) for all i where x(i) >
bound. | |
| template<class Scalar> | |
| Scalar | max (const VectorBase< Scalar > &x) |
| Max element: result = max{ x(i), i = 1...n } . | |
| template<class Scalar> | |
| void | max (const VectorBase< Scalar > &x, const Ptr< Scalar > &maxEle, const Ptr< Ordinal > &maxIndex) |
| Max element and its index: Returns maxEle = x(k) and maxIndex = k such that x(k) >= x(i) for i = 0...x.space()->dim()-1. | |
| template<class Scalar> | |
| void | maxLessThanBound (const VectorBase< Scalar > &x, const Scalar &bound, const Ptr< Scalar > &maxEle, const Ptr< Ordinal > &maxIndex) |
| Max element less than bound and its index: Returns maxEle =
x(k) and maxIndex = k such that x(k) >= x(i) for all i where x(i) < bound. | |
| Related Symbols inherited from Thyra::MultiVectorBase< Scalar > | |
| template<class Scalar> | |
| void | applyOp (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=0) |
| Apply a reduction/transformation operator column by column and return an array of the reduction objects. | |
| template<class Scalar> | |
| void | applyOp (const RTOpPack::RTOpT< Scalar > &primary_op, const RTOpPack::RTOpT< Scalar > &secondary_op, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &multi_vecs, const ArrayView< const Ptr< MultiVectorBase< Scalar > > > &targ_multi_vecs, const Ptr< RTOpPack::ReductTarget > &reduct_obj, const Ordinal primary_global_offset=0) |
| Apply a reduction/transformation operator column by column and reduce the intermediate reduction objects into one reduction object. | |
| template<class Scalar> | |
| void | norms (const MultiVectorBase< Scalar > &V, const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) |
| Column-wise multi-vector natural norm. | |
| template<class Scalar, class NormOp> | |
| void | reductions (const MultiVectorBase< Scalar > &V, const NormOp &op, const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) |
| Column-wise multi-vector reductions. | |
| template<class Scalar> | |
| void | norms_1 (const MultiVectorBase< Scalar > &V, const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) |
| Column-wise multi-vector one norm. | |
| template<class Scalar> | |
| void | norms_2 (const MultiVectorBase< Scalar > &V, const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) |
| Column-wise multi-vector 2 (Euclidean) norm. | |
| template<class Scalar> | |
| void | norms_inf (const MultiVectorBase< Scalar > &V, const ArrayView< typename ScalarTraits< Scalar >::magnitudeType > &norms) |
| Column-wise multi-vector infinity norm. | |
| template<class Scalar> | |
| Array< typename ScalarTraits< Scalar >::magnitudeType > | norms_inf (const MultiVectorBase< Scalar > &V) |
| Column-wise multi-vector infinity norm. | |
| template<class Scalar> | |
| void | dots (const MultiVectorBase< Scalar > &V1, const MultiVectorBase< Scalar > &V2, const ArrayView< Scalar > &dots) |
| Multi-vector dot product. | |
| template<class Scalar> | |
| void | sums (const MultiVectorBase< Scalar > &V, const ArrayView< Scalar > &sums) |
| Multi-vector column sum. | |
| template<class Scalar> | |
| ScalarTraits< Scalar >::magnitudeType | norm_1 (const MultiVectorBase< Scalar > &V) |
| Take the induced matrix one norm of a multi-vector. | |
| template<class Scalar> | |
| void | scale (Scalar alpha, const Ptr< MultiVectorBase< Scalar > > &V) |
| V = alpha*V. | |
| template<class Scalar> | |
| void | scaleUpdate (const VectorBase< Scalar > &a, const MultiVectorBase< Scalar > &U, const Ptr< MultiVectorBase< Scalar > > &V) |
| A*U + V -> V (where A is a diagonal matrix with diagonal a). | |
| template<class Scalar> | |
| void | assign (const Ptr< MultiVectorBase< Scalar > > &V, Scalar alpha) |
| V = alpha. | |
| template<class Scalar> | |
| void | assign (const Ptr< MultiVectorBase< Scalar > > &V, const MultiVectorBase< Scalar > &U) |
| V = U. | |
| template<class Scalar> | |
| void | update (Scalar alpha, const MultiVectorBase< Scalar > &U, const Ptr< MultiVectorBase< Scalar > > &V) |
| alpha*U + V -> V. | |
| template<class Scalar> | |
| void | update (const ArrayView< const Scalar > &alpha, Scalar beta, const MultiVectorBase< Scalar > &U, const Ptr< MultiVectorBase< Scalar > > &V) |
| alpha[j]*beta*U(j) + V(j) - > V(j), for j = 0 ,,, | |
| template<class Scalar> | |
| void | update (const MultiVectorBase< Scalar > &U, const ArrayView< const Scalar > &alpha, Scalar beta, const Ptr< MultiVectorBase< Scalar > > &V) |
| U(j) + alpha[j]*beta*V(j) - > V(j), for j = 0 ,,, U.domain()->dim()-1. | |
| template<class Scalar> | |
| void | linear_combination (const ArrayView< const Scalar > &alpha, const ArrayView< const Ptr< const MultiVectorBase< Scalar > > > &X, const Scalar &beta, const Ptr< MultiVectorBase< Scalar > > &Y) |
| Y.col(j)(i) = beta*Y.col(j)(i) + sum( alpha[k]*X[k].col(j)(i),
k=0...m-1 ), for i = 0...Y->range()->dim()-1, j =
0...Y->domain()->dim()-1. | |
| template<class Scalar> | |
| void | randomize (Scalar l, Scalar u, const Ptr< MultiVectorBase< Scalar > > &V) |
| Generate a random multi-vector with elements uniformly distributed elements. | |
| template<class Scalar> | |
| void | Vt_S (const Ptr< MultiVectorBase< Scalar > > &Z, const Scalar &alpha) |
| Z(i,j) *= alpha, i = 0...Z->range()->dim()-1, j =
0...Z->domain()->dim()-1. | |
| template<class Scalar> | |
| void | Vp_S (const Ptr< MultiVectorBase< Scalar > > &Z, const Scalar &alpha) |
| Z(i,j) += alpha, i = 0...Z->range()->dim()-1, j =
0...Z->domain()->dim()-1. | |
| template<class Scalar> | |
| void | Vp_V (const Ptr< MultiVectorBase< Scalar > > &Z, const MultiVectorBase< Scalar > &X) |
| Z(i,j) += X(i,j), i = 0...Z->range()->dim()-1, j =
0...Z->domain()->dim()-1. | |
| template<class Scalar> | |
| void | V_VpV (const Ptr< MultiVectorBase< Scalar > > &Z, const MultiVectorBase< Scalar > &X, const MultiVectorBase< Scalar > &Y) |
| Z(i,j) = X(i,j) + Y(i,j), i = 0...Z->range()->dim()-1, j =
0...Z->domain()->dim()-1. | |
| template<class Scalar> | |
| void | V_VmV (const Ptr< MultiVectorBase< Scalar > > &Z, const MultiVectorBase< Scalar > &X, const MultiVectorBase< Scalar > &Y) |
| Z(i,j) = X(i,j) - Y(i,j), i = 0...Z->range()->dim()-1, j =
0...Z->domain()->dim()-1. | |
| template<class Scalar> | |
| void | V_StVpV (const Ptr< MultiVectorBase< Scalar > > &Z, const Scalar &alpha, const MultiVectorBase< Scalar > &X, const MultiVectorBase< Scalar > &Y) |
| Z(i,j) = alpha*X(i,j) + Y(i), i = 0...z->space()->dim()-1, , j = 0...Z->domain()->dim()-1. | |
| Related Symbols inherited from Thyra::LinearOpBase< Scalar > | |
| template<class Scalar> | |
| bool | isFullyUninitialized (const LinearOpBase< Scalar > &M) |
| Determines if a linear operator is in the "Fully Uninitialized" state or not. | |
| template<class Scalar> | |
| bool | isPartiallyInitialized (const LinearOpBase< Scalar > &M) |
| Determines if a linear operator is in the "Partially Initialized" state or not. | |
| template<class Scalar> | |
| bool | isFullyInitialized (const LinearOpBase< Scalar > &M) |
| Determines if a linear operator is in the "Fully Initialized" state or not. | |
| template<class Scalar> | |
| bool | opSupported (const LinearOpBase< Scalar > &M, EOpTransp M_trans) |
| Determines if an operation is supported for a single scalar type. | |
| template<class Scalar> | |
| void | apply (const LinearOpBase< Scalar > &M, const EOpTransp M_trans, const MultiVectorBase< Scalar > &X, const Ptr< MultiVectorBase< Scalar > > &Y, const Scalar alpha=static_cast< Scalar >(1.0), const Scalar beta=static_cast< Scalar >(0.0)) |
| Non-member function call for M.apply(...). | |
| void | apply (const LinearOpBase< double > &M, const EOpTransp M_trans, const MultiVectorBase< double > &X, const Ptr< MultiVectorBase< double > > &Y, const double alpha=1.0, const double beta=0.0) |
| Calls apply<double>(...). | |
Base class for SPMD vectors that can provide views of contiguous elements in a process.
By inheriting from this base class, vector implementations allow their vector objects to be seamlessly combined with other SPMD vector objects (of potentially different concrete types) in applyOp(). A big part of this protocol is that every vector object can expose an SpmdVectorSpaceBase object through the function spmdSpace().
Definition at line 34 of file Thyra_SpmdVectorBase.hpp.
|
inline |
Get a non-const generalized view of local vector data.
Definition at line 50 of file Thyra_SpmdVectorBase.hpp.
|
inline |
Get a const generalized view of local vector data.
Definition at line 55 of file Thyra_SpmdVectorBase.hpp.
|
inline |
Returns a non-const pointer to the beginning of the local vector data.
| localValues | [out] On output *localValues will point to an array of the local values. |
Preconditions:
Postconditions:
Note, the data view returned from this function must be freed by removing all of the ArrayRCP objects (or setting them to null).
Definition at line 75 of file Thyra_SpmdVectorBase.hpp.
|
inline |
Returns a const pointer to the beginning of the local vector data.
| localValues | [out] On output *localValues will point to an array of the local values. |
Preconditions:
Postconditions:
Note, the data view returned from this function must be freed by removing all of the ArrayRCP objects (or setting them to null).
Definition at line 95 of file Thyra_SpmdVectorBase.hpp.
|
protectedpure virtual |
Virtual implementation for getNonconstLocalSubVector().
Implemented in Thyra::SpmdVectorDefaultBase< Scalar >.
|
protectedpure virtual |
Virtual implementation for getLocalSubVector().
Implemented in Thyra::SpmdVectorDefaultBase< Scalar >.
|
protectedpure virtual |
Implementation of getNonconstLocalData().
Implemented in Thyra::DefaultSpmdVector< Scalar >, and Thyra::TpetraVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.
|
protectedpure virtual |
Implementation of getLocalData().
Implemented in Thyra::DefaultSpmdVector< Scalar >, and Thyra::TpetraVector< Scalar, LocalOrdinal, GlobalOrdinal, Node >.