Skip to content

Commit

Permalink
Don't initialize ref surface operator for older versions
Browse files Browse the repository at this point in the history
  • Loading branch information
janvonrickenbach committed Nov 20, 2023
1 parent 2fa1ecd commit 3e69cef
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/ansys/dpf/composites/_composite_model_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,14 +176,15 @@ def __init__(
unit_system=self._unit_system,
)

self._reference_surface_and_mapping_field = _get_reference_surface_and_mapping_field(
data_sources=self.data_sources.composite, unit_system=self._unit_system
)
if version_equal_or_later(self._server, "8.0"):
self._reference_surface_and_mapping_field = _get_reference_surface_and_mapping_field(
data_sources=self.data_sources.composite, unit_system=self._unit_system
)

self._map_to_reference_surface_operator = _get_map_to_reference_surface_operator(
reference_surface_and_mapping_field=self._reference_surface_and_mapping_field,
element_layer_indices_field=self.get_mesh().property_field("element_layer_indices"),
)
self._map_to_reference_surface_operator = _get_map_to_reference_surface_operator(
reference_surface_and_mapping_field=self._reference_surface_and_mapping_field,
element_layer_indices_field=self.get_mesh().property_field("element_layer_indices"),
)

self._element_info_provider = get_element_info_provider(
mesh=self.get_mesh(),
Expand Down

0 comments on commit 3e69cef

Please sign in to comment.