We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am trying to solve the 2D Stokes equation with doubly periodic boundary conditions.
For the 0th mode, we need to fix the coefficient \hat{u}{00} = \hat{v}{00} = \hat{p}_{00} = 0. I implement this in Shenfun Solver like this:
up_hat = M.solve(fh_hat, constraints=((0, 0, 0),(1, 0, 0),(2, 0, 0)))
However, the Shenfun Solver gives the following error information:
"File "/home/xx/Mywork/Shenfun/Example/Stokes/TestPeriodic.py", line 41, in up_hat = M.solve(fh_hat, constraints=((0, 0, 0),(1, 0, 0),(2, 0, 0))) IndexError: only integers, slices (:), ellipsis (...), numpy.newaxis (None) and integer or boolean arrays are valid indices"
:
...
None
I have no idea what's wrong with the constraint. Do you have any suggestions on this issue?
The text was updated successfully, but these errors were encountered:
This is a bug and it is due to numpy sum here and here returning a float instead of an int. It is easily fixed and will soon be incorporated.
Sorry, something went wrong.
Dear Prof. Mikael Mortensen,
Thanks for fixing such a bug. Looking forward to the updated Shenfun solver.
No branches or pull requests
I am trying to solve the 2D Stokes equation with doubly periodic boundary conditions.
For the 0th mode, we need to fix the coefficient \hat{u}{00} = \hat{v}{00} = \hat{p}_{00} = 0. I implement this in Shenfun Solver like this:
up_hat = M.solve(fh_hat, constraints=((0, 0, 0),(1, 0, 0),(2, 0, 0)))
However, the Shenfun Solver gives the following error information:
"File "/home/xx/Mywork/Shenfun/Example/Stokes/TestPeriodic.py", line 41, in
up_hat = M.solve(fh_hat, constraints=((0, 0, 0),(1, 0, 0),(2, 0, 0)))
IndexError: only integers, slices (
:
), ellipsis (...
), numpy.newaxis (None
) and integer or boolean arrays are valid indices"I have no idea what's wrong with the constraint. Do you have any suggestions on this issue?
The text was updated successfully, but these errors were encountered: