Thyra_MPILinearOpBaseDecl.hpp

00001 // @HEADER
00002 // ***********************************************************************
00003 // 
00004 //    Thyra: Interfaces and Support for Abstract Numerical Algorithms
00005 //                 Copyright (2004) Sandia Corporation
00006 // 
00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00008 // license for use of this work by or on behalf of the U.S. Government.
00009 // 
00010 // This library is free software; you can redistribute it and/or modify
00011 // it under the terms of the GNU Lesser General Public License as
00012 // published by the Free Software Foundation; either version 2.1 of the
00013 // License, or (at your option) any later version.
00014 //  
00015 // This library is distributed in the hope that it will be useful, but
00016 // WITHOUT ANY WARRANTY; without even the implied warranty of
00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00018 // Lesser General Public License for more details.
00019 //  
00020 // You should have received a copy of the GNU Lesser General Public
00021 // License along with this library; if not, write to the Free Software
00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00023 // USA
00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00025 // 
00026 // ***********************************************************************
00027 // @HEADER
00028 
00029 #ifndef THYRA_MPI_LINEAR_OP_BASE_DECL_HPP
00030 #define THYRA_MPI_LINEAR_OP_BASE_DECL_HPP
00031 
00032 #include "Thyra_SingleScalarEuclideanLinearOpBaseDecl.hpp"
00033 #include "Teuchos_StandardMemberCompositionMacros.hpp"
00034 
00035 namespace Thyra {
00036 
00037 template<class Scalar> class MPIVectorSpaceBase;
00038 
00169 template<class Scalar>
00170 class MPILinearOpBase : virtual public SingleScalarEuclideanLinearOpBase<Scalar> {
00171 public:
00172 
00174   using SingleScalarEuclideanLinearOpBase<Scalar>::euclideanApply;
00175 
00179   Teuchos::RefCountPtr<const ScalarProdVectorSpaceBase<Scalar> > rangeScalarProdVecSpc() const;
00181   Teuchos::RefCountPtr<const ScalarProdVectorSpaceBase<Scalar> > domainScalarProdVecSpc() const;
00186   void euclideanApply(
00187     const ETransp                     M_trans
00188     ,const MultiVectorBase<Scalar>    &X
00189     ,MultiVectorBase<Scalar>          *Y
00190     ,const Scalar                     alpha
00191     ,const Scalar                     beta
00192     ) const;
00194 
00195 protected:
00196 
00199 
00208   STANDARD_MEMBER_COMPOSITION_MEMBERS( bool, forceUnitStride )
00209 
00210   
00217   MPILinearOpBase();
00218 
00234   virtual void setSpaces(
00235     const Teuchos::RefCountPtr<const MPIVectorSpaceBase<Scalar> >      &range
00236     ,const Teuchos::RefCountPtr<const MPIVectorSpaceBase<Scalar> >     &domain
00237     );
00238 
00257   virtual void setLocalDimensions(
00258     MPI_Comm                                                    mpiComm 
00259     ,const Index                                                localDimRange
00260     ,const Index                                                localDimDomain
00261     );
00262 
00264 
00267 
00280   virtual void euclideanApply(
00281     const ETransp                                M_trans
00282     ,const RTOpPack::SubVectorT<Scalar>          &local_x
00283     ,const RTOpPack::MutableSubVectorT<Scalar>   *local_y
00284     ,const Scalar                                alpha
00285     ,const Scalar                                beta
00286     ) const = 0;
00287 
00308   virtual void euclideanApply(
00309     const ETransp                                     M_trans
00310     ,const RTOpPack::SubMultiVectorT<Scalar>          &local_X
00311     ,const RTOpPack::MutableSubMultiVectorT<Scalar>   *local_Y
00312     ,const Scalar                                     alpha
00313     ,const Scalar                                     beta
00314     ) const;
00315 
00317 
00318 private:
00319 
00320   Teuchos::RefCountPtr<const MPIVectorSpaceBase<Scalar> >    range_;
00321   Teuchos::RefCountPtr<const MPIVectorSpaceBase<Scalar> >    domain_;
00322 
00323 };  // end class LinearOpBase
00324 
00325 } // end namespace Thyra
00326 
00327 #endif  // THYRA_MPI_LINEAR_OP_BASE_DECL_HPP

Generated on Thu Sep 18 12:39:52 2008 for Thyra ANA Operator/VectorBase Interfaces and Related Software by doxygen 1.3.9.1