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

Add a unit grid generator #154

Merged
merged 4 commits into from
Nov 8, 2022
Merged

Add a unit grid generator #154

merged 4 commits into from
Nov 8, 2022

Conversation

fsimonis
Copy link
Member

Main changes of this PR

This PR adds a unit grid generator with adjustable x, y, z dimensions.
Defaults to 2D by default (z=1).

Author's checklist

  • I used the pre-commit hook and used pre-commit run --all to apply all available hooks.
  • I added a test to cover the proposed changes in our test suite.
  • I updated the documentation in docs/README.md.
  • I updated potential breaking changes in the tutorial precice/tutorials/aste-turbine.

davidscn and others added 2 commits September 28, 2022 17:26
Copy link
Member

@davidscn davidscn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some linter fixes and maybe a few documentation tweaks, otherwise good to go.

@@ -8,3 +8,20 @@ python generate_unit_cube.py --mesh coarse.vtk --resolution 0.2
```

This requires the `gmsh` and `meshio` Python packages.

# Unit grid mesh generator
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The edge length of the mesh is always 1 in each dimension, right? Although this might be clear for you, would be good to add it in a sentence here.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can add it in the name, but "Unit" already means that 😉

Comment on lines +23 to +24
# 100x100x2 3D grid
python generate_unit_grid.py --mesh name.vtu -x 100 -y 100 -z 2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it now 3D because of the z=2?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exactly, 2 layers in the z direction.

tools/mesh-generators/README.md Outdated Show resolved Hide resolved
@davidscn davidscn merged commit 999137c into develop Nov 8, 2022
@davidscn davidscn deleted the add-unit-grid-gen branch November 8, 2022 15:13
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

Successfully merging this pull request may close these issues.

2 participants