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

Convention regarding $\nabla u$ #56

Open
srosenbu opened this issue Jul 10, 2024 · 5 comments
Open

Convention regarding $\nabla u$ #56

srosenbu opened this issue Jul 10, 2024 · 5 comments
Milestone

Comments

@srosenbu
Copy link
Member

Currently, we use ufl.nabla_grad for $\nabla u$ which means $\partial u_j/\partial x_i$. Some other sources however define it as $\nabla u = \partial u_i/\partial_j$ which is represented in ufl as ufl.grad.

Which one do we want to use? Since this can be a really annoying source of error, we should make sure we use it consistently

@srosenbu
Copy link
Member Author

@saifr68 we should probably deal with this before you merge your stress-rate branch

@saifr68
Copy link
Collaborator

saifr68 commented Jul 11, 2024

I say let's just stick to what is already implemented and mention this in the documentation. And whenever an implementation method of some author is used we just check if the convention matches. If not, we make the necessary adjustments accordingly

@srosenbu
Copy link
Member Author

I mean, my preferred way of implementing stuff is in Rust and there the memory-layout is column-wise instead of row-wise as it is in FEniCS. So I need to watch out for transposition anyways. So I am fine with either with a slight preference towards ufl.grad because the notation $\partial u_i/\partial x_j$ seems more intuitive to me.

Any more opinions on this @aradermacher , @pdiercks, @joergfunger ?

@aradermacher
Copy link
Collaborator

I'm fine with Saifs suggestion
Nevertheless we need to think about a documentation

@joergfunger
Copy link
Member

I think the suggestion of @srosenbu is more intuitive, but just make sure it is correctly documented.

@srosenbu srosenbu added this to the v0.2.0 milestone Aug 5, 2024
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

No branches or pull requests

4 participants