Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
pyMOR
pymor
Commits
76f6329d
Commit
76f6329d
authored
Apr 26, 2022
by
ullmannsven
Committed by
Stephan Rave
May 09, 2022
Browse files
fixed some last suggestions
parent
f8ab8d4d
Changes
2
Hide whitespace changes
Inline
Side-by-side
docs/source/bibliography.bib
View file @
76f6329d
...
...
@@ -373,12 +373,12 @@
year
=
{2021}
}
@article
{
SJK1
5
,
@article
{
SJK1
6
,
title
=
{Randomized algorithms for generalized Hermitian eigenvalue problems with application to computing Karhunen Loeve expansion}
,
author
=
{Saibaba AK, Lee J. and Kitanidis PK}
,
journal
=
{Numerical Linear Algebra with Applications}
,
year
=
{201
5
}
,
DOI
=
{ 10.1002/nla}
year
=
{201
6
}
,
DOI
=
{ 10.1002/nla
.2026
}
}
@article
{
TRLBK14
,
...
...
src/pymor/algorithms/rand_la.py
View file @
76f6329d
...
...
@@ -263,7 +263,7 @@ def random_ghep(A, E=None, modes=6, p=20, q=2, single_pass=False):
if `E` is not `None`.
This method is an implementation of algorithm 6 and 7 in :cite:`SJK
2
1`.
This method is an implementation of algorithm 6 and 7 in :cite:`SJK1
6
`.
Parameters
----------
...
...
@@ -278,9 +278,9 @@ def random_ghep(A, E=None, modes=6, p=20, q=2, single_pass=False):
(oversampling parameter).
q :
If not `0`, performs `q` power iterations to increase the relative weight
of the larger singular values.
of the larger singular values.
Ignored when `single_pass` is `True`.
single_pass
If `True`, computes the ghep where only one set of matvec Ax is required, but a
n additional error is produced.
If `True`, computes the ghep where only one set of matvec Ax is required, but a
t the expense of lower numerical accuracy.
If `False` the methods requires two sets of matvecs Ax
Returns
...
...
@@ -313,11 +313,10 @@ def random_ghep(A, E=None, modes=6, p=20, q=2, single_pass=False):
if
single_pass
:
Omega
=
A
.
source
.
random
(
modes
+
p
,
distribution
=
'normal'
)
Y_bar
=
A
.
apply
(
Omega
)
Y
=
InverseOperator
(
E
).
apply
(
Y_bar
)
Y
=
E
.
apply_inverse
(
Y_bar
)
Q
,
R
=
gram_schmidt
(
Y
,
product
=
E
,
return_R
=
True
)
X
=
E
.
apply2
(
Omega
,
Q
)
Z
=
E
.
apply2
(
Q
,
Omega
)
T
=
np
.
linalg
.
inv
(
X
)
@
Omega
.
inner
(
Y_bar
)
@
np
.
linalg
.
inv
(
Z
)
T
=
np
.
linalg
.
inv
(
X
)
@
Omega
.
inner
(
Y_bar
)
@
np
.
linalg
.
inv
(
X
.
T
)
else
:
C
=
InverseOperator
(
E
)
@
A
Y
,
Omega
=
rrf
(
C
,
q
=
q
,
l
=
modes
+
p
,
return_rand
=
True
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment