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

feat: Add resolution gradient support in the mesh generator #177

Merged
merged 1 commit into from
Mar 26, 2024
Merged

Conversation

adigitoleo
Copy link
Member

Adds simple resolution gradient functionality to the mesh generator.

CLI example:

pydrex-mesh -k="rectangle" -a xy 1,1 -rN:1e-2,S:1e-3 out.msh                                  [bg:1]

API example:

>>> rect = rectangle(
...     "test_rect",
...     ("x", "z"),
...     center=(0, 0),
...     width=1,
...     height=1,
...     resolution={"north-west": 1e-3, "south-east": 1e-2},
...     _write_file=False
... )
>>> rect.point_constraints[1][-1]
0.01
>>> rect.point_constraints[3][-1]
0.001
>>> rect.point_constraints[0][-1] == rect.point_constraints[2][-1]
True
>>> rect.point_constraints[0][-1]
0.0055

This will allow for setting a higher resolution near the ridge/corner in the initial mesh which we feed to Fluidity.

Adds simple resolution gradient functionality to the mesh generator.

CLI example:
```
pydrex-mesh -k="rectangle" -a xy 1,1 -rN:1e-2,S:1e-3 out.msh                                  [bg:1]
```

API example:
```
>>> rect = rectangle(
...     "test_rect",
...     ("x", "z"),
...     center=(0, 0),
...     width=1,
...     height=1,
...     resolution={"north-west": 1e-3, "south-east": 1e-2},
...     _write_file=False
... )
>>> rect.point_constraints[1][-1]
0.01
>>> rect.point_constraints[3][-1]
0.001
>>> rect.point_constraints[0][-1] == rect.point_constraints[2][-1]
True
>>> rect.point_constraints[0][-1]
0.0055
```

This will allow for setting a higher resolution near the ridge/corner in
the initial mesh which we feed to Fluidity.
@adigitoleo adigitoleo requested a review from Patol75 March 25, 2024 23:39
@Patol75 Patol75 merged commit c01d316 into main Mar 26, 2024
4 checks passed
@adigitoleo adigitoleo deleted the meshgen branch March 28, 2024 04:32
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