RTOp Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Public Member Functions | List of all members
RTOpPack::TOpLinearCombination< Scalar > Class Template Reference

Linear combination transformation operator: z0[i] = beta*z0[i]. More...

#include <RTOpPack_TOpLinearCombination_decl.hpp>

Inheritance diagram for RTOpPack::TOpLinearCombination< Scalar >:
Inheritance graph
[legend]

Public Member Functions

 TOpLinearCombination (const ArrayView< const Scalar > &alpha_in=Teuchos::null, const Scalar &beta=Teuchos::ScalarTraits< Scalar >::zero())
 
void alpha (const ArrayView< const Scalar > &alpha_in)
 
const ArrayView< const Scalar > alpha () const
 
void beta (const Scalar &beta_in)
 
Scalar beta () const
 
int num_vecs () const
 
- Public Member Functions inherited from RTOpPack::RTOpT< Scalar >
void get_reduct_type_num_entries (const Ptr< int > &num_values, const Ptr< int > &num_indexes, const Ptr< int > &num_chars) const
 Get the number of entries of each basic data type in the externalized state for a reduction object for this operator.
 
Teuchos::RCP< ReductTargetreduct_obj_create () const
 Creates a new reduction target object initialized and ready to be used in a reduction.
 
void reduce_reduct_objs (const ReductTarget &in_reduct_obj, const Ptr< ReductTarget > &inout_reduct_obj) const
 Reduce intermediate reduction target objects.
 
void reduct_obj_reinit (const Ptr< ReductTarget > &reduct_obj) const
 Reinitialize an already created reduction object.
 
void extract_reduct_obj_state (const ReductTarget &reduct_obj, const ArrayView< primitive_value_type > &value_data, const ArrayView< index_type > &index_data, const ArrayView< char_type > &char_data) const
 Extract the state of an already created reduction object.
 
void load_reduct_obj_state (const ArrayView< const primitive_value_type > &value_data, const ArrayView< const index_type > &index_data, const ArrayView< const char_type > &char_data, const Ptr< ReductTarget > &reduct_obj) const
 Load the state of an already created reduction object given arrays of primitive objects.
 
std::string op_name () const
 Return the name (as a null-terminated C-style string) of the operator.
 
bool coord_invariant () const
 Returns true if this operator is coordinate invariant.
 
Range1D range () const
 Returns the continuous range of elements that this operator is defined over.
 
void apply_op (const ArrayView< const ConstSubVectorView< Scalar > > &sub_vecs, const ArrayView< const SubVectorView< Scalar > > &targ_sub_vecs, const Ptr< ReductTarget > &reduct_obj) const
 Apply the reduction/transformation operator to a set of sub-vectors.
 

Overridden from RTOpT

Scalar beta_
 
Array< Scalar > alpha_
 
void apply_op_impl (const ArrayView< const ConstSubVectorView< Scalar > > &sub_vecs, const ArrayView< const SubVectorView< Scalar > > &targ_sub_vecs, const Ptr< ReductTarget > &reduct_obj_inout) const
 

Additional Inherited Members

- Public Types inherited from RTOpPack::RTOpT< Scalar >
typedef PrimitiveTypeTraits< Scalar, Scalar >::primitiveType primitive_value_type
 
- Protected Member Functions inherited from RTOpPack::RTOpT< Scalar >
 RTOpT (const std::string &op_name_base="")
 Constructor that creates an operator name appended with the type.
 
void setOpNameBase (const std::string &op_name_base)
 Just set the operator name.
 
virtual void get_reduct_type_num_entries_impl (const Ptr< int > &num_values, const Ptr< int > &num_indexes, const Ptr< int > &num_chars) const
 
virtual Teuchos::RCP< ReductTargetreduct_obj_create_impl () const
 
virtual void reduce_reduct_objs_impl (const ReductTarget &in_reduct_obj, const Ptr< ReductTarget > &inout_reduct_obj) const
 
virtual void reduct_obj_reinit_impl (const Ptr< ReductTarget > &reduct_obj) const
 
virtual void extract_reduct_obj_state_impl (const ReductTarget &reduct_obj, const ArrayView< primitive_value_type > &value_data, const ArrayView< index_type > &index_data, const ArrayView< char_type > &char_data) const
 
virtual void load_reduct_obj_state_impl (const ArrayView< const primitive_value_type > &value_data, const ArrayView< const index_type > &index_data, const ArrayView< const char_type > &char_data, const Ptr< ReductTarget > &reduct_obj) const
 
virtual std::string op_name_impl () const
 
virtual bool coord_invariant_impl () const
 
virtual Range1D range_impl () const
 

Detailed Description

template<class Scalar>
class RTOpPack::TOpLinearCombination< Scalar >

Linear combination transformation operator: z0[i] = beta*z0[i].

This transformation operator only accepts num_targ_vec==1 but accepts any num_vecs > 0.

Warning! this class can only be used in SPMD mode and not client/server or master/slave. You know what needs to happen for this to work!

Definition at line 64 of file RTOpPack_TOpLinearCombination_decl.hpp.

Constructor & Destructor Documentation

◆ TOpLinearCombination()

template<class Scalar >
RTOpPack::TOpLinearCombination< Scalar >::TOpLinearCombination ( const ArrayView< const Scalar > & alpha_in = Teuchos::null,
const Scalar & beta = Teuchos::ScalarTraits<Scalar>::zero() )

Definition at line 54 of file RTOpPack_TOpLinearCombination_def.hpp.

Member Function Documentation

◆ alpha() [1/2]

template<class Scalar >
void RTOpPack::TOpLinearCombination< Scalar >::alpha ( const ArrayView< const Scalar > & alpha_in)

Definition at line 68 of file RTOpPack_TOpLinearCombination_def.hpp.

◆ alpha() [2/2]

template<class Scalar >
const ArrayView< const Scalar > RTOpPack::TOpLinearCombination< Scalar >::alpha ( ) const

Definition at line 78 of file RTOpPack_TOpLinearCombination_def.hpp.

◆ beta() [1/2]

template<class Scalar >
void RTOpPack::TOpLinearCombination< Scalar >::beta ( const Scalar & beta_in)

Definition at line 83 of file RTOpPack_TOpLinearCombination_def.hpp.

◆ beta() [2/2]

template<class Scalar >
Scalar RTOpPack::TOpLinearCombination< Scalar >::beta ( ) const

Definition at line 87 of file RTOpPack_TOpLinearCombination_def.hpp.

◆ num_vecs()

template<class Scalar >
int RTOpPack::TOpLinearCombination< Scalar >::num_vecs ( ) const

Definition at line 91 of file RTOpPack_TOpLinearCombination_def.hpp.

◆ apply_op_impl()

template<class Scalar >
void RTOpPack::TOpLinearCombination< Scalar >::apply_op_impl ( const ArrayView< const ConstSubVectorView< Scalar > > & sub_vecs,
const ArrayView< const SubVectorView< Scalar > > & targ_sub_vecs,
const Ptr< ReductTarget > & reduct_obj_inout ) const
virtual

Implements RTOpPack::RTOpT< Scalar >.

Definition at line 98 of file RTOpPack_TOpLinearCombination_def.hpp.

Member Data Documentation

◆ beta_

template<class Scalar >
Scalar RTOpPack::TOpLinearCombination< Scalar >::beta_
private

Definition at line 102 of file RTOpPack_TOpLinearCombination_decl.hpp.

◆ alpha_

template<class Scalar >
Array<Scalar> RTOpPack::TOpLinearCombination< Scalar >::alpha_
private

Definition at line 103 of file RTOpPack_TOpLinearCombination_decl.hpp.


The documentation for this class was generated from the following files: