Skip to content

Commit

Permalink
Merge branch 'maint/update_enhanced_meshing_interface' of https://git…
Browse files Browse the repository at this point in the history
…hub.com/ansys/pyfluent into maint/update_enhanced_meshing_interface
  • Loading branch information
prmukherj committed Mar 28, 2024
2 parents 7aa68be + ffd09f7 commit 8d98dd4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/test_meshingmode/test_meshing_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_launch_pure_meshing(load_mixing_elbow_pure_meshing):
file_name = "launch_pure_meshing_journal.py"
pure_meshing_session.journal.start(file_name)
session_dir = dir(pure_meshing_session)
for attr in ("field_data", "field_info", "meshing", "workflow"):
for attr in ("fields", "meshing", "workflow"):
assert attr in session_dir
workflow = pure_meshing_session.workflow
workflow.TaskObject["Import Geometry"].Execute()
Expand Down
4 changes: 2 additions & 2 deletions tests/test_pure_mesh_vs_mesh_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def test_pure_meshing_mode(load_mixing_elbow_pure_meshing):
# n.b. 'field_data', 'field_info' need to
# be eliminated from meshing sessions
session_dir = dir(pure_meshing_session)
for attr in ("meshing", "workflow"):
for attr in ("fields", "meshing", "workflow"):
assert attr in session_dir
workflow = pure_meshing_session.workflow
workflow_dir = dir(workflow)
Expand All @@ -33,7 +33,7 @@ def test_meshing_mode(load_mixing_elbow_meshing):
# n.b. 'field_data', 'field_info' need to
# be eliminated from meshing sessions
session_dir = dir(meshing_session)
for attr in ("meshing", "workflow"):
for attr in ("fields", "meshing", "workflow"):
assert attr in session_dir
assert meshing_session.workflow.InitializeWorkflow(
WorkflowType="Watertight Geometry"
Expand Down
16 changes: 16 additions & 0 deletions tests/test_reduction.py
Original file line number Diff line number Diff line change
Expand Up @@ -362,3 +362,19 @@ def test_reduction_does_not_modify_case(load_static_mixer_case):
locations=solver.setup.boundary_conditions.velocity_inlet,
)
assert not solver.scheme_eval.scheme_eval("(case-modified?)")


@pytest.mark.fluent_version(">=24.2")
def test_fix_for_invalid_location_inputs(load_static_mixer_case):
solver = load_static_mixer_case
solver.solution.initialization.hybrid_initialize()

assert solver.fields.reduction.area(locations=["inlet1"], ctxt=solver)

with pytest.raises(RuntimeError):
assert solver.fields.reduction.area(locations=["inlet-1"], ctxt=solver)

assert solver.fields.reduction.area(locations=["inlet1"])

with pytest.raises(RuntimeError):
assert solver.fields.reduction.area(locations=["inlet-1"])

0 comments on commit 8d98dd4

Please sign in to comment.