/[escript]/branches/trilinos_from_5897/trilinoswrap/src/types.h
ViewVC logotype

Diff of /branches/trilinos_from_5897/trilinoswrap/src/types.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6103 by caltinay, Mon Feb 22 06:59:27 2016 UTC revision 6104 by caltinay, Wed Mar 30 06:01:20 2016 UTC
# Line 21  Line 21 
21    
22  #include <Tpetra_CrsGraph.hpp>  #include <Tpetra_CrsGraph.hpp>
23  #include <Tpetra_CrsMatrix.hpp>  #include <Tpetra_CrsMatrix.hpp>
 #include <Amesos2_Solver_decl.hpp>  
 #include <BelosSolverManager.hpp>  
24    
25  namespace esys_trilinos {  namespace esys_trilinos {
26    
27  /// Scalar type  /// Scalar types
28  typedef double  ST;  typedef escript::DataTypes::real_t  real_t;
29    typedef escript::DataTypes::cplx_t  cplx_t;
30    
31  /// Global Ordinal type  /// Global Ordinal type
32  typedef escript::DataTypes::index_t GO;  typedef escript::DataTypes::index_t GO;
33  /// Local Ordinal type  /// Local Ordinal type
# Line 36  typedef escript::DataTypes::index_t LO; Line 36  typedef escript::DataTypes::index_t LO;
36  #ifdef _OPENMP  #ifdef _OPENMP
37  typedef Kokkos::Compat::KokkosOpenMPWrapperNode NT;  typedef Kokkos::Compat::KokkosOpenMPWrapperNode NT;
38  #elif USE_CUDA  #elif USE_CUDA
39  typedef Kokkos::Compat::KokkosCudaWrapperNode NT;  typedef Kokkos::Compat::KokkosCudaWrapperNode   NT;
40  #else  #else
41  typedef Kokkos::Compat::KokkosSerialWrapperNode NT;  typedef Kokkos::Compat::KokkosSerialWrapperNode NT;
42  #endif  #endif
43    
44  typedef Tpetra::CrsGraph<LO,GO,NT>                 GraphType;  typedef Tpetra::CrsGraph<LO,GO,NT>    GraphType;
45  typedef Tpetra::CrsMatrix<ST,LO,GO,NT>             MatrixType;  typedef Tpetra::Import<LO,GO,NT>      ImportType;
46  typedef Tpetra::MultiVector<ST,LO,GO,NT>           VectorType;  typedef Teuchos::RCP<GraphType>       TrilinosGraph_ptr;
 typedef Tpetra::Operator<ST,LO,GO,NT>              OpType;  
 typedef Belos::LinearProblem<ST,VectorType,OpType> ProblemType;  
 typedef Belos::SolverManager<ST,VectorType,OpType> SolverType;  
 typedef Amesos2::Solver<MatrixType,VectorType>     DirectSolverType;  
 typedef MatrixType::map_type                       MapType;  
 typedef Tpetra::Import<LO,GO,NT>                   ImportType;  
   
 typedef Teuchos::RCP<MapType> TrilinosMap_ptr;  
 typedef Teuchos::RCP<const MapType> const_TrilinosMap_ptr;  
   
 typedef Teuchos::RCP<GraphType> TrilinosGraph_ptr;  
47  typedef Teuchos::RCP<const GraphType> const_TrilinosGraph_ptr;  typedef Teuchos::RCP<const GraphType> const_TrilinosGraph_ptr;
48    typedef GraphType::map_type           MapType;
49    typedef Teuchos::RCP<MapType>         TrilinosMap_ptr;
50    typedef Teuchos::RCP<const MapType>   const_TrilinosMap_ptr;
51    
52    template<typename ST> using MatrixType = Tpetra::CrsMatrix<ST,LO,GO,NT>;
53    template<typename ST> using VectorType = Tpetra::MultiVector<ST,LO,GO,NT>;
54    template<typename ST> using OpType     = Tpetra::Operator<ST,LO,GO,NT>;
55    
56    typedef VectorType<real_t> RealVector;
57    typedef MatrixType<real_t> RealMatrix;
58    typedef OpType<real_t>     RealOperator;
59    
60    typedef VectorType<cplx_t> ComplexVector;
61    typedef MatrixType<cplx_t> ComplexMatrix;
62    typedef OpType<cplx_t>     ComplexOperator;
63    
64  inline  inline
65  Teuchos::RCP<const Teuchos::Comm<int> > TeuchosCommFromEsysComm(MPI_Comm comm)  Teuchos::RCP<const Teuchos::Comm<int> > TeuchosCommFromEsysComm(MPI_Comm comm)

Legend:
Removed from v.6103  
changed lines
  Added in v.6104

  ViewVC Help
Powered by ViewVC 1.1.26