OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
AmrMultiGridDefs.h
Go to the documentation of this file.
1 //
2 // Header file AmrMultiGridDefs
3 // Extends the AMR namespace with Trilinos types
4 //
5 // Copyright (c) 2017 - 2020, Matthias Frey, Paul Scherrer Institut, Villigen PSI, Switzerland
6 // All rights reserved
7 //
8 // Implemented as part of the PhD thesis
9 // "Precise Simulations of Multibunches in High Intensity Cyclotrons"
10 //
11 // This file is part of OPAL.
12 //
13 // OPAL is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // You should have received a copy of the GNU General Public License
19 // along with OPAL. If not, see <https://www.gnu.org/licenses/>.
20 //
21 #ifndef AMR_MULTI_GRID_DEFS_H
22 #define AMR_MULTI_GRID_DEFS_H
23 
24 // Trilinos headers
25 #include <Tpetra_Map.hpp>
26 #include <Tpetra_Vector.hpp>
27 #include <Tpetra_CrsMatrix.hpp>
28 
29 #include <Teuchos_RCP.hpp>
30 #include <Teuchos_ArrayRCP.hpp>
31 #include <Teuchos_DefaultMpiComm.hpp> // wrapper for our communicator
32 
33 #include <Kokkos_DefaultNode.hpp>
34 
35 namespace amr {
36  // All Tpetra
37  typedef double scalar_t;
38  typedef int local_ordinal_t;
39  typedef long global_ordinal_t;
40 
41 #ifdef AMR_MG_SERIAL_NODE
42  typedef ::Kokkos::Compat::KokkosSerialWrapperNode node_t;
43 #elif AMR_MG_PTHREAD_NODE
44  typedef ::Kokkos::Compat::KokkosThreadsWrapperNode node_t;
45 #elif AMR_MG_OPENMP_NODE
46  typedef ::Kokkos::Compat::KokkosOpenMPWrapperNode node_t;
47 #elif AMR_MG_CUDA_NODE
48  typedef ::Kokkos::Compat::KokkosCudaWrapperNode node_t;
49 #else
50  typedef KokkosClassic::DefaultNode::DefaultNodeType node_t;
51 #endif
52 
53  typedef Tpetra::CrsMatrix<scalar_t,
56  node_t
58 
59  typedef Tpetra::Vector<scalar_t,
62  node_t
64 
65  typedef Tpetra::Operator<scalar_t,
68  node_t
70 
71  typedef Tpetra::MultiVector<scalar_t,
74  node_t
76 
77 
78  typedef Tpetra::Map<local_ordinal_t,
80  node_t
81  > dmap_t;
82 
83  typedef Teuchos::MpiComm<int> comm_t;
84 }
85 
86 #endif
Some AMR types used a lot.
Definition: AmrDefs.h:33
long global_ordinal_t
Tpetra::Operator< scalar_t, local_ordinal_t, global_ordinal_t, node_t > operator_t
KokkosClassic::DefaultNode::DefaultNodeType node_t
Tpetra::Map< local_ordinal_t, global_ordinal_t, node_t > dmap_t
int local_ordinal_t
Tpetra::Vector< scalar_t, local_ordinal_t, global_ordinal_t, node_t > vector_t
double scalar_t
Tpetra::MultiVector< scalar_t, local_ordinal_t, global_ordinal_t, node_t > multivector_t
Tpetra::CrsMatrix< scalar_t, local_ordinal_t, global_ordinal_t, node_t > matrix_t
Teuchos::MpiComm< int > comm_t