Skip to content
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

Single point derivative #78

Open
RandomUsernameToSave opened this issue Feb 14, 2024 · 1 comment
Open

Single point derivative #78

RandomUsernameToSave opened this issue Feb 14, 2024 · 1 comment
Labels
question Further information is requested

Comments

@RandomUsernameToSave
Copy link

Is there a way to calculate the partial derivatives of a single point of a grid (without retrieving it after calculating it on the whole grid) ?
I can't manage to do it.
If there is no way, I might add it manually,
Best regards :)

@maroba
Copy link
Owner

maroba commented Dec 9, 2024

Hi, sorry for the late reply.

Yes, there is a way to evaluate only at a single grid point, however, not with the FinDiff object itself, but with the Stencil object. To see how to create stencils, have a look at this example

After you have created the stencil d_dx, you can apply it to an array f by calling it, and passing the index tuple of the grid point to the at keyword argument.

d_dx(f, at=(5,))

@maroba maroba added the question Further information is requested label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants