-
Notifications
You must be signed in to change notification settings - Fork 31
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
Support latest PETSC #54
Conversation
Does the scalar argument not work for older version of PETSc? |
Nope, I get this:
|
(I was getting extremely confused about the difference between this and #52 , then I looked at the branches - why was that necessary? The commit history looks the same) |
I think I was being an idiot and couldn't figure out how to push directly to the modlab fork of idwarp so had to push to my own, that PR just merged my fork's |
alright I see, and ofc you did not squash so to a reviewer they look like "double commits". No worries, looks fine! |
Hold back on merging for now, I think we can do this in a much simpler way |
Was able to figure out how to retrieve all necessary values with a single call to |
Purpose
Fixing issues with the VecGetValues function so that idwarp works with newer versions of petsc, part of tackling https://github.com/mdolab/docker/issues/83.
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
Testflo tests pass locally with petsc 3.12 and on docker image with 3.15
Checklist
Put an
x
in the boxes that apply.flake8
andblack
to make sure the code adheres to PEP-8 and is consistently formatted