BELFEM 0.9.0
Berkeley Lab Finite Element Framework
Loading...
Searching...
No Matches
arpacktools.hpp
Go to the documentation of this file.
1/*
2 * BELFEM -- The Berkeley Lab Finite Element Framework
3 * Copyright (c) 2026, The Regents of the University of California,
4 * through Lawrence Berkeley National Laboratory (subject to receipt of any required
5 * approvals from the U.S. Dept. of Energy). All rights reserved.
6 *
7 * Developers: Christian Messe, Gregory Giard
8 *
9 * See the top-level LICENSE file for the complete license and disclaimer.
10 */
11
12#ifndef ARPACKTOOLS_HPP
13#define ARPACKTOOLS_HPP
14
15#include "typedefs.hpp"
16
17namespace belfem
18{
19 namespace arpack
20 {
24 constexpr index_t gNumInfoEntries = 7 ;
25
27 constexpr index_t gInfoNaupd = 0 ;
28
30 constexpr index_t gInfoNeupd = 1 ;
31
33 constexpr index_t gInfoNumConverged = 2 ;
34
37
40
43
45 constexpr index_t gInfoSubspaceSize = 6 ;
46
47#ifdef __cplusplus
48 extern"C" {
49#endif
50
67 void
69 const int_t * n,
70 const int_t * nnz,
71 const real * values,
72 const int_t * indices,
73 const int_t * pointers,
74 const int_t * job,
75 const int_t * nev,
76 const int_t * ncvmin,
77 const real * tol,
78 const int_t * maxit,
79 const real * sigma, // 0 for OP = A, else OP = sigma*I - A
80 real * lambdareal,
81 real * lambdaimag,
82 int_t * info ) ;
83
97 void
99 const int_t * n,
100 const int_t * nnz,
101 const real * values,
102 const int_t * indices,
103 const int_t * pointers,
104 const int_t * job,
105 const int_t * nev,
106 const int_t * ncvmin,
107 const real * tol,
108 const int_t * maxit,
109 const real * sigma, // 0 for OP = A, else OP = sigma*I - A
110 real * lambdareal,
111 real * lambdaimag,
112 int_t * info ) ;
113
132 void
134 int_t * ido,
135 const int_t * n,
136 const int_t * nev,
137 const int_t * ncv,
138 real * tol, // dsaupd may overwrite it
139 real * resid, // [ n ]
140 real * vectors, // [ ldv * ncv ]
141 const int_t * ldv,
142 int_t * iparam, // [ 11 ]
143 int_t * ipntr, // [ 11 ]
144 real * workd, // [ 3 * n ]
145 real * workl, // [ lworkl ]
146 const int_t * lworkl,
147 int_t * info ) ;
148
159 void
161 const real * sigma,
162 const int_t * n,
163 const int_t * nev,
164 const int_t * ncv,
165 real * tol,
166 real * resid,
167 real * vectors,
168 const int_t * ldv,
169 int_t * iparam,
170 int_t * ipntr,
171 real * workd,
172 real * workl,
173 const int_t * lworkl,
174 real * lambdareal, // [ nev ], eigenvalues of A
175 int_t * info ) ;
176
177#ifdef __cplusplus
178 }
179#endif
180
198 void
199 check_naupd( const int_t aInfo );
200
206 void
207 check_neupd( const int_t aInfo );
208
220 void
221 check_saupd( const int_t aInfo );
222
228 void
229 check_seupd( const int_t aInfo );
230
231 }
232
233}
234#endif //ARPACKTOOLS_HPP
Definition arpacktools.cpp:21
constexpr index_t gInfoNaupd
index of the dnaupd flag within that array
Definition arpacktools.hpp:27
constexpr index_t gInfoNumIterations
index of the number of restart iterations taken
Definition arpacktools.hpp:36
void arpack_standard_eigen(const int_t *n, const int_t *nnz, const real *values, const int_t *indices, const int_t *pointers, const int_t *job, const int_t *nev, const int_t *ncvmin, const real *tol, const int_t *maxit, const real *sigma, real *lambdareal, real *lambdaimag, int_t *info)
serial reverse communication driver around dnaupd / dneupd.
constexpr index_t gInfoNumOperations
index of the number of OP*x operations
Definition arpacktools.hpp:39
constexpr index_t gInfoNumConverged
index of the number of converged Ritz values
Definition arpacktools.hpp:33
void check_naupd(const int_t aInfo)
decode the dnaupd / pdnaupd flag, info( gInfoNaupd ).
Definition arpacktools.cpp:25
constexpr index_t gInfoNeupd
index of the dneupd flag within that array
Definition arpacktools.hpp:30
void arpack_si_extract(const real *sigma, const int_t *n, const int_t *nev, const int_t *ncv, real *tol, real *resid, real *vectors, const int_t *ldv, int_t *iparam, int_t *ipntr, real *workd, real *workl, const int_t *lworkl, real *lambdareal, int_t *info)
extract the eigenvalues after arpack_si_step returned ido = 99.
void check_seupd(const int_t aInfo)
decode the dseupd / pdseupd flag, info( gInfoNeupd ).
Definition arpacktools.cpp:356
void check_neupd(const int_t aInfo)
decode the dneupd flag, info( gInfoNeupd ).
Definition arpacktools.cpp:148
constexpr index_t gInfoNumReorthogonalizations
index of the number of re-orthogonalizations
Definition arpacktools.hpp:42
constexpr index_t gInfoSubspaceSize
index of the Krylov subspace size actually used
Definition arpacktools.hpp:45
void arpack_symmetric_eigen(const int_t *n, const int_t *nnz, const real *values, const int_t *indices, const int_t *pointers, const int_t *job, const int_t *nev, const int_t *ncvmin, const real *tol, const int_t *maxit, const real *sigma, real *lambdareal, real *lambdaimag, int_t *info)
symmetric counterpart of arpack_standard_eigen: dsaupd / dseupd instead of dnaupd / dneupd.
constexpr index_t gNumInfoEntries
Definition arpacktools.hpp:24
void arpack_si_step(int_t *ido, const int_t *n, const int_t *nev, const int_t *ncv, real *tol, real *resid, real *vectors, const int_t *ldv, int_t *iparam, int_t *ipntr, real *workd, real *workl, const int_t *lworkl, int_t *info)
ONE step of a shift-invert ( mode 3 ) reverse-communication loop.
void check_saupd(const int_t aInfo)
decode the dsaupd / pdsaupd flag, info( gInfoNaupd ).
Definition arpacktools.cpp:230
USER GUIDES:
Definition cl_Capacitor.cpp:16
uint32_t index_t
Definition typedefs.hpp:52
double real
Definition typedefs.hpp:36
int32_t int_t
Definition typedefs.hpp:51