Tpetra Matrix/Vector Services Version of the Day
Tpetra_RowMatrixTransposer_decl.hpp
00001 
00002 //@HEADER
00003 /*
00004 ************************************************************************
00005 
00006               Tpetra: Linear Algebra Services Package 
00007                 Copyright (2001) Sandia Corporation
00008 
00009 Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
00010 license for use of this work by or on behalf of the U.S. Government.
00011 
00012 This library is free software; you can redistribute it and/or modify
00013 it under the terms of the GNU Lesser General Public License as
00014 published by the Free Software Foundation; either version 2.1 of the
00015 License, or (at your option) any later version.
00016  
00017 This library is distributed in the hope that it will be useful, but
00018 WITHOUT ANY WARRANTY; without even the implied warranty of
00019 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00020 Lesser General Public License for more details.
00021  
00022 You should have received a copy of the GNU Lesser General Public
00023 License along with this library; if not, write to the Free Software
00024 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00025 USA
00026 Questions? Contact Michael A. Heroux (maherou@sandia.gov) 
00027 
00028 ************************************************************************
00029 */
00030 //@HEADER
00031 
00032 #ifndef TPETRA_ROWMATRIXTRANSPOSER_DECL_HPP
00033 #define TPETRA_ROWMATRIXTRANSPOSER_DECL_HPP
00034 #include <Teuchos_RCP.hpp>
00035 #include <Kokkos_DefaultKernels.hpp>
00036 #include <Kokkos_DefaultNode.hpp>
00037 #include "Tpetra_CrsMatrix.hpp"
00038 #include "Tpetra_ConfigDefs.hpp"
00039 
00041 
00042 namespace Tpetra {
00043 
00044 template <class LocalOrdinal, class GlobalOrdinal, class Node>
00045 class Map;
00046 
00047 
00051 template <class Scalar, 
00052   class LocalOrdinal=int, 
00053   class GlobalOrdinal=LocalOrdinal, 
00054   class Node=Kokkos::DefaultNode::DefaultNodeType, 
00055     class SpMatOps   = typename Kokkos::DefaultKernels<Scalar,LocalOrdinal,Node>::SparseOps >
00056 class RowMatrixTransposer {
00057     
00058   public:
00059 
00061 
00062 
00063 
00070   RowMatrixTransposer(const CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>& origMatrix);
00071 
00073   
00074   virtual ~RowMatrixTransposer();
00076   
00078 
00079   
00081 
00089   RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node, SpMatOps> >
00090   createTranspose(const OptimizeOption optimizeTranspose=DoOptimizeStorage
00091     , Teuchos::RCP<const Map<LocalOrdinal, GlobalOrdinal, Node> > transposeRowMap = Teuchos::null);
00092 
00093   
00094  private: 
00095   //The original matrix to be transposed.
00096   const CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node>& origMatrix_;
00097   //The matrix in which the result of the tranpose is placed.
00098   RCP<CrsMatrix<Scalar, LocalOrdinal, GlobalOrdinal, Node, SpMatOps> > transposeMatrix_;
00099   //Whether or not to optimize the storage of the transpose matrix.
00100   OptimizeOption optimizeTranspose_;  
00101   const RCP<const Teuchos::Comm<int> > comm_;
00102   GlobalOrdinal indexBase_;
00103 };
00104 
00105 
00106 }
00107 
00108 #endif /* TPETRA_ROWMATRIXTRANSPOSER_DECL_HPP */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines