Fixing issues with the VecGetValues function so that idwarp works with newer versions of petsc.
We haven't figured out why, but in newer versions of petsc, VecGetValues expects a scalar rather than a single entry array for the index when retrieving a single value. I added some conditional compilation so that we use the correct inputs depending on the petsc version installed and therefore maintain backwards compatibility.
Type of change
What types of change is it?
Select the appropriate type(s) that describe this PR
[x] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (non-backwards-compatible fix or feature)
[ ] Code style update (formatting, renaming)
[ ] Refactoring (no functional changes, no API changes)
[ ] Documentation update
[ ] Maintenance update
[ ] Other (please describe)
Testing
All testflo tests pass locally
Checklist
Put an x in the boxes that apply.
[ ] I have run flake8 and black to make sure the code adheres to PEP-8 and is consistently formatted
[x] I have run unit and regression tests which pass locally with my changes
[ ] I have added new tests that prove my fix is effective or that my feature works
Purpose
Fixing issues with the
VecGetValues
function so that idwarp works with newer versions of petsc.We haven't figured out why, but in newer versions of petsc,
VecGetValues
expects a scalar rather than a single entry array for the index when retrieving a single value. I added some conditional compilation so that we use the correct inputs depending on the petsc version installed and therefore maintain backwards compatibility.Type of change
What types of change is it? Select the appropriate type(s) that describe this PR
Testing
All testflo tests pass locally
Checklist
Put an
x
in the boxes that apply.flake8
andblack
to make sure the code adheres to PEP-8 and is consistently formatted