deal.II version GIT relicensing-6809-ge913b9bb34 2026-09-25 17:20:01+00:00
\(\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// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
4// Copyright (C) 2017 - 2026 by the deal.II authors
5//
6// This file is part of the deal.II library.
7//
8// Detailed license information governing the source code and contributions
9// can be found in LICENSE.md and CONTRIBUTING.md at the top level directory.
10//
11// -----------------------------------------------------------------------------
12
13#ifndef dealii_trilinos_index_access_h
14#define dealii_trilinos_index_access_h
15
16#include <deal.II/base/config.h>
17
18#ifdef DEAL_II_TRILINOS_WITH_EPETRA
19
20# include <deal.II/base/types.h>
21
22
24# include <Epetra_BlockMap.h>
25# include <Epetra_CrsGraph.h>
26# include <Epetra_CrsMatrix.h>
27# include <Epetra_MultiVector.h>
29
30#endif // DEAL_II_WITH_TRILINOS
31
33
34#ifdef DEAL_II_TRILINOS_WITH_EPETRA
35namespace TrilinosWrappers
36{
43 n_global_elements(const Epetra_BlockMap &map)
44 {
45 return map.NumGlobalElements64();
46 }
47
53 min_my_gid(const Epetra_BlockMap &map)
54 {
55# ifdef DEAL_II_WITH_64BIT_INDICES
56 return map.MinMyGID64();
57# else
58 return map.MinMyGID();
59# endif
60 }
61
67 max_my_gid(const Epetra_BlockMap &map)
68 {
69# ifdef DEAL_II_WITH_64BIT_INDICES
70 return map.MaxMyGID64();
71# else
72 return map.MaxMyGID();
73# endif
74 }
75
81 global_index(const Epetra_BlockMap &map,
82 const ::types::global_dof_index i)
83 {
84# ifdef DEAL_II_WITH_64BIT_INDICES
85 return map.GID64(i);
86# else
87 return map.GID(i);
88# endif
89 }
90
97 my_global_elements(const Epetra_BlockMap &map)
98 {
99# ifdef DEAL_II_WITH_64BIT_INDICES
100 return map.MyGlobalElements64();
101# else
102 return map.MyGlobalElements();
103# endif
104 }
105
111 n_global_rows(const Epetra_CrsGraph &graph)
112 {
113# ifdef DEAL_II_WITH_64BIT_INDICES
114 return graph.NumGlobalRows64();
115# else
116 return graph.NumGlobalRows();
117# endif
118 }
119
125 n_global_cols(const Epetra_CrsGraph &graph)
126 {
127# ifdef DEAL_II_WITH_64BIT_INDICES
128 return graph.NumGlobalCols64();
129# else
130 return graph.NumGlobalCols();
131# endif
132 }
133
139 n_global_entries(const Epetra_CrsGraph &graph)
140 {
141 return graph.NumGlobalEntries64();
142 }
143
149 global_row_index(const Epetra_CrsMatrix &matrix,
150 const ::types::global_dof_index i)
151 {
152# ifdef DEAL_II_WITH_64BIT_INDICES
153 return matrix.GRID64(i);
154# else
155 return matrix.GRID(i);
156# endif
157 }
158
164 global_column_index(const Epetra_CrsMatrix &matrix,
165 const ::types::global_dof_index i)
166 {
167# ifdef DEAL_II_WITH_64BIT_INDICES
168 return matrix.GCID64(i);
169# else
170 return matrix.GCID(i);
171# endif
172 }
173
179 global_length(const Epetra_MultiVector &vector)
180 {
181# ifdef DEAL_II_WITH_64BIT_INDICES
182 return vector.GlobalLength64();
183# else
184 return vector.GlobalLength();
185# endif
186 }
187
193 n_global_rows(const Epetra_RowMatrix &matrix)
194 {
195# ifdef DEAL_II_WITH_64BIT_INDICES
196 return matrix.NumGlobalRows64();
197# else
198 return matrix.NumGlobalRows();
199# endif
200 }
201} // namespace TrilinosWrappers
202
203#endif // DEAL_II_WITH_TRILINOS
204
206#endif // dealii_trilinos_index_access_h
#define DEAL_II_NAMESPACE_OPEN
Definition config.h:38
#define DEAL_II_DISABLE_EXTRA_DIAGNOSTICS
Definition config.h:636
#define DEAL_II_NAMESPACE_CLOSE
Definition config.h:39
#define DEAL_II_ENABLE_EXTRA_DIAGNOSTICS
Definition config.h:680
long long int int64_type
Definition types.h:198
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)