From 3e69cef00f3c502e9bd7ccdb6ffa14be146b6805 Mon Sep 17 00:00:00 2001 From: jvonrick Date: Mon, 20 Nov 2023 14:29:20 +0100 Subject: [PATCH] Don't initialize ref surface operator for older versions --- src/ansys/dpf/composites/_composite_model_impl.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/ansys/dpf/composites/_composite_model_impl.py b/src/ansys/dpf/composites/_composite_model_impl.py index 593841d1f..33660e572 100644 --- a/src/ansys/dpf/composites/_composite_model_impl.py +++ b/src/ansys/dpf/composites/_composite_model_impl.py @@ -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(),