feat: meshing update#5118
Draft
mayankansys wants to merge 18 commits into
Draft
Conversation
Up to standards ✅🟢 Issues
|
…/pyfluent into feat/meshing_workflow_5112
…/pyfluent into feat/meshing_workflow_5112
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds direct construction support for enhanced meshing workflows and exposes user-facing workflow classes from the top-level ansys.fluent.core package.
Changes:
- Added direct session-based constructors for meshing workflow classes.
- Updated meshing session workflow factory methods to use the new constructors.
- Added server workflow tests and a changelog fragment for the new API.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
src/ansys/fluent/core/meshing/meshing_workflow_new.py |
Adds direct-construction constructors and public aliases. |
src/ansys/fluent/core/session_base_meshing.py |
Updates meshing workflow creation to use direct constructors. |
src/ansys/fluent/core/__init__.py |
Exports workflow classes and aliases from the top-level package. |
tests/test_server_meshing_workflow.py |
Adds direct-construction workflow tests. |
doc/changelog.d/5118.added.md |
Adds a changelog entry. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
323
to
327
| def __init__( | ||
| self, | ||
| workflow: PyMenu, | ||
| meshing: PyMenu, | ||
| fluent_version: FluentVersion, | ||
| session: "PureMeshing | Meshing ", | ||
| file_path: PathType = None, | ||
| initialize: bool = True, |
Comment on lines
402
to
+405
| self._current_workflow = LoadWorkflow( | ||
| _make_datamodel_module(self, root_module), | ||
| self.meshing, | ||
| self.get_fluent_version(), | ||
| os.fspath(file_path), | ||
| initialize, | ||
| session=self, | ||
| file_path=os.fspath(file_path), | ||
| initialize=initialize, |
Comment on lines
+65
to
+66
| LoadWorkflow, | ||
| TopologyBasedMeshing, |
Comment on lines
+377
to
+381
| self._meshing = meshing_root | ||
| self._base_meshing = base | ||
| if initialize: | ||
| self._create_workflow() | ||
| base._current_workflow = self |
Comment on lines
+372
to
+378
| fluent_version=fluent_version, | ||
| ) | ||
| self._meshing = meshing | ||
| self._meshing = meshing_root | ||
| self._base_meshing = base | ||
| if initialize: | ||
| self._create_workflow() | ||
| base._current_workflow = self |
Comment on lines
320
to
325
| def __init__( | ||
| self, | ||
| workflow: PyMenu, | ||
| meshing: PyMenu, | ||
| fluent_version: FluentVersion, | ||
| session: "PureMeshing | Meshing ", | ||
| file_path: PathType = None, | ||
| initialize: bool = True, | ||
| ) -> None: |
Comment on lines
+40
to
+47
| def _get_base_meshing(session) -> "BaseMeshing": | ||
| """Extract a ``BaseMeshing`` instance from a session object. | ||
|
|
||
| Parameters | ||
| ---------- | ||
| session : PureMeshing | Meshing | ||
| A meshing session or its internal ``BaseMeshing`` helper. | ||
|
|
Comment on lines
32
to
+36
| from ansys.fluent.core.services.datamodel_se import PyMenu | ||
| from ansys.fluent.core.utils.fluent_version import FluentVersion | ||
| from ansys.fluent.core.session_base_meshing import BaseMeshing | ||
| from ansys.fluent.core.session_meshing import Meshing | ||
| from ansys.fluent.core.session_pure_meshing import PureMeshing | ||
| from ansys.fluent.core.session_shared import _make_datamodel_module |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Previously, meshing workflows could only be created via session methods like
meshing.watertight(), which was not intuitive. The underlying classes were not designed for direct user interaction.Change Summary
WatertightMeshing(session=meshing).WatertightMeshingwere added and exported to the top-levelansys.fluent.corepackage for easy import.(meshing.current_workflow)is now correctly updated when a workflow is constructed directly.Impact
(e.g., meshing.watertight())remain fully functional.