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: Recursive 'update_dict'. #3370

Merged
merged 4 commits into from
Oct 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ packages = [

[tool.poetry.dependencies]
python = ">=3.10,<4.0"
ansys-api-fluent = "^0.3.27"
ansys-api-fluent = "^0.3.28"
ansys-platform-instancemanagement = "~=1.0"
ansys-tools-filetransfer = ">=0.1,<0.3"
ansys-units = "^0.3.2"
Expand Down
2 changes: 1 addition & 1 deletion src/ansys/fluent/core/services/datamodel_se.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ def update_dict(
) -> None:
"""Update the dict."""
request = DataModelProtoModule.UpdateDictRequest(
rules=rules, path=path, wait=True
rules=rules, path=path, wait=True, recursive=recursive
)
_convert_value_to_variant(dict_state, request.dicttomerge)
response = self._impl.update_dict(request)
Expand Down
39 changes: 39 additions & 0 deletions tests/test_new_meshing_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1760,3 +1760,42 @@ def test_return_state_changes(new_meshing_session):
wt.describe_geometry()

assert wt.add_multizone_controls


@pytest.mark.codegen_required
prmukherj marked this conversation as resolved.
Show resolved Hide resolved
@pytest.mark.fluent_version(">=25.1")
def test_recursive_update_dict(new_meshing_session):
meshing = new_meshing_session
fault_tolerant = meshing.fault_tolerant()
import_file_name = examples.download_file(
"exhaust_system.fmd", "pyfluent/exhaust_system"
)

import_cad = fault_tolerant.import_cad_and_part_management
import_cad.feature_angle = 35
import_cad.fmd_file_name = import_file_name
import_cad()

descr_geom = fault_tolerant.describe_geometry_and_flow
descr_geom.arguments()
descr_geom.flow_type = "Internal flow through the object"
descr_geom.add_enclosure = "Yes"
descr_geom.close_caps = "Yes"
descr_geom.local_refinement_regions = "Yes"
descr_geom.describe_geometry_and_flow_options.moving_objects = "Yes"
descr_geom.describe_geometry_and_flow_options.advanced_options = True
descr_geom.describe_geometry_and_flow_options.porous_regions = "Yes"
descr_geom.describe_geometry_and_flow_options.enable_overset = "Yes"
descr_geom.describe_geometry_and_flow_options.extract_edge_features = "Yes"
descr_geom.describe_geometry_and_flow_options.zero_thickness = "Yes"
descr_geom.arguments()
assert meshing.workflow.TaskObject["Describe Geometry and Flow"].Arguments()[
"DescribeGeometryAndFlowOptions"
] == {
"AdvancedOptions": True,
"EnableOverset": "Yes",
"ExtractEdgeFeatures": "Yes",
"MovingObjects": "Yes",
"PorousRegions": "Yes",
"ZeroThickness": "Yes",
}