-
Notifications
You must be signed in to change notification settings - Fork 35
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
Example #22
Example #22
Conversation
Good initiative, thanks! We could then also include them in the docs. (Either directly through a Sphinx add-on or via a link) |
The idea of adding a jupyter notebook is nice and helpful. I realized that my suggestions went into a separate branch "patch-1", for which I missed to create a pull request. But I think most of my remarks are in the code. |
Any updates on this? |
I'm sorry, I spoke to Dominik about it in person but didn't update you here. We do like the idea and also thought it would be good to also add an example which goes a bit more into detail about the inner workings. |
Alright. Thanks for the update. I will assume that the example is correct and merge it for now. |
lettuce/io.py
Outdated
self.point_dict["p"] = self.lattice.convert_to_numpy(p[0, ..., None]) | ||
for d in range(self.lattice.D): | ||
self.point_dict[f"u{'xyz'[d]}"] = self.lattice.convert_to_numpy(u[d, ..., None]) | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait ... is this the correct behavior for 1D and 3D?
lettuce/io.py
Outdated
else: | ||
self.point_dict["p"] = self.lattice.convert_to_numpy(p[0, ...]) | ||
for d in range(self.lattice.D): | ||
self.point_dict[f"u{'xyz'[d]}"] = self.lattice.convert_to_numpy(u[d, ...]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remind me: Why do we need 2 separate cases here? Does pyevtk require a different shape for 2D and 3D?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it does. See #14
@Olllom I retested the example file and it works. From my point of view it can be merged. |
…educed resolution for shorter runtime, added mlups print
Merge from master
Added an example folder and an example file which simulates TGV3D and uses several reporters and does some plotting ect. to demonstrate general usage of lettuce, with hopefully enough comments for easy understanding
@dominikwilde your suggestions sadly didn't reach my branch for some reason, I tried to include what i had noted / remembered, please remind me if stuff is missing