Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gram-Schmidt with R #577

Merged
merged 3 commits into from Feb 2, 2019
Merged

Gram-Schmidt with R #577

merged 3 commits into from Feb 2, 2019

Conversation

pmli
Copy link
Member

@pmli pmli commented Jan 31, 2019

Closes #491.

  • adds an option to compute the R matrix
  • some improvements (no more flake8 issues with old_norm)
  • adds unit tests

@pmli pmli added pr:new-feature linear algebra labels Jan 31, 2019
@pmli pmli added this to the 2019.2 milestone Jan 31, 2019
@pmli pmli requested a review from sdrave Jan 31, 2019
@codecov
Copy link

@codecov codecov bot commented Feb 1, 2019

Codecov Report

Merging #577 into master will decrease coverage by <.01%.
The diff coverage is 94.44%.

Impacted Files Coverage Δ
src/pymor/algorithms/gram_schmidt.py 98% <94.44%> (+0.12%) ⬆️
src/pymor/reductors/residual.py 69.72% <0%> (-0.62%) ⬇️

@codecov
Copy link

@codecov codecov bot commented Feb 1, 2019

Codecov Report

Merging #577 into master will decrease coverage by 0.36%.
The diff coverage is 93.75%.

Impacted Files Coverage Δ
src/pymor/algorithms/gram_schmidt.py 97.89% <93.75%> (+0.02%) ⬆️
src/pymor/reductors/residual.py 69.72% <0%> (-0.62%) ⬇️
src/pymor/models/iosys.py 61.48% <0%> (ø)
src/pymor/models/mpi.py 26.66% <0%> (ø)
src/pymor/models/basic.py 85.93% <0%> (ø)
src/pymor/models/interfaces.py 83.33% <0%> (ø)
src/pymor/reductors/bt.py 66.08% <0%> (+1.5%) ⬆️
src/pymor/discretizers/fv.py 88.38% <0%> (+4.92%) ⬆️

Copy link
Member

@sdrave sdrave left a comment

LGTM. Just one remark: Since computing R is mostly for free, I would simplify the code by always computing R and renaming the parameter from compute_R to return_R

@pmli
Copy link
Member Author

@pmli pmli commented Feb 1, 2019

Could allocating additional memory cause issues when return_R == False? Or can len(A) always be assumed to be "small"? I was also wondering if R should be constructed row by row, instead of creating a square matrix and deleting rows at the end.

@sdrave
Copy link
Member

@sdrave sdrave commented Feb 1, 2019

I would say that if len(A) is so large, that storing len(A)**2 doubles is problematic, then a VectorArray is the wrong data structure.

@pmli
Copy link
Member Author

@pmli pmli commented Feb 1, 2019

Ok, good. I made the changes.

sdrave
sdrave approved these changes Feb 2, 2019
@pmli pmli merged commit dbd8db4 into master Feb 2, 2019
4 checks passed
@pmli pmli deleted the gram_schmidt-R branch Feb 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:new-feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants