-
Notifications
You must be signed in to change notification settings - Fork 88
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
add workspace for intermediate vector in and adapt apply_uses_initial_guess
in Schwarz
#1688
base: develop
Are you sure you want to change the base?
Conversation
}, | ||
alpha, b, beta, x); | ||
} | ||
|
||
|
||
template <typename ValueType, typename LocalIndexType, typename GlobalIndexType> | ||
template <typename VectorType> | ||
void Schwarz<ValueType, LocalIndexType, GlobalIndexType>::set_cache_to( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You only need this function once, right? Then I would prefer to just add this directly, it's not that much IMO.
* (could also be done with writing `operator=` and copy | ||
* constructor of the enclosing class by hand) | ||
*/ | ||
mutable struct cache_struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be a DenseCache
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it does not support distributed::Vector.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're right. Perhaps it would make sense to add VectorCache
, instead of using the cache construct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with the Marcel that it can be a DenseCache
instead of cache_struct
. But otherwise looks good to me. I approve it as Marcel has already requested that change.
This adds a cache/workspace for the intermediate vector in advanced_apply of Schwarz.
Also, it makes apply_uses_initial_guess rely on the
local_solver->apply_uses_initial_guess()
.We might need to revisit this function after adding refining step in Schwarz.