Reference documentation for deal.II version 9.5.0
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Loading...
Searching...
No Matches
trilinos_index_access.h
Go to the documentation of this file.
1// ---------------------------------------------------------------------
2//
3// Copyright (C) 2017 - 2022 by the deal.II authors
4//
5// This file is part of the deal.II library.
6//
7// The deal.II library is free software; you can use it, redistribute
8// it, and/or modify it under the terms of the GNU Lesser General
9// Public License as published by the Free Software Foundation; either
10// version 2.1 of the License, or (at your option) any later version.
11// The full text of the license can be found in the file LICENSE.md at
12// the top level directory of deal.II.
13//
14// ---------------------------------------------------------------------
15
16#ifndef dealii_trilinos_index_access_h
17#define dealii_trilinos_index_access_h
18
19#include <deal.II/base/config.h>
20
21#ifdef DEAL_II_WITH_TRILINOS
22
23# include <deal.II/base/types.h>
24
25# include <Epetra_BlockMap.h>
26# include <Epetra_CrsGraph.h>
27# include <Epetra_CrsMatrix.h>
28# include <Epetra_MultiVector.h>
29
31
32namespace TrilinosWrappers
33{
40 n_global_elements(const Epetra_BlockMap &map)
41 {
42 return map.NumGlobalElements64();
43 }
44
50 min_my_gid(const Epetra_BlockMap &map)
51 {
52# ifdef DEAL_II_WITH_64BIT_INDICES
53 return map.MinMyGID64();
54# else
55 return map.MinMyGID();
56# endif
57 }
58
64 max_my_gid(const Epetra_BlockMap &map)
65 {
66# ifdef DEAL_II_WITH_64BIT_INDICES
67 return map.MaxMyGID64();
68# else
69 return map.MaxMyGID();
70# endif
71 }
72
78 global_index(const Epetra_BlockMap & map,
79 const ::types::global_dof_index i)
80 {
81# ifdef DEAL_II_WITH_64BIT_INDICES
82 return map.GID64(i);
83# else
84 return map.GID(i);
85# endif
86 }
87
94 my_global_elements(const Epetra_BlockMap &map)
95 {
96# ifdef DEAL_II_WITH_64BIT_INDICES
97 return map.MyGlobalElements64();
98# else
99 return map.MyGlobalElements();
100# endif
101 }
102
108 n_global_rows(const Epetra_CrsGraph &graph)
109 {
110# ifdef DEAL_II_WITH_64BIT_INDICES
111 return graph.NumGlobalRows64();
112# else
113 return graph.NumGlobalRows();
114# endif
115 }
116
122 n_global_cols(const Epetra_CrsGraph &graph)
123 {
124# ifdef DEAL_II_WITH_64BIT_INDICES
125 return graph.NumGlobalCols64();
126# else
127 return graph.NumGlobalCols();
128# endif
129 }
130
136 n_global_entries(const Epetra_CrsGraph &graph)
137 {
138 return graph.NumGlobalEntries64();
139 }
140
146 global_row_index(const Epetra_CrsMatrix & matrix,
147 const ::types::global_dof_index i)
148 {
149# ifdef DEAL_II_WITH_64BIT_INDICES
150 return matrix.GRID64(i);
151# else
152 return matrix.GRID(i);
153# endif
154 }
155
161 global_column_index(const Epetra_CrsMatrix & matrix,
162 const ::types::global_dof_index i)
163 {
164# ifdef DEAL_II_WITH_64BIT_INDICES
165 return matrix.GCID64(i);
166# else
167 return matrix.GCID(i);
168# endif
169 }
170
176 global_length(const Epetra_MultiVector &vector)
177 {
178# ifdef DEAL_II_WITH_64BIT_INDICES
179 return vector.GlobalLength64();
180# else
181 return vector.GlobalLength();
182# endif
183 }
184
190 n_global_rows(const Epetra_RowMatrix &matrix)
191 {
192# ifdef DEAL_II_WITH_64BIT_INDICES
193 return matrix.NumGlobalRows64();
194# else
195 return matrix.NumGlobalRows();
196# endif
197 }
198} // namespace TrilinosWrappers
199
201#endif // DEAL_II_WITH_TRILINOS
202#endif // dealii_trilinos_index_access_h
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:472
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:473
long long int int64_type
Definition types.h:185
TrilinosWrappers::types::int_type global_index(const Epetra_BlockMap &map, const ::types::global_dof_index i)
TrilinosWrappers::types::int_type n_global_rows(const Epetra_CrsGraph &graph)
TrilinosWrappers::types::int_type global_length(const Epetra_MultiVector &vector)
TrilinosWrappers::types::int_type min_my_gid(const Epetra_BlockMap &map)
TrilinosWrappers::types::int_type * my_global_elements(const Epetra_BlockMap &map)
TrilinosWrappers::types::int64_type n_global_entries(const Epetra_CrsGraph &graph)
TrilinosWrappers::types::int64_type n_global_elements(const Epetra_BlockMap &map)
TrilinosWrappers::types::int_type global_column_index(const Epetra_CrsMatrix &matrix, const ::types::global_dof_index i)
TrilinosWrappers::types::int_type max_my_gid(const Epetra_BlockMap &map)
TrilinosWrappers::types::int_type global_row_index(const Epetra_CrsMatrix &matrix, const ::types::global_dof_index i)
TrilinosWrappers::types::int_type n_global_cols(const Epetra_CrsGraph &graph)