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

Rewrite examples in plain script (no class) #103

Open
hsalehipour opened this issue Jan 10, 2025 · 1 comment
Open

Rewrite examples in plain script (no class) #103

hsalehipour opened this issue Jan 10, 2025 · 1 comment
Assignees

Comments

@hsalehipour
Copy link
Collaborator

hsalehipour commented Jan 10, 2025

It might be better to avoid defining classes and instead use simple scripts to run all experiments. Additionally, we should treat the examples as tutorials, providing plenty of comments and detailed descriptions for each step.

However, it would be helpful to keep the lid-driven cavity example in a class format since we have a distributed version that inherits from it. This will demonstrate an alternative way of structuring examples.

The lift and drag scripts in wind tunnel example can also be improved.

@sambaPython24
Copy link

@hsalehipour That would be a good idea, for example explaining directly in the code such as the simple flow past sphere what the e.g. the self.stepper function is doing and what arguments it is taking. There is an error in this example and it is difficult to debug, since the docstring is also limited (e.g.

Signature: simulation.stepper.__call__(*args, callback=None, **kwargs)
Docstring: Call self as a function.
File:      [~/path_to_package/python3.12/site-packages/xlb/operator/operator.py](https://file+.vscode-resource.vscode-cdn.net/home/emonds/Dokumente/FlowSimulation/~/anaconda3/envs/pytorch3D/lib/python3.12/site-packages/xlb/operator/operator.py)
Type:      method

)

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

3 participants