Changing behaviour for allocate_vector
#963
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Up to now,
allocate_vector
used thezeros
method to create the vector. This not only allocates, but also initializes. Now this is no longer the case.I have gone through the functions using
allocate_vector
,allocate_in_domain
andallocate_in_range
and did the necessary updates.Notably, the functions
zero_free_values
andzero_dirichlet_values
were not explicitly filling the newly allocated vector with zeros, but were relying on the function to set the values to zero. This is now explicit.Also, now that the API for
allocate_vector
is more robust, I've gotten rid of some specializations forzero_free_values
that are now redundant.