Skip to content

Commit

Permalink
Improve the handling of missing materials (#474)
Browse files Browse the repository at this point in the history
* Add new input pin for the material provider
  • Loading branch information
roosre authored Jun 17, 2024
1 parent e6cea95 commit 0152bd2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/ansys/dpf/composites/layup_info/material_operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,19 @@ def get_material_operators(
# Combines the material support in the engineering data XML file and the unit system.
# Its output can be used to evaluate material properties.
material_provider = Operator("eng_data::ans_mat_material_provider")
material_provider.inputs.data_sources = engineering_data_source
material_provider.inputs.unit_system_or_result_info(unit_system)
material_provider.inputs.abstract_field_support(
material_support_provider.outputs.abstract_field_support
)
material_provider.inputs.Engineering_data_file(engineering_data_source)

# pylint: disable=protected-access
if version_equal_or_later(rst_data_source._server, "9.0"):
# BUG 1060154: Mechanical adds materials to the MAPDL model for flexible
# Remote Points etc. These materials should be skipped by adding
# materials without properties.
material_provider.inputs.skip_missing_materials(True)

return MaterialOperators(
material_provider=material_provider,
material_support_provider=material_support_provider,
Expand Down

0 comments on commit 0152bd2

Please sign in to comment.