Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
juobs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Javier Ugarrio
juobs
Commits
1ad65f09
Commit
1ad65f09
authored
4 years ago
by
Alessandro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to alessandro's branch
parent
55c47ca9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
6 deletions
+13
-6
src/juobs_linalg.jl
src/juobs_linalg.jl
+13
-6
No files found.
src/juobs_linalg.jl
View file @
1ad65f09
...
@@ -120,7 +120,6 @@ function uwgevp_tot(mat_list::Vector{Matrix}, tnot::Int64; iter::Int64 = 30, eve
...
@@ -120,7 +120,6 @@ function uwgevp_tot(mat_list::Vector{Matrix}, tnot::Int64; iter::Int64 = 30, eve
n
=
length
(
mat_list
)
n
=
length
(
mat_list
)
evals
=
Array
{
Array
{
uwreal
}}(
undef
,
0
)
evals
=
Array
{
Array
{
uwreal
}}(
undef
,
0
)
if
!
evec
if
!
evec
println
(
tnot
)
c_inv
=
invert
(
mat_list
[
tnot
])
c_inv
=
invert
(
mat_list
[
tnot
])
for
i
=
1
:
n
for
i
=
1
:
n
aux_evals
=
uwgevp
(
mat_list
[
i
],
c_inv
,
iter
=
iter
)
aux_evals
=
uwgevp
(
mat_list
[
i
],
c_inv
,
iter
=
iter
)
...
@@ -136,18 +135,26 @@ function uwgevp_tot(mat_list::Vector{Matrix}, tnot::Int64; iter::Int64 = 30, eve
...
@@ -136,18 +135,26 @@ function uwgevp_tot(mat_list::Vector{Matrix}, tnot::Int64; iter::Int64 = 30, eve
ptilda
=
norm_evec
(
aux_evec
,
mat_list
[
i
])
ptilda
=
norm_evec
(
aux_evec
,
mat_list
[
i
])
m
=
uwdot
(
mat_list
[
i
],
ptilda
)
m
=
uwdot
(
mat_list
[
i
],
ptilda
)
push!
(
evecs
,
m
)
push!
(
evecs
,
m
)
println
(
"
\n
t is "
,
i
+
3
,
" tnot is "
,
i
)
#if 2*tnot < i && i<n-5
# tnot+=5
#end
end
end
return
evals
,
evecs
return
evals
,
evecs
end
end
end
end
function
uwgevp_tot
(
mat_list
::
Vector
{
Matrix
};
iter
::
Int64
=
30
,
delta_t
::
Int64
=
3
)
n
=
length
(
mat_list
)
-
delta_t
evecs
=
Array
{
Matrix
}(
undef
,
0
)
for
i
=
2
:
n
c_inv
=
invert
(
mat_list
[
i
])
usless
,
temp_evec
=
uwgevp
(
mat_list
[
i
+
delta_t
],
c_inv
,
evec
=
true
,
iter
=
iter
)
push!
(
evecs
,
uwdot
(
mat_list
[
i
],
norm_evec
(
temp_evec
,
mat_list
[
i
])))
end
return
evecs
end
"""
"""
uwgevp(c_t:: Matrix{uwreal}, c_tnot_inv::Matrix{uwreal}; iter = 30, evec = false)
uwgevp(c_t:: Matrix{uwreal}, c_tnot_inv::Matrix{uwreal}; iter = 30, evec = false)
Given two matrices of uwreal C(t) and C(t0), this method solves the generalized eigenvalue problem
Given two matrices of uwreal C(t) and C(t0)
^-1
, this method solves the generalized eigenvalue problem
C(t)V = C(t_0)D V, where V is the eigenvector matrix and D is the diagonal matrix of eigenvalues.
C(t)V = C(t_0)D V, where V is the eigenvector matrix and D is the diagonal matrix of eigenvalues.
If evec = true also the eigenvectors are returned as columns of the orthogonal matrix u.
If evec = true also the eigenvectors are returned as columns of the orthogonal matrix u.
...
...
This diff is collapsed.
Click to expand it.
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