Skip to content

Conversation

@jwpeterson
Copy link
Member

And add NumericVector::set_type(t) that allows the user to change the NumericVector ParallelType in some situations. I'm going to attach a --disable-deprecated build to this PR to see whether there is any downstream code that is currently using the API. I only located two instances of it (in the same function) within libmesh itself.

The user should not be allowed to change the ParallelType of a
NumericVector on the fly. Ideally, this flag should be set prior to
the vector being initialized, and then not changed. If we do need to
support changing it, it would be better to have a dedicated
NumericVector::set_type() API that does this, but we would still need
to restrict when such an API would be allowed to be called.
The new arg defaults to AUTOMATIC, so the behavior should be exactly
the same as it was previously, although now we have the chance to set
a custom ParallelType via the NumericVector::build() API.
Making this a generic setter opens up the possibility that we will
support more complicated/expensive type conversions later. For now, we
just throw a libmesh_not_implemented() error when the user requests to
change the ParallelType of an already-initialized NumericVector.
@jwpeterson jwpeterson requested a review from roystgnr November 27, 2024 23:35
@moosebuild
Copy link

Job Coverage, step Generate coverage on d13c580 wanted to post the following:

Coverage

db32ea #4024 d13c58
Total Total +/- New
Rate 62.33% 62.33% +0.00% 73.33%
Hits 72643 72649 +6 11
Misses 43901 43902 +1 4

Diff coverage report

Full coverage report

Warnings

  • New new line coverage rate 73.33% is less than the suggested 90.0%

This comment will be updated on new commits.

@jwpeterson jwpeterson merged commit 6ef7d43 into libMesh:devel Nov 29, 2024
21 checks passed
@jwpeterson jwpeterson deleted the test_numeric_vector_type_api_removal branch December 17, 2024 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants