From 3e2ada4701b02192f420216e0943cf7aa15cc418 Mon Sep 17 00:00:00 2001 From: Shubham Shevale Date: Fri, 4 Sep 2026 15:15:16 +0530 Subject: [PATCH 01/14] update code from ADO --- .github/workflows/ci_cd.yml | 2 +- .pre-commit-config.yaml | 2 +- .../config/vocabularies/ANSYS/accept.txt | 1 + pyproject.toml | 2 +- src/ansys/meshing/prime/autogen/automesh.py | 2 +- .../meshing/prime/autogen/automeshstructs.py | 2 +- .../meshing/prime/autogen/autoquadmesher.py | 2 +- .../prime/autogen/autoquadmesherstructs.py | 2 +- .../prime/autogen/boundaryfittednurbs.py | 2 +- .../meshing/prime/autogen/collapsetool.py | 2 +- .../prime/autogen/collapsetoolstructs.py | 2 +- .../meshing/prime/autogen/commonstructs.py | 2 +- .../meshing/prime/autogen/commontypes.py | 2 +- src/ansys/meshing/prime/autogen/connect.py | 2 +- .../meshing/prime/autogen/connectstructs.py | 2 +- .../meshing/prime/autogen/controldata.py | 2 +- .../meshing/prime/autogen/controlstructs.py | 2 +- src/ansys/meshing/prime/autogen/coreobject.py | 2 +- src/ansys/meshing/prime/autogen/deletetool.py | 2 +- .../prime/autogen/deletetoolstructs.py | 2 +- .../prime/autogen/featureextraction.py | 2 +- .../prime/autogen/featureextractionstructs.py | 2 +- src/ansys/meshing/prime/autogen/fileio.py | 2 +- .../meshing/prime/autogen/fileiostructs.py | 83 +- .../meshing/prime/autogen/hextospline.py | 2 +- src/ansys/meshing/prime/autogen/igastructs.py | 2 +- .../prime/autogen/materialpointmanager.py | 2 +- .../autogen/materialpointmanagerstructs.py | 2 +- src/ansys/meshing/prime/autogen/meshinfo.py | 2 +- .../meshing/prime/autogen/meshinfostructs.py | 2 +- src/ansys/meshing/prime/autogen/model.py | 2 +- .../meshing/prime/autogen/modelstructs.py | 2 +- src/ansys/meshing/prime/autogen/morpher.py | 2 +- .../prime/autogen/morpherbcsstructs.py | 2 +- .../meshing/prime/autogen/morpherstructs.py | 2 +- .../meshing/prime/autogen/multizonecontrol.py | 2 +- src/ansys/meshing/prime/autogen/part.py | 2 +- .../meshing/prime/autogen/partstructs.py | 2 +- .../meshing/prime/autogen/periodiccontrol.py | 2 +- .../prime/autogen/periodiccontrolstructs.py | 2 +- .../meshing/prime/autogen/primeconfig.py | 2 +- .../meshing/prime/autogen/prismcontrol.py | 2 +- .../prime/autogen/prismcontrolstructs.py | 2 +- .../meshing/prime/autogen/quadtospline.py | 2 +- src/ansys/meshing/prime/autogen/scaffolder.py | 2 +- .../prime/autogen/scaffolderstructs.py | 2 +- .../meshing/prime/autogen/shellblcontrol.py | 2 +- .../prime/autogen/shellblcontrolstructs.py | 2 +- .../meshing/prime/autogen/sizecontrol.py | 2 +- .../prime/autogen/sizecontrolstructs.py | 2 +- src/ansys/meshing/prime/autogen/sizefield.py | 2 +- .../meshing/prime/autogen/sizefieldstructs.py | 2 +- .../meshing/prime/autogen/splittoolstructs.py | 2 +- .../meshing/prime/autogen/surfacesearch.py | 2 +- .../prime/autogen/surfacesearchstructs.py | 2 +- .../meshing/prime/autogen/surfaceutilities.py | 2 +- .../prime/autogen/surfaceutilitystructs.py | 2 +- src/ansys/meshing/prime/autogen/surfer.py | 2 +- .../meshing/prime/autogen/surferstructs.py | 2 +- .../prime/autogen/thinvolumecontrol.py | 2 +- .../prime/autogen/thinvolumecontrolstructs.py | 2 +- src/ansys/meshing/prime/autogen/topodata.py | 2 +- .../meshing/prime/autogen/topodatastructs.py | 2 +- .../prime/autogen/toposearchstructs.py | 2 +- .../meshing/prime/autogen/topoutilities.py | 2 +- .../prime/autogen/topoutilitystructs.py | 2 +- src/ansys/meshing/prime/autogen/transform.py | 2 +- .../meshing/prime/autogen/transformstructs.py | 2 +- .../meshing/prime/autogen/trimmedspline.py | 2 +- .../prime/autogen/trimmedsplinestructs.py | 2 +- .../meshing/prime/autogen/volumecontrol.py | 2 +- .../prime/autogen/volumecontrolstructs.py | 2 +- .../meshing/prime/autogen/volumemeshtool.py | 2 +- .../prime/autogen/volumemeshtoolstructs.py | 2 +- .../meshing/prime/autogen/volumesearch.py | 2 +- .../prime/autogen/volumesearchstructs.py | 2 +- .../meshing/prime/autogen/volumesweeper.py | 2 +- .../prime/autogen/volumesweeperstructs.py | 2 +- src/ansys/meshing/prime/autogen/vtcomposer.py | 2 +- .../prime/autogen/vtcomposerstructs.py | 2 +- src/ansys/meshing/prime/autogen/wrapper.py | 2 +- .../meshing/prime/autogen/wrappercontrol.py | 2 +- .../meshing/prime/autogen/wrapperstructs.py | 2 +- src/ansys/meshing/prime/core/controldata.py | 3 +- .../meshing/prime/core/dynaexportutils.py | 3 +- src/ansys/meshing/prime/core/fileio.py | 62 +- .../meshing/prime/core/mapdlcdbexportutils.py | 935 ++++++++++++++---- src/ansys/meshing/prime/core/mesh.py | 3 +- src/ansys/meshing/prime/core/model.py | 3 +- src/ansys/meshing/prime/core/part.py | 3 +- .../meshing/prime/core/periodiccontrol.py | 3 +- src/ansys/meshing/prime/core/prismcontrol.py | 3 +- src/ansys/meshing/prime/core/sizecontrol.py | 3 +- .../meshing/prime/core/surfaceutilities.py | 3 +- src/ansys/meshing/prime/core/surfer.py | 3 +- src/ansys/meshing/prime/core/volumecontrol.py | 3 +- src/ansys/meshing/prime/core/volumesweeper.py | 3 +- src/ansys/meshing/prime/core/wrapper.py | 3 +- .../meshing/prime/core/wrappercontrol.py | 3 +- src/ansys/meshing/prime/internals/client.py | 5 +- .../meshing/prime/internals/comm_manager.py | 3 +- .../meshing/prime/internals/communicator.py | 3 +- src/ansys/meshing/prime/internals/config.py | 3 +- .../meshing/prime/internals/cyberchannel.py | 3 +- src/ansys/meshing/prime/internals/defaults.py | 3 +- .../meshing/prime/internals/error_handling.py | 3 +- .../prime/internals/grpc_communicator.py | 3 +- .../meshing/prime/internals/grpc_utils.py | 3 +- .../meshing/prime/internals/json_utils.py | 3 +- src/ansys/meshing/prime/internals/launcher.py | 5 +- src/ansys/meshing/prime/internals/logger.py | 3 +- .../prime/internals/prime_communicator.py | 3 +- .../prime/internals/socket_communicator.py | 3 +- src/ansys/meshing/prime/internals/utils.py | 9 +- .../meshing/prime/internals/yaml_converter.py | 172 ++++ .../meshing/prime/internals/yaml_parser.py | 782 +++++++++++++++ .../meshing/prime/params/primestructs.py | 3 +- 117 files changed, 2002 insertions(+), 295 deletions(-) create mode 100644 src/ansys/meshing/prime/internals/yaml_converter.py create mode 100644 src/ansys/meshing/prime/internals/yaml_parser.py diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index da9bc2c7f9..23b7473cf7 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -17,7 +17,7 @@ on: env: DOCKER_IMAGE_NAME: ghcr.io/ansys/prime - DOCKER_IMAGE_TAG: '26.1.3' + DOCKER_IMAGE_TAG: '26.1.5' MAIN_PYTHON_VERSION: '3.14' PACKAGE_NAME: 'ansys-meshing-prime' PACKAGE_NAMESPACE: 'ansys.meshing.prime' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1d51379195..a195f59050 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -46,7 +46,7 @@ repos: rev: 6.3.0 hooks: - id: pydocstyle - additional_dependencies: [toml] + additional_dependencies: [toml, tomli] exclude: "tests/|examples/|__init__.py" - repo: https://github.com/ansys/pre-commit-hooks diff --git a/doc/styles/config/vocabularies/ANSYS/accept.txt b/doc/styles/config/vocabularies/ANSYS/accept.txt index 992b07009a..236f056b1d 100644 --- a/doc/styles/config/vocabularies/ANSYS/accept.txt +++ b/doc/styles/config/vocabularies/ANSYS/accept.txt @@ -51,6 +51,7 @@ SizeField sizefield stackable [Ss]tacker +Synopsys [Ss]weeper [Ss]weepable te diff --git a/pyproject.toml b/pyproject.toml index 6ea7bf5d2c..d746518477 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi" [project] name = "ansys-meshing-prime" -version = "0.10.4" +version = "0.10.5.dev0" description = "PyPrimeMesh is a Python client to Ansys Prime Server, which delivers core Ansys meshing technology." readme = "README.md" requires-python = ">=3.10,<4" diff --git a/src/ansys/meshing/prime/autogen/automesh.py b/src/ansys/meshing/prime/autogen/automesh.py index dd4512f5a0..2fb84fa793 100644 --- a/src/ansys/meshing/prime/autogen/automesh.py +++ b/src/ansys/meshing/prime/autogen/automesh.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/automeshstructs.py b/src/ansys/meshing/prime/autogen/automeshstructs.py index 908c1db86d..9662a4f6f9 100644 --- a/src/ansys/meshing/prime/autogen/automeshstructs.py +++ b/src/ansys/meshing/prime/autogen/automeshstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/autoquadmesher.py b/src/ansys/meshing/prime/autogen/autoquadmesher.py index 391854612e..9f19308287 100644 --- a/src/ansys/meshing/prime/autogen/autoquadmesher.py +++ b/src/ansys/meshing/prime/autogen/autoquadmesher.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/autoquadmesherstructs.py b/src/ansys/meshing/prime/autogen/autoquadmesherstructs.py index 24ae63b9b2..90393f4859 100644 --- a/src/ansys/meshing/prime/autogen/autoquadmesherstructs.py +++ b/src/ansys/meshing/prime/autogen/autoquadmesherstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/boundaryfittednurbs.py b/src/ansys/meshing/prime/autogen/boundaryfittednurbs.py index d869b044d9..bf6551317b 100644 --- a/src/ansys/meshing/prime/autogen/boundaryfittednurbs.py +++ b/src/ansys/meshing/prime/autogen/boundaryfittednurbs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/collapsetool.py b/src/ansys/meshing/prime/autogen/collapsetool.py index 9465f91e41..441b758eed 100644 --- a/src/ansys/meshing/prime/autogen/collapsetool.py +++ b/src/ansys/meshing/prime/autogen/collapsetool.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/collapsetoolstructs.py b/src/ansys/meshing/prime/autogen/collapsetoolstructs.py index 32de530a71..ad98256504 100644 --- a/src/ansys/meshing/prime/autogen/collapsetoolstructs.py +++ b/src/ansys/meshing/prime/autogen/collapsetoolstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/commonstructs.py b/src/ansys/meshing/prime/autogen/commonstructs.py index 6fd38991cd..eb0808ac8d 100644 --- a/src/ansys/meshing/prime/autogen/commonstructs.py +++ b/src/ansys/meshing/prime/autogen/commonstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/commontypes.py b/src/ansys/meshing/prime/autogen/commontypes.py index b519ba1a57..f37d1942d1 100644 --- a/src/ansys/meshing/prime/autogen/commontypes.py +++ b/src/ansys/meshing/prime/autogen/commontypes.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/connect.py b/src/ansys/meshing/prime/autogen/connect.py index 9c7fcfaedb..985ce9a5d6 100644 --- a/src/ansys/meshing/prime/autogen/connect.py +++ b/src/ansys/meshing/prime/autogen/connect.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/connectstructs.py b/src/ansys/meshing/prime/autogen/connectstructs.py index 8d8200a3b5..a943cb8921 100644 --- a/src/ansys/meshing/prime/autogen/connectstructs.py +++ b/src/ansys/meshing/prime/autogen/connectstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/controldata.py b/src/ansys/meshing/prime/autogen/controldata.py index 449ead4df9..bb71c77baa 100644 --- a/src/ansys/meshing/prime/autogen/controldata.py +++ b/src/ansys/meshing/prime/autogen/controldata.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/controlstructs.py b/src/ansys/meshing/prime/autogen/controlstructs.py index 132902a365..cd06e261ef 100644 --- a/src/ansys/meshing/prime/autogen/controlstructs.py +++ b/src/ansys/meshing/prime/autogen/controlstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/coreobject.py b/src/ansys/meshing/prime/autogen/coreobject.py index a26f470f69..92762a45e6 100644 --- a/src/ansys/meshing/prime/autogen/coreobject.py +++ b/src/ansys/meshing/prime/autogen/coreobject.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/deletetool.py b/src/ansys/meshing/prime/autogen/deletetool.py index 585409fa99..91ea680607 100644 --- a/src/ansys/meshing/prime/autogen/deletetool.py +++ b/src/ansys/meshing/prime/autogen/deletetool.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/deletetoolstructs.py b/src/ansys/meshing/prime/autogen/deletetoolstructs.py index c96d38aa89..4cd1ad24b7 100644 --- a/src/ansys/meshing/prime/autogen/deletetoolstructs.py +++ b/src/ansys/meshing/prime/autogen/deletetoolstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/featureextraction.py b/src/ansys/meshing/prime/autogen/featureextraction.py index abd7d8c446..6172e35bf6 100644 --- a/src/ansys/meshing/prime/autogen/featureextraction.py +++ b/src/ansys/meshing/prime/autogen/featureextraction.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/featureextractionstructs.py b/src/ansys/meshing/prime/autogen/featureextractionstructs.py index 2745188f2d..c1f380a64c 100644 --- a/src/ansys/meshing/prime/autogen/featureextractionstructs.py +++ b/src/ansys/meshing/prime/autogen/featureextractionstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/fileio.py b/src/ansys/meshing/prime/autogen/fileio.py index 4c0f7d632b..88264c127d 100644 --- a/src/ansys/meshing/prime/autogen/fileio.py +++ b/src/ansys/meshing/prime/autogen/fileio.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/fileiostructs.py b/src/ansys/meshing/prime/autogen/fileiostructs.py index 96df8d2fec..51d8606918 100644 --- a/src/ansys/meshing/prime/autogen/fileiostructs.py +++ b/src/ansys/meshing/prime/autogen/fileiostructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # @@ -144,6 +144,42 @@ class SeparateBlocksFormatType(enum.IntEnum): **This is a beta parameter**. **The behavior and name may change in the future**.""" +class TargetAnsysVersion(enum.IntEnum): + """Target ANSYS release version for CDB export compatibility. Determines which features and formats are available. + """ + V231 = 0 + """Target Ansys 2023 R1. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + V232 = 1 + """Target Ansys 2023 R2. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + V241 = 2 + """Target Ansys 2024 R1. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + V242 = 3 + """Target Ansys 2024 R2. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + V251 = 4 + """Target Ansys 2025 R1. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + V252 = 5 + """Target Ansys 2025 R2. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + V261 = 6 + """Target Ansys 2026 R1. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + LATEST = 6 + """Alias for the latest supported Ansys release (default). Update this alias each release cycle. + + **This is a beta parameter**. **The behavior and name may change in the future**.""" + class LSDynaFileFormatType(enum.IntEnum): """Provides the format type to write the LS-DYNA file. """ @@ -3508,6 +3544,10 @@ class ExportMapdlCdbParams(CoreObject): initial_counters: Dict[str, Union[str, int, float, bool]], optional Parameter to specify the starting counter values for export + **This is a beta parameter**. **The behavior and name may change in the future**. + target_ansys_version: TargetAnsysVersion, optional + Target ANSYS version for export compatibility. Defaults to TargetAnsysVersion_Latest. When set to an older version, incompatible features are automatically coerced to safe fallback values. + **This is a beta parameter**. **The behavior and name may change in the future**. json_data: dict, optional JSON dictionary to create a ``ExportMapdlCdbParams`` object with provided parameters. @@ -3547,7 +3587,8 @@ def __initialize( contact_element_types: ContactElementTypeParams, reorder_spotweldsurface: bool, skip_comments: bool, - initial_counters: Dict[str, Union[str, int, float, bool]]): + initial_counters: Dict[str, Union[str, int, float, bool]], + target_ansys_version: TargetAnsysVersion): self._config_settings = config_settings self._pre_solution_settings = pre_solution_settings self._material_properties = material_properties @@ -3576,6 +3617,7 @@ def __initialize( self._reorder_spotweldsurface = reorder_spotweldsurface self._skip_comments = skip_comments self._initial_counters = initial_counters + self._target_ansys_version = TargetAnsysVersion(target_ansys_version) def __init__( self, @@ -3608,6 +3650,7 @@ def __init__( reorder_spotweldsurface: bool = None, skip_comments: bool = None, initial_counters: Dict[str, Union[str, int, float, bool]] = None, + target_ansys_version: TargetAnsysVersion = None, json_data : dict = None, **kwargs): """Initialize a ``ExportMapdlCdbParams`` object. @@ -3727,6 +3770,10 @@ def __init__( initial_counters: Dict[str, Union[str, int, float, bool]], optional Parameter to specify the starting counter values for export + **This is a beta parameter**. **The behavior and name may change in the future**. + target_ansys_version: TargetAnsysVersion, optional + Target ANSYS version for export compatibility. Defaults to TargetAnsysVersion_Latest. When set to an older version, incompatible features are automatically coerced to safe fallback values. + **This is a beta parameter**. **The behavior and name may change in the future**. json_data: dict, optional JSON dictionary to create a ``ExportMapdlCdbParams`` object with provided parameters. @@ -3764,9 +3811,10 @@ def __init__( ContactElementTypeParams(model = model, json_data = json_data["contactElementTypes"] if "contactElementTypes" in json_data else None), json_data["reorderSpotweldsurface"] if "reorderSpotweldsurface" in json_data else None, json_data["skipComments"] if "skipComments" in json_data else None, - json_data["initialCounters"] if "initialCounters" in json_data else None) + json_data["initialCounters"] if "initialCounters" in json_data else None, + TargetAnsysVersion(json_data["targetAnsysVersion"] if "targetAnsysVersion" in json_data else None)) else: - all_field_specified = all(arg is not None for arg in [config_settings, pre_solution_settings, material_properties, boundary_conditions, analysis_settings, write_cells, enable_face_based_labels, label_export_params, write_by_zones, consider_general_connectors_as_spot_weld, analysis_type, simulation_type, analysis_settings_file_name, write_separate_blocks, write_components_with_element_blocks, separate_blocks_format_type, export_tie_as_cntgen, export_coupling_as_sfcgen, export_fasteners_as_swgen, export_rigid_bodies_as_rbgen, write_component_based_ties, mortar_contact_for_ties, get_zone_mesh_results, write_thickness_file, contact_element_types, reorder_spotweldsurface, skip_comments, initial_counters]) + all_field_specified = all(arg is not None for arg in [config_settings, pre_solution_settings, material_properties, boundary_conditions, analysis_settings, write_cells, enable_face_based_labels, label_export_params, write_by_zones, consider_general_connectors_as_spot_weld, analysis_type, simulation_type, analysis_settings_file_name, write_separate_blocks, write_components_with_element_blocks, separate_blocks_format_type, export_tie_as_cntgen, export_coupling_as_sfcgen, export_fasteners_as_swgen, export_rigid_bodies_as_rbgen, write_component_based_ties, mortar_contact_for_ties, get_zone_mesh_results, write_thickness_file, contact_element_types, reorder_spotweldsurface, skip_comments, initial_counters, target_ansys_version]) if all_field_specified: self.__initialize( config_settings, @@ -3796,7 +3844,8 @@ def __init__( contact_element_types, reorder_spotweldsurface, skip_comments, - initial_counters) + initial_counters, + target_ansys_version) else: if model is None: raise ValueError("Invalid assignment. Either pass a model or specify all properties.") @@ -3831,7 +3880,8 @@ def __init__( contact_element_types if contact_element_types is not None else ( ExportMapdlCdbParams._default_params["contact_element_types"] if "contact_element_types" in ExportMapdlCdbParams._default_params else ContactElementTypeParams(model = model, json_data = (json_data["contactElementTypes"] if "contactElementTypes" in json_data else None))), reorder_spotweldsurface if reorder_spotweldsurface is not None else ( ExportMapdlCdbParams._default_params["reorder_spotweldsurface"] if "reorder_spotweldsurface" in ExportMapdlCdbParams._default_params else (json_data["reorderSpotweldsurface"] if "reorderSpotweldsurface" in json_data else None)), skip_comments if skip_comments is not None else ( ExportMapdlCdbParams._default_params["skip_comments"] if "skip_comments" in ExportMapdlCdbParams._default_params else (json_data["skipComments"] if "skipComments" in json_data else None)), - initial_counters if initial_counters is not None else ( ExportMapdlCdbParams._default_params["initial_counters"] if "initial_counters" in ExportMapdlCdbParams._default_params else (json_data["initialCounters"] if "initialCounters" in json_data else None))) + initial_counters if initial_counters is not None else ( ExportMapdlCdbParams._default_params["initial_counters"] if "initial_counters" in ExportMapdlCdbParams._default_params else (json_data["initialCounters"] if "initialCounters" in json_data else None)), + target_ansys_version if target_ansys_version is not None else ( ExportMapdlCdbParams._default_params["target_ansys_version"] if "target_ansys_version" in ExportMapdlCdbParams._default_params else TargetAnsysVersion(json_data["targetAnsysVersion"] if "targetAnsysVersion" in json_data else None))) self._custom_params = kwargs if model is not None: [ model._logger.debug(f'Unsupported argument : {key}') for key in kwargs ] @@ -3868,7 +3918,8 @@ def set_default( contact_element_types: ContactElementTypeParams = None, reorder_spotweldsurface: bool = None, skip_comments: bool = None, - initial_counters: Dict[str, Union[str, int, float, bool]] = None): + initial_counters: Dict[str, Union[str, int, float, bool]] = None, + target_ansys_version: TargetAnsysVersion = None): """Set the default values of the ``ExportMapdlCdbParams`` object. Parameters @@ -3929,6 +3980,8 @@ def set_default( Option to skip export of comments to the exported file. When the value is true, skips writing comments. When the value is false, writes comments to the exported file. The default value is false. initial_counters: Dict[str, Union[str, int, float, bool]], optional Parameter to specify the starting counter values for export + target_ansys_version: TargetAnsysVersion, optional + Target ANSYS version for export compatibility. Defaults to TargetAnsysVersion_Latest. When set to an older version, incompatible features are automatically coerced to safe fallback values. """ args = locals() [ExportMapdlCdbParams._default_params.update({ key: value }) for key, value in args.items() if value is not None] @@ -4003,11 +4056,13 @@ def _jsonify(self) -> Dict[str, Any]: json_data["skipComments"] = self._skip_comments if self._initial_counters is not None: json_data["initialCounters"] = self._initial_counters + if self._target_ansys_version is not None: + json_data["targetAnsysVersion"] = self._target_ansys_version [ json_data.update({ utils.to_camel_case(key) : value }) for key, value in self._custom_params.items()] return json_data def __str__(self) -> str: - message = "config_settings : %s\npre_solution_settings : %s\nmaterial_properties : %s\nboundary_conditions : %s\nanalysis_settings : %s\nwrite_cells : %s\nenable_face_based_labels : %s\nlabel_export_params : %s\nwrite_by_zones : %s\nconsider_general_connectors_as_spot_weld : %s\nanalysis_type : %s\nsimulation_type : %s\nanalysis_settings_file_name : %s\nwrite_separate_blocks : %s\nwrite_components_with_element_blocks : %s\nseparate_blocks_format_type : %s\nexport_tie_as_cntgen : %s\nexport_coupling_as_sfcgen : %s\nexport_fasteners_as_swgen : %s\nexport_rigid_bodies_as_rbgen : %s\nwrite_component_based_ties : %s\nmortar_contact_for_ties : %s\nget_zone_mesh_results : %s\nwrite_thickness_file : %s\ncontact_element_types : %s\nreorder_spotweldsurface : %s\nskip_comments : %s\ninitial_counters : %s" % (self._config_settings, self._pre_solution_settings, self._material_properties, self._boundary_conditions, self._analysis_settings, self._write_cells, self._enable_face_based_labels, '{ ' + str(self._label_export_params) + ' }', self._write_by_zones, self._consider_general_connectors_as_spot_weld, self._analysis_type, self._simulation_type, self._analysis_settings_file_name, self._write_separate_blocks, self._write_components_with_element_blocks, self._separate_blocks_format_type, self._export_tie_as_cntgen, self._export_coupling_as_sfcgen, self._export_fasteners_as_swgen, self._export_rigid_bodies_as_rbgen, self._write_component_based_ties, self._mortar_contact_for_ties, self._get_zone_mesh_results, self._write_thickness_file, '{ ' + str(self._contact_element_types) + ' }', self._reorder_spotweldsurface, self._skip_comments, self._initial_counters) + message = "config_settings : %s\npre_solution_settings : %s\nmaterial_properties : %s\nboundary_conditions : %s\nanalysis_settings : %s\nwrite_cells : %s\nenable_face_based_labels : %s\nlabel_export_params : %s\nwrite_by_zones : %s\nconsider_general_connectors_as_spot_weld : %s\nanalysis_type : %s\nsimulation_type : %s\nanalysis_settings_file_name : %s\nwrite_separate_blocks : %s\nwrite_components_with_element_blocks : %s\nseparate_blocks_format_type : %s\nexport_tie_as_cntgen : %s\nexport_coupling_as_sfcgen : %s\nexport_fasteners_as_swgen : %s\nexport_rigid_bodies_as_rbgen : %s\nwrite_component_based_ties : %s\nmortar_contact_for_ties : %s\nget_zone_mesh_results : %s\nwrite_thickness_file : %s\ncontact_element_types : %s\nreorder_spotweldsurface : %s\nskip_comments : %s\ninitial_counters : %s\ntarget_ansys_version : %s" % (self._config_settings, self._pre_solution_settings, self._material_properties, self._boundary_conditions, self._analysis_settings, self._write_cells, self._enable_face_based_labels, '{ ' + str(self._label_export_params) + ' }', self._write_by_zones, self._consider_general_connectors_as_spot_weld, self._analysis_type, self._simulation_type, self._analysis_settings_file_name, self._write_separate_blocks, self._write_components_with_element_blocks, self._separate_blocks_format_type, self._export_tie_as_cntgen, self._export_coupling_as_sfcgen, self._export_fasteners_as_swgen, self._export_rigid_bodies_as_rbgen, self._write_component_based_ties, self._mortar_contact_for_ties, self._get_zone_mesh_results, self._write_thickness_file, '{ ' + str(self._contact_element_types) + ' }', self._reorder_spotweldsurface, self._skip_comments, self._initial_counters, self._target_ansys_version) message += ''.join('\n' + str(key) + ' : ' + str(value) for key, value in self._custom_params.items()) return message @@ -4347,6 +4402,18 @@ def initial_counters(self) -> Dict[str, Union[str, int, float, bool]]: def initial_counters(self, value: Dict[str, Union[str, int, float, bool]]): self._initial_counters = value + @property + def target_ansys_version(self) -> TargetAnsysVersion: + """Target ANSYS version for export compatibility. Defaults to TargetAnsysVersion_Latest. When set to an older version, incompatible features are automatically coerced to safe fallback values. + + **This is a beta parameter**. **The behavior and name may change in the future**. + """ + return self._target_ansys_version + + @target_ansys_version.setter + def target_ansys_version(self, value: TargetAnsysVersion): + self._target_ansys_version = value + class ExportMapdlCdbResults(CoreObject): """Results associated with the MAPDL CDB export. diff --git a/src/ansys/meshing/prime/autogen/hextospline.py b/src/ansys/meshing/prime/autogen/hextospline.py index 3f24d588f1..80b25f5ed7 100644 --- a/src/ansys/meshing/prime/autogen/hextospline.py +++ b/src/ansys/meshing/prime/autogen/hextospline.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/igastructs.py b/src/ansys/meshing/prime/autogen/igastructs.py index efea38354f..5fcb3c032c 100644 --- a/src/ansys/meshing/prime/autogen/igastructs.py +++ b/src/ansys/meshing/prime/autogen/igastructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/materialpointmanager.py b/src/ansys/meshing/prime/autogen/materialpointmanager.py index 5122551458..455262f075 100644 --- a/src/ansys/meshing/prime/autogen/materialpointmanager.py +++ b/src/ansys/meshing/prime/autogen/materialpointmanager.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/materialpointmanagerstructs.py b/src/ansys/meshing/prime/autogen/materialpointmanagerstructs.py index 338f390952..b3026f516e 100644 --- a/src/ansys/meshing/prime/autogen/materialpointmanagerstructs.py +++ b/src/ansys/meshing/prime/autogen/materialpointmanagerstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/meshinfo.py b/src/ansys/meshing/prime/autogen/meshinfo.py index 7abd8f428f..d606fcc791 100644 --- a/src/ansys/meshing/prime/autogen/meshinfo.py +++ b/src/ansys/meshing/prime/autogen/meshinfo.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/meshinfostructs.py b/src/ansys/meshing/prime/autogen/meshinfostructs.py index 8a0b4c108c..dd5de2b691 100644 --- a/src/ansys/meshing/prime/autogen/meshinfostructs.py +++ b/src/ansys/meshing/prime/autogen/meshinfostructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/model.py b/src/ansys/meshing/prime/autogen/model.py index 9a7af7a847..96b9634974 100644 --- a/src/ansys/meshing/prime/autogen/model.py +++ b/src/ansys/meshing/prime/autogen/model.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/modelstructs.py b/src/ansys/meshing/prime/autogen/modelstructs.py index e898aaf9fc..3e945ae084 100644 --- a/src/ansys/meshing/prime/autogen/modelstructs.py +++ b/src/ansys/meshing/prime/autogen/modelstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/morpher.py b/src/ansys/meshing/prime/autogen/morpher.py index ed098fdb3d..c975874818 100644 --- a/src/ansys/meshing/prime/autogen/morpher.py +++ b/src/ansys/meshing/prime/autogen/morpher.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/morpherbcsstructs.py b/src/ansys/meshing/prime/autogen/morpherbcsstructs.py index 9e3070e2c3..fce19a45b9 100644 --- a/src/ansys/meshing/prime/autogen/morpherbcsstructs.py +++ b/src/ansys/meshing/prime/autogen/morpherbcsstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/morpherstructs.py b/src/ansys/meshing/prime/autogen/morpherstructs.py index 17b356c664..06be06b935 100644 --- a/src/ansys/meshing/prime/autogen/morpherstructs.py +++ b/src/ansys/meshing/prime/autogen/morpherstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/multizonecontrol.py b/src/ansys/meshing/prime/autogen/multizonecontrol.py index b874a6a988..ffed8c2475 100644 --- a/src/ansys/meshing/prime/autogen/multizonecontrol.py +++ b/src/ansys/meshing/prime/autogen/multizonecontrol.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/part.py b/src/ansys/meshing/prime/autogen/part.py index 0d83b3ea97..f2f002d79f 100644 --- a/src/ansys/meshing/prime/autogen/part.py +++ b/src/ansys/meshing/prime/autogen/part.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/partstructs.py b/src/ansys/meshing/prime/autogen/partstructs.py index 754d36a72d..068ea53359 100644 --- a/src/ansys/meshing/prime/autogen/partstructs.py +++ b/src/ansys/meshing/prime/autogen/partstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/periodiccontrol.py b/src/ansys/meshing/prime/autogen/periodiccontrol.py index fcc68ca982..c1947be1e3 100644 --- a/src/ansys/meshing/prime/autogen/periodiccontrol.py +++ b/src/ansys/meshing/prime/autogen/periodiccontrol.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/periodiccontrolstructs.py b/src/ansys/meshing/prime/autogen/periodiccontrolstructs.py index 75fa523557..2d8881b1ff 100644 --- a/src/ansys/meshing/prime/autogen/periodiccontrolstructs.py +++ b/src/ansys/meshing/prime/autogen/periodiccontrolstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/primeconfig.py b/src/ansys/meshing/prime/autogen/primeconfig.py index 76e1c4abdc..825726e232 100644 --- a/src/ansys/meshing/prime/autogen/primeconfig.py +++ b/src/ansys/meshing/prime/autogen/primeconfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/prismcontrol.py b/src/ansys/meshing/prime/autogen/prismcontrol.py index ac7b6d957b..6b2c2e2729 100644 --- a/src/ansys/meshing/prime/autogen/prismcontrol.py +++ b/src/ansys/meshing/prime/autogen/prismcontrol.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/prismcontrolstructs.py b/src/ansys/meshing/prime/autogen/prismcontrolstructs.py index 5bec715ed5..ed84fc31ec 100644 --- a/src/ansys/meshing/prime/autogen/prismcontrolstructs.py +++ b/src/ansys/meshing/prime/autogen/prismcontrolstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/quadtospline.py b/src/ansys/meshing/prime/autogen/quadtospline.py index e8482881dc..5761bfd30c 100644 --- a/src/ansys/meshing/prime/autogen/quadtospline.py +++ b/src/ansys/meshing/prime/autogen/quadtospline.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/scaffolder.py b/src/ansys/meshing/prime/autogen/scaffolder.py index 830f8161a6..a4c7e76ca5 100644 --- a/src/ansys/meshing/prime/autogen/scaffolder.py +++ b/src/ansys/meshing/prime/autogen/scaffolder.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/scaffolderstructs.py b/src/ansys/meshing/prime/autogen/scaffolderstructs.py index 8a8a4b6333..ab58ee4f66 100644 --- a/src/ansys/meshing/prime/autogen/scaffolderstructs.py +++ b/src/ansys/meshing/prime/autogen/scaffolderstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/shellblcontrol.py b/src/ansys/meshing/prime/autogen/shellblcontrol.py index f51318f7f1..d54fc7a600 100644 --- a/src/ansys/meshing/prime/autogen/shellblcontrol.py +++ b/src/ansys/meshing/prime/autogen/shellblcontrol.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/shellblcontrolstructs.py b/src/ansys/meshing/prime/autogen/shellblcontrolstructs.py index dcc5de3836..9f78b196f6 100644 --- a/src/ansys/meshing/prime/autogen/shellblcontrolstructs.py +++ b/src/ansys/meshing/prime/autogen/shellblcontrolstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/sizecontrol.py b/src/ansys/meshing/prime/autogen/sizecontrol.py index fded55d87d..6ce1173782 100644 --- a/src/ansys/meshing/prime/autogen/sizecontrol.py +++ b/src/ansys/meshing/prime/autogen/sizecontrol.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/sizecontrolstructs.py b/src/ansys/meshing/prime/autogen/sizecontrolstructs.py index c429ad35fa..e6b3c4e4c4 100644 --- a/src/ansys/meshing/prime/autogen/sizecontrolstructs.py +++ b/src/ansys/meshing/prime/autogen/sizecontrolstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/sizefield.py b/src/ansys/meshing/prime/autogen/sizefield.py index 68107f1bc1..d0f6146318 100644 --- a/src/ansys/meshing/prime/autogen/sizefield.py +++ b/src/ansys/meshing/prime/autogen/sizefield.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/sizefieldstructs.py b/src/ansys/meshing/prime/autogen/sizefieldstructs.py index a3adcb5494..506d2fa3d1 100644 --- a/src/ansys/meshing/prime/autogen/sizefieldstructs.py +++ b/src/ansys/meshing/prime/autogen/sizefieldstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/splittoolstructs.py b/src/ansys/meshing/prime/autogen/splittoolstructs.py index 2a0246b780..70747ba6cb 100644 --- a/src/ansys/meshing/prime/autogen/splittoolstructs.py +++ b/src/ansys/meshing/prime/autogen/splittoolstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/surfacesearch.py b/src/ansys/meshing/prime/autogen/surfacesearch.py index 3fabc7a503..6e4b7b1194 100644 --- a/src/ansys/meshing/prime/autogen/surfacesearch.py +++ b/src/ansys/meshing/prime/autogen/surfacesearch.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/surfacesearchstructs.py b/src/ansys/meshing/prime/autogen/surfacesearchstructs.py index 02f2390d55..e791862ce9 100644 --- a/src/ansys/meshing/prime/autogen/surfacesearchstructs.py +++ b/src/ansys/meshing/prime/autogen/surfacesearchstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/surfaceutilities.py b/src/ansys/meshing/prime/autogen/surfaceutilities.py index 4d3d53ca1e..97ba5a744c 100644 --- a/src/ansys/meshing/prime/autogen/surfaceutilities.py +++ b/src/ansys/meshing/prime/autogen/surfaceutilities.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/surfaceutilitystructs.py b/src/ansys/meshing/prime/autogen/surfaceutilitystructs.py index df7db1b30c..bd936c68ab 100644 --- a/src/ansys/meshing/prime/autogen/surfaceutilitystructs.py +++ b/src/ansys/meshing/prime/autogen/surfaceutilitystructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/surfer.py b/src/ansys/meshing/prime/autogen/surfer.py index de5abff28e..9335164af8 100644 --- a/src/ansys/meshing/prime/autogen/surfer.py +++ b/src/ansys/meshing/prime/autogen/surfer.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/surferstructs.py b/src/ansys/meshing/prime/autogen/surferstructs.py index 0db815df8c..bdc5603150 100644 --- a/src/ansys/meshing/prime/autogen/surferstructs.py +++ b/src/ansys/meshing/prime/autogen/surferstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/thinvolumecontrol.py b/src/ansys/meshing/prime/autogen/thinvolumecontrol.py index b3bdc4e70c..94b8c02e4f 100644 --- a/src/ansys/meshing/prime/autogen/thinvolumecontrol.py +++ b/src/ansys/meshing/prime/autogen/thinvolumecontrol.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/thinvolumecontrolstructs.py b/src/ansys/meshing/prime/autogen/thinvolumecontrolstructs.py index 6cd0b26065..d524348c89 100644 --- a/src/ansys/meshing/prime/autogen/thinvolumecontrolstructs.py +++ b/src/ansys/meshing/prime/autogen/thinvolumecontrolstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/topodata.py b/src/ansys/meshing/prime/autogen/topodata.py index 01dbcde2bc..e2b34d1754 100644 --- a/src/ansys/meshing/prime/autogen/topodata.py +++ b/src/ansys/meshing/prime/autogen/topodata.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/topodatastructs.py b/src/ansys/meshing/prime/autogen/topodatastructs.py index af80c721d8..bc15bcd1f0 100644 --- a/src/ansys/meshing/prime/autogen/topodatastructs.py +++ b/src/ansys/meshing/prime/autogen/topodatastructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/toposearchstructs.py b/src/ansys/meshing/prime/autogen/toposearchstructs.py index 1629a4a43b..9eacd6579b 100644 --- a/src/ansys/meshing/prime/autogen/toposearchstructs.py +++ b/src/ansys/meshing/prime/autogen/toposearchstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/topoutilities.py b/src/ansys/meshing/prime/autogen/topoutilities.py index b6c2e3e8c7..436ca5eeab 100644 --- a/src/ansys/meshing/prime/autogen/topoutilities.py +++ b/src/ansys/meshing/prime/autogen/topoutilities.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/topoutilitystructs.py b/src/ansys/meshing/prime/autogen/topoutilitystructs.py index 99008cb05c..3a098bc683 100644 --- a/src/ansys/meshing/prime/autogen/topoutilitystructs.py +++ b/src/ansys/meshing/prime/autogen/topoutilitystructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/transform.py b/src/ansys/meshing/prime/autogen/transform.py index 7c27a98666..a41ee0993f 100644 --- a/src/ansys/meshing/prime/autogen/transform.py +++ b/src/ansys/meshing/prime/autogen/transform.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/transformstructs.py b/src/ansys/meshing/prime/autogen/transformstructs.py index 56df8ee2f9..8772177ad5 100644 --- a/src/ansys/meshing/prime/autogen/transformstructs.py +++ b/src/ansys/meshing/prime/autogen/transformstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/trimmedspline.py b/src/ansys/meshing/prime/autogen/trimmedspline.py index 019d4262ca..c109f2d2e5 100644 --- a/src/ansys/meshing/prime/autogen/trimmedspline.py +++ b/src/ansys/meshing/prime/autogen/trimmedspline.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/trimmedsplinestructs.py b/src/ansys/meshing/prime/autogen/trimmedsplinestructs.py index 32722898ad..49161082ca 100644 --- a/src/ansys/meshing/prime/autogen/trimmedsplinestructs.py +++ b/src/ansys/meshing/prime/autogen/trimmedsplinestructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/volumecontrol.py b/src/ansys/meshing/prime/autogen/volumecontrol.py index d81dd70101..168a80e7ad 100644 --- a/src/ansys/meshing/prime/autogen/volumecontrol.py +++ b/src/ansys/meshing/prime/autogen/volumecontrol.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/volumecontrolstructs.py b/src/ansys/meshing/prime/autogen/volumecontrolstructs.py index d5b4998065..32e630baf0 100644 --- a/src/ansys/meshing/prime/autogen/volumecontrolstructs.py +++ b/src/ansys/meshing/prime/autogen/volumecontrolstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/volumemeshtool.py b/src/ansys/meshing/prime/autogen/volumemeshtool.py index 54790d67d1..0192e9a44f 100644 --- a/src/ansys/meshing/prime/autogen/volumemeshtool.py +++ b/src/ansys/meshing/prime/autogen/volumemeshtool.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/volumemeshtoolstructs.py b/src/ansys/meshing/prime/autogen/volumemeshtoolstructs.py index 7c24be0b32..90b4cef91b 100644 --- a/src/ansys/meshing/prime/autogen/volumemeshtoolstructs.py +++ b/src/ansys/meshing/prime/autogen/volumemeshtoolstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/volumesearch.py b/src/ansys/meshing/prime/autogen/volumesearch.py index 710984d715..f96934793d 100644 --- a/src/ansys/meshing/prime/autogen/volumesearch.py +++ b/src/ansys/meshing/prime/autogen/volumesearch.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/volumesearchstructs.py b/src/ansys/meshing/prime/autogen/volumesearchstructs.py index f659075d6d..22925b8285 100644 --- a/src/ansys/meshing/prime/autogen/volumesearchstructs.py +++ b/src/ansys/meshing/prime/autogen/volumesearchstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/volumesweeper.py b/src/ansys/meshing/prime/autogen/volumesweeper.py index 08a051b90a..c4a2713226 100644 --- a/src/ansys/meshing/prime/autogen/volumesweeper.py +++ b/src/ansys/meshing/prime/autogen/volumesweeper.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/volumesweeperstructs.py b/src/ansys/meshing/prime/autogen/volumesweeperstructs.py index e62cc2c6b3..7f9cf6ff78 100644 --- a/src/ansys/meshing/prime/autogen/volumesweeperstructs.py +++ b/src/ansys/meshing/prime/autogen/volumesweeperstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/vtcomposer.py b/src/ansys/meshing/prime/autogen/vtcomposer.py index 45292db3c9..00c0e56e0e 100644 --- a/src/ansys/meshing/prime/autogen/vtcomposer.py +++ b/src/ansys/meshing/prime/autogen/vtcomposer.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/vtcomposerstructs.py b/src/ansys/meshing/prime/autogen/vtcomposerstructs.py index c08b20e426..7bdb8011c9 100644 --- a/src/ansys/meshing/prime/autogen/vtcomposerstructs.py +++ b/src/ansys/meshing/prime/autogen/vtcomposerstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/wrapper.py b/src/ansys/meshing/prime/autogen/wrapper.py index 92169dcee6..a9560ce32c 100644 --- a/src/ansys/meshing/prime/autogen/wrapper.py +++ b/src/ansys/meshing/prime/autogen/wrapper.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/wrappercontrol.py b/src/ansys/meshing/prime/autogen/wrappercontrol.py index edc2b2a12a..9490186792 100644 --- a/src/ansys/meshing/prime/autogen/wrappercontrol.py +++ b/src/ansys/meshing/prime/autogen/wrappercontrol.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/autogen/wrapperstructs.py b/src/ansys/meshing/prime/autogen/wrapperstructs.py index e567554282..a18bfb0455 100644 --- a/src/ansys/meshing/prime/autogen/wrapperstructs.py +++ b/src/ansys/meshing/prime/autogen/wrapperstructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/core/controldata.py b/src/ansys/meshing/prime/core/controldata.py index 2051522a9b..6835a34a62 100644 --- a/src/ansys/meshing/prime/core/controldata.py +++ b/src/ansys/meshing/prime/core/controldata.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/core/dynaexportutils.py b/src/ansys/meshing/prime/core/dynaexportutils.py index 721e199a7c..cb044632b3 100644 --- a/src/ansys/meshing/prime/core/dynaexportutils.py +++ b/src/ansys/meshing/prime/core/dynaexportutils.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/core/fileio.py b/src/ansys/meshing/prime/core/fileio.py index 18ede9c4bb..a531199184 100644 --- a/src/ansys/meshing/prime/core/fileio.py +++ b/src/ansys/meshing/prime/core/fileio.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy @@ -22,7 +23,9 @@ """Module for managing file inputs and outputs.""" import copy import json +import logging import traceback +from pathlib import Path from typing import List # isort: split @@ -63,6 +66,7 @@ WriteSizeFieldParams, ) from ansys.meshing.prime.core.model import Model +from ansys.meshing.prime.internals import yaml_converter from ansys.meshing.prime.params.primestructs import ErrorCode @@ -82,6 +86,52 @@ def __init__(self, model: Model): self._model = model super().__init__(model) + def _get_customization_schema_json(self, customization_file_name: str) -> str: + """Convert custom YAML schema to JSON and return the content as a string. + + This runs on the client side before Abaqus import or MAPDL export so + the server side C++ code can directly consume the JSON schema content. + + Parameters + ---------- + customization_file_name : str + Path to the YAML customization file. + + Returns + ------- + str + JSON string content of the converted schema, or empty string if + no custom YAML schema is found or conversion fails. + """ + logger = getattr(self._model, "python_logger", logging.getLogger(__name__)) + + yaml_file = Path(customization_file_name) + if not yaml_file.is_file(): + return "" + + try: + schema_content = yaml_converter.convert_yaml_to_json_string(str(yaml_file)) + logger.info("Converted custom YAML schema to JSON: %s", yaml_file) + return schema_content + except FileNotFoundError as ex: + logger.warning( + "Custom YAML schema file not found: %s", + ex, + ) + return "" + except ValueError as ex: + logger.warning( + "Failed to convert custom YAML schema to JSON: %s", + ex, + ) + return "" + except Exception as ex: + logger.warning( + "Unexpected error converting custom YAML schema: %s", + ex, + ) + return "" + def read_pmdat(self, file_name: str, file_read_params: FileReadParams) -> FileReadResults: """Read a PyPrimeMesh data (PMDAT) file. @@ -327,6 +377,16 @@ def export_mapdl_cdb( >>> results = file_io.export_mapdl_cdb("/tmp/file.cdb", params) """ params = copy.copy(params) + # Support hidden transport fields through custom params when these + # members are not part of the released client API surface. + customization_file = getattr(params, "customization_file_name", None) + if not customization_file: + customization_file = params._custom_params.get("customization_file_name") + if customization_file: + params._custom_params["customization_schema"] = self._get_customization_schema_json( + customization_file + ) + params._custom_params["customization_file_name"] = customization_file with utils.file_write_context(self._model, file_name) as temp_file_name: args = {"partId": 0} command_name = "PrimeMesh::FileIO/GetAbaqusSimulationData" diff --git a/src/ansys/meshing/prime/core/mapdlcdbexportutils.py b/src/ansys/meshing/prime/core/mapdlcdbexportutils.py index 01f61d31e3..e7b209a320 100644 --- a/src/ansys/meshing/prime/core/mapdlcdbexportutils.py +++ b/src/ansys/meshing/prime/core/mapdlcdbexportutils.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy @@ -102,12 +103,8 @@ def field_less_1_str(self, string): return field -class _ModelInformation: - model_simulation_data = None - - class _TimePointsProcessor: - __slots__ = ('_time_data', '_file_name', '_formatter', '_model', '_logger') + __slots__ = ('_time_data', '_file_name', '_formatter', '_model', '_logger', '_points') def __init__(self, model: prime.Model, data, file_name=''): self._time_data = data @@ -115,6 +112,7 @@ def __init__(self, model: prime.Model, data, file_name=''): self._formatter = _FormatEntities() self._model = model self._logger = model.python_logger + self._points = [] def write_timepoint_table_to_file(self, mapdl_commands): with open(self._file_name, 'a') as file_time_pt: @@ -134,6 +132,9 @@ def get_all_timepoints_commands(self): ) return time_pt_commands + def _get_list_of_floats(self): + return self._points + def _get_commands(self, time_pt_table_name, time_pt_table_data): mapdl_commands = '' params = time_pt_table_data['Parameters'] @@ -147,7 +148,10 @@ def _get_commands(self, time_pt_table_name, time_pt_table_data): f"Warning: timepoint table with argument generate is not processed." ) pt_data = time_pt_table_data['Data']['time_points'] - formatter_pt_data = [f"{self._formatter.field_str(pt)}" for pt in pt_data] + self._points = [float(pt) for pt in pt_data if float(pt) != 0.0] + formatter_pt_data = [ + f"{self._formatter.field_str(str(float(pt)))}" for pt in pt_data if float(pt) != 0.0 + ] all_values = [] all_values.extend(formatter_pt_data) format_output = "" @@ -155,8 +159,8 @@ def _get_commands(self, time_pt_table_name, time_pt_table_data): values = all_values[i : i + 4] format_output += ''.join(values) + '\n' tpname = get_modified_component_name(time_pt_table_name) - mapdl_commands += f"*DIM, {tpname}, ARRAY, {len(pt_data)}, 1, 1,\n" - mapdl_commands += f"*PREAD, {tpname}, {len(pt_data)}\n" + mapdl_commands += f"*DIM, {tpname}, ARRAY, {len(formatter_pt_data)}, 1, 1,\n" + mapdl_commands += f"*PREAD, {tpname}, {len(formatter_pt_data)}\n" mapdl_commands += format_output mapdl_commands += "END PREAD\n" return mapdl_commands @@ -632,6 +636,7 @@ class _MaterialProcessor: '_model', '_logger', '_skip_comments', + '_params', ) def __init__( @@ -641,12 +646,14 @@ def __init__( zone_data, hm_comments=False, skip_comments=True, + params=None, ): self._raw_materials_data = raw_materials_data self._zone_data = zone_data self._mat_id = 0 self._enable_hm_comments = hm_comments self._material_linked_to_zone_type = {} + self._params = params self._cohezive_zone_thickness_data = {} self._property_function_map = { 'DENSITY': self._process_density, @@ -674,14 +681,21 @@ def _map_zone_type_with_material(self): if 'Type' not in zone_details: self._logger.warning(f'Warning: Type is not specified for zone {zone}') continue - if zone_details['Type'] not in ['Shell', 'Solid', 'Cohesive', 'Beam']: + if zone_details['Type'] not in [ + 'Shell', + 'Solid', + 'Cohesive', + 'Beam', + 'Gasket', + 'Membrane', + ]: self._logger.warning( f"Warning: Type of {zone} in not mapped to " f"material ({zone_details['Type']})" ) self._logger.info(zone_details['Type']) continue - if 'Material' not in zone_details: + if 'Material' not in zone_details and zone_details['Type'] != 'Gasket': self._logger.warning(f'Warning: Material is not specified for zone {zone}') continue if zone_details['Type'] == 'Cohesive': @@ -697,25 +711,29 @@ def _map_zone_type_with_material(self): self._cohezive_zone_thickness_data[zone_details['Material']]['Thickness'] = ( zone_details['Thickness'] ) - if zone_details['Material'] in self._material_linked_to_zone_type: - if self._material_linked_to_zone_type[zone_details['Material']] in [ - 'Shell', - 'Solid', - 'beam', - ]: - if zone_details['Type'] == 'Cohesive': - self._logger.warning( - f"Warning: Material:'{zone_details['Material']}' is used for " - f" {zone_details['Type']} and one of these [Shell, Solid, beam]" - ) - elif self._material_linked_to_zone_type[zone_details['Material']] == 'Cohesive': - if zone_details['Type'] in ['Shell', 'Solid', 'beam']: - self._logger.warning( - f"Warning: Material:'{zone_details['Material']}' is used for " - f"{zone_details['Type']} and cohesive" - ) - else: - self._material_linked_to_zone_type[zone_details['Material']] = zone_details['Type'] + if "Material" in zone_details: + if zone_details['Material'] in self._material_linked_to_zone_type: + if self._material_linked_to_zone_type[zone_details['Material']] in [ + 'Shell', + 'Solid', + 'beam', + 'Membrane', + ]: + if zone_details['Type'] == 'Cohesive': + self._logger.warning( + f"Warning: Material:'{zone_details['Material']}' is used for " + f" {zone_details['Type']} and one of these [Shell, Solid, beam]" + ) + elif self._material_linked_to_zone_type[zone_details['Material']] == 'Cohesive': + if zone_details['Type'] in ['Shell', 'Solid', 'beam', 'Membrane']: + self._logger.warning( + f"Warning: Material:'{zone_details['Material']}' is used for " + f"{zone_details['Type']} and cohesive" + ) + else: + self._material_linked_to_zone_type[zone_details['Material']] = zone_details[ + 'Type' + ] def get_all_material_commands(self): mapdl_text_data_list = [] @@ -1311,6 +1329,7 @@ def _process_expansion_data(self, property_dict, material, mat_id): zero = float(parameters['ZERO']) expansion_data += f"MPTEMP,,,,,,,,\n" expansion_data += f"MPAMOD, {mat_id}, {zero},\t! C\n" + expansion_data += "\n\n" return expansion_data def _process_conductivity_data(self, property_dict, material, mat_id): @@ -1526,8 +1545,12 @@ def _process_elastic_modulus(self, property_dict, material, mat_id): elastic_modulus += f"TBDATA, 1, {e}, {v}\n" else: if self._material_linked_to_zone_type[material] == 'Cohesive': - elastic_modulus += f"TB, ELAS, {mat_id}, 1, 2,ISOT\n" - elastic_modulus += f"TBDATA, 1, {youngs_mod[0]}, {nu[0]}\n" + if int(str(self._params.target_ansys_version)[-3:]) >= 251: + elastic_modulus += f"TB, ELAS, {mat_id}, 1, 2,ISOT\n" + elastic_modulus += f"TBDATA, 1, {youngs_mod[0]}, {nu[0]}\n" + else: + elastic_modulus += f"TB, GASKET, {mat_id}, 1, 2, ELAS\n" + elastic_modulus += f"TBDATA, 1, {youngs_mod[0]}, {nu[0]}\n" else: elastic_modulus += f"MP,EX,{mat_id},{youngs_mod[0]}\n" elastic_modulus += f"MP,NUXY,{mat_id},{nu[0]}\n" @@ -1676,6 +1699,20 @@ def _process_elastic_modulus(self, property_dict, material, mat_id): return '' return elastic_modulus + def _is_negative_stress_strain_slope_present(self, stress, strain, data_points): + + if len(stress) != len(strain): + self._logger.warning(f"Inconsistent stress and strain values for *PLASTIC") + return False + + for i in range(data_points): + if i + 2 > data_points: + break + if float(stress[i + 1]) < float(stress[i]) and float(strain[i + 1]) > float(strain[i]): + return True + + return False + def _process_plastic_data(self, property_dict, material, mat_id): def fmt(val): try: @@ -1762,7 +1799,8 @@ def fmt(val): if hardening == "ISOTROPIC": lines.append(f"TB,PLAS,{mat_id},,{int(data_points)},MISO") use_tbd = False - + if self._is_negative_stress_strain_slope_present(stresses, strains, int(data_points)): + lines.append(f"TBEO,NEGSLOPE,1") curr_temp = None start = 1 num_prev = 0 @@ -1982,6 +2020,293 @@ def _process_hyperelastic_data(self, property_dict, material, mat_id): return hyperelastic_data +class _GasketMaterialProcessor: + __slots__ = ( + '_raw_gasket_materials_data', + '_sim_data', + '_mat_id', + '_enable_hm_comments', + '_property_function_map', + '_gasket_zone_thickness_data', + '_gasket_zone_gap_data', + '_model', + '_logger', + '_skip_comments', + ) + + def __init__( + self, + model: prime.Model, + raw_gasket_materials_data, + sim_data=None, + hm_comments=False, + skip_comments=True, + ): + self._raw_gasket_materials_data = raw_gasket_materials_data + self._sim_data = sim_data + self._mat_id = 0 + self._gasket_zone_thickness_data = {} + self._gasket_zone_gap_data = {} + self._enable_hm_comments = hm_comments + self._property_function_map = { + "GasketElasticity": self._process_gasket_elasticity, + "GasketThicknessBehavior": self._process_gasket_thickness_behavior, + "Expansion": self._process_expansion_data, + } + self._model = model + self._logger = model.python_logger + self._skip_comments = skip_comments + + def _map_zone_with_gasket_behavior(self): + if self._sim_data.get("GasketSection") is None: + return + for zone in self._sim_data.get("GasketSection"): + zone_details = self._sim_data.get("GasketSection")[zone] + parameters = zone_details.get("Parameters", {}) + zone_data = zone_details.get("Data", {}) + if "BEHAVIOR" in parameters: + behavior = parameters["BEHAVIOR"] + if zone_data is not None: + if "initial_gap" in zone_data: + self._gasket_zone_gap_data.setdefault(behavior, []).append( + zone_data['initial_gap'] + ) + if "initial_thickness" in zone_data: + self._gasket_zone_thickness_data.setdefault(behavior, []).append( + zone_data['initial_thickness'] + ) + + def get_all_material_commands(self): + mapdl_text_data_list = [] + self._map_zone_with_gasket_behavior() + if self._raw_gasket_materials_data: + for material in self._raw_gasket_materials_data: + self._logger.info(f"Processing Material: {material}") + mapdl_text_data = self._get_mat_comands(material) + mapdl_text_data_list.append(mapdl_text_data) + return '\n\n'.join(mapdl_text_data_list) + + def _get_mat_comands(self, material): + mat_data = self._raw_gasket_materials_data[material] + self._mat_id = mat_data['id'] + mapdl_text_data = "" + hm_comment = self._enable_hm_comments and self._skip_comments is False + if hm_comment: + mapdl_text_data += "!!HMNAME MAT \n" + mapdl_text_data += f'!!{self._mat_id:>10} "{material}"\n' + else: + mapdl_text_data += f"! material '{material}' \n" + if "Parameters" in mat_data: + self._logger.warning(f"Parameter on Material {material} are not processed.") + for prop in mat_data: + if prop == 'id': + continue + if prop in self._property_function_map: + function = self._property_function_map[prop] + mapdl_text_data += function(mat_data[prop], material, self._mat_id) + else: + if prop not in ['HMComments', 'Comments']: + self._logger.warning( + f"The property {prop} for Material {material} is not processed." + ) + return mapdl_text_data + + def _process_gasket_elasticity(self, property_dicts, material, mat_id): + gasket_elasticity_data = "" + + for property_dict in property_dicts: + parameters = property_dict.get("Parameters", {}) + data = property_dict.get("Data", {}) + + component = parameters.get("COMPONENT", "TRANSVERSE SHEAR") + + temperature = data.get("Temperature", []) + + if component == "TRANSVERSE SHEAR": + shear_stiffness = data.get("Shear stiffness", []) + + if not temperature: + temperature = [None] * len(shear_stiffness) + temp = None + gasket_elasticity_data += f"TB, GASKET, {mat_id}, , 3, TSS\n" + for s, t in zip(shear_stiffness, temperature): + if temp != t: + temp = t + if temp is not None: + gasket_elasticity_data += f"TBTEMP, {temp}\n" + gasket_elasticity_data += f"TBDATA, 1, {s}, {s}, 0\n" + gasket_elasticity_data += f"\n" + + if component == "MEMBRANE": + youngs_modulus = data.get("Youngs modulus", []) + poisson_ratio = data.get("Poisson ratio", []) + + if not temperature: + temperature = [None] * len(youngs_modulus) + + temp = None + gasket_elasticity_data += f"TB, GASKET, {mat_id}, , 6, TSMS\n" + for e, v, t in zip(youngs_modulus, poisson_ratio, temperature): + if temp != t: + temp = t + if temp is not None: + gasket_elasticity_data += f"TBTEMP, {temp}\n" + gasket_elasticity_data += f"TBDATA, 1, , , {e}, {e}, , {v}\n" + gasket_elasticity_data += f"\n" + + return gasket_elasticity_data + + def _process_expansion_data(self, property_dicts, material, mat_id): + + expansion_data = _MaterialProcessor._process_expansion_data( + self, property_dicts, material, mat_id + ) + + return expansion_data + + def _process_gasket_thickness_behavior(self, property_dicts, material, mat_id): + gasket_thickness_behavior_data = "" + + # print(f"_process_gasket_thickness_behavior {material}") + # print(property_dicts) + + def _to_float(v, default=None): + try: + return float(v) + except (TypeError, ValueError): + return default + + def _as_list(v): + if v is None: + return [] + return v if isinstance(v, list) else [v] + + def _fmt(v): + fv = _to_float(v, 0.0) + return f"{fv:.12g}" + + for property_dict in property_dicts: + parameters = property_dict.get("Parameters", {}) + + scaling_factor = 1e-3 + if "SCALING FACTOR" in parameters: + scaling_factor = _to_float(parameters["SCALING FACTOR"], 1e-3) + + if material in self._gasket_zone_gap_data and self._gasket_zone_gap_data[material]: + if len(self._gasket_zone_gap_data[material]) > 1: + self._logger.warning( + f"Multiple initial gap values are provided for material {material} " + f"from the zone data, only the first value is used for processing " + f"gasket thickness behavior." + ) + initial_gap = self._gasket_zone_gap_data[material][0] + else: + initial_gap = 0.0 + + data = property_dict.get("Data", {}) + + data_type = parameters.get("TYPE", "ELASTIC-PLASTIC") + data_variables = parameters.get("VARIABLE", "STRESS") + data_direction = parameters.get("DIRECTION", "LOADING") + data_interpolation = parameters.get("INTERPOLATION", "NORMALIZED") + + if data_direction == 'LOADING': + gasket_thickness_behavior_data += f"TB, GASKET, {mat_id}, 1, , PARA\n" + gasket_thickness_behavior_data += f"TBDATA, 1, {initial_gap}, {scaling_factor}, 0\n" + gasket_thickness_behavior_data += f"\n" + + derection_map = {"LOADING": "COMP", "UNLOADING": "NUNL"} + + temperature = data.get("Temperature", []) + + if data_variables == 'STRESS': + pressure = data.get("Pressure", []) + closure = data.get("Closure", []) + else: + pressure = data.get("Force", []) + closure = data.get("Closure", []) + + if data_type == 'ELASTIC-PLASTIC': + plastic_closure = data.get("Plastic Closure", []) + else: + plastic_closure = data.get("Maximum Closure", []) + + if not temperature: + temperature = [None] * len(pressure) + if not plastic_closure: + plastic_closure = [None] * len(pressure) + + temp = None + pc = None + + datapoints = len(pressure) // len(list(set(temperature))) + if data_direction == 'LOADING': + gasket_thickness_behavior_data += ( + f"TB, GASKET, {mat_id}, , {datapoints}, {derection_map[data_direction]}\n" + ) + for i in range(len(pressure)): + if temp != temperature[i]: + temp = temperature[i] + gasket_thickness_behavior_data += f"TBTEMP, {temp}\n" + gasket_thickness_behavior_data += f"TBPT, ,{closure[i]}, {pressure[i]}\n" + + else: + gasket_unloading_curve_data = "" + pt_counter = 0 + for i in range(0, len(pressure)): + if temp != temperature[i] or pc != plastic_closure[i] or closure[i] == 0.0: + if ( + pt_counter > 0 + and f"TB, GASKET, {mat_id}, , 0, {derection_map[data_direction]}\n" + in gasket_thickness_behavior_data + ): + gasket_thickness_behavior_data = gasket_thickness_behavior_data.replace( + f"TB, GASKET, {mat_id}, , 0, {derection_map[data_direction]}\n", + f"TB, GASKET, {mat_id}, , {pt_counter}, " + f"{derection_map[data_direction]}\n", + ) + gasket_thickness_behavior_data += gasket_unloading_curve_data + gasket_unloading_curve_data = "" + gasket_thickness_behavior_data += f"\n" + gasket_thickness_behavior_data += ( + f"TB, GASKET, {mat_id}, , 0, {derection_map[data_direction]}\n" + ) + pt_counter = 0 + if temp is not None: + gasket_thickness_behavior_data += f"TBTEMP, {temp}\n" + + temp = temperature[i] + pc = plastic_closure[i] + + gasket_unloading_curve_data = ( + f"TBPT, ,{closure[i]}, {pressure[i]}\n" + gasket_unloading_curve_data + ) + pt_counter += 1 + if ( + f"TB, GASKET, {mat_id}, , 0, {derection_map[data_direction]}\n" + in gasket_thickness_behavior_data + ): + gasket_thickness_behavior_data = gasket_thickness_behavior_data.replace( + f"TB, GASKET, {mat_id}, , 0, {derection_map[data_direction]}\n", + f"TB, GASKET, {mat_id}, , {pt_counter}, {derection_map[data_direction]}\n", + ) + gasket_thickness_behavior_data += gasket_unloading_curve_data + return gasket_thickness_behavior_data + + def get_material_commands_by_material_name(self, mat_name): + mapdl_text_data = self._get_mat_comands(mat_name) + return mapdl_text_data + + def get_material_commands_by_material_id(self, id): + mapdl_text_data = '' + for material in self._raw_gasket_materials_data: + mat_data = self._raw_gasket_materials_data[material] + if mat_data['id'] == id: + mapdl_text_data = self._get_mat_comands(material) + break + return mapdl_text_data + + class _JointMaterialProcessor: __slots__ = ( '_raw_joint_materials_data', @@ -2566,6 +2891,9 @@ class _BoundaryProcessor: '_base_id_counter', '_step_removed', '_logger', + '_boundary_component_data', + 'current_boundary_component', + 'op_new', ) def __init__( @@ -2577,6 +2905,7 @@ def __init__( sim_data=None, need_base_id=False, step_removed=True, + previous_component_data={}, ): self._simulation_data = sim_data self._boundaries_data = data @@ -2590,6 +2919,9 @@ def __init__( self._base_id_mapping = {} self._base_id_counter = 1 self._logger = model.python_logger + self._boundary_component_data = previous_component_data + self.current_boundary_component = {} + self.op_new = False def get_ampl_commands(self): return self._ampl_commands @@ -2601,8 +2933,12 @@ def get_all_boundary_commands(self): for boundary_data in boundaries_data: boundary_commands += self._get_commands(boundary_data, boundary_counter) boundary_counter += 1 + boundary_commands += self._get_ddele() return boundary_commands + def get_boundary_component_data(self): + return self.current_boundary_component + def get_boundary_commands_by_id(self, boundary_id): pass @@ -2619,7 +2955,10 @@ def get_boundary_comp_name_with_base_motion(self, base_motion_name): for data_line in data_lines: comp_names.append( get_modified_component_name( - str(data_line['node_set']), 'NSET', self._simulation_data + str(data_line['node_set']), + 'NSET', + self._simulation_data, + self._logger, ) ) else: @@ -2629,12 +2968,28 @@ def get_boundary_comp_name_with_base_motion(self, base_motion_name): for data_line in data_lines: comp_names.append( get_modified_component_name( - str(data_line['node_set']), 'NSET', self._simulation_data + str(data_line['node_set']), + 'NSET', + self._simulation_data, + self._logger, ) ) return comp_names + def _get_ddele(self): + ddele_str = "" + if self.op_new and self._boundary_component_data: + for _c, _dof in self._boundary_component_data.items(): + if _c in self.current_boundary_component: + for _d in list(set(_dof).difference(set(self.current_boundary_component[_c]))): + ddele_str += f"DDELE, {_c}, {_d}\n" + + if not self._step_removed: + boundary_commands += ",,,FORCE\n" + # boundary_commands += "OUTRES,RSOL,1\n" + return ddele_str + def _get_commands(self, boundary_data, boundary_counter): boundary_commands = '' dof_map = { @@ -2665,14 +3020,17 @@ def _get_commands(self, boundary_data, boundary_counter): base_name = None fixed = False boundary_type = 'DISPLACEMENT' + current_boundary_component = {} if 'Parameters' in boundary_data and boundary_data['Parameters'] is not None: params = boundary_data['Parameters'] - if 'OP' in params and params['OP'] == 'NEW' and self._ddele_added == False: - self._ddele_added = True - boundary_commands += "DDELE,ALL,ALL" - if not self._step_removed: - boundary_commands += ",,,FORCE\n" - boundary_commands += "OUTRES,RSOL,1\n" + if 'OP' in params and params['OP'] == 'NEW': + self.op_new = True + # if 'OP' in params and params['OP'] == 'NEW' and self._ddele_added == False: + # self._ddele_added = True + # boundary_commands += "DDELE,ALL,ALL" + # if not self._step_removed: + # boundary_commands += ",,,FORCE\n" + # boundary_commands += "OUTRES,RSOL,1\n" boundary_commands += "\n" if 'AMPLITUDE' in params: @@ -2705,9 +3063,12 @@ def _get_commands(self, boundary_data, boundary_counter): last = int(data_line['last_degree']) + 1 if amplitude is not None: modified_amplitude_name = "AMPL_BOUNDARY" - applied_on = get_modified_component_name( - str(data_line['node_set']), 'NSET', self._simulation_data - ) + if str(data_line['node_set']).isnumeric(): + applied_on = get_modified_component_name(str(data_line['node_set'])) + else: + applied_on = get_modified_component_name( + str(data_line['node_set']), 'NSET', self._simulation_data + ) ampl_processor = _AmplitudeProcessor( self._model, self._simulation_data["Amplitude"] ) @@ -2732,16 +3093,20 @@ def _get_commands(self, boundary_data, boundary_counter): cmname = data_line['node_set'] else: cmname = get_modified_component_name( - data_line['node_set'], 'NSET', self._simulation_data + data_line['node_set'], 'NSET', self._simulation_data, self._logger ) boundary_commands += f"D, {cmname}, " - + if cmname not in self.current_boundary_component: + self.current_boundary_component[cmname] = [] if boundary_type == 'VELOCITY': boundary_commands += f"{vel_map[i]}, " + self.current_boundary_component[cmname].append(vel_map[i]) elif boundary_type == 'ACCELERATION': boundary_commands += f"{acc_map[i]}, " + self.current_boundary_component[cmname].append(acc_map[i]) else: boundary_commands += f"{dof_map[i]}, " + self.current_boundary_component[cmname].append(dof_map[i]) if fixed: boundary_commands += f"%_FIX%" elif self._need_base_id: @@ -2768,6 +3133,7 @@ def _get_commands(self, boundary_data, boundary_counter): else: boundary_commands += f"{mag}" boundary_commands += "\n" + return boundary_commands @@ -2806,58 +3172,84 @@ def _get_commands(self, dload_data): op = None if 'Parameters' in dload_data and dload_data['Parameters'] is not None: params = dload_data['Parameters'] - if 'OP' in params: - if params['OP'] == 'NEW': - op = 'NEW' - if len(params) > 1: - self._logger.warning(f"Warning: parameter on DLOAD keyword are not processed") - else: - self._logger.warning(f"Warning: parameter on DLOAD keyword are not processed") + + if params.get('OP') == 'NEW': + op = 'NEW' + if len(params) > 1: + self._logger.warning("Warning: parameter on DLOAD keyword are not processed") data_lines = dload_data['Data'] - mag = 0 + load_type = None - elset = None - x_mag = 0 - y_mag = 0 - z_mag = 0 + mag = 0.0 + + # Stores acceleration per ELSET + elset_accel = {} + # Global acceleration (ACEL) + x_mag_accel = y_mag_accel = z_mag_accel = 0.0 + elset_used = False + for data_line in data_lines: - if len(data_line) == 0: + if not data_line: continue + elset = None if 'element_number_or_set' in data_line: - elset = get_modified_component_name( - data_line['element_number_or_set'], 'ELSET', self._simulation_data - ) - if 'magnitude' in data_line: - mag = float(data_line['magnitude']) + if str(data_line['element_number_or_set']).isnumeric(): + elset = get_modified_component_name(str(data_line['element_number_or_set'])) + else: + elset = get_modified_component_name( + data_line['element_number_or_set'], + 'ELSET', + self._simulation_data, + self._logger, + ) if 'type' in data_line: load_type = data_line['type'] + if 'magnitude' in data_line: + mag = float(data_line['magnitude']) + if load_type == "GRAV": - x = 0.0 - y = 0.0 - z = 0.0 - if 'x' in data_line: - x = float(data_line['x']) - if 'y' in data_line: - y = float(data_line['y']) - if 'z' in data_line: - z = float(data_line['z']) - denominator_squared = x**2 + y**2 + z**2 - if denominator_squared == 0: - norm = 1 # Or some other appropriate value + x = float(data_line.get('x', 0.0)) + + y = float(data_line.get('y', 0.0)) + + z = float(data_line.get('z', 0.0)) + denominator_squared = x * x + y * y + z * z + norm = 1.0 if denominator_squared == 0 else 1.0 / math.sqrt(denominator_squared) + ax = -norm * x * mag + ay = -norm * y * mag + az = -norm * z * mag + # ELSET-SPECIFIC CASE + if elset: + elset_used = True + if elset not in elset_accel: + elset_accel[elset] = [0.0, 0.0, 0.0] + elset_accel[elset][0] += ax + elset_accel[elset][1] += ay + elset_accel[elset][2] += az + + # GLOBAL CASE else: - norm = 1 / math.sqrt(denominator_squared) - x_mag += -norm * x * mag - y_mag += -norm * y * mag - z_mag += -norm * z * mag - if elset: - if op == 'NEW': - dload_commands = f"CMACEL, {elset}, 0.0, 0.0, 0.0 \n" - dload_commands += f"CMACEL, {elset}, {x_mag}, {y_mag}, {z_mag}\n" - else: + x_mag_accel += ax + y_mag_accel += ay + z_mag_accel += az + else: + self._logger.warning(f"*DLOAD of type = " f"{load_type} is not processed.") + # print(elset_accel) + # ELSET COMMANDS + if elset_accel: + for elset, (ax, ay, az) in elset_accel.items(): + if op == 'NEW': + dload_commands += f"CMACEL, {elset}, 0.0, 0.0, 0.0\n" + dload_commands += ( + f"CMACEL, {elset}, {elset_accel[elset][0]}, " + f"{elset_accel[elset][1]}, {elset_accel[elset][2]}\n" + ) + # WRITE GLOBAL COMMAND + if x_mag_accel != 0.0 or y_mag_accel != 0.0 or z_mag_accel != 0.0: if op == 'NEW': - dload_commands = "ACEL, 0.0, 0.0, 0.0 \n" - dload_commands += f"ACEL, {x_mag}, {y_mag}, {z_mag}\n" - dload_commands += "\n" + dload_commands += "ACEL, 0.0, 0.0, 0.0\n" + dload_commands += f"ACEL, {x_mag_accel}, {y_mag_accel}, {z_mag_accel}\n" + return dload_commands @@ -2874,6 +3266,8 @@ class _CloadProcessor: '_ampl_commands', '_model', '_logger', + '_previous_cload_component_data', + '_current_cload_component_data', ) def __init__( @@ -2885,6 +3279,7 @@ def __init__( step_MSUP=False, modal_load_vectors={}, sim_data=None, + previous_component_data=None, ): self._simulation_data = sim_data self._modal_load_vectors = modal_load_vectors @@ -2897,6 +3292,8 @@ def __init__( self._ampl_commands = '' self._model = model self._logger = model.python_logger + self._previous_cload_component_data = previous_component_data + self._current_cload_component_data = {} def get_ampl_commands(self): return self._ampl_commands @@ -2912,6 +3309,13 @@ def get_all_cload_commands(self): cload_commands += f'\n' for cload_data in cloads_data: cload_commands += self._get_commands(cload_data) + if self._fedele_added and cloads_data and not self._step_MSUP: + fdele_commands = '' + for key, val in self._previous_cload_component_data.items(): + if key not in self._current_cload_component_data: + for dof in val: + fdele_commands += f"F, {key}, {dof}, 0\n" + cload_commands = fdele_commands + cload_commands if self._step_MSUP: for i in list( set(self._modal_load_vectors.keys()).difference( @@ -2919,7 +3323,7 @@ def get_all_cload_commands(self): ) ): cload_commands += f"LVSCALE, 0, {i}\n" - return cload_commands + return cload_commands, self._current_cload_component_data def get_cload_commands_by_id(self, cload_id): pass @@ -2936,13 +3340,16 @@ def _get_commands(self, cload_data): 6: 'MZ', } amplitude = None + real = True if 'Parameters' in cload_data and cload_data['Parameters'] is not None: params = cload_data['Parameters'] if 'OP' in params and params['OP'] == 'NEW' and self._fedele_added == False: self._fedele_added = True - cload_commands += "FDELE,ALL,ALL \n" + # cload_commands += "FDELE,ALL,ALL \n" if 'AMPLITUDE' in params: amplitude = params['AMPLITUDE'] + if "IMAGINARY" in params: + real = False data_lines = cload_data['Data'] for data_line in data_lines: if len(data_line) == 0: @@ -2953,9 +3360,12 @@ def _get_commands(self, cload_data): mag = float(data_line['magnitude']) if amplitude is not None: modified_amplitude_name = "AMPL_CLOAD" - applied_on = get_modified_component_name( - str(data_line['node_set']), 'NSET', self._simulation_data - ) + if str(data_line['node_set']).isnumeric(): + applied_on = get_modified_component_name(str(data_line['node_set'])) + else: + applied_on = get_modified_component_name( + str(data_line['node_set']), 'NSET', self._simulation_data + ) ampl_processor = _AmplitudeProcessor( self._model, self._simulation_data["Amplitude"] ) @@ -2970,11 +3380,22 @@ def _get_commands(self, cload_data): self._ampl_commands += ampl_commands if data_line['node_set'].isnumeric(): cload_commands += f"F, {data_line['node_set']}, {dof_map[dof]}, " + if data_line['node_set'] not in self._current_cload_component_data: + self._current_cload_component_data[data_line['node_set']] = [dof_map[dof]] + else: + self._current_cload_component_data[data_line['node_set']].append(dof_map[dof]) else: cmname = get_modified_component_name( - data_line['node_set'], 'NSET', self._simulation_data + data_line['node_set'], 'NSET', self._simulation_data, self._logger ) + if cmname not in self._current_cload_component_data: + self._current_cload_component_data[cmname] = [dof_map[dof]] + else: + self._current_cload_component_data[cmname].append(dof_map[dof]) cload_commands += f"F, {cmname}, {dof_map[dof]}, " + + if not real: + cload_commands += ", " if amplitude is not None: ac = _AmplitudeProcessor._amplitude_count cload_commands += f"%{modified_amplitude_name}_{ac}%" @@ -2982,13 +3403,22 @@ def _get_commands(self, cload_data): cload_commands += f"{mag}" cload_commands += "\n" for dict_key, val in self._modal_load_vectors.items(): - if ( - get_modified_component_name(val["SET"], 'NSET', self._simulation_data) - == get_modified_component_name( - data_line['node_set'], 'NSET', self._simulation_data + if val["SET"].isnumeric(): + lv_comp = val["SET"] + else: + lv_comp = get_modified_component_name( + val["SET"], 'NSET', self._simulation_data, self._logger ) - and val["COMP"] == dof_map[dof] - ): + if data_line['node_set'].isnumeric(): + f_comp = data_line['node_set'] + else: + f_comp = get_modified_component_name( + data_line['node_set'], + 'NSET', + self._simulation_data, + self._logger, + ) + if lv_comp == f_comp and val["COMP"] == dof_map[dof] and val["REAL"] == real: cload_lv_scale_commands += f"LVSCALE, 0, {dict_key}\n" self._load_vestors_in_current_step.append(dict_key) if amplitude: @@ -3094,9 +3524,17 @@ def _get_commands(self, connector_motion_data): mag = float(data_line['magnitude']) if amplitude is not None: modified_amplitude_name = "AMPL_CONNECTOR_MOTION" - applied_on = get_modified_component_name( - str(data_line['element_number_or_set']), 'ELSET', self._simulation_data - ) + if str(data_line['element_number_or_set']).isnumeric(): + applied_on = get_modified_component_name( + str(data_line['element_number_or_set']) + ) + else: + applied_on = get_modified_component_name( + str(data_line['element_number_or_set']), + 'ELSET', + self._simulation_data, + self._logger, + ) ampl_processor = _AmplitudeProcessor( self._model, self._simulation_data["Amplitude"] ) @@ -3110,14 +3548,15 @@ def _get_commands(self, connector_motion_data): ) if data_line['element_number_or_set'].isnumeric() == False: dls = get_modified_component_name( - data_line['element_number_or_set'], 'ELSET', self._simulation_data + data_line['element_number_or_set'], + 'ELSET', + self._simulation_data, + self._logger, ) connector_motion_commands += f"CMSEL, S, {dls}, ELEM\n" connector_motion_commands += f"DJ, ALL, " else: - cmname = get_modified_component_name( - str(data_line['element_number_or_set']), 'ELSET', self._simulation_data - ) + cmname = get_modified_component_name(str(data_line['element_number_or_set'])) connector_motion_commands += f"DJ, {cmname}, " if connnector_motion_type == 'DISPLACEMENT': connector_motion_commands += f"{dof_map[dof]}, " @@ -3272,18 +3711,27 @@ def _get_commands(self, base_motion_data): temp_count = 0 lists_bc_base = None + inner_break = False for key, val in self._base_id_mapping.items(): if not base_name: - if val[0]['BaseName'] is None: - temp_count += 1 - if temp_count == self._base_motion_counter: + for base in val: + if base['BaseName'] is None: + temp_count += 1 + if temp_count == self._base_motion_counter: + lists_bc_base = self._base_id_mapping[key] + self._base_motion_counter += 1 + inner_break = True + break + if inner_break: + break + else: + for base in val: + if base['BaseName'] == base_name: lists_bc_base = self._base_id_mapping[key] - self._base_motion_counter += 1 + inner_break = True break - else: - if val[0]['BaseName'] == base_name: - lists_bc_base = self._base_id_mapping[key] + if inner_break: break if lists_bc_base is not None: @@ -3507,7 +3955,9 @@ def get_monitor_commands(self): if node.isnumeric(): str_node = node else: - cmname = get_modified_component_name(node, 'NSET', self._simulation_data) + cmname = get_modified_component_name( + node, 'NSET', self._simulation_data, self._logger + ) monitor_commands += f"CMSEL,S,{cmname},NODE\n" monitor_commands += f"node_id = NDNEXT(0)\n" monitor_commands += f"ALLSEL\n" @@ -3591,10 +4041,21 @@ class _StepProcessor: '_global_structural_damping_value', '_use_LMM_as_applicable', '_base_id_mapping', + '_cload_component_data', + '_boundary_component_data', + '_time_points', + '_params', ) def __init__( - self, model: prime.Model, data, sim_data, model_application, use_LMM_as_applicable=False + self, + model: prime.Model, + data, + sim_data, + model_application, + use_LMM_as_applicable=False, + time_points=[], + params=None, ): self._simulation_data = sim_data self._steps_data = data @@ -3623,6 +4084,10 @@ def __init__( self._global_structural_damping_value = 0.0 self._base_id_mapping = {} self._use_LMM_as_applicable = use_LMM_as_applicable + self._cload_component_data = {} + self._boundary_component_data = {} + self._time_points = time_points + self._params = params def get_cload_ampl_commands(self): return self._cload_ampl_commands @@ -3664,6 +4129,9 @@ def get_static_analysis_data(self, static_data): time_period = 1.0 min_time_increment = 1e-05 max_time_increment = 1.0 + first_point = None + if self._time_points: + first_point = self._time_points[0] if 'Data' in static_data and static_data['Data'] is not None: data = static_data['Data'] if 'time_increment' in data: @@ -3689,6 +4157,8 @@ def get_static_analysis_data(self, static_data): max_time_increment = time_interval_val if time_increment > max_time_increment: time_increment = max_time_increment + if first_point is not None and time_increment > first_point and self._time == 0.0: + time_increment = first_point self._step_start_time = self._time self._time += time_period self._step_end_time = self._time @@ -3708,12 +4178,16 @@ def get_static_analysis_data(self, static_data): static_analysis_commands += 'ANTYPE, STATIC\n' else: static_analysis_commands += 'ANTYPE, STATIC\n' + else: + static_analysis_commands += 'ANTYPE, STATIC\n' static_analysis_commands += f'TIME,{self._time}\n' static_analysis_commands += f'AUTOTS,ON\n' static_analysis_commands += ( - f'DELTIM, {time_increment}, {min_time_increment}, {max_time_increment}, , FORCE\n' + f'DELTIM, {time_increment}, {min_time_increment}, {max_time_increment}' ) - static_analysis_commands += '\n' + if int(str(self._params.target_ansys_version)[-3:]) >= 252: + static_analysis_commands += ", , FORCE" + static_analysis_commands += '\n\n' self._previous_analysis = "STATIC" return static_analysis_commands @@ -3721,6 +4195,11 @@ def get_modal_dynamic_analysis_data(self, dynamic_data): """Get modal dynamic analysis details.""" dynamic_analysis_commands = '' self._step_MSUP = True + + first_point = None + if self._time_points: + first_point = self._time_points[0] + if type(dynamic_data) == list: dynamic_data = dynamic_data[0] time_increment = 1.0 @@ -3741,6 +4220,8 @@ def get_modal_dynamic_analysis_data(self, dynamic_data): time_period = float(data['time_period']) if time_increment > max_time_increment: time_increment = max_time_increment + if first_point is not None and time_increment > first_point and self._time == 0.0: + time_increment = first_point if 'Parameters' in dynamic_data: data = dynamic_data['Parameters'] if data: @@ -3754,6 +4235,7 @@ def get_modal_dynamic_analysis_data(self, dynamic_data): f'! ---------------------------- STEP: {self._step_counter} -----------------------\n' ) if self._previous_analysis == "STATIC": + dynamic_analysis_commands += f'ANTYPE, STATIC \n' dynamic_analysis_commands += 'TINTP, 0.41421,,,,,,-1\n' dynamic_analysis_commands += '\n' dynamic_analysis_commands += 'SOLOPT,STOT,FORCE,HHT\n' @@ -3781,7 +4263,9 @@ def get_modal_dynamic_analysis_data(self, dynamic_data): ) self._assign_analysis.append(f'step_{self._step_counter}_transient_analysis') dynamic_analysis_commands += f'/SOLU\n' - if self._previous_analysis != "MODAL DYNAMIC": + if self._previous_analysis == "MODAL DYNAMIC": + dynamic_analysis_commands += f'ANTYPE, TRANS \n' + else: dynamic_analysis_commands += f'ANTYPE, TRANS \n' dynamic_analysis_commands += f'TRNOPT, ' if "FREQUENCY" in self._analysis_sequence[: self._step_counter]: @@ -3815,6 +4299,11 @@ def get_modal_dynamic_analysis_data(self, dynamic_data): def get_dynamic_analysis_data(self, dynamic_data): """Get dynamic analysis details.""" dynamic_analysis_commands = '' + + first_point = None + if self._time_points: + first_point = self._time_points[0] + self._step_MSUP = False if type(dynamic_data) == list: dynamic_data = dynamic_data[0] @@ -3851,6 +4340,8 @@ def get_dynamic_analysis_data(self, dynamic_data): max_time_increment = time_interval_val if time_increment > max_time_increment: time_increment = max_time_increment + if first_point is not None and time_increment > first_point and self._time == 0.0: + time_increment = first_point if 'Parameters' in dynamic_data: data = dynamic_data['Parameters'] if data: @@ -3864,6 +4355,7 @@ def get_dynamic_analysis_data(self, dynamic_data): f'! ------------------------- STEP: {self._step_counter} -----------------------\n' ) if self._previous_analysis == "STATIC": + dynamic_analysis_commands += f'ANTYPE, STATIC\n' dynamic_analysis_commands += 'TINTP, 0.41421,,,,,,-1\n' dynamic_analysis_commands += '\n' dynamic_analysis_commands += 'SOLOPT,STOT,FORCE,HHT\n' @@ -3891,7 +4383,10 @@ def get_dynamic_analysis_data(self, dynamic_data): ) self._assign_analysis.append(f'step_{self._step_counter}_transient_analysis') dynamic_analysis_commands += f'/SOLU\n' - if self._previous_analysis != "DYNAMIC" and self._previous_analysis != "STATIC": + + if self._previous_analysis == "DYNAMIC": + dynamic_analysis_commands += f'ANTYPE, TRANS \n' + elif self._previous_analysis != "DYNAMIC" and self._previous_analysis != "STATIC": dynamic_analysis_commands += f'ANTYPE, TRANS \n' dynamic_analysis_commands += f'TRNOPT, ' if "FREQUENCY" in self._analysis_sequence[: self._step_counter]: @@ -3904,9 +4399,11 @@ def get_dynamic_analysis_data(self, dynamic_data): dynamic_analysis_commands += f'TIME, {self._time}\n' dynamic_analysis_commands += f'AUTOTS,ON\n' dynamic_analysis_commands += ( - f'DELTIM, {time_increment}, {min_time_increment}, {max_time_increment},, FORCE\n' + f'DELTIM, {time_increment}, {min_time_increment}, {max_time_increment}' ) - dynamic_analysis_commands += f'\n' + if int(str(self._params.target_ansys_version)[-3:]) >= 252: + dynamic_analysis_commands += f', , FORCE' + dynamic_analysis_commands += f'\n\n' if res_modes: dynamic_analysis_commands += f'RESVEC, {res_modes}\n' dynamic_analysis_commands += f'\n' @@ -4019,8 +4516,9 @@ def get_frequency_analysis_data(self, frequency_data): ) self._assign_analysis.append(f'step_{self._step_counter}_modal_analysis') frequency_analysis_commands += f'/SOLU\n' - if self._previous_analysis != 'FREQUENCY': - frequency_analysis_commands += f'ANTYPE, MODAL\n' + # if self._previous_analysis != 'FREQUENCY': + # frequency_analysis_commands += f'ANTYPE, MODAL\n' + frequency_analysis_commands += f'ANTYPE, MODAL\n' frequency_analysis_commands += ( f'MODOPT, {modopt_method}, {nmodes}, {min_frequency}, ' f'{max_frequency}, {cpxmod}, {nrm_key}\n' @@ -4087,6 +4585,7 @@ def get_steady_state_dynamics_data(self, steady_state_dynamics_data): and type(steady_state_dynamics_data['Data']) == list ): data = steady_state_dynamics_data['Data'] + first_line = data[0] if 'num_points' in first_line: npoints = int(first_line['num_points']) @@ -4105,8 +4604,9 @@ def get_steady_state_dynamics_data(self, steady_state_dynamics_data): ) self._assign_analysis.append(f'step_{self._step_counter}_harmonic_analysis') steady_state_dynamics_analysis_commands += f'/SOLU\n' - if self._previous_analysis != "STEADY STATE DYNAMICS": - steady_state_dynamics_analysis_commands += f'ANTYPE, HARMIC\n' + # if self._previous_analysis != "STEADY STATE DYNAMICS": + # steady_state_dynamics_analysis_commands += f'ANTYPE, HARMIC\n' + steady_state_dynamics_analysis_commands += f'ANTYPE, HARMIC\n' steady_state_dynamics_analysis_commands += f'HARFRQ, {min_frequency}, {max_frequency}\n' steady_state_dynamics_analysis_commands += f'NSUB, {npoints-1}\n' if "FREQUENCY" in self._analysis_sequence[: self._step_counter]: @@ -4212,6 +4712,8 @@ def get_output_analysis_data(self, output_data): return output_analysis_commands time_points = None for output in output_data: + if not ('Data' in output and output['Data'] is not None): + continue if 'Parameters' in output: parameters = output['Parameters'] if 'TIME POINT' in parameters: @@ -4244,6 +4746,8 @@ def get_output_analysis_data(self, output_data): number_interval_to_table = False for output in output_data: + if not ('Data' in output and output['Data'] is not None): + continue minimum_time_interval = self.get_output_time_interval() ninterval = None if 'Parameters' in output: @@ -4267,12 +4771,10 @@ def get_output_analysis_data(self, output_data): else: ninterval = int(parameters['NUMBER INTERVAL']) nfreq = None - if 'Parameters' in output and 'FREQUENCY' in output['Parameters']: - if 'Frequency' in self._curr_step: - # Abaqus ignores *OUTPUT FREQUENCY in a *FREQUENCY step and forces it to 1. - nfreq = 1 - else: - nfreq = output['Parameters']['FREQUENCY'] + if 'Parameters' in output: + parameters = output['Parameters'] + if 'FREQUENCY' in parameters: + nfreq = parameters['FREQUENCY'] time_interval = None if 'Parameters' in output: parameters = output['Parameters'] @@ -4314,6 +4816,7 @@ def get_output_analysis_data(self, output_data): enrgout['Parameters']['ELSET'], 'ELSET', self._simulation_data, + self._logger, ) output_analysis_commands += ', ,\n' if 'NodeOutput' in output['Data']: @@ -4345,6 +4848,7 @@ def get_output_analysis_data(self, output_data): nodeout['Parameters']['NSET'], 'NSET', self._simulation_data, + self._logger, ) + ",NODE\n" ) @@ -4357,6 +4861,7 @@ def get_output_analysis_data(self, output_data): nodeout['Parameters']['NSET'], 'NSET', self._simulation_data, + self._logger, ) + "_CONTACT, ELEM\n" ) @@ -4414,6 +4919,7 @@ def get_output_analysis_data(self, output_data): nodeout['Parameters']['NSET'], 'NSET', self._simulation_data, + self._logger, ) ) elif key == "CF": @@ -4440,6 +4946,7 @@ def get_output_analysis_data(self, output_data): nodeout['Parameters']['NSET'], 'NSET', self._simulation_data, + self._logger, ) + "_CONTACT" ) @@ -4492,6 +4999,7 @@ def get_output_analysis_data(self, output_data): elemout['Parameters']['ELSET'], 'ELSET', self._simulation_data, + self._logger, ) ) elif key in ["PEEQ", "PEEQMAX"]: @@ -4518,6 +5026,7 @@ def get_output_analysis_data(self, output_data): elemout['Parameters']['ELSET'], 'ELSET', self._simulation_data, + self._logger, ) ) elif key == "PE": @@ -4544,6 +5053,7 @@ def get_output_analysis_data(self, output_data): elemout['Parameters']['ELSET'], 'ELSET', self._simulation_data, + self._logger, ) output_analysis_commands += ( out_cmds @@ -4563,6 +5073,7 @@ def get_output_analysis_data(self, output_data): elemout['Parameters']['ELSET'], 'ELSET', self._simulation_data, + self._logger, ) else: out_cmds += "ESEL, S, ENAME, , 181\n" @@ -4611,6 +5122,7 @@ def get_output_analysis_data(self, output_data): elemout['Parameters']['ELSET'], 'ELSET', self._simulation_data, + self._logger, ) ) elif key == "CTF": @@ -4637,6 +5149,7 @@ def get_output_analysis_data(self, output_data): elemout['Parameters']['ELSET'], 'ELSET', self._simulation_data, + self._logger, ) ) elif key == "NFORC": @@ -4663,6 +5176,7 @@ def get_output_analysis_data(self, output_data): elemout['Parameters']['ELSET'], 'ELSET', self._simulation_data, + self._logger, ) ) output_analysis_commands += ', ,\n' @@ -4685,7 +5199,10 @@ def get_output_analysis_data(self, output_data): and 'ELSET' in elemout['Parameters'] ): output_analysis_commands += get_modified_component_name( - elemout['Parameters']['ELSET'], 'ELSET', self._simulation_data + elemout['Parameters']['ELSET'], + 'ELSET', + self._simulation_data, + self._logger, ) output_analysis_commands += "\n" return output_analysis_commands @@ -4711,6 +5228,7 @@ def create_modal_vectors(self): if self._previous_modal_resvec is None: if temp_count != 0: vector_commands += 'SOLVE\n' + vector_commands += 'ANTYPE, MODAL\n' vector_commands += '\n' vector_commands += f'FDELE, ALL, ALL \n' vector_commands += f'SFDELE, ALL, ALL \n' @@ -4721,6 +5239,10 @@ def create_modal_vectors(self): if "Cload" in step_data: cloads_data = step_data['Cload'] for cload_data in cloads_data: + real = True + if 'Parameters' in cload_data and cload_data['Parameters'] is not None: + if "IMAGINARY" in cload_data['Parameters']: + real = False data_lines = cload_data['Data'] for data_line in data_lines: if len(data_line) == 0: @@ -4732,26 +5254,38 @@ def create_modal_vectors(self): if self._previous_modal_resvec: if count_load_vectors != 0: vector_commands += 'SOLVE\n' + vector_commands += 'ANTYPE, MODAL\n' vector_commands += '\n' vector_commands += f'FDELE, ALL, ALL \n' vector_commands += f'SFDELE, ALL, ALL \n' vector_commands += f'SFEDELE, ALL, ALL, ALL \n' vector_commands += f'ACEL, 0, 0, 0 \n' vector_commands += f'\n' + load_val = ", 1" + if not real: + load_val = ", , 1" if data_line['node_set'].isnumeric(): cmname = data_line['node_set'] vector_commands += ( - f"F, " f"{data_line['node_set']}, " f"{dof_map[dof]}, 1\n" + f"F, " + f"{data_line['node_set']}, " + f"{dof_map[dof]}{load_val}\n" ) else: cmname = get_modified_component_name( - data_line['node_set'], 'NSET', self._simulation_data + data_line['node_set'], + 'NSET', + self._simulation_data, + self._logger, + ) + vector_commands += ( + f"F, " f"{cmname}, " f"{dof_map[dof]}{load_val}\n" ) - vector_commands += f"F, " f"{cmname}, " f"{dof_map[dof]}, 1\n" count_load_vectors += 1 self._modal_load_vectors[count_load_vectors] = { 'SET': cmname, "COMP": dof_map[dof], + "REAL": real, } return vector_commands @@ -4862,9 +5396,9 @@ def get_step_cload_data(self, cloads_data): self._step_MSUP, self._modal_load_vectors, sim_data=self._simulation_data, + previous_component_data=self._cload_component_data, ) - cload_commands = '' - cload_commands += cload_processor.get_all_cload_commands() + cload_commands, self._cload_component_data = cload_processor.get_all_cload_commands() self._cload_ampl_commands += cload_processor.get_ampl_commands() return cload_commands @@ -4898,10 +5432,12 @@ def get_step_boundary_data(self, boundaries_data): sim_data=self._simulation_data, need_base_id=need_base_id, step_removed=step_removed, + previous_component_data=self._boundary_component_data, ) boundary_commands = '' boundary_commands += boundary_processor.get_all_boundary_commands() self._boundary_ampl_commands += boundary_processor.get_ampl_commands() + self._boundary_component_data = boundary_processor.get_boundary_component_data() self._base_id_mapping = boundary_processor._base_id_mapping return boundary_commands @@ -5002,6 +5538,13 @@ def _process_step(self, step_data): if key == "Output" and "Static" in step_data: if "STATIC" in self._analysis_sequence and "DYNAMIC" in self._analysis_sequence: mapdl_step_commands += "Placeholder_Transient_Outres\n" + + if "DDELE" in mapdl_step_commands: + lines = mapdl_step_commands.split('\n') + for line in lines: + if line.startswith("DDELE") and "FORCE" in line: + mapdl_step_commands += "OUTRES,RSOL,1\n" + step_name = '' if 'Parameters' in step_data: step_params = step_data['Parameters'] @@ -5207,12 +5750,13 @@ def _modify_section_data(self, behavior_data): return secdata_string -def get_modified_component_name(name: str, set_type: str = None, sim_data=None) -> str: +def get_modified_component_name(name: str, set_type: str = None, sim_data=None, logger=None) -> str: """ Modify a component name to meet specific criteria. - This function replaces any non-alphanumeric characters with underscores - and adds the prefix "COMP_" if the name starts with a digit or underscore. + This function returns the precomputed modified component name stored in + simulation data. If no stored modified name is available, the original + component name is returned. Parameters ---------- @@ -5220,47 +5764,78 @@ def get_modified_component_name(name: str, set_type: str = None, sim_data=None) The original component name. set_type : str - The type of component (NSET, ELSET, SURFACE), used if there is a potential name conflict. + The type of component (NSET, ELSET, SURFACE, ELEMENT), used to select + the matching simulation-data section. sim_data - The simulation data of the part in json format, used if there is a potential name conflict. + The simulation data of the part in json format, used to retrieve a + precomputed modified component name. + + logger + Optional logger used to warn when the helper falls back to the + original unsanitized component name. Returns ------- str - The modified component name. + The modified component name if it is stored in simulation data. Notes ----- - This function is designed to sanitize component names for specific use cases - where restrictions might exist on allowed characters and initial characters. + This function is designed to read precomputed component names for MAPDL + export. When a set type is not provided, it falls back to sanitizing the + component name and adding the COMP_ prefix when needed. """ - modified_name = re.sub(r"[^\w]", "_", name) - if set_type == 'NSET': - has_surface = ( - 'Surface' in sim_data - and sim_data["Surface"] is not None - and name in sim_data['Surface'] - ) - has_nset = 'Nset' in sim_data and sim_data["Nset"] is not None and name in sim_data['Nset'] - has_elset = ( - 'Elset' in sim_data and sim_data["Elset"] is not None and name in sim_data['Elset'] - ) - has_element = ( - 'Element' in sim_data - and sim_data["Element"] is not None - and name in sim_data['Element'] - ) - count = has_nset + (has_surface or has_elset or has_element) - - if count > 1: - modified_name = set_type + "_" + modified_name - - if modified_name and (modified_name[0].isdigit() or modified_name[0] == "_"): - modified_name = "COMP_" + modified_name + def warn_and_return_original_name(reason: str) -> str: + if logger is not None: + logger.warning( + "Using original unsanitized component name " + f"'{name}' for set type '{set_type}': {reason}" + ) + return name + + if set_type is None: + modified_name = re.sub(r"[^\w]", "_", name) + if modified_name and (modified_name[0].isdigit() or modified_name[0] == "_"): + modified_name = "COMP_" + modified_name + return modified_name + + if not isinstance(sim_data, dict): + return warn_and_return_original_name("simulation data is unavailable") + + section_name = { + 'SURFACE': 'Surface', + 'NSET': 'Nset', + 'ELSET': 'Elset', + 'ELEMENT': 'Element', + }.get(set_type) + if section_name is None: + return warn_and_return_original_name(f"component source type {set_type} is unsupported") + + section = sim_data.get(section_name) + entry = section.get(name) if isinstance(section, dict) else None + if not isinstance(entry, dict): + parts = sim_data.get('Parts') + if isinstance(parts, dict): + matched_entry = None + for part_data in parts.values(): + part_section = part_data.get(section_name) if isinstance(part_data, dict) else None + part_entry = part_section.get(name) if isinstance(part_section, dict) else None + if isinstance(part_entry, dict): + if matched_entry is not None: + return warn_and_return_original_name( + "multiple matching part entries were found" + ) + matched_entry = part_entry + entry = matched_entry + if not isinstance(entry, dict): + return warn_and_return_original_name("no matching simulation-data entry was found") - return modified_name + modified_name = entry.get('ModifiedCdbComponentName') + if isinstance(modified_name, str): + return modified_name + return warn_and_return_original_name("ModifiedCdbComponentName is missing") def generate_mapdl_commands( @@ -5300,6 +5875,7 @@ def generate_mapdl_commands( json_simulation_data["Zones"], params.write_separate_blocks, params.skip_comments, + params=params, ) mat_cmds = mp.get_all_material_commands() all_mat_cmds = mat_cmds @@ -5315,14 +5891,31 @@ def generate_mapdl_commands( ) joint_all_mat_cmds = jmp.get_all_material_commands() all_mat_cmds += joint_all_mat_cmds + if ( + "GasketBehavior" in json_simulation_data + and json_simulation_data["GasketBehavior"] is not None + ): + gmp = _GasketMaterialProcessor( + model, + json_simulation_data["GasketBehavior"], + json_simulation_data, + params.write_separate_blocks, + params.skip_comments, + ) + gasket_all_mat_cmds = gmp.get_all_material_commands() + all_mat_cmds += gasket_all_mat_cmds + general_contact_cmds = '' ampl_cmds = '' + time_points = [] if "TimePoint" in json_simulation_data: timepoint_processor = _TimePointsProcessor(model, json_simulation_data["TimePoint"]) ampl_cmds += timepoint_processor.get_all_timepoints_commands() + time_points = timepoint_processor._get_list_of_floats() if "TimePoints" in json_simulation_data: timepoints_processor = _TimePointsProcessor(model, json_simulation_data["TimePoints"]) ampl_cmds += timepoints_processor.get_all_timepoints_commands() + time_points = timepoints_processor._get_list_of_floats() pre_step_boun_cmds = '' boundary_ampl_cmds = '' if "Boundary" in json_simulation_data: @@ -5344,6 +5937,8 @@ def generate_mapdl_commands( sim_data=json_simulation_data, model_application=params.analysis_type, use_LMM_as_applicable=False, + time_points=time_points, + params=params, ) step_settings = steps_data.get_all_steps() ninterval_mapdl_commands = steps_data.get_ninterval_mapdl_commands() diff --git a/src/ansys/meshing/prime/core/mesh.py b/src/ansys/meshing/prime/core/mesh.py index 0697fefff5..f4410807d6 100644 --- a/src/ansys/meshing/prime/core/mesh.py +++ b/src/ansys/meshing/prime/core/mesh.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/core/model.py b/src/ansys/meshing/prime/core/model.py index 846a85d87f..1464b22533 100644 --- a/src/ansys/meshing/prime/core/model.py +++ b/src/ansys/meshing/prime/core/model.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/core/part.py b/src/ansys/meshing/prime/core/part.py index f13708a3cc..83a6fa778f 100644 --- a/src/ansys/meshing/prime/core/part.py +++ b/src/ansys/meshing/prime/core/part.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/core/periodiccontrol.py b/src/ansys/meshing/prime/core/periodiccontrol.py index a94cce5ebe..108ecfdec5 100644 --- a/src/ansys/meshing/prime/core/periodiccontrol.py +++ b/src/ansys/meshing/prime/core/periodiccontrol.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/core/prismcontrol.py b/src/ansys/meshing/prime/core/prismcontrol.py index 9ca41f70f8..7b3272831e 100644 --- a/src/ansys/meshing/prime/core/prismcontrol.py +++ b/src/ansys/meshing/prime/core/prismcontrol.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/core/sizecontrol.py b/src/ansys/meshing/prime/core/sizecontrol.py index 21688c17ed..778549f285 100644 --- a/src/ansys/meshing/prime/core/sizecontrol.py +++ b/src/ansys/meshing/prime/core/sizecontrol.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/core/surfaceutilities.py b/src/ansys/meshing/prime/core/surfaceutilities.py index fc5ba583ef..49edb3651f 100644 --- a/src/ansys/meshing/prime/core/surfaceutilities.py +++ b/src/ansys/meshing/prime/core/surfaceutilities.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/core/surfer.py b/src/ansys/meshing/prime/core/surfer.py index 182fbc5a0b..68b590b45d 100644 --- a/src/ansys/meshing/prime/core/surfer.py +++ b/src/ansys/meshing/prime/core/surfer.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/core/volumecontrol.py b/src/ansys/meshing/prime/core/volumecontrol.py index ea00f1d29d..eac1698609 100644 --- a/src/ansys/meshing/prime/core/volumecontrol.py +++ b/src/ansys/meshing/prime/core/volumecontrol.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/core/volumesweeper.py b/src/ansys/meshing/prime/core/volumesweeper.py index b39134573f..cd25957524 100644 --- a/src/ansys/meshing/prime/core/volumesweeper.py +++ b/src/ansys/meshing/prime/core/volumesweeper.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/core/wrapper.py b/src/ansys/meshing/prime/core/wrapper.py index 0fcecc583f..6b0f644d0d 100644 --- a/src/ansys/meshing/prime/core/wrapper.py +++ b/src/ansys/meshing/prime/core/wrapper.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/core/wrappercontrol.py b/src/ansys/meshing/prime/core/wrappercontrol.py index c42e3c8ef9..5948fd24e0 100644 --- a/src/ansys/meshing/prime/core/wrappercontrol.py +++ b/src/ansys/meshing/prime/core/wrappercontrol.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/internals/client.py b/src/ansys/meshing/prime/internals/client.py index f1b61348bf..ac725b19ba 100644 --- a/src/ansys/meshing/prime/internals/client.py +++ b/src/ansys/meshing/prime/internals/client.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy @@ -23,6 +24,7 @@ import logging import os +from pathlib import Path from typing import Optional import ansys.meshing.prime.examples as examples @@ -86,6 +88,7 @@ def __init__( self._local = local self._process = server_process self._comm = None + self._cleanup_script_path: Path = None if not local: if ( connection_type == config.ConnectionType.GRPC_SECURE diff --git a/src/ansys/meshing/prime/internals/comm_manager.py b/src/ansys/meshing/prime/internals/comm_manager.py index c8b61fd395..ca18ec6822 100644 --- a/src/ansys/meshing/prime/internals/comm_manager.py +++ b/src/ansys/meshing/prime/internals/comm_manager.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/internals/communicator.py b/src/ansys/meshing/prime/internals/communicator.py index b44c5679b9..17789bb612 100644 --- a/src/ansys/meshing/prime/internals/communicator.py +++ b/src/ansys/meshing/prime/internals/communicator.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/internals/config.py b/src/ansys/meshing/prime/internals/config.py index 368e1760aa..56a0c81c24 100644 --- a/src/ansys/meshing/prime/internals/config.py +++ b/src/ansys/meshing/prime/internals/config.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/internals/cyberchannel.py b/src/ansys/meshing/prime/internals/cyberchannel.py index 3a2dc18b44..9d0621253c 100644 --- a/src/ansys/meshing/prime/internals/cyberchannel.py +++ b/src/ansys/meshing/prime/internals/cyberchannel.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/internals/defaults.py b/src/ansys/meshing/prime/internals/defaults.py index 5b8b984a42..87d8108ed1 100644 --- a/src/ansys/meshing/prime/internals/defaults.py +++ b/src/ansys/meshing/prime/internals/defaults.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/internals/error_handling.py b/src/ansys/meshing/prime/internals/error_handling.py index 98b747a3e4..bd9fda84d8 100644 --- a/src/ansys/meshing/prime/internals/error_handling.py +++ b/src/ansys/meshing/prime/internals/error_handling.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/internals/grpc_communicator.py b/src/ansys/meshing/prime/internals/grpc_communicator.py index 32a335a153..e8f664f24c 100644 --- a/src/ansys/meshing/prime/internals/grpc_communicator.py +++ b/src/ansys/meshing/prime/internals/grpc_communicator.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/internals/grpc_utils.py b/src/ansys/meshing/prime/internals/grpc_utils.py index 45c1bb9f53..51abc60e43 100644 --- a/src/ansys/meshing/prime/internals/grpc_utils.py +++ b/src/ansys/meshing/prime/internals/grpc_utils.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/internals/json_utils.py b/src/ansys/meshing/prime/internals/json_utils.py index feae77f857..5f1cda18c9 100644 --- a/src/ansys/meshing/prime/internals/json_utils.py +++ b/src/ansys/meshing/prime/internals/json_utils.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/internals/launcher.py b/src/ansys/meshing/prime/internals/launcher.py index 00cae7c7a7..517ff4e9df 100644 --- a/src/ansys/meshing/prime/internals/launcher.py +++ b/src/ansys/meshing/prime/internals/launcher.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy @@ -277,7 +278,6 @@ def launch_prime( ConnectionError When there is an error in connecting to the gRPC server. """ - logging.getLogger('PyPrimeMesh').info("Launching Ansys Prime Server...") if config.has_pim(): return launch_remote_prime(version=version, timeout=timeout) @@ -307,7 +307,6 @@ def launch_prime( ) launch_container = bool(int(os.environ.get('PYPRIMEMESH_LAUNCH_CONTAINER', '0'))) - logging.getLogger('PyPrimeMesh').info(f'Launch container: {launch_container}') if launch_container: logging.getLogger('PyPrimeMesh').info("Launching container...") container_name = utils.make_unique_container_name('ansys-prime-server') diff --git a/src/ansys/meshing/prime/internals/logger.py b/src/ansys/meshing/prime/internals/logger.py index 0573c1b571..92797855bf 100644 --- a/src/ansys/meshing/prime/internals/logger.py +++ b/src/ansys/meshing/prime/internals/logger.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/internals/prime_communicator.py b/src/ansys/meshing/prime/internals/prime_communicator.py index f3cca61f12..57d2a39698 100644 --- a/src/ansys/meshing/prime/internals/prime_communicator.py +++ b/src/ansys/meshing/prime/internals/prime_communicator.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/internals/socket_communicator.py b/src/ansys/meshing/prime/internals/socket_communicator.py index 2c7a266a8d..4eff561fbf 100644 --- a/src/ansys/meshing/prime/internals/socket_communicator.py +++ b/src/ansys/meshing/prime/internals/socket_communicator.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy diff --git a/src/ansys/meshing/prime/internals/utils.py b/src/ansys/meshing/prime/internals/utils.py index b0544ccc60..b27b21a19c 100644 --- a/src/ansys/meshing/prime/internals/utils.py +++ b/src/ansys/meshing/prime/internals/utils.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy @@ -36,7 +37,7 @@ def _get_docker(): - """Return the docker module, importing it on first use. + """Get the docker module, importing it on first use. Raises ------ @@ -49,8 +50,8 @@ def _get_docker(): return docker except ImportError: raise ImportError( - "The 'docker' package is required for container operations. " - "Install it with: pip install docker" + "Container operations require 'docker' package. " + "Install the docker package using the command 'pip install docker'." ) from None diff --git a/src/ansys/meshing/prime/internals/yaml_converter.py b/src/ansys/meshing/prime/internals/yaml_converter.py new file mode 100644 index 0000000000..9c9c43c12f --- /dev/null +++ b/src/ansys/meshing/prime/internals/yaml_converter.py @@ -0,0 +1,172 @@ +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +"""YAML to PRIME JSON schema converter module. + +Converts user-friendly YAML schema definitions to ANSYS PRIME's JSON schema format. +Supports both simple keywords (like *BOUNDARY) and complex parameter-variant keywords +(like *SURFACE). Preserves Output templates and field metadata. + +Architecture: +- Simple keywords: Data -> Data_Block.Data_Fields + Output_Template +- Complex keywords: Parameters + Variants -> Data_Parameter structure with variant-specific outputs + +This module is designed to be imported and used programmatically, not as a standalone script. +""" + +import json +import logging +from typing import Any, Dict, List + +from .yaml_parser import parse_yaml_file + +# Schema JSON keys (module-level constants) +DATA_BLOCK = "Data_Block" +DATA_FIELDS = "Data_Fields" +OUTPUT_TEMPLATE = "Output_Template" +DEFAULT_PARAMETERS = "Default_Parameters" + + +class YamlToPrimeJsonConverter: + """Converts YAML keyword definitions to PRIME JSON schema format.""" + + def __init__(self): + """Initialize an empty converter.""" + self.schemas = {} + self.logger = logging.getLogger(__name__) + + def convert_yaml_file(self, yaml_file_path: str) -> Dict[str, Any]: + """ + Convert a YAML file to PRIME JSON schema format. + + Args: + yaml_file_path: Path to the YAML file to convert + + Returns: + Dictionary containing the converted schemas + + Raises: + ValueError: If the YAML file is empty or invalid + FileNotFoundError: If the YAML file doesn't exist + """ + yaml_data = parse_yaml_file(yaml_file_path) + if yaml_data is None: + raise ValueError(f"Empty or invalid YAML file: {yaml_file_path}") + + for keyword_name, keyword_def in yaml_data.items(): + if not isinstance(keyword_def, dict): + raise ValueError(f"Invalid schema for {keyword_name}") + + if keyword_name.startswith('TranslationRulesTweaking'): + for key, value in keyword_def.items(): + self.schemas[key] = value + continue + + pattern = self._extract_pattern(keyword_def) + json_schema = self._convert_simple_keyword(keyword_def) + self.schemas[pattern] = json_schema + + return self.schemas + + def _extract_pattern(self, keyword_def: Dict) -> str: + """Extract and validate the pattern from a keyword definition.""" + pattern = keyword_def.get('Pattern', '') + if not pattern: + raise ValueError("Missing 'Pattern' in keyword definition") + + pattern = pattern.lstrip('*').upper() + return pattern + + def _extract_default_parameters(self, parameters: List[Dict]) -> Dict: + """Extract default parameter values.""" + return {p["name"]: p["default"] for p in parameters if "default" in p} + + def _is_array_field(self, field_type: str) -> bool: + """Check if a field type indicates an array.""" + return "list" in field_type.lower() + + def _expand_array_fields(self, field_name, field_type) -> list: + """Expand array field definitions into individual field names.""" + field_names = [] + field_type = field_type.replace('list', '') + field_type = field_type.replace('[', '') + field_type = field_type.replace(']', '') + total_data_points = 0 + for part in map(str.strip, field_type.split(",")): + if "*" in part: + count, dtype = part.split("*") + total_data_points += int(count) + else: + total_data_points += 1 + for i in range(total_data_points): + array_field_name = f"{field_name}_{i+1}" + field_names.append(array_field_name) + return field_names + + def _convert_simple_keyword(self, keyword_def: Dict) -> Dict: + """Convert a keyword definition to JSON schema format.""" + EXCLUDED_KEYS = {"Pattern", "Description"} + json_schema = {} + for key, value in keyword_def.items(): + if key in EXCLUDED_KEYS: + continue + if key == "OutputExpression": + while value[-1] == "\n": + value = value[:-1] + json_schema[key] = value + + return json_schema + + def get_json_string(self, indent: int = 2) -> str: + """ + Get the converted schemas as a JSON string. + + Args: + indent: Indentation level for JSON formatting + + Returns: + JSON string representation of the schemas + """ + return json.dumps(self.schemas, indent=indent) + + +def convert_yaml_to_json_string(yaml_file_path: str) -> str: + """ + Convert a YAML file to a JSON string. + + Args: + yaml_file_path: Path to the YAML file to convert + + Returns: + JSON string representation of the converted schemas + + Raises: + ValueError: If the YAML file is empty or invalid + FileNotFoundError: If the YAML file doesn't exist + + Example: + >>> json_string = convert_yaml_to_json_string("schema.yaml") + >>> customizationSchema = json_string + """ + converter = YamlToPrimeJsonConverter() + converter.convert_yaml_file(yaml_file_path) + return converter.get_json_string() diff --git a/src/ansys/meshing/prime/internals/yaml_parser.py b/src/ansys/meshing/prime/internals/yaml_parser.py new file mode 100644 index 0000000000..d1d8306787 --- /dev/null +++ b/src/ansys/meshing/prime/internals/yaml_parser.py @@ -0,0 +1,782 @@ +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-License-Identifier: MIT +# +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to deal +# in the Software without restriction, including without limitation the rights +# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +# copies of the Software, and to permit persons to whom the Software is +# furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in all +# copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +# SOFTWARE. + +"""ANSYS PRIME standalone YAML parser. + +Zero external dependencies - pure Python implementation. + +Parses YAML keyword definition files following PRIME schema format. +Supports: scalars, lists, dicts, multi-line strings, comments. + +Author: ANSYS PRIME Team +""" + +from pathlib import Path +from typing import Any, Dict, List, Optional, Tuple, Union + + +class YamlParseError(Exception): + """Exception raised for YAML parsing errors.""" + + pass + + +class YamlParser: + """ + Standalone YAML parser for ANSYS PRIME keyword schemas. + + Supports: + - Key-value pairs (key: value) + - Lists with '-' prefix + - Nested dictionaries (indentation-based) + - Multi-line strings (| and >) + - Comments (#) + - Quoted strings ("..." and '...') + - Type inference (string, int, float, bool, null) + + Does NOT support (not needed for PRIME schemas): + - Anchors/aliases (&anchor, *alias) + - Complex flow syntax ({}, []) + - Multiple documents (---) + - Custom tags (!!str, !!int) + """ + + def __init__(self): + """Initialize an empty parser state.""" + self.lines: List[str] = [] + self.line_num = 0 + self.current_indent = 0 + + def parse(self, text: str) -> Dict[str, Any]: + """ + Parse YAML text and return Python dictionary. + + Args: + text: YAML content as string + + Returns: + Parsed data as Python dict + + Raises: + YamlParseError: If syntax is invalid + """ + # Normalize line endings and split + text = text.replace('\r\n', '\n').replace('\r', '\n') + self.lines = text.split('\n') + self.line_num = 0 + return self._parse_dict(0) + + def parse_file(self, filepath: str) -> Dict[str, Any]: + """ + Parse YAML file and return Python dictionary. + + Args: + filepath: Path to YAML file + + Returns: + Parsed data as Python dict + """ + path = Path(filepath) + if not path.exists(): + raise FileNotFoundError(f"YAML file not found: {filepath}") + + with path.open('r', encoding='utf-8') as f: + content = f.read() + + return self.parse(content) + + def _get_indent(self, line: str) -> int: + """Count leading spaces (tabs converted to 2 spaces).""" + expanded = line.replace('\t', ' ') + return len(expanded) - len(expanded.lstrip(' ')) + + def _strip_comment(self, line: str) -> str: + """Remove # comments (preserving # inside quotes).""" + result = [] + in_single_quote = False + in_double_quote = False + i = 0 + + while i < len(line): + char = line[i] + + # Toggle quote states + if char == "'" and not in_double_quote: + in_single_quote = not in_single_quote + result.append(char) + elif char == '"' and not in_single_quote: + # Check if escaped + if i > 0 and line[i - 1] == '\\': + result.append(char) + else: + in_double_quote = not in_double_quote + result.append(char) + elif char == '#' and not in_single_quote and not in_double_quote: + # Found unquoted comment - stop here + break + else: + result.append(char) + + i += 1 + + return ''.join(result).rstrip() + + def _parse_value(self, value_str: str) -> Union[str, int, float, bool, None]: + """Convert string to appropriate Python type.""" + value_str = value_str.strip() + + if not value_str: + return None + + # Null/None + if value_str in ('null', 'Null', 'NULL', '~', ''): + return None + + # Boolean + if value_str in ('true', 'True', 'TRUE'): + return True + if value_str in ('false', 'False', 'FALSE'): + return False + + # Quoted string - remove quotes + if (value_str.startswith('"') and value_str.endswith('"')) or ( + value_str.startswith("'") and value_str.endswith("'") + ): + # Unescape common escape sequences + unquoted = value_str[1:-1] + unquoted = unquoted.replace('\\n', '\n') + unquoted = unquoted.replace('\\t', '\t') + unquoted = unquoted.replace('\\r', '\r') + unquoted = unquoted.replace('\\"', '"') + unquoted = unquoted.replace("\\'", "'") + unquoted = unquoted.replace('\\\\', '\\') + return unquoted + + # Number (int or float) + try: + # Try int first + if '.' not in value_str and 'e' not in value_str.lower(): + return int(value_str) + # Try float + return float(value_str) + except ValueError: + pass + + # Inline flow mapping: {k: v, k: v, ...} + if value_str.startswith('{') and value_str.endswith('}'): + return self._parse_flow_mapping(value_str) + + # Return as string + return value_str + + def _parse_flow_mapping(self, text: str) -> dict: + """Parse an inline YAML flow mapping of the form ``{k: v, k: v, ...}``.""" + inner = text[1:-1].strip() + result = {} + if not inner: + return result + # Split on commas NOT inside nested braces/brackets + parts = [] + depth = 0 + current = [] + for ch in inner: + if ch in ('{', '['): + depth += 1 + current.append(ch) + elif ch in ('}', ']'): + depth -= 1 + current.append(ch) + elif ch == ',' and depth == 0: + parts.append(''.join(current).strip()) + current = [] + else: + current.append(ch) + if current: + parts.append(''.join(current).strip()) + for part in parts: + if ':' not in part: + continue + k, _, v = part.partition(':') + result[self._parse_value(k.strip())] = self._parse_value(v.strip()) + return result + + def _peek_next_line(self, current_indent: int) -> Optional[Tuple[int, str]]: + """ + Peek at next non-empty, non-comment line without consuming it. + + Returns: + (indent, stripped_line) or None if no more lines + """ + save_line_num = self.line_num + + while self.line_num < len(self.lines): + raw_line = self.lines[self.line_num] + line = self._strip_comment(raw_line) + + if line.strip(): + indent = self._get_indent(line) + stripped = line.strip() + self.line_num = save_line_num # Restore position + return (indent, stripped) + + self.line_num += 1 + + self.line_num = save_line_num + return None + + def _parse_dict(self, base_indent: int) -> Dict[str, Any]: + """Parse dictionary at given indentation level.""" + result = {} + + while self.line_num < len(self.lines): + raw_line = self.lines[self.line_num] + line = self._strip_comment(raw_line) + + # Skip empty lines + if not line.strip(): + self.line_num += 1 + continue + + indent = self._get_indent(line) + stripped = line.strip() + + # Exit if dedented + if indent < base_indent: + break + + # Skip if more indented (will be handled by nested call) + if indent > base_indent: + raise YamlParseError( + f"Line {self.line_num + 1}: Unexpected indentation: '{stripped}'" + ) + + # Must have a colon for key-value + if ':' not in stripped: + raise YamlParseError( + f"Line {self.line_num + 1}: Expected key:value, got: '{stripped}'" + ) + + # Parse key and value + key, _, value = stripped.partition(':') + key = key.strip() + value = value.strip() + + self.line_num += 1 + + # Multi-line string (| or >) + if value in ('|', '>'): + result[key] = self._parse_multiline(base_indent, fold=(value == '>')) + continue + + # Empty value - check next line + if not value: + peek = self._peek_next_line(base_indent) + + if peek is None: + result[key] = None + continue + + next_indent, next_stripped = peek + + # List follows + if next_indent > base_indent and next_stripped.startswith('-'): + result[key] = self._parse_list(next_indent) + # Nested dict follows + elif next_indent > base_indent and ':' in next_stripped: + result[key] = self._parse_dict(next_indent) + else: + result[key] = None + else: + # Inline value + result[key] = self._parse_value(value) + + return result + + def _parse_list_item_properties( + self, base_indent: int, initial_dict: Dict[str, Any] + ) -> Dict[str, Any]: + """ + Parse additional properties of a list item that started with '- key: value'. + + Continues reading lines at base_indent+2 (or more) until dedented or next '-'. + + Args: + base_indent: The indent level of the '-' + initial_dict: Dictionary with first property already parsed + + Returns: + Complete dictionary with all properties + """ + result = initial_dict.copy() + + while self.line_num < len(self.lines): + raw_line = self.lines[self.line_num] + line = self._strip_comment(raw_line) + + if not line.strip(): + self.line_num += 1 + continue + + indent = self._get_indent(line) + stripped = line.strip() + + # Stop if dedented to base level or below + if indent <= base_indent: + break + + # Stop if we hit another list item + if stripped.startswith('-'): + break + + # Must be a key:value at proper indent + if ':' not in stripped: + break + + key, _, value = stripped.partition(':') + key = key.strip() + value = value.strip() + + self.line_num += 1 + + # Handle multi-line string + if value in ('|', '>'): + result[key] = self._parse_multiline(indent, fold=(value == '>')) + # Empty value - check for nested structure + elif not value: + peek = self._peek_next_line(indent) + if peek and peek[0] > indent: + next_indent, next_stripped = peek + if next_stripped.startswith('-'): + result[key] = self._parse_list(peek[0]) + elif ':' in next_stripped: + # Parse nested dict (e.g., when: followed by TYPE: ELEMENT) + result[key] = self._parse_dict(peek[0]) + else: + result[key] = None + else: + result[key] = None + # Simple inline value + else: + result[key] = self._parse_value(value) + + return result + + def _parse_list(self, base_indent: int) -> List[Any]: + """Parse list at given indentation level.""" + result = [] + + while self.line_num < len(self.lines): + raw_line = self.lines[self.line_num] + line = self._strip_comment(raw_line) + + if not line.strip(): + self.line_num += 1 + continue + + indent = self._get_indent(line) + stripped = line.strip() + + # Exit if dedented below base + if indent < base_indent: + break + + # Must start with '-' at base indent level + if indent == base_indent: + if not stripped.startswith('-'): + # Not a list item anymore + break + + # Get value after '-' + value = stripped[1:].strip() + self.line_num += 1 + + # Case 1: Inline simple value (e.g., "- item") + if value and ':' not in value: + result.append(self._parse_value(value)) + continue + + # Case 2: Inline dict (e.g., "- key: value" or "- when:") + if value and ':' in value: + key, _, val = value.partition(':') + key = key.strip() + val = val.strip() + + # Check if value is empty (e.g., "- when:") + if not val: + # Value will come from indented lines below + # Peek to see what follows + peek = self._peek_next_line(base_indent) + + if peek and peek[0] > base_indent: + next_indent, next_stripped = peek + + # Next line is indented dict content (e.g., TYPE: ELEMENT under when:) + if ':' in next_stripped and not next_stripped.startswith('-'): + # Parse the nested dict as the value for this key + nested_dict = self._parse_dict(peek[0]) + item_dict = {key: nested_dict} + + # Continue parsing other properties at same level + item_dict = self._parse_list_item_properties(base_indent, item_dict) + result.append(item_dict) + continue + # Next line is a list + elif next_stripped.startswith('-'): + nested_list = self._parse_list(peek[0]) + item_dict = {key: nested_list} + + # Continue parsing other properties + item_dict = self._parse_list_item_properties(base_indent, item_dict) + result.append(item_dict) + continue + + # No nested structure, just empty value + item_dict = {key: None} + else: + # Has inline value (e.g., "- name: MPC_TYPE") + item_dict = {key: self._parse_value(val)} + + # Check if more properties follow (without '-') + item_dict = self._parse_list_item_properties(base_indent, item_dict) + result.append(item_dict) + continue + + # Case 3: Empty after '-', check next line + peek = self._peek_next_line(base_indent) + + if peek is None: + result.append(None) + continue + + next_indent, next_stripped = peek + + # Multi-line dict under list item (most common case) + # Next line should be indented and be a key:value + if ( + next_indent > base_indent + and ':' in next_stripped + and not next_stripped.startswith('-') + ): + item_dict = self._parse_dict(next_indent) + result.append(item_dict) + # Nested list under list item + elif next_indent > base_indent and next_stripped.startswith('-'): + result.append(self._parse_list(next_indent)) + else: + result.append(None) + else: + # Indented more than base - shouldn't happen at list level + break + + return result + + def _parse_multiline(self, base_indent: int, fold: bool = False) -> str: + """ + Parse multi-line string (| or >). + + Args: + base_indent: Base indentation of parent key + fold: If True (>), fold lines into single line. If False (|), preserve newlines. + """ + lines = [] + min_indent = None + + while self.line_num < len(self.lines): + raw_line = self.lines[self.line_num] + + # Empty line - keep it + if not raw_line.strip(): + self.line_num += 1 + lines.append('') + continue + + indent = self._get_indent(raw_line) + + # Exit if dedented to base level or less + if indent <= base_indent: + break + + # Track minimum indentation of content + if min_indent is None: + min_indent = indent + + # Remove base indentation + content = raw_line[min_indent:] if indent >= min_indent else raw_line.lstrip() + lines.append(content.rstrip()) + self.line_num += 1 + + if fold: + # Fold mode (>): join lines with spaces, collapse empty lines + result = [] + current = [] + + for line in lines: + if not line: + if current: + result.append(' '.join(current)) + current = [] + result.append('') + else: + current.append(line) + + if current: + result.append(' '.join(current)) + + return '\n'.join(result).strip() + else: + # Literal mode (|): preserve newlines + return '\n'.join(lines) + + +def parse_yaml(text: str) -> Dict[str, Any]: + """ + Parse YAML text and return Python dictionary. + + Args: + text: YAML content as string + + Returns: + Parsed data as Python dict + + Example: + >>> yaml_text = ''' + ... MPC_Definition: + ... Pattern: "*MPC" + ... Data: + ... - name: MPC_TYPE + ... type: string + ... ''' + >>> data = parse_yaml(yaml_text) + >>> print(data['MPC_Definition']['Pattern']) + *MPC + """ + parser = YamlParser() + return parser.parse(text) + + +def parse_yaml_file(filepath: str) -> Dict[str, Any]: + """ + Parse YAML file and return Python dictionary. + + Args: + filepath: Path to YAML file + + Returns: + Parsed data as Python dict + + Example: + >>> data = parse_yaml_file("YamlDoc.yaml") + >>> keywords = list(data.keys()) + >>> print(f"Found {len(keywords)} keyword definitions") + """ + parser = YamlParser() + return parser.parse_file(filepath) + + +# Validation and conversion functions for PRIME schemas + + +def validate_prime_keyword_schema(data: Dict[str, Any]) -> List[str]: + """ + Validate parsed YAML against PRIME keyword schema rules. + + Returns: + List of validation error messages (empty if valid) + """ + errors = [] + + for keyword_name, keyword_def in data.items(): + if not isinstance(keyword_def, dict): + errors.append(f"Keyword '{keyword_name}' must be a dictionary") + continue + + # Rule 1: Must have Pattern + if 'Pattern' not in keyword_def: + errors.append(f"Keyword '{keyword_name}' missing required 'Pattern' field") + + # Rule 2: Parameters must be list if present + if 'Parameters' in keyword_def: + if not isinstance(keyword_def['Parameters'], list): + errors.append(f"'{keyword_name}' Parameters must be a list (use '-')") + + # Rule 2: Data must be list if present + if 'Data' in keyword_def: + if not isinstance(keyword_def['Data'], list): + errors.append(f"'{keyword_name}' Data must be a list (use '-')") + + # Rule 2: Variants must be list if present + if 'Variants' in keyword_def: + if not isinstance(keyword_def['Variants'], list): + errors.append(f"'{keyword_name}' Variants must be a list (use '-')") + + # Rule 4: Each variant must have 'when:' condition + for i, variant in enumerate(keyword_def['Variants']): + if 'when' not in variant: + errors.append(f"'{keyword_name}' Variant {i} missing 'when:' condition") + + # Rule 3: Validate field structure in Data + if 'Data' in keyword_def and isinstance(keyword_def['Data'], list): + for field in keyword_def['Data']: + if not isinstance(field, dict): + errors.append(f"'{keyword_name}' Data field must be dictionary") + continue + + if 'name' not in field: + errors.append(f"'{keyword_name}' Data field missing 'name'") + if 'type' not in field: + errors.append( + f"'{keyword_name}' Data field '{field.get('name', '?')}' missing 'type'" + ) + return errors + + +def convert_to_json_schema(yaml_data: Dict[str, Any]) -> Dict[str, Any]: + """ + Convert parsed YAML to JSON schema format for AbaqusImpl.cpp. + + Args: + yaml_data: Parsed YAML data + + Returns: + JSON schema dictionary compatible with ReadPropertySectionWithSchema + """ + json_schema = {} + + for keyword_name, keyword_def in yaml_data.items(): + if not isinstance(keyword_def, dict): + continue + + keyword_schema = {} + + # Add Data_Block for common data fields + if 'Data' in keyword_def and isinstance(keyword_def['Data'], list): + data_field_names = [field['name'] for field in keyword_def['Data'] if 'name' in field] + keyword_schema['Data_Block'] = { + 'Data_Fields': [data_field_names], + 'Object': None, + 'Repeat': None, + } + + # Add Default_Parameters + if 'Parameters' in keyword_def and isinstance(keyword_def['Parameters'], list): + default_params = {} + for param in keyword_def['Parameters']: + if 'default' in param and param['default'] is not None: + default_params[param['name']] = str(param['default']) + + if default_params: + keyword_schema['Default_Parameters'] = default_params + + # Handle Variants -> Output_Parameter structure + if 'Variants' in keyword_def and isinstance(keyword_def['Variants'], list): + variants = keyword_def['Variants'] + + if variants: + # Get variant parameter name (assume all use same parameter) + first_variant = variants[0] + if 'when' in first_variant: + variant_param_name = list(first_variant['when'].keys())[0] + + output_param = {variant_param_name: {}} + + for variant in variants: + if 'when' not in variant: + continue + + variant_value = variant['when'].get(variant_param_name) + if not variant_value: + continue + + output_template = {} + if 'Output_Expression' in variant: + output_template['Expression'] = variant['Output_Expression'] + elif 'Output_Function' in variant: + output_template['Function'] = variant['Output_Function'] + + if output_template: + output_param[variant_param_name][variant_value] = { + 'Output_Template': output_template + } + + if output_param[variant_param_name]: + keyword_schema['Output_Parameter'] = output_param + + # Handle simple Output_Expression (no variants) + elif 'Output_Expression' in keyword_def or 'Output_Function' in keyword_def: + output_template = {} + if 'Output_Expression' in keyword_def: + output_template['Expression'] = keyword_def['Output_Expression'] + elif 'Output_Function' in keyword_def: + output_template['Function'] = keyword_def['Output_Function'] + + if output_template: + keyword_schema['Output_Template'] = output_template + + json_schema[keyword_name] = keyword_schema + + return json_schema + + +# Main conversion function for workflow integration + + +def convert_yaml_to_json_schema( + yaml_file: str, output_file: Optional[str] = None +) -> Dict[str, Any]: + """ + Complete workflow: Parse YAML → Validate → Convert to JSON schema. + + Args: + yaml_file: Path to YAML keyword definition file + output_file: Optional path to save JSON schema (if None, only returns dict) + + Returns: + JSON schema dictionary + + Raises: + YamlParseError: If YAML syntax is invalid + ValueError: If schema validation fails + + Example: + >>> schema = convert_yaml_to_json_schema("YamlDoc.yaml", "abaqus_schema.json") + >>> print(f"Converted {len(schema)} keywords") + """ + # Parse YAML + yaml_data = parse_yaml_file(yaml_file) + + # Validate against PRIME rules + errors = validate_prime_keyword_schema(yaml_data) + if errors: + error_msg = "YAML schema validation failed:\n" + "\n".join(f" - {err}" for err in errors) + raise ValueError(error_msg) + + # Convert to JSON schema + json_schema = convert_to_json_schema(yaml_data) + + # Save if output file specified + if output_file: + import json + + with open(output_file, 'w', encoding='utf-8') as f: + json.dump(json_schema, f, indent=2) + + return json_schema diff --git a/src/ansys/meshing/prime/params/primestructs.py b/src/ansys/meshing/prime/params/primestructs.py index 8e48401bcb..e5a74a51a2 100644 --- a/src/ansys/meshing/prime/params/primestructs.py +++ b/src/ansys/meshing/prime/params/primestructs.py @@ -1,4 +1,5 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # Permission is hereby granted, free of charge, to any person obtaining a copy From db93cd2876a1e03e914833c4a91ef4b92b19fe18 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Mon, 7 Sep 2026 10:15:03 +0000 Subject: [PATCH 02/14] chore: adding changelog file 1350.maintenance.md [dependabot-skip] --- doc/changelog.d/1350.maintenance.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/1350.maintenance.md diff --git a/doc/changelog.d/1350.maintenance.md b/doc/changelog.d/1350.maintenance.md new file mode 100644 index 0000000000..e408514e90 --- /dev/null +++ b/doc/changelog.d/1350.maintenance.md @@ -0,0 +1 @@ +Update from ado sync 2026 sp03 From 417761ce57ab3403079687b52915e99749cfba7a Mon Sep 17 00:00:00 2001 From: Alex Fernandez Date: Wed, 9 Sep 2026 15:36:45 +0200 Subject: [PATCH 03/14] fix: Pre-commit --- .pre-commit-config.yaml | 2 +- LICENSE | 2 +- examples/gallery/00_lucid_file_IO.py | 2 +- examples/gallery/01_bracket_scaffold.py | 2 +- examples/gallery/02_lucid_mixing_elbow.py | 2 +- examples/gallery/03_lucid_pipe_tee.py | 2 +- examples/gallery/04_lucid_toy_car.py | 2 +- examples/gallery/05_pcb_stacker.py | 2 +- examples/gallery/06_blade_morph.py | 2 +- examples/gallery/07_saddle_bracket.py | 2 +- examples/gallery/08_lucid_generic_f1_rear_wing.py | 2 +- examples/gallery/09_multi_layer_quad_mesh_pcb.py | 2 +- examples/gallery/10_wheel_ground_contact_patch.py | 2 +- examples/gallery/12_import_from_pygeometry.py | 2 +- examples/gallery_beta/11_solder_ball.py | 2 +- examples/misc/example_template.py | 2 +- examples/other/elbow_trame.py | 2 +- examples/other/mixing_elbow.py | 2 +- examples/other/pipe_tee.py | 2 +- src/ansys/meshing/prime/_version.py | 2 +- src/ansys/meshing/prime/core/controldata.py | 4 ++-- src/ansys/meshing/prime/core/dynaexportutils.py | 4 ++-- src/ansys/meshing/prime/core/fileio.py | 4 ++-- src/ansys/meshing/prime/core/mapdlcdbexportutils.py | 4 ++-- src/ansys/meshing/prime/core/mesh.py | 4 ++-- src/ansys/meshing/prime/core/model.py | 4 ++-- src/ansys/meshing/prime/core/part.py | 4 ++-- src/ansys/meshing/prime/core/periodiccontrol.py | 4 ++-- src/ansys/meshing/prime/core/prismcontrol.py | 4 ++-- src/ansys/meshing/prime/core/sizecontrol.py | 4 ++-- src/ansys/meshing/prime/core/surfaceutilities.py | 4 ++-- src/ansys/meshing/prime/core/surfer.py | 4 ++-- src/ansys/meshing/prime/core/volumecontrol.py | 4 ++-- src/ansys/meshing/prime/core/volumesweeper.py | 4 ++-- src/ansys/meshing/prime/core/wrapper.py | 4 ++-- src/ansys/meshing/prime/core/wrappercontrol.py | 4 ++-- src/ansys/meshing/prime/examples/__init__.py | 2 +- src/ansys/meshing/prime/examples/download_utilities.py | 2 +- src/ansys/meshing/prime/examples/examples.py | 2 +- src/ansys/meshing/prime/examples/unit_test_examples.py | 2 +- src/ansys/meshing/prime/graphics/__init__.py | 2 +- src/ansys/meshing/prime/graphics/plotter.py | 3 ++- src/ansys/meshing/prime/graphics/widgets/color_by_type.py | 2 +- src/ansys/meshing/prime/graphics/widgets/hide_picked.py | 2 +- src/ansys/meshing/prime/graphics/widgets/picked_info.py | 3 ++- src/ansys/meshing/prime/graphics/widgets/toggle_edges.py | 3 ++- src/ansys/meshing/prime/internals/client.py | 4 ++-- src/ansys/meshing/prime/internals/comm_manager.py | 4 ++-- src/ansys/meshing/prime/internals/communicator.py | 4 ++-- src/ansys/meshing/prime/internals/config.py | 4 ++-- src/ansys/meshing/prime/internals/cyberchannel.py | 4 ++-- src/ansys/meshing/prime/internals/defaults.py | 4 ++-- src/ansys/meshing/prime/internals/error_handling.py | 4 ++-- src/ansys/meshing/prime/internals/grpc_communicator.py | 4 ++-- src/ansys/meshing/prime/internals/grpc_utils.py | 4 ++-- src/ansys/meshing/prime/internals/json_utils.py | 4 ++-- src/ansys/meshing/prime/internals/launcher.py | 4 ++-- src/ansys/meshing/prime/internals/logger.py | 4 ++-- src/ansys/meshing/prime/internals/prime_communicator.py | 4 ++-- src/ansys/meshing/prime/internals/socket_communicator.py | 4 ++-- src/ansys/meshing/prime/internals/utils.py | 4 ++-- src/ansys/meshing/prime/internals/yaml_converter.py | 2 +- src/ansys/meshing/prime/internals/yaml_parser.py | 2 +- src/ansys/meshing/prime/lucid/__init__.py | 2 +- src/ansys/meshing/prime/lucid/mesh_util.py | 2 +- src/ansys/meshing/prime/lucid/scope.py | 2 +- src/ansys/meshing/prime/lucid/utils.py | 2 +- src/ansys/meshing/prime/params/primestructs.py | 4 ++-- src/ansys/meshing/prime/relaxed_json/__init__.py | 2 +- src/ansys/meshing/prime/relaxed_json/decoder.py | 2 +- src/ansys/meshing/prime/relaxed_json/encoder.py | 2 +- src/ansys/meshing/prime/relaxed_json/scanner.py | 2 +- tests/__init__.py | 2 +- tests/conftest.py | 2 +- tests/core/conftest.py | 2 +- tests/core/test_controldata.py | 2 +- tests/core/test_fileio.py | 2 +- tests/core/test_surfaceutilities.py | 2 +- tests/core/test_surfer.py | 2 +- tests/graphics/test_graphics.py | 2 +- tests/internals/test_logger.py | 2 +- tests/internals/test_utils.py | 2 +- tests/lucid/test_mesh_utils.py | 2 +- tests/test_bracket_scaffold.py | 2 +- tests/test_elbow_lucid_regression.py | 2 +- tests/test_elbow_scdoc.py | 2 +- tests/test_lucid_toycar_wrapper_tutorial_regression.py | 2 +- tests/test_pipe_tee_junction.py | 2 +- tests/test_wrapper_control.py | 2 +- 89 files changed, 124 insertions(+), 121 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a195f59050..47a2bce26e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -50,7 +50,7 @@ repos: exclude: "tests/|examples/|__init__.py" - repo: https://github.com/ansys/pre-commit-hooks - rev: v0.2.8 + rev: v0.8.0 hooks: - id: add-license-headers args: diff --git a/LICENSE b/LICENSE index 4f5b90e25a..d74618a4e1 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2026 ANSYS, Inc. and/or its affiliates. +Copyright (c) 2022 - 2026 ANSYS, Inc. and/or its affiliates. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/examples/gallery/00_lucid_file_IO.py b/examples/gallery/00_lucid_file_IO.py index 42dcbe30ee..eaa9430ef5 100644 --- a/examples/gallery/00_lucid_file_IO.py +++ b/examples/gallery/00_lucid_file_IO.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/01_bracket_scaffold.py b/examples/gallery/01_bracket_scaffold.py index 7a8713b50a..714cab264f 100644 --- a/examples/gallery/01_bracket_scaffold.py +++ b/examples/gallery/01_bracket_scaffold.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/02_lucid_mixing_elbow.py b/examples/gallery/02_lucid_mixing_elbow.py index acda0d08d3..54516f2c92 100644 --- a/examples/gallery/02_lucid_mixing_elbow.py +++ b/examples/gallery/02_lucid_mixing_elbow.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/03_lucid_pipe_tee.py b/examples/gallery/03_lucid_pipe_tee.py index 9970ca9b41..264870a64e 100644 --- a/examples/gallery/03_lucid_pipe_tee.py +++ b/examples/gallery/03_lucid_pipe_tee.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/04_lucid_toy_car.py b/examples/gallery/04_lucid_toy_car.py index 84c96f31ba..1a165850bf 100644 --- a/examples/gallery/04_lucid_toy_car.py +++ b/examples/gallery/04_lucid_toy_car.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/05_pcb_stacker.py b/examples/gallery/05_pcb_stacker.py index 765b3826af..669eb11bc6 100644 --- a/examples/gallery/05_pcb_stacker.py +++ b/examples/gallery/05_pcb_stacker.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/06_blade_morph.py b/examples/gallery/06_blade_morph.py index 89d2f3b886..6e47a88753 100644 --- a/examples/gallery/06_blade_morph.py +++ b/examples/gallery/06_blade_morph.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/07_saddle_bracket.py b/examples/gallery/07_saddle_bracket.py index c75ae560c0..db41de338a 100644 --- a/examples/gallery/07_saddle_bracket.py +++ b/examples/gallery/07_saddle_bracket.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/08_lucid_generic_f1_rear_wing.py b/examples/gallery/08_lucid_generic_f1_rear_wing.py index 4d64e1c426..5e81c9cc37 100644 --- a/examples/gallery/08_lucid_generic_f1_rear_wing.py +++ b/examples/gallery/08_lucid_generic_f1_rear_wing.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/09_multi_layer_quad_mesh_pcb.py b/examples/gallery/09_multi_layer_quad_mesh_pcb.py index 13ec5c9622..f2cffc015f 100644 --- a/examples/gallery/09_multi_layer_quad_mesh_pcb.py +++ b/examples/gallery/09_multi_layer_quad_mesh_pcb.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/10_wheel_ground_contact_patch.py b/examples/gallery/10_wheel_ground_contact_patch.py index b21472ef0f..5c3fac57ab 100644 --- a/examples/gallery/10_wheel_ground_contact_patch.py +++ b/examples/gallery/10_wheel_ground_contact_patch.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/12_import_from_pygeometry.py b/examples/gallery/12_import_from_pygeometry.py index d63278266b..fc7289aec3 100644 --- a/examples/gallery/12_import_from_pygeometry.py +++ b/examples/gallery/12_import_from_pygeometry.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery_beta/11_solder_ball.py b/examples/gallery_beta/11_solder_ball.py index da613634a9..d35be930e3 100644 --- a/examples/gallery_beta/11_solder_ball.py +++ b/examples/gallery_beta/11_solder_ball.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/misc/example_template.py b/examples/misc/example_template.py index 3ef726c040..9d7f63e511 100644 --- a/examples/misc/example_template.py +++ b/examples/misc/example_template.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/other/elbow_trame.py b/examples/other/elbow_trame.py index 969abc6e54..1984d5b948 100644 --- a/examples/other/elbow_trame.py +++ b/examples/other/elbow_trame.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/other/mixing_elbow.py b/examples/other/mixing_elbow.py index 1831b61dc8..32896fc142 100644 --- a/examples/other/mixing_elbow.py +++ b/examples/other/mixing_elbow.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/other/pipe_tee.py b/examples/other/pipe_tee.py index 76d45333a8..27a3e362be 100644 --- a/examples/other/pipe_tee.py +++ b/examples/other/pipe_tee.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/_version.py b/src/ansys/meshing/prime/_version.py index 1b1b878b5c..410d263700 100644 --- a/src/ansys/meshing/prime/_version.py +++ b/src/ansys/meshing/prime/_version.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/core/controldata.py b/src/ansys/meshing/prime/core/controldata.py index 6835a34a62..e096505f82 100644 --- a/src/ansys/meshing/prime/core/controldata.py +++ b/src/ansys/meshing/prime/core/controldata.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/core/dynaexportutils.py b/src/ansys/meshing/prime/core/dynaexportutils.py index cb044632b3..5760ac3a1c 100644 --- a/src/ansys/meshing/prime/core/dynaexportutils.py +++ b/src/ansys/meshing/prime/core/dynaexportutils.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/core/fileio.py b/src/ansys/meshing/prime/core/fileio.py index a531199184..b5ce604e6f 100644 --- a/src/ansys/meshing/prime/core/fileio.py +++ b/src/ansys/meshing/prime/core/fileio.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/core/mapdlcdbexportutils.py b/src/ansys/meshing/prime/core/mapdlcdbexportutils.py index e7b209a320..e00e083cad 100644 --- a/src/ansys/meshing/prime/core/mapdlcdbexportutils.py +++ b/src/ansys/meshing/prime/core/mapdlcdbexportutils.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/core/mesh.py b/src/ansys/meshing/prime/core/mesh.py index f4410807d6..c0341b7106 100644 --- a/src/ansys/meshing/prime/core/mesh.py +++ b/src/ansys/meshing/prime/core/mesh.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/core/model.py b/src/ansys/meshing/prime/core/model.py index 1464b22533..cc24a1d7db 100644 --- a/src/ansys/meshing/prime/core/model.py +++ b/src/ansys/meshing/prime/core/model.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/core/part.py b/src/ansys/meshing/prime/core/part.py index 83a6fa778f..46fddc5390 100644 --- a/src/ansys/meshing/prime/core/part.py +++ b/src/ansys/meshing/prime/core/part.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/core/periodiccontrol.py b/src/ansys/meshing/prime/core/periodiccontrol.py index 108ecfdec5..2ca31b0c59 100644 --- a/src/ansys/meshing/prime/core/periodiccontrol.py +++ b/src/ansys/meshing/prime/core/periodiccontrol.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/core/prismcontrol.py b/src/ansys/meshing/prime/core/prismcontrol.py index 7b3272831e..a1b2d6369c 100644 --- a/src/ansys/meshing/prime/core/prismcontrol.py +++ b/src/ansys/meshing/prime/core/prismcontrol.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/core/sizecontrol.py b/src/ansys/meshing/prime/core/sizecontrol.py index 778549f285..c08e65f2cf 100644 --- a/src/ansys/meshing/prime/core/sizecontrol.py +++ b/src/ansys/meshing/prime/core/sizecontrol.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/core/surfaceutilities.py b/src/ansys/meshing/prime/core/surfaceutilities.py index 49edb3651f..ff55f3f225 100644 --- a/src/ansys/meshing/prime/core/surfaceutilities.py +++ b/src/ansys/meshing/prime/core/surfaceutilities.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/core/surfer.py b/src/ansys/meshing/prime/core/surfer.py index 68b590b45d..d7864a5b0f 100644 --- a/src/ansys/meshing/prime/core/surfer.py +++ b/src/ansys/meshing/prime/core/surfer.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/core/volumecontrol.py b/src/ansys/meshing/prime/core/volumecontrol.py index eac1698609..d27eec3b36 100644 --- a/src/ansys/meshing/prime/core/volumecontrol.py +++ b/src/ansys/meshing/prime/core/volumecontrol.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/core/volumesweeper.py b/src/ansys/meshing/prime/core/volumesweeper.py index cd25957524..fd5f613d8a 100644 --- a/src/ansys/meshing/prime/core/volumesweeper.py +++ b/src/ansys/meshing/prime/core/volumesweeper.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/core/wrapper.py b/src/ansys/meshing/prime/core/wrapper.py index 6b0f644d0d..3953e20a95 100644 --- a/src/ansys/meshing/prime/core/wrapper.py +++ b/src/ansys/meshing/prime/core/wrapper.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/core/wrappercontrol.py b/src/ansys/meshing/prime/core/wrappercontrol.py index 5948fd24e0..cfa3efb613 100644 --- a/src/ansys/meshing/prime/core/wrappercontrol.py +++ b/src/ansys/meshing/prime/core/wrappercontrol.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/examples/__init__.py b/src/ansys/meshing/prime/examples/__init__.py index 99503166a6..0cc83976de 100644 --- a/src/ansys/meshing/prime/examples/__init__.py +++ b/src/ansys/meshing/prime/examples/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/examples/download_utilities.py b/src/ansys/meshing/prime/examples/download_utilities.py index 09f57f44ee..e118078282 100644 --- a/src/ansys/meshing/prime/examples/download_utilities.py +++ b/src/ansys/meshing/prime/examples/download_utilities.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/examples/examples.py b/src/ansys/meshing/prime/examples/examples.py index b5f0e6d773..631160e59d 100644 --- a/src/ansys/meshing/prime/examples/examples.py +++ b/src/ansys/meshing/prime/examples/examples.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/examples/unit_test_examples.py b/src/ansys/meshing/prime/examples/unit_test_examples.py index 61c7de5288..207016f202 100644 --- a/src/ansys/meshing/prime/examples/unit_test_examples.py +++ b/src/ansys/meshing/prime/examples/unit_test_examples.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/graphics/__init__.py b/src/ansys/meshing/prime/graphics/__init__.py index f4b4d0337b..d9ddfcba21 100644 --- a/src/ansys/meshing/prime/graphics/__init__.py +++ b/src/ansys/meshing/prime/graphics/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/graphics/plotter.py b/src/ansys/meshing/prime/graphics/plotter.py index 49fc689c57..791e080d2f 100644 --- a/src/ansys/meshing/prime/graphics/plotter.py +++ b/src/ansys/meshing/prime/graphics/plotter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # @@ -19,6 +19,7 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. + """Module for the plotter.""" import enum import warnings diff --git a/src/ansys/meshing/prime/graphics/widgets/color_by_type.py b/src/ansys/meshing/prime/graphics/widgets/color_by_type.py index c041f6e67f..0d3754be3b 100644 --- a/src/ansys/meshing/prime/graphics/widgets/color_by_type.py +++ b/src/ansys/meshing/prime/graphics/widgets/color_by_type.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/graphics/widgets/hide_picked.py b/src/ansys/meshing/prime/graphics/widgets/hide_picked.py index 4165e5ad0a..a6a1f616bf 100644 --- a/src/ansys/meshing/prime/graphics/widgets/hide_picked.py +++ b/src/ansys/meshing/prime/graphics/widgets/hide_picked.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/graphics/widgets/picked_info.py b/src/ansys/meshing/prime/graphics/widgets/picked_info.py index fea88b7264..0df3283700 100644 --- a/src/ansys/meshing/prime/graphics/widgets/picked_info.py +++ b/src/ansys/meshing/prime/graphics/widgets/picked_info.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # @@ -19,6 +19,7 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. + """Module for PickedInfo widget.""" import os from typing import TYPE_CHECKING diff --git a/src/ansys/meshing/prime/graphics/widgets/toggle_edges.py b/src/ansys/meshing/prime/graphics/widgets/toggle_edges.py index c284814c1c..24aaa896b8 100644 --- a/src/ansys/meshing/prime/graphics/widgets/toggle_edges.py +++ b/src/ansys/meshing/prime/graphics/widgets/toggle_edges.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # @@ -19,6 +19,7 @@ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. + """Module for ToggleEdges widget.""" import os from typing import TYPE_CHECKING diff --git a/src/ansys/meshing/prime/internals/client.py b/src/ansys/meshing/prime/internals/client.py index ac725b19ba..afabeb391b 100644 --- a/src/ansys/meshing/prime/internals/client.py +++ b/src/ansys/meshing/prime/internals/client.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/internals/comm_manager.py b/src/ansys/meshing/prime/internals/comm_manager.py index ca18ec6822..6920d497e4 100644 --- a/src/ansys/meshing/prime/internals/comm_manager.py +++ b/src/ansys/meshing/prime/internals/comm_manager.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/internals/communicator.py b/src/ansys/meshing/prime/internals/communicator.py index 17789bb612..ad98bd9703 100644 --- a/src/ansys/meshing/prime/internals/communicator.py +++ b/src/ansys/meshing/prime/internals/communicator.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/internals/config.py b/src/ansys/meshing/prime/internals/config.py index 56a0c81c24..06177dfe82 100644 --- a/src/ansys/meshing/prime/internals/config.py +++ b/src/ansys/meshing/prime/internals/config.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/internals/cyberchannel.py b/src/ansys/meshing/prime/internals/cyberchannel.py index 9d0621253c..9f9cdd34de 100644 --- a/src/ansys/meshing/prime/internals/cyberchannel.py +++ b/src/ansys/meshing/prime/internals/cyberchannel.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/internals/defaults.py b/src/ansys/meshing/prime/internals/defaults.py index 87d8108ed1..b828116c57 100644 --- a/src/ansys/meshing/prime/internals/defaults.py +++ b/src/ansys/meshing/prime/internals/defaults.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/internals/error_handling.py b/src/ansys/meshing/prime/internals/error_handling.py index bd9fda84d8..9a636b741a 100644 --- a/src/ansys/meshing/prime/internals/error_handling.py +++ b/src/ansys/meshing/prime/internals/error_handling.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/internals/grpc_communicator.py b/src/ansys/meshing/prime/internals/grpc_communicator.py index e8f664f24c..e56717f44f 100644 --- a/src/ansys/meshing/prime/internals/grpc_communicator.py +++ b/src/ansys/meshing/prime/internals/grpc_communicator.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/internals/grpc_utils.py b/src/ansys/meshing/prime/internals/grpc_utils.py index 51abc60e43..ccfb3b3f30 100644 --- a/src/ansys/meshing/prime/internals/grpc_utils.py +++ b/src/ansys/meshing/prime/internals/grpc_utils.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/internals/json_utils.py b/src/ansys/meshing/prime/internals/json_utils.py index 5f1cda18c9..a4e95ccd4e 100644 --- a/src/ansys/meshing/prime/internals/json_utils.py +++ b/src/ansys/meshing/prime/internals/json_utils.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/internals/launcher.py b/src/ansys/meshing/prime/internals/launcher.py index 517ff4e9df..8795694c45 100644 --- a/src/ansys/meshing/prime/internals/launcher.py +++ b/src/ansys/meshing/prime/internals/launcher.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/internals/logger.py b/src/ansys/meshing/prime/internals/logger.py index 92797855bf..d1d636ddb7 100644 --- a/src/ansys/meshing/prime/internals/logger.py +++ b/src/ansys/meshing/prime/internals/logger.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/internals/prime_communicator.py b/src/ansys/meshing/prime/internals/prime_communicator.py index 57d2a39698..db2af567b9 100644 --- a/src/ansys/meshing/prime/internals/prime_communicator.py +++ b/src/ansys/meshing/prime/internals/prime_communicator.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/internals/socket_communicator.py b/src/ansys/meshing/prime/internals/socket_communicator.py index 4eff561fbf..92b825aa06 100644 --- a/src/ansys/meshing/prime/internals/socket_communicator.py +++ b/src/ansys/meshing/prime/internals/socket_communicator.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/internals/utils.py b/src/ansys/meshing/prime/internals/utils.py index b27b21a19c..821c519023 100644 --- a/src/ansys/meshing/prime/internals/utils.py +++ b/src/ansys/meshing/prime/internals/utils.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/internals/yaml_converter.py b/src/ansys/meshing/prime/internals/yaml_converter.py index 9c9c43c12f..037867a6a8 100644 --- a/src/ansys/meshing/prime/internals/yaml_converter.py +++ b/src/ansys/meshing/prime/internals/yaml_converter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/internals/yaml_parser.py b/src/ansys/meshing/prime/internals/yaml_parser.py index d1d8306787..b2317d5a49 100644 --- a/src/ansys/meshing/prime/internals/yaml_parser.py +++ b/src/ansys/meshing/prime/internals/yaml_parser.py @@ -1,4 +1,4 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/lucid/__init__.py b/src/ansys/meshing/prime/lucid/__init__.py index c6eb8b8eac..261eec08f0 100644 --- a/src/ansys/meshing/prime/lucid/__init__.py +++ b/src/ansys/meshing/prime/lucid/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/lucid/mesh_util.py b/src/ansys/meshing/prime/lucid/mesh_util.py index 1f5361ffb9..854c8d7b65 100644 --- a/src/ansys/meshing/prime/lucid/mesh_util.py +++ b/src/ansys/meshing/prime/lucid/mesh_util.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/lucid/scope.py b/src/ansys/meshing/prime/lucid/scope.py index ddf0b706ed..9fd056cc8b 100644 --- a/src/ansys/meshing/prime/lucid/scope.py +++ b/src/ansys/meshing/prime/lucid/scope.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/lucid/utils.py b/src/ansys/meshing/prime/lucid/utils.py index 0085a89264..8dd32cc55a 100644 --- a/src/ansys/meshing/prime/lucid/utils.py +++ b/src/ansys/meshing/prime/lucid/utils.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/params/primestructs.py b/src/ansys/meshing/prime/params/primestructs.py index e5a74a51a2..ecdf55f8e0 100644 --- a/src/ansys/meshing/prime/params/primestructs.py +++ b/src/ansys/meshing/prime/params/primestructs.py @@ -1,7 +1,7 @@ -# Copyright (C) 2026 ANSYS, Inc. and/or its affiliates. -# SPDX-FileCopyrightText: 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/src/ansys/meshing/prime/relaxed_json/__init__.py b/src/ansys/meshing/prime/relaxed_json/__init__.py index 6ae6a192f3..ba53978efa 100644 --- a/src/ansys/meshing/prime/relaxed_json/__init__.py +++ b/src/ansys/meshing/prime/relaxed_json/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/relaxed_json/decoder.py b/src/ansys/meshing/prime/relaxed_json/decoder.py index b048d930f8..4457af5c61 100644 --- a/src/ansys/meshing/prime/relaxed_json/decoder.py +++ b/src/ansys/meshing/prime/relaxed_json/decoder.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/relaxed_json/encoder.py b/src/ansys/meshing/prime/relaxed_json/encoder.py index 7a14dd68ce..9c09c805ac 100644 --- a/src/ansys/meshing/prime/relaxed_json/encoder.py +++ b/src/ansys/meshing/prime/relaxed_json/encoder.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/relaxed_json/scanner.py b/src/ansys/meshing/prime/relaxed_json/scanner.py index 69a1ba98a4..a726bab8ba 100644 --- a/src/ansys/meshing/prime/relaxed_json/scanner.py +++ b/src/ansys/meshing/prime/relaxed_json/scanner.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/__init__.py b/tests/__init__.py index 733fa82b03..55573db356 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/conftest.py b/tests/conftest.py index 85b57a6824..663a8f0020 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/core/conftest.py b/tests/core/conftest.py index c90b59b8d6..c2eeec2514 100644 --- a/tests/core/conftest.py +++ b/tests/core/conftest.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/core/test_controldata.py b/tests/core/test_controldata.py index a6515b2462..2f6b20617f 100644 --- a/tests/core/test_controldata.py +++ b/tests/core/test_controldata.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/core/test_fileio.py b/tests/core/test_fileio.py index 623e9b0c40..f405e416fb 100644 --- a/tests/core/test_fileio.py +++ b/tests/core/test_fileio.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/core/test_surfaceutilities.py b/tests/core/test_surfaceutilities.py index 865bdaacf5..7ff2bc8bf3 100644 --- a/tests/core/test_surfaceutilities.py +++ b/tests/core/test_surfaceutilities.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/core/test_surfer.py b/tests/core/test_surfer.py index 8a4f5864cb..564bbf6c6b 100644 --- a/tests/core/test_surfer.py +++ b/tests/core/test_surfer.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/graphics/test_graphics.py b/tests/graphics/test_graphics.py index 385243d2fa..76df2d7a03 100644 --- a/tests/graphics/test_graphics.py +++ b/tests/graphics/test_graphics.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/internals/test_logger.py b/tests/internals/test_logger.py index 61a9489a45..3e8c793a38 100644 --- a/tests/internals/test_logger.py +++ b/tests/internals/test_logger.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/internals/test_utils.py b/tests/internals/test_utils.py index 536dde5581..1aed64253d 100644 --- a/tests/internals/test_utils.py +++ b/tests/internals/test_utils.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/lucid/test_mesh_utils.py b/tests/lucid/test_mesh_utils.py index b581785043..87519f224a 100644 --- a/tests/lucid/test_mesh_utils.py +++ b/tests/lucid/test_mesh_utils.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_bracket_scaffold.py b/tests/test_bracket_scaffold.py index 8c53a4cbfa..08eed7e17d 100644 --- a/tests/test_bracket_scaffold.py +++ b/tests/test_bracket_scaffold.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_elbow_lucid_regression.py b/tests/test_elbow_lucid_regression.py index 97b6d56b47..a1c0156889 100644 --- a/tests/test_elbow_lucid_regression.py +++ b/tests/test_elbow_lucid_regression.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_elbow_scdoc.py b/tests/test_elbow_scdoc.py index c1ce74ba89..e3da0ea75c 100644 --- a/tests/test_elbow_scdoc.py +++ b/tests/test_elbow_scdoc.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_lucid_toycar_wrapper_tutorial_regression.py b/tests/test_lucid_toycar_wrapper_tutorial_regression.py index e4ac3c8653..5e2966c837 100644 --- a/tests/test_lucid_toycar_wrapper_tutorial_regression.py +++ b/tests/test_lucid_toycar_wrapper_tutorial_regression.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_pipe_tee_junction.py b/tests/test_pipe_tee_junction.py index 7841f6ae62..d18df177ae 100644 --- a/tests/test_pipe_tee_junction.py +++ b/tests/test_pipe_tee_junction.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_wrapper_control.py b/tests/test_wrapper_control.py index f99a63d7e7..08033c4efd 100644 --- a/tests/test_wrapper_control.py +++ b/tests/test_wrapper_control.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2026 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # From 3cecfc8d7fbc3cab51b6972494c89bf8a950dfe9 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Wed, 9 Sep 2026 13:38:46 +0000 Subject: [PATCH 04/14] chore: adding changelog file 1350.test.md [dependabot-skip] --- doc/changelog.d/{1350.maintenance.md => 1350.test.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename doc/changelog.d/{1350.maintenance.md => 1350.test.md} (100%) diff --git a/doc/changelog.d/1350.maintenance.md b/doc/changelog.d/1350.test.md similarity index 100% rename from doc/changelog.d/1350.maintenance.md rename to doc/changelog.d/1350.test.md From 6cb2ee29050858d63748fbe2223825a3f9d3f420 Mon Sep 17 00:00:00 2001 From: Alex Fernandez Date: Wed, 9 Sep 2026 16:53:18 +0200 Subject: [PATCH 05/14] fix: Check vulns --- .github/workflows/ci_cd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 23b7473cf7..962740c08b 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -54,6 +54,7 @@ jobs: token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} python-package-name: ${{ env.PACKAGE_NAME }} dev-mode: ${{ github.ref != 'refs/heads/main' }} + hide-log: false style: name: Code style From 5775da0d8a65f2bd563a134e361c73c034cbebba Mon Sep 17 00:00:00 2001 From: Alex Fernandez Date: Thu, 10 Sep 2026 11:51:14 +0200 Subject: [PATCH 06/14] fix: use get method to avoid try-except-pass --- .../meshing/prime/core/dynaexportutils.py | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/ansys/meshing/prime/core/dynaexportutils.py b/src/ansys/meshing/prime/core/dynaexportutils.py index 5760ac3a1c..f383982d7c 100644 --- a/src/ansys/meshing/prime/core/dynaexportutils.py +++ b/src/ansys/meshing/prime/core/dynaexportutils.py @@ -2454,26 +2454,16 @@ def _get_zone_with_id(self, _id): if self._zone_data is not None: for zone in self._zone_data: zone_details = self._zone_data[zone] - try: - if zone_details['id'] == _id: - zone_name = zone - zone_details = zone_details - return zone_name, zone_details - except: - pass + if isinstance(zone_details, dict) and zone_details.get('id') == _id: + return zone, zone_details elif self._part_data is not None: for part in self._part_data: part_info = self._part_data[part] if part_info is not None and part_info['Zones'] is not None: for zone in part_info['Zones']: zone_details = part_info['Zones'][zone] - try: - if zone_details['id'] == _id: - zone_name = zone - zone_details = zone_details - return zone_name, zone_details - except: - pass + if isinstance(zone_details, dict) and zone_details.get('id') == _id: + return zone, zone_details return None, {} def _is_material_used_with_shell(self, mat_name): From d91be16662d1d8a159d064f87c22e688584562fe Mon Sep 17 00:00:00 2001 From: Alex Fernandez Date: Thu, 10 Sep 2026 11:52:35 +0200 Subject: [PATCH 07/14] fix: ignore expected advisories --- src/ansys/meshing/prime/internals/launcher.py | 19 +++++++++---- .../prime/internals/prime_communicator.py | 3 ++- src/ansys/meshing/prime/internals/utils.py | 27 ++++++++++++------- 3 files changed, 33 insertions(+), 16 deletions(-) diff --git a/src/ansys/meshing/prime/internals/launcher.py b/src/ansys/meshing/prime/internals/launcher.py index 8795694c45..3a380f0bb9 100644 --- a/src/ansys/meshing/prime/internals/launcher.py +++ b/src/ansys/meshing/prime/internals/launcher.py @@ -23,7 +23,9 @@ """Helper module for launching the server.""" import logging import os -import subprocess + +# Required to launch the validated Prime Server executable. +import subprocess # nosec B404 import sys import uuid from typing import Optional @@ -43,8 +45,10 @@ from simple_upload_server.client import Client as FileClient config.set_has_pim(pypim.is_configured()) -except: - pass +except ImportError: + pypim = None + FileClient = None + config.set_has_pim(False) __all__ = ['launch_prime', 'launch_server_process'] @@ -188,7 +192,8 @@ def launch_server_process( server_args.append(f"--server_cert_dir={server_certs_dir}") logging.getLogger('PyPrimeMesh').info('Launching Ansys Prime Server') - server = subprocess.Popen(server_args, **kwargs) + # The executable path is validated above and arguments are passed without a shell. + server = subprocess.Popen(server_args, **kwargs) # nosec B603 return server @@ -203,6 +208,9 @@ def launch_remote_prime( if version is None: version = 'latest' + if pypim is None or FileClient is None: + raise RuntimeError('PyPIM and the simple upload server client are required.') + pim = pypim.connect() instance = pim.create_instance(product_name='prime', product_version=version) instance.wait_for_ready() @@ -215,8 +223,9 @@ def launch_remote_prime( ) client = Client(channel=channel, timeout=timeout) + # The service authenticates through its headers but requires a non-secret token value. file_service = FileClient( - token='token', + token='token', # nosec B106 url=instance.services['http-simple-upload-server'].uri, headers=instance.services['http-simple-upload-server'].headers, ) diff --git a/src/ansys/meshing/prime/internals/prime_communicator.py b/src/ansys/meshing/prime/internals/prime_communicator.py index db2af567b9..875d1e46cb 100644 --- a/src/ansys/meshing/prime/internals/prime_communicator.py +++ b/src/ansys/meshing/prime/internals/prime_communicator.py @@ -118,7 +118,8 @@ def run_on_server(self, model, recipe: str) -> dict: dict Response from the server. """ - exec(recipe, globals()) + # This API intentionally executes trusted recipes in the embedded Prime Server runtime. + exec(recipe, globals()) # nosec B102 output = '{"Results" : "' + str(return_value) + '"}' with config.numpy_array_optimization_disabled(): result = json.loads(output) diff --git a/src/ansys/meshing/prime/internals/utils.py b/src/ansys/meshing/prime/internals/utils.py index 821c519023..9cdc63893d 100644 --- a/src/ansys/meshing/prime/internals/utils.py +++ b/src/ansys/meshing/prime/internals/utils.py @@ -24,7 +24,9 @@ import logging import os import shutil -import subprocess + +# Required for fixed process-inspection commands. +import subprocess # nosec B404 import time import uuid from contextlib import contextmanager @@ -104,18 +106,23 @@ def get_child_processes(process): Process IDs of the processes. """ children = [] - cmd = subprocess.Popen("pgrep -P %d" % process, shell=True, stdout=subprocess.PIPE) - out = cmd.stdout.read().decode("utf-8") - cmd.wait() - for pid in out.split("\n")[:1]: + # These fixed system commands receive only integer process IDs and never use a shell. + cmd = subprocess.run( # nosec B603, B607 + ['pgrep', '-P', str(process)], + capture_output=True, + text=True, + check=False, + ) + for pid in cmd.stdout.splitlines()[:1]: if pid.strip() == '': break - ps_cmd = subprocess.Popen( - "ps -o cmd= {}".format(int(pid)), stdout=subprocess.PIPE, shell=True + ps_cmd = subprocess.run( # nosec B603, B607 + ['ps', '-o', 'cmd=', str(int(pid))], + capture_output=True, + text=True, + check=False, ) - ps_out = ps_cmd.stdout.read().decode("utf-8") - ps_cmd.wait() - ps_parts = ps_out.split() + ps_parts = ps_cmd.stdout.split() if ps_parts and "AnsysPrimeServer" in ps_parts[0]: children.append(int(pid)) else: From fe1d4c85f356e705542a3952b5d79aa38b96842c Mon Sep 17 00:00:00 2001 From: Alex Fernandez Date: Thu, 10 Sep 2026 11:56:36 +0200 Subject: [PATCH 08/14] fix: remove assertions --- src/ansys/meshing/prime/internals/client.py | 3 ++- .../meshing/prime/internals/grpc_communicator.py | 12 ++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/ansys/meshing/prime/internals/client.py b/src/ansys/meshing/prime/internals/client.py index afabeb391b..6aa65664bc 100644 --- a/src/ansys/meshing/prime/internals/client.py +++ b/src/ansys/meshing/prime/internals/client.py @@ -207,7 +207,8 @@ def exit(self): self._comm.close() self._comm = None if self._process is not None: - assert self._local == False + if self._local: + raise RuntimeError('A local client cannot own a server process.') terminate_process(self._process) self._process = None if config.using_container(): diff --git a/src/ansys/meshing/prime/internals/grpc_communicator.py b/src/ansys/meshing/prime/internals/grpc_communicator.py index e56717f44f..5dfdc9898a 100644 --- a/src/ansys/meshing/prime/internals/grpc_communicator.py +++ b/src/ansys/meshing/prime/internals/grpc_communicator.py @@ -105,7 +105,8 @@ def get_response_messages(response_generator): if response.HasField('completion_token'): break - assert response.HasField('content') + if not response.HasField('content'): + raise RuntimeError('Received a gRPC response without content or a completion token.') yield response.content @@ -419,13 +420,16 @@ def finalize(self): if self._stub is not None: try: response = self._stub.Finalize(prime_pb2.FinalizeRequest()) - message = get_response(response, '') - except Exception: + get_response(response, '') + except grpc.RpcError: # It is possible that the server is already down # when this is called. # In that case, we can just ignore the error. # The channel will be closed anyway. - pass + logging.getLogger('PyPrimeMesh').debug( + 'Prime Server was unavailable while finalizing the gRPC connection.', + exc_info=True, + ) else: raise RuntimeError("No connection with server") From 3752349ecbc74df95875b05977b00d41bddc88f4 Mon Sep 17 00:00:00 2001 From: Alex Fernandez Date: Thu, 10 Sep 2026 13:47:34 +0200 Subject: [PATCH 09/14] fix: errors --- .../meshing/prime/core/dynaexportutils.py | 18 ++++++++++--- src/ansys/meshing/prime/internals/client.py | 3 +-- .../prime/internals/grpc_communicator.py | 12 +++------ src/ansys/meshing/prime/internals/launcher.py | 11 +++----- src/ansys/meshing/prime/internals/utils.py | 27 +++++++++---------- 5 files changed, 35 insertions(+), 36 deletions(-) diff --git a/src/ansys/meshing/prime/core/dynaexportutils.py b/src/ansys/meshing/prime/core/dynaexportutils.py index f383982d7c..0c95e04b55 100644 --- a/src/ansys/meshing/prime/core/dynaexportutils.py +++ b/src/ansys/meshing/prime/core/dynaexportutils.py @@ -2454,16 +2454,26 @@ def _get_zone_with_id(self, _id): if self._zone_data is not None: for zone in self._zone_data: zone_details = self._zone_data[zone] - if isinstance(zone_details, dict) and zone_details.get('id') == _id: - return zone, zone_details + try: + if zone_details['id'] == _id: + zone_name = zone + zone_details = zone_details + return zone_name, zone_details + except: + zone_details = None elif self._part_data is not None: for part in self._part_data: part_info = self._part_data[part] if part_info is not None and part_info['Zones'] is not None: for zone in part_info['Zones']: zone_details = part_info['Zones'][zone] - if isinstance(zone_details, dict) and zone_details.get('id') == _id: - return zone, zone_details + try: + if zone_details['id'] == _id: + zone_name = zone + zone_details = zone_details + return zone_name, zone_details + except: + zone_details = None return None, {} def _is_material_used_with_shell(self, mat_name): diff --git a/src/ansys/meshing/prime/internals/client.py b/src/ansys/meshing/prime/internals/client.py index 6aa65664bc..cfa5e0b983 100644 --- a/src/ansys/meshing/prime/internals/client.py +++ b/src/ansys/meshing/prime/internals/client.py @@ -207,8 +207,7 @@ def exit(self): self._comm.close() self._comm = None if self._process is not None: - if self._local: - raise RuntimeError('A local client cannot own a server process.') + assert self._local == False # nosec B101 terminate_process(self._process) self._process = None if config.using_container(): diff --git a/src/ansys/meshing/prime/internals/grpc_communicator.py b/src/ansys/meshing/prime/internals/grpc_communicator.py index 5dfdc9898a..ab4a4b2fb7 100644 --- a/src/ansys/meshing/prime/internals/grpc_communicator.py +++ b/src/ansys/meshing/prime/internals/grpc_communicator.py @@ -105,8 +105,7 @@ def get_response_messages(response_generator): if response.HasField('completion_token'): break - if not response.HasField('content'): - raise RuntimeError('Received a gRPC response without content or a completion token.') + assert response.HasField('content') # nosec B101 yield response.content @@ -420,16 +419,13 @@ def finalize(self): if self._stub is not None: try: response = self._stub.Finalize(prime_pb2.FinalizeRequest()) - get_response(response, '') - except grpc.RpcError: + message = get_response(response, '') + except Exception: # It is possible that the server is already down # when this is called. # In that case, we can just ignore the error. # The channel will be closed anyway. - logging.getLogger('PyPrimeMesh').debug( - 'Prime Server was unavailable while finalizing the gRPC connection.', - exc_info=True, - ) + return else: raise RuntimeError("No connection with server") diff --git a/src/ansys/meshing/prime/internals/launcher.py b/src/ansys/meshing/prime/internals/launcher.py index 3a380f0bb9..706fa63954 100644 --- a/src/ansys/meshing/prime/internals/launcher.py +++ b/src/ansys/meshing/prime/internals/launcher.py @@ -24,7 +24,7 @@ import logging import os -# Required to launch the validated Prime Server executable. +# Required to launch Prime Server. import subprocess # nosec B404 import sys import uuid @@ -45,9 +45,7 @@ from simple_upload_server.client import Client as FileClient config.set_has_pim(pypim.is_configured()) -except ImportError: - pypim = None - FileClient = None +except: config.set_has_pim(False) __all__ = ['launch_prime', 'launch_server_process'] @@ -208,9 +206,6 @@ def launch_remote_prime( if version is None: version = 'latest' - if pypim is None or FileClient is None: - raise RuntimeError('PyPIM and the simple upload server client are required.') - pim = pypim.connect() instance = pim.create_instance(product_name='prime', product_version=version) instance.wait_for_ready() @@ -223,7 +218,7 @@ def launch_remote_prime( ) client = Client(channel=channel, timeout=timeout) - # The service authenticates through its headers but requires a non-secret token value. + # The service authenticates through headers; this is a required non-secret placeholder. file_service = FileClient( token='token', # nosec B106 url=instance.services['http-simple-upload-server'].uri, diff --git a/src/ansys/meshing/prime/internals/utils.py b/src/ansys/meshing/prime/internals/utils.py index 9cdc63893d..95add29815 100644 --- a/src/ansys/meshing/prime/internals/utils.py +++ b/src/ansys/meshing/prime/internals/utils.py @@ -25,7 +25,7 @@ import os import shutil -# Required for fixed process-inspection commands. +# Required for process inspection. import subprocess # nosec B404 import time import uuid @@ -106,23 +106,22 @@ def get_child_processes(process): Process IDs of the processes. """ children = [] - # These fixed system commands receive only integer process IDs and never use a shell. - cmd = subprocess.run( # nosec B603, B607 - ['pgrep', '-P', str(process)], - capture_output=True, - text=True, - check=False, + # The command interpolates only a process ID. + cmd = subprocess.Popen( # nosec B602 + "pgrep -P %d" % process, shell=True, stdout=subprocess.PIPE ) - for pid in cmd.stdout.splitlines()[:1]: + out = cmd.stdout.read().decode("utf-8") + cmd.wait() + for pid in out.split("\n")[:1]: if pid.strip() == '': break - ps_cmd = subprocess.run( # nosec B603, B607 - ['ps', '-o', 'cmd=', str(int(pid))], - capture_output=True, - text=True, - check=False, + # The PID is normalized to an integer. + ps_cmd = subprocess.Popen( # nosec B602 + "ps -o cmd= {}".format(int(pid)), stdout=subprocess.PIPE, shell=True ) - ps_parts = ps_cmd.stdout.split() + ps_out = ps_cmd.stdout.read().decode("utf-8") + ps_cmd.wait() + ps_parts = ps_out.split() if ps_parts and "AnsysPrimeServer" in ps_parts[0]: children.append(int(pid)) else: From 02224546527b01373cf88f50085013eb03465142 Mon Sep 17 00:00:00 2001 From: Shubham Shevale Date: Fri, 11 Sep 2026 15:47:02 +0530 Subject: [PATCH 10/14] fix post vulnerability issues --- src/ansys/meshing/prime/core/mapdlcdbexportutils.py | 6 +++--- src/ansys/meshing/prime/internals/client.py | 2 -- src/ansys/meshing/prime/internals/launcher.py | 2 ++ src/ansys/meshing/prime/internals/yaml_converter.py | 10 ++++++---- src/ansys/meshing/prime/internals/yaml_parser.py | 3 ++- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/ansys/meshing/prime/core/mapdlcdbexportutils.py b/src/ansys/meshing/prime/core/mapdlcdbexportutils.py index e00e083cad..e9658eb17c 100644 --- a/src/ansys/meshing/prime/core/mapdlcdbexportutils.py +++ b/src/ansys/meshing/prime/core/mapdlcdbexportutils.py @@ -2196,8 +2196,8 @@ def _fmt(v): if len(self._gasket_zone_gap_data[material]) > 1: self._logger.warning( f"Multiple initial gap values are provided for material {material} " - f"from the zone data, only the first value is used for processing " - f"gasket thickness behavior." + f"from the zone data, " + f"only the first value is used for processing gasket thickness behavior." ) initial_gap = self._gasket_zone_gap_data[material][0] else: @@ -2261,7 +2261,7 @@ def _fmt(v): in gasket_thickness_behavior_data ): gasket_thickness_behavior_data = gasket_thickness_behavior_data.replace( - f"TB, GASKET, {mat_id}, , 0, {derection_map[data_direction]}\n", + f"TB, GASKET, {mat_id}, , 0, " f"{derection_map[data_direction]}\n", f"TB, GASKET, {mat_id}, , {pt_counter}, " f"{derection_map[data_direction]}\n", ) diff --git a/src/ansys/meshing/prime/internals/client.py b/src/ansys/meshing/prime/internals/client.py index cfa5e0b983..c070140207 100644 --- a/src/ansys/meshing/prime/internals/client.py +++ b/src/ansys/meshing/prime/internals/client.py @@ -24,7 +24,6 @@ import logging import os -from pathlib import Path from typing import Optional import ansys.meshing.prime.examples as examples @@ -88,7 +87,6 @@ def __init__( self._local = local self._process = server_process self._comm = None - self._cleanup_script_path: Path = None if not local: if ( connection_type == config.ConnectionType.GRPC_SECURE diff --git a/src/ansys/meshing/prime/internals/launcher.py b/src/ansys/meshing/prime/internals/launcher.py index 706fa63954..50b89daa7e 100644 --- a/src/ansys/meshing/prime/internals/launcher.py +++ b/src/ansys/meshing/prime/internals/launcher.py @@ -282,6 +282,7 @@ def launch_prime( ConnectionError When there is an error in connecting to the gRPC server. """ + logging.getLogger('PyPrimeMesh').info("Launching Ansys Prime Server...") if config.has_pim(): return launch_remote_prime(version=version, timeout=timeout) @@ -311,6 +312,7 @@ def launch_prime( ) launch_container = bool(int(os.environ.get('PYPRIMEMESH_LAUNCH_CONTAINER', '0'))) + logging.getLogger('PyPrimeMesh').info(f'Launch container: {launch_container}') if launch_container: logging.getLogger('PyPrimeMesh').info("Launching container...") container_name = utils.make_unique_container_name('ansys-prime-server') diff --git a/src/ansys/meshing/prime/internals/yaml_converter.py b/src/ansys/meshing/prime/internals/yaml_converter.py index 037867a6a8..4ab8771150 100644 --- a/src/ansys/meshing/prime/internals/yaml_converter.py +++ b/src/ansys/meshing/prime/internals/yaml_converter.py @@ -20,11 +20,13 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""YAML to PRIME JSON schema converter module. +""" +YAML to PRIME JSON Schema Converter Module. Converts user-friendly YAML schema definitions to ANSYS PRIME's JSON schema format. -Supports both simple keywords (like *BOUNDARY) and complex parameter-variant keywords -(like *SURFACE). Preserves Output templates and field metadata. +Supports both simple keywords (like *BOUNDARY) and complex parameter-variant +keywords (like *SURFACE). +Preserves Output templates and field metadata. Architecture: - Simple keywords: Data -> Data_Block.Data_Fields + Output_Template @@ -50,7 +52,7 @@ class YamlToPrimeJsonConverter: """Converts YAML keyword definitions to PRIME JSON schema format.""" def __init__(self): - """Initialize an empty converter.""" + """Initialize the converter.""" self.schemas = {} self.logger = logging.getLogger(__name__) diff --git a/src/ansys/meshing/prime/internals/yaml_parser.py b/src/ansys/meshing/prime/internals/yaml_parser.py index b2317d5a49..4a80e0ced3 100644 --- a/src/ansys/meshing/prime/internals/yaml_parser.py +++ b/src/ansys/meshing/prime/internals/yaml_parser.py @@ -20,7 +20,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -"""ANSYS PRIME standalone YAML parser. +""" +ANSYS PRIME Standalone YAML Parser. Zero external dependencies - pure Python implementation. From 68a2a46ab3310a6816906f78dd4bfae9349be0c0 Mon Sep 17 00:00:00 2001 From: Shubham Shevale Date: Tue, 15 Sep 2026 10:48:28 +0530 Subject: [PATCH 11/14] fix python issues --- src/ansys/meshing/prime/internals/launcher.py | 2 +- src/ansys/meshing/prime/relaxed_json/scanner.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ansys/meshing/prime/internals/launcher.py b/src/ansys/meshing/prime/internals/launcher.py index 50b89daa7e..2c198bf974 100644 --- a/src/ansys/meshing/prime/internals/launcher.py +++ b/src/ansys/meshing/prime/internals/launcher.py @@ -316,7 +316,7 @@ def launch_prime( if launch_container: logging.getLogger('PyPrimeMesh').info("Launching container...") container_name = utils.make_unique_container_name('ansys-prime-server') - utils.launch_prime_github_container( + port = utils.launch_prime_github_container( port=port, name=container_name, version=version, diff --git a/src/ansys/meshing/prime/relaxed_json/scanner.py b/src/ansys/meshing/prime/relaxed_json/scanner.py index a726bab8ba..7631ef8c02 100644 --- a/src/ansys/meshing/prime/relaxed_json/scanner.py +++ b/src/ansys/meshing/prime/relaxed_json/scanner.py @@ -25,7 +25,7 @@ from typing import Callable, Tuple NUMBER_RE = re.compile( - b'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?', re.VERBOSE | re.MULTILINE | re.DOTALL + rb'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?', re.VERBOSE | re.MULTILINE | re.DOTALL ) From 1dbab913dacb79b5a86d4e7376387ef647418792 Mon Sep 17 00:00:00 2001 From: Shubham Shevale Date: Tue, 15 Sep 2026 10:51:48 +0530 Subject: [PATCH 12/14] fix python issues_2 --- src/ansys/meshing/prime/internals/launcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ansys/meshing/prime/internals/launcher.py b/src/ansys/meshing/prime/internals/launcher.py index 2c198bf974..50b89daa7e 100644 --- a/src/ansys/meshing/prime/internals/launcher.py +++ b/src/ansys/meshing/prime/internals/launcher.py @@ -316,7 +316,7 @@ def launch_prime( if launch_container: logging.getLogger('PyPrimeMesh').info("Launching container...") container_name = utils.make_unique_container_name('ansys-prime-server') - port = utils.launch_prime_github_container( + utils.launch_prime_github_container( port=port, name=container_name, version=version, From 733aff389532aa579edf83aaf0070584cac24d37 Mon Sep 17 00:00:00 2001 From: Alex Fernandez Date: Thu, 17 Sep 2026 10:34:34 +0200 Subject: [PATCH 13/14] fix: License headers --- .pre-commit-config.yaml | 2 +- LICENSE | 4 ++-- docker/build_docker_linux.py | 2 +- examples/gallery/00_lucid_file_IO.py | 2 +- examples/gallery/01_bracket_scaffold.py | 2 +- examples/gallery/02_lucid_mixing_elbow.py | 2 +- examples/gallery/03_lucid_pipe_tee.py | 2 +- examples/gallery/04_lucid_toy_car.py | 2 +- examples/gallery/05_pcb_stacker.py | 2 +- examples/gallery/06_blade_morph.py | 2 +- examples/gallery/07_saddle_bracket.py | 2 +- examples/gallery/08_lucid_generic_f1_rear_wing.py | 2 +- examples/gallery/09_multi_layer_quad_mesh_pcb.py | 2 +- examples/gallery/10_wheel_ground_contact_patch.py | 2 +- examples/gallery/12_import_from_pygeometry.py | 2 +- examples/gallery_beta/11_solder_ball.py | 2 +- examples/misc/example_template.py | 2 +- examples/other/elbow_trame.py | 2 +- examples/other/mixing_elbow.py | 2 +- examples/other/pipe_tee.py | 2 +- src/ansys/meshing/prime/_version.py | 2 +- src/ansys/meshing/prime/core/controldata.py | 2 +- src/ansys/meshing/prime/core/dynaexportutils.py | 2 +- src/ansys/meshing/prime/core/fileio.py | 2 +- src/ansys/meshing/prime/core/mapdlcdbexportutils.py | 2 +- src/ansys/meshing/prime/core/mesh.py | 2 +- src/ansys/meshing/prime/core/model.py | 2 +- src/ansys/meshing/prime/core/part.py | 2 +- src/ansys/meshing/prime/core/periodiccontrol.py | 2 +- src/ansys/meshing/prime/core/prismcontrol.py | 2 +- src/ansys/meshing/prime/core/sizecontrol.py | 2 +- src/ansys/meshing/prime/core/surfaceutilities.py | 2 +- src/ansys/meshing/prime/core/surfer.py | 2 +- src/ansys/meshing/prime/core/volumecontrol.py | 2 +- src/ansys/meshing/prime/core/volumesweeper.py | 2 +- src/ansys/meshing/prime/core/wrapper.py | 2 +- src/ansys/meshing/prime/core/wrappercontrol.py | 2 +- src/ansys/meshing/prime/examples/__init__.py | 2 +- src/ansys/meshing/prime/examples/download_utilities.py | 2 +- src/ansys/meshing/prime/examples/examples.py | 2 +- src/ansys/meshing/prime/examples/unit_test_examples.py | 2 +- src/ansys/meshing/prime/graphics/__init__.py | 2 +- src/ansys/meshing/prime/graphics/plotter.py | 2 +- src/ansys/meshing/prime/graphics/widgets/color_by_type.py | 2 +- src/ansys/meshing/prime/graphics/widgets/hide_picked.py | 2 +- src/ansys/meshing/prime/graphics/widgets/picked_info.py | 2 +- src/ansys/meshing/prime/graphics/widgets/toggle_edges.py | 2 +- src/ansys/meshing/prime/internals/client.py | 2 +- src/ansys/meshing/prime/internals/comm_manager.py | 2 +- src/ansys/meshing/prime/internals/communicator.py | 2 +- src/ansys/meshing/prime/internals/config.py | 2 +- src/ansys/meshing/prime/internals/cyberchannel.py | 2 +- src/ansys/meshing/prime/internals/defaults.py | 2 +- src/ansys/meshing/prime/internals/error_handling.py | 2 +- src/ansys/meshing/prime/internals/grpc_communicator.py | 2 +- src/ansys/meshing/prime/internals/grpc_utils.py | 2 +- src/ansys/meshing/prime/internals/json_utils.py | 2 +- src/ansys/meshing/prime/internals/launcher.py | 2 +- src/ansys/meshing/prime/internals/logger.py | 2 +- src/ansys/meshing/prime/internals/prime_communicator.py | 2 +- src/ansys/meshing/prime/internals/socket_communicator.py | 2 +- src/ansys/meshing/prime/internals/utils.py | 2 +- src/ansys/meshing/prime/internals/yaml_converter.py | 2 +- src/ansys/meshing/prime/internals/yaml_parser.py | 2 +- src/ansys/meshing/prime/lucid/__init__.py | 2 +- src/ansys/meshing/prime/lucid/mesh_util.py | 2 +- src/ansys/meshing/prime/lucid/scope.py | 2 +- src/ansys/meshing/prime/lucid/utils.py | 2 +- src/ansys/meshing/prime/params/primestructs.py | 2 +- src/ansys/meshing/prime/relaxed_json/__init__.py | 2 +- src/ansys/meshing/prime/relaxed_json/decoder.py | 2 +- src/ansys/meshing/prime/relaxed_json/encoder.py | 2 +- src/ansys/meshing/prime/relaxed_json/scanner.py | 2 +- tests/__init__.py | 2 +- tests/conftest.py | 2 +- tests/core/conftest.py | 2 +- tests/core/test_controldata.py | 2 +- tests/core/test_fileio.py | 2 +- tests/core/test_surfaceutilities.py | 2 +- tests/core/test_surfer.py | 2 +- tests/graphics/test_graphics.py | 2 +- tests/internals/test_logger.py | 2 +- tests/internals/test_utils.py | 2 +- tests/lucid/test_mesh_utils.py | 2 +- tests/test_bracket_scaffold.py | 2 +- tests/test_elbow_lucid_regression.py | 2 +- tests/test_elbow_scdoc.py | 4 +++- tests/test_lucid_toycar_wrapper_tutorial_regression.py | 2 +- tests/test_pipe_tee_junction.py | 2 +- tests/test_wrapper_control.py | 2 +- 90 files changed, 93 insertions(+), 91 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 47a2bce26e..6fc60a73c7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -54,4 +54,4 @@ repos: hooks: - id: add-license-headers args: - - LICENSE \ No newline at end of file + - --start_year=2026 \ No newline at end of file diff --git a/LICENSE b/LICENSE index d74618a4e1..412bb01598 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2022 - 2026 ANSYS, Inc. and/or its affiliates. +Copyright (c) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in @@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +SOFTWARE. \ No newline at end of file diff --git a/docker/build_docker_linux.py b/docker/build_docker_linux.py index 353471da89..e3348af096 100644 --- a/docker/build_docker_linux.py +++ b/docker/build_docker_linux.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/00_lucid_file_IO.py b/examples/gallery/00_lucid_file_IO.py index eaa9430ef5..16c1708516 100644 --- a/examples/gallery/00_lucid_file_IO.py +++ b/examples/gallery/00_lucid_file_IO.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/01_bracket_scaffold.py b/examples/gallery/01_bracket_scaffold.py index 714cab264f..0ca5f2e439 100644 --- a/examples/gallery/01_bracket_scaffold.py +++ b/examples/gallery/01_bracket_scaffold.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/02_lucid_mixing_elbow.py b/examples/gallery/02_lucid_mixing_elbow.py index 54516f2c92..20a6f5b352 100644 --- a/examples/gallery/02_lucid_mixing_elbow.py +++ b/examples/gallery/02_lucid_mixing_elbow.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/03_lucid_pipe_tee.py b/examples/gallery/03_lucid_pipe_tee.py index 264870a64e..a160cfb082 100644 --- a/examples/gallery/03_lucid_pipe_tee.py +++ b/examples/gallery/03_lucid_pipe_tee.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/04_lucid_toy_car.py b/examples/gallery/04_lucid_toy_car.py index 1a165850bf..d2d29e7360 100644 --- a/examples/gallery/04_lucid_toy_car.py +++ b/examples/gallery/04_lucid_toy_car.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/05_pcb_stacker.py b/examples/gallery/05_pcb_stacker.py index 669eb11bc6..6922e24e4c 100644 --- a/examples/gallery/05_pcb_stacker.py +++ b/examples/gallery/05_pcb_stacker.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/06_blade_morph.py b/examples/gallery/06_blade_morph.py index 6e47a88753..cfbc0ca1f4 100644 --- a/examples/gallery/06_blade_morph.py +++ b/examples/gallery/06_blade_morph.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/07_saddle_bracket.py b/examples/gallery/07_saddle_bracket.py index db41de338a..59b9aec2aa 100644 --- a/examples/gallery/07_saddle_bracket.py +++ b/examples/gallery/07_saddle_bracket.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/08_lucid_generic_f1_rear_wing.py b/examples/gallery/08_lucid_generic_f1_rear_wing.py index 5e81c9cc37..d427b8dedc 100644 --- a/examples/gallery/08_lucid_generic_f1_rear_wing.py +++ b/examples/gallery/08_lucid_generic_f1_rear_wing.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/09_multi_layer_quad_mesh_pcb.py b/examples/gallery/09_multi_layer_quad_mesh_pcb.py index f2cffc015f..bfb8113e02 100644 --- a/examples/gallery/09_multi_layer_quad_mesh_pcb.py +++ b/examples/gallery/09_multi_layer_quad_mesh_pcb.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/10_wheel_ground_contact_patch.py b/examples/gallery/10_wheel_ground_contact_patch.py index 5c3fac57ab..4858daf6a5 100644 --- a/examples/gallery/10_wheel_ground_contact_patch.py +++ b/examples/gallery/10_wheel_ground_contact_patch.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery/12_import_from_pygeometry.py b/examples/gallery/12_import_from_pygeometry.py index fc7289aec3..ea05000989 100644 --- a/examples/gallery/12_import_from_pygeometry.py +++ b/examples/gallery/12_import_from_pygeometry.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/gallery_beta/11_solder_ball.py b/examples/gallery_beta/11_solder_ball.py index d35be930e3..9ff949f8aa 100644 --- a/examples/gallery_beta/11_solder_ball.py +++ b/examples/gallery_beta/11_solder_ball.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/misc/example_template.py b/examples/misc/example_template.py index 9d7f63e511..5f1bb7ed42 100644 --- a/examples/misc/example_template.py +++ b/examples/misc/example_template.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/other/elbow_trame.py b/examples/other/elbow_trame.py index 1984d5b948..353dcba39c 100644 --- a/examples/other/elbow_trame.py +++ b/examples/other/elbow_trame.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/other/mixing_elbow.py b/examples/other/mixing_elbow.py index 32896fc142..309d749202 100644 --- a/examples/other/mixing_elbow.py +++ b/examples/other/mixing_elbow.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/examples/other/pipe_tee.py b/examples/other/pipe_tee.py index 27a3e362be..f765d8acb2 100644 --- a/examples/other/pipe_tee.py +++ b/examples/other/pipe_tee.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/_version.py b/src/ansys/meshing/prime/_version.py index 410d263700..24efebeb9d 100644 --- a/src/ansys/meshing/prime/_version.py +++ b/src/ansys/meshing/prime/_version.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/core/controldata.py b/src/ansys/meshing/prime/core/controldata.py index e096505f82..24ca0f79ef 100644 --- a/src/ansys/meshing/prime/core/controldata.py +++ b/src/ansys/meshing/prime/core/controldata.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/core/dynaexportutils.py b/src/ansys/meshing/prime/core/dynaexportutils.py index 0c95e04b55..7a401992f9 100644 --- a/src/ansys/meshing/prime/core/dynaexportutils.py +++ b/src/ansys/meshing/prime/core/dynaexportutils.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/core/fileio.py b/src/ansys/meshing/prime/core/fileio.py index b5ce604e6f..074cd6141d 100644 --- a/src/ansys/meshing/prime/core/fileio.py +++ b/src/ansys/meshing/prime/core/fileio.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/core/mapdlcdbexportutils.py b/src/ansys/meshing/prime/core/mapdlcdbexportutils.py index e00e083cad..99ca85739c 100644 --- a/src/ansys/meshing/prime/core/mapdlcdbexportutils.py +++ b/src/ansys/meshing/prime/core/mapdlcdbexportutils.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/core/mesh.py b/src/ansys/meshing/prime/core/mesh.py index c0341b7106..6f9de3eddf 100644 --- a/src/ansys/meshing/prime/core/mesh.py +++ b/src/ansys/meshing/prime/core/mesh.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/core/model.py b/src/ansys/meshing/prime/core/model.py index cc24a1d7db..d9e73cb38a 100644 --- a/src/ansys/meshing/prime/core/model.py +++ b/src/ansys/meshing/prime/core/model.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/core/part.py b/src/ansys/meshing/prime/core/part.py index 46fddc5390..fd0298abe2 100644 --- a/src/ansys/meshing/prime/core/part.py +++ b/src/ansys/meshing/prime/core/part.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/core/periodiccontrol.py b/src/ansys/meshing/prime/core/periodiccontrol.py index 2ca31b0c59..0f9fdc6139 100644 --- a/src/ansys/meshing/prime/core/periodiccontrol.py +++ b/src/ansys/meshing/prime/core/periodiccontrol.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/core/prismcontrol.py b/src/ansys/meshing/prime/core/prismcontrol.py index a1b2d6369c..faa54bc8e9 100644 --- a/src/ansys/meshing/prime/core/prismcontrol.py +++ b/src/ansys/meshing/prime/core/prismcontrol.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/core/sizecontrol.py b/src/ansys/meshing/prime/core/sizecontrol.py index c08e65f2cf..05d9edcd53 100644 --- a/src/ansys/meshing/prime/core/sizecontrol.py +++ b/src/ansys/meshing/prime/core/sizecontrol.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/core/surfaceutilities.py b/src/ansys/meshing/prime/core/surfaceutilities.py index ff55f3f225..aec4846331 100644 --- a/src/ansys/meshing/prime/core/surfaceutilities.py +++ b/src/ansys/meshing/prime/core/surfaceutilities.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/core/surfer.py b/src/ansys/meshing/prime/core/surfer.py index d7864a5b0f..8bd0b62789 100644 --- a/src/ansys/meshing/prime/core/surfer.py +++ b/src/ansys/meshing/prime/core/surfer.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/core/volumecontrol.py b/src/ansys/meshing/prime/core/volumecontrol.py index d27eec3b36..8667a4e6d0 100644 --- a/src/ansys/meshing/prime/core/volumecontrol.py +++ b/src/ansys/meshing/prime/core/volumecontrol.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/core/volumesweeper.py b/src/ansys/meshing/prime/core/volumesweeper.py index fd5f613d8a..4d5819002d 100644 --- a/src/ansys/meshing/prime/core/volumesweeper.py +++ b/src/ansys/meshing/prime/core/volumesweeper.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/core/wrapper.py b/src/ansys/meshing/prime/core/wrapper.py index 3953e20a95..d7d1431dc0 100644 --- a/src/ansys/meshing/prime/core/wrapper.py +++ b/src/ansys/meshing/prime/core/wrapper.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/core/wrappercontrol.py b/src/ansys/meshing/prime/core/wrappercontrol.py index cfa3efb613..883895eda0 100644 --- a/src/ansys/meshing/prime/core/wrappercontrol.py +++ b/src/ansys/meshing/prime/core/wrappercontrol.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/examples/__init__.py b/src/ansys/meshing/prime/examples/__init__.py index 0cc83976de..43ac264ae1 100644 --- a/src/ansys/meshing/prime/examples/__init__.py +++ b/src/ansys/meshing/prime/examples/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/examples/download_utilities.py b/src/ansys/meshing/prime/examples/download_utilities.py index e118078282..7e8787436a 100644 --- a/src/ansys/meshing/prime/examples/download_utilities.py +++ b/src/ansys/meshing/prime/examples/download_utilities.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/examples/examples.py b/src/ansys/meshing/prime/examples/examples.py index 631160e59d..9826f39480 100644 --- a/src/ansys/meshing/prime/examples/examples.py +++ b/src/ansys/meshing/prime/examples/examples.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/examples/unit_test_examples.py b/src/ansys/meshing/prime/examples/unit_test_examples.py index 207016f202..c6d238849c 100644 --- a/src/ansys/meshing/prime/examples/unit_test_examples.py +++ b/src/ansys/meshing/prime/examples/unit_test_examples.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/graphics/__init__.py b/src/ansys/meshing/prime/graphics/__init__.py index d9ddfcba21..370869a931 100644 --- a/src/ansys/meshing/prime/graphics/__init__.py +++ b/src/ansys/meshing/prime/graphics/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/graphics/plotter.py b/src/ansys/meshing/prime/graphics/plotter.py index 791e080d2f..95455898df 100644 --- a/src/ansys/meshing/prime/graphics/plotter.py +++ b/src/ansys/meshing/prime/graphics/plotter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/graphics/widgets/color_by_type.py b/src/ansys/meshing/prime/graphics/widgets/color_by_type.py index 0d3754be3b..faa29c3144 100644 --- a/src/ansys/meshing/prime/graphics/widgets/color_by_type.py +++ b/src/ansys/meshing/prime/graphics/widgets/color_by_type.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/graphics/widgets/hide_picked.py b/src/ansys/meshing/prime/graphics/widgets/hide_picked.py index a6a1f616bf..16b7547593 100644 --- a/src/ansys/meshing/prime/graphics/widgets/hide_picked.py +++ b/src/ansys/meshing/prime/graphics/widgets/hide_picked.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/graphics/widgets/picked_info.py b/src/ansys/meshing/prime/graphics/widgets/picked_info.py index 0df3283700..ef6070adc3 100644 --- a/src/ansys/meshing/prime/graphics/widgets/picked_info.py +++ b/src/ansys/meshing/prime/graphics/widgets/picked_info.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/graphics/widgets/toggle_edges.py b/src/ansys/meshing/prime/graphics/widgets/toggle_edges.py index 24aaa896b8..7304b9c25e 100644 --- a/src/ansys/meshing/prime/graphics/widgets/toggle_edges.py +++ b/src/ansys/meshing/prime/graphics/widgets/toggle_edges.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/internals/client.py b/src/ansys/meshing/prime/internals/client.py index cfa5e0b983..f602163618 100644 --- a/src/ansys/meshing/prime/internals/client.py +++ b/src/ansys/meshing/prime/internals/client.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/internals/comm_manager.py b/src/ansys/meshing/prime/internals/comm_manager.py index 6920d497e4..b21f755070 100644 --- a/src/ansys/meshing/prime/internals/comm_manager.py +++ b/src/ansys/meshing/prime/internals/comm_manager.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/internals/communicator.py b/src/ansys/meshing/prime/internals/communicator.py index ad98bd9703..b1700859fd 100644 --- a/src/ansys/meshing/prime/internals/communicator.py +++ b/src/ansys/meshing/prime/internals/communicator.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/internals/config.py b/src/ansys/meshing/prime/internals/config.py index 06177dfe82..7e961aed53 100644 --- a/src/ansys/meshing/prime/internals/config.py +++ b/src/ansys/meshing/prime/internals/config.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/internals/cyberchannel.py b/src/ansys/meshing/prime/internals/cyberchannel.py index 9f9cdd34de..dab9136af6 100644 --- a/src/ansys/meshing/prime/internals/cyberchannel.py +++ b/src/ansys/meshing/prime/internals/cyberchannel.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/internals/defaults.py b/src/ansys/meshing/prime/internals/defaults.py index b828116c57..202b58c34f 100644 --- a/src/ansys/meshing/prime/internals/defaults.py +++ b/src/ansys/meshing/prime/internals/defaults.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/internals/error_handling.py b/src/ansys/meshing/prime/internals/error_handling.py index 9a636b741a..9c1ed9db9c 100644 --- a/src/ansys/meshing/prime/internals/error_handling.py +++ b/src/ansys/meshing/prime/internals/error_handling.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/internals/grpc_communicator.py b/src/ansys/meshing/prime/internals/grpc_communicator.py index ab4a4b2fb7..2bde1a0fc1 100644 --- a/src/ansys/meshing/prime/internals/grpc_communicator.py +++ b/src/ansys/meshing/prime/internals/grpc_communicator.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/internals/grpc_utils.py b/src/ansys/meshing/prime/internals/grpc_utils.py index ccfb3b3f30..6c036969c0 100644 --- a/src/ansys/meshing/prime/internals/grpc_utils.py +++ b/src/ansys/meshing/prime/internals/grpc_utils.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/internals/json_utils.py b/src/ansys/meshing/prime/internals/json_utils.py index a4e95ccd4e..12ab84dd36 100644 --- a/src/ansys/meshing/prime/internals/json_utils.py +++ b/src/ansys/meshing/prime/internals/json_utils.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/internals/launcher.py b/src/ansys/meshing/prime/internals/launcher.py index 706fa63954..2a799e404b 100644 --- a/src/ansys/meshing/prime/internals/launcher.py +++ b/src/ansys/meshing/prime/internals/launcher.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/internals/logger.py b/src/ansys/meshing/prime/internals/logger.py index d1d636ddb7..7661870266 100644 --- a/src/ansys/meshing/prime/internals/logger.py +++ b/src/ansys/meshing/prime/internals/logger.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/internals/prime_communicator.py b/src/ansys/meshing/prime/internals/prime_communicator.py index 875d1e46cb..fe4a90ed24 100644 --- a/src/ansys/meshing/prime/internals/prime_communicator.py +++ b/src/ansys/meshing/prime/internals/prime_communicator.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/internals/socket_communicator.py b/src/ansys/meshing/prime/internals/socket_communicator.py index 92b825aa06..dbee698518 100644 --- a/src/ansys/meshing/prime/internals/socket_communicator.py +++ b/src/ansys/meshing/prime/internals/socket_communicator.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/internals/utils.py b/src/ansys/meshing/prime/internals/utils.py index 95add29815..04292fa78f 100644 --- a/src/ansys/meshing/prime/internals/utils.py +++ b/src/ansys/meshing/prime/internals/utils.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/internals/yaml_converter.py b/src/ansys/meshing/prime/internals/yaml_converter.py index 037867a6a8..40e672a7e1 100644 --- a/src/ansys/meshing/prime/internals/yaml_converter.py +++ b/src/ansys/meshing/prime/internals/yaml_converter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/internals/yaml_parser.py b/src/ansys/meshing/prime/internals/yaml_parser.py index b2317d5a49..58f134e78f 100644 --- a/src/ansys/meshing/prime/internals/yaml_parser.py +++ b/src/ansys/meshing/prime/internals/yaml_parser.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/lucid/__init__.py b/src/ansys/meshing/prime/lucid/__init__.py index 261eec08f0..d32dc6642a 100644 --- a/src/ansys/meshing/prime/lucid/__init__.py +++ b/src/ansys/meshing/prime/lucid/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/lucid/mesh_util.py b/src/ansys/meshing/prime/lucid/mesh_util.py index 854c8d7b65..6c532c7c79 100644 --- a/src/ansys/meshing/prime/lucid/mesh_util.py +++ b/src/ansys/meshing/prime/lucid/mesh_util.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/lucid/scope.py b/src/ansys/meshing/prime/lucid/scope.py index 9fd056cc8b..15c0e37ade 100644 --- a/src/ansys/meshing/prime/lucid/scope.py +++ b/src/ansys/meshing/prime/lucid/scope.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/lucid/utils.py b/src/ansys/meshing/prime/lucid/utils.py index 8dd32cc55a..ddc3c4b3b3 100644 --- a/src/ansys/meshing/prime/lucid/utils.py +++ b/src/ansys/meshing/prime/lucid/utils.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/params/primestructs.py b/src/ansys/meshing/prime/params/primestructs.py index ecdf55f8e0..ddc4d9c976 100644 --- a/src/ansys/meshing/prime/params/primestructs.py +++ b/src/ansys/meshing/prime/params/primestructs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/relaxed_json/__init__.py b/src/ansys/meshing/prime/relaxed_json/__init__.py index ba53978efa..eeae7b5269 100644 --- a/src/ansys/meshing/prime/relaxed_json/__init__.py +++ b/src/ansys/meshing/prime/relaxed_json/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/relaxed_json/decoder.py b/src/ansys/meshing/prime/relaxed_json/decoder.py index 4457af5c61..51de4cdc68 100644 --- a/src/ansys/meshing/prime/relaxed_json/decoder.py +++ b/src/ansys/meshing/prime/relaxed_json/decoder.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/relaxed_json/encoder.py b/src/ansys/meshing/prime/relaxed_json/encoder.py index 9c09c805ac..92d88c179b 100644 --- a/src/ansys/meshing/prime/relaxed_json/encoder.py +++ b/src/ansys/meshing/prime/relaxed_json/encoder.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/meshing/prime/relaxed_json/scanner.py b/src/ansys/meshing/prime/relaxed_json/scanner.py index a726bab8ba..a8222aae4d 100644 --- a/src/ansys/meshing/prime/relaxed_json/scanner.py +++ b/src/ansys/meshing/prime/relaxed_json/scanner.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/__init__.py b/tests/__init__.py index 55573db356..9ee3c7e4ee 100644 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/conftest.py b/tests/conftest.py index 663a8f0020..33131c2c65 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/core/conftest.py b/tests/core/conftest.py index c2eeec2514..2c6f15736f 100644 --- a/tests/core/conftest.py +++ b/tests/core/conftest.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/core/test_controldata.py b/tests/core/test_controldata.py index 2f6b20617f..9e19c26994 100644 --- a/tests/core/test_controldata.py +++ b/tests/core/test_controldata.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/core/test_fileio.py b/tests/core/test_fileio.py index f405e416fb..2a85ad8eab 100644 --- a/tests/core/test_fileio.py +++ b/tests/core/test_fileio.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/core/test_surfaceutilities.py b/tests/core/test_surfaceutilities.py index 7ff2bc8bf3..029d3b6228 100644 --- a/tests/core/test_surfaceutilities.py +++ b/tests/core/test_surfaceutilities.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/core/test_surfer.py b/tests/core/test_surfer.py index 564bbf6c6b..54540a1ed8 100644 --- a/tests/core/test_surfer.py +++ b/tests/core/test_surfer.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/graphics/test_graphics.py b/tests/graphics/test_graphics.py index 76df2d7a03..6ee1f3d658 100644 --- a/tests/graphics/test_graphics.py +++ b/tests/graphics/test_graphics.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/internals/test_logger.py b/tests/internals/test_logger.py index 3e8c793a38..9ed10b02e0 100644 --- a/tests/internals/test_logger.py +++ b/tests/internals/test_logger.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/internals/test_utils.py b/tests/internals/test_utils.py index 1aed64253d..47c99ea85c 100644 --- a/tests/internals/test_utils.py +++ b/tests/internals/test_utils.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/lucid/test_mesh_utils.py b/tests/lucid/test_mesh_utils.py index 87519f224a..ef06b113d5 100644 --- a/tests/lucid/test_mesh_utils.py +++ b/tests/lucid/test_mesh_utils.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_bracket_scaffold.py b/tests/test_bracket_scaffold.py index 08eed7e17d..8710e2377e 100644 --- a/tests/test_bracket_scaffold.py +++ b/tests/test_bracket_scaffold.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_elbow_lucid_regression.py b/tests/test_elbow_lucid_regression.py index a1c0156889..6e61c27d69 100644 --- a/tests/test_elbow_lucid_regression.py +++ b/tests/test_elbow_lucid_regression.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_elbow_scdoc.py b/tests/test_elbow_scdoc.py index e3da0ea75c..27f76d1c2c 100644 --- a/tests/test_elbow_scdoc.py +++ b/tests/test_elbow_scdoc.py @@ -1,7 +1,9 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # +# +# # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights diff --git a/tests/test_lucid_toycar_wrapper_tutorial_regression.py b/tests/test_lucid_toycar_wrapper_tutorial_regression.py index 5e2966c837..cf9376bcc5 100644 --- a/tests/test_lucid_toycar_wrapper_tutorial_regression.py +++ b/tests/test_lucid_toycar_wrapper_tutorial_regression.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_pipe_tee_junction.py b/tests/test_pipe_tee_junction.py index d18df177ae..a9dc68c84a 100644 --- a/tests/test_pipe_tee_junction.py +++ b/tests/test_pipe_tee_junction.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_wrapper_control.py b/tests/test_wrapper_control.py index 08033c4efd..7e22bb6990 100644 --- a/tests/test_wrapper_control.py +++ b/tests/test_wrapper_control.py @@ -1,4 +1,4 @@ -# Copyright (C) 2022 - 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. +# Copyright (C) 2026 Synopsys, Inc. and ANSYS, Inc. All rights reserved. # SPDX-License-Identifier: MIT # # From 9a217f32663f9068cd48edc099f79658dfcb3375 Mon Sep 17 00:00:00 2001 From: Alex Fernandez Date: Thu, 17 Sep 2026 13:18:45 +0200 Subject: [PATCH 14/14] fix: License symbol --- .pre-commit-config.yaml | 1 + SECURITY.md | 2 +- docker/build_docker_linux.py | 2 +- examples/gallery/00_lucid_file_IO.py | 2 +- examples/gallery/01_bracket_scaffold.py | 2 +- examples/gallery/02_lucid_mixing_elbow.py | 2 +- examples/gallery/03_lucid_pipe_tee.py | 2 +- examples/gallery/04_lucid_toy_car.py | 2 +- examples/gallery/05_pcb_stacker.py | 2 +- examples/gallery/06_blade_morph.py | 2 +- examples/gallery/07_saddle_bracket.py | 2 +- examples/gallery/08_lucid_generic_f1_rear_wing.py | 2 +- examples/gallery/09_multi_layer_quad_mesh_pcb.py | 2 +- examples/gallery/10_wheel_ground_contact_patch.py | 2 +- examples/gallery/12_import_from_pygeometry.py | 2 +- examples/gallery_beta/11_solder_ball.py | 2 +- examples/misc/example_template.py | 2 +- examples/other/elbow_trame.py | 2 +- examples/other/mixing_elbow.py | 2 +- examples/other/pipe_tee.py | 2 +- src/ansys/meshing/prime/_version.py | 2 +- src/ansys/meshing/prime/core/controldata.py | 2 +- src/ansys/meshing/prime/core/dynaexportutils.py | 2 +- src/ansys/meshing/prime/core/fileio.py | 2 +- src/ansys/meshing/prime/core/mapdlcdbexportutils.py | 2 +- src/ansys/meshing/prime/core/mesh.py | 2 +- src/ansys/meshing/prime/core/model.py | 2 +- src/ansys/meshing/prime/core/part.py | 2 +- src/ansys/meshing/prime/core/periodiccontrol.py | 2 +- src/ansys/meshing/prime/core/prismcontrol.py | 2 +- src/ansys/meshing/prime/core/sizecontrol.py | 2 +- src/ansys/meshing/prime/core/surfaceutilities.py | 2 +- src/ansys/meshing/prime/core/surfer.py | 2 +- src/ansys/meshing/prime/core/volumecontrol.py | 2 +- src/ansys/meshing/prime/core/volumesweeper.py | 2 +- src/ansys/meshing/prime/core/wrapper.py | 2 +- src/ansys/meshing/prime/core/wrappercontrol.py | 2 +- src/ansys/meshing/prime/examples/__init__.py | 2 +- src/ansys/meshing/prime/examples/download_utilities.py | 2 +- src/ansys/meshing/prime/examples/examples.py | 2 +- src/ansys/meshing/prime/examples/unit_test_examples.py | 2 +- src/ansys/meshing/prime/graphics/__init__.py | 2 +- src/ansys/meshing/prime/graphics/plotter.py | 2 +- src/ansys/meshing/prime/graphics/widgets/color_by_type.py | 2 +- src/ansys/meshing/prime/graphics/widgets/hide_picked.py | 2 +- src/ansys/meshing/prime/graphics/widgets/picked_info.py | 2 +- src/ansys/meshing/prime/graphics/widgets/toggle_edges.py | 2 +- src/ansys/meshing/prime/internals/client.py | 2 +- src/ansys/meshing/prime/internals/comm_manager.py | 2 +- src/ansys/meshing/prime/internals/communicator.py | 2 +- src/ansys/meshing/prime/internals/config.py | 2 +- src/ansys/meshing/prime/internals/cyberchannel.py | 2 +- src/ansys/meshing/prime/internals/defaults.py | 2 +- src/ansys/meshing/prime/internals/error_handling.py | 2 +- src/ansys/meshing/prime/internals/grpc_communicator.py | 2 +- src/ansys/meshing/prime/internals/grpc_utils.py | 2 +- src/ansys/meshing/prime/internals/json_utils.py | 2 +- src/ansys/meshing/prime/internals/launcher.py | 2 +- src/ansys/meshing/prime/internals/logger.py | 2 +- src/ansys/meshing/prime/internals/prime_communicator.py | 2 +- src/ansys/meshing/prime/internals/socket_communicator.py | 2 +- src/ansys/meshing/prime/internals/utils.py | 2 +- src/ansys/meshing/prime/internals/yaml_converter.py | 2 +- src/ansys/meshing/prime/internals/yaml_parser.py | 2 +- src/ansys/meshing/prime/lucid/__init__.py | 2 +- src/ansys/meshing/prime/lucid/mesh_util.py | 2 +- src/ansys/meshing/prime/lucid/scope.py | 2 +- src/ansys/meshing/prime/lucid/utils.py | 2 +- src/ansys/meshing/prime/params/primestructs.py | 2 +- src/ansys/meshing/prime/relaxed_json/__init__.py | 2 +- src/ansys/meshing/prime/relaxed_json/decoder.py | 2 +- src/ansys/meshing/prime/relaxed_json/encoder.py | 2 +- src/ansys/meshing/prime/relaxed_json/scanner.py | 2 +- tests/__init__.py | 2 +- tests/conftest.py | 2 +- tests/core/conftest.py | 2 +- tests/core/test_controldata.py | 2 +- tests/core/test_fileio.py | 2 +- tests/core/test_surfaceutilities.py | 2 +- tests/core/test_surfer.py | 2 +- tests/graphics/test_graphics.py | 2 +- tests/internals/test_logger.py | 2 +- tests/internals/test_utils.py | 2 +- tests/lucid/test_mesh_utils.py | 2 +- tests/test_bracket_scaffold.py | 2 +- tests/test_elbow_lucid_regression.py | 2 +- tests/test_elbow_scdoc.py | 2 +- tests/test_lucid_toycar_wrapper_tutorial_regression.py | 2 +- tests/test_pipe_tee_junction.py | 2 +- tests/test_wrapper_control.py | 2 +- 90 files changed, 90 insertions(+), 89 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6fc60a73c7..cab7e3ecd1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -53,5 +53,6 @@ repos: rev: v0.8.0 hooks: - id: add-license-headers + files: '((src|examples|tests|docker)/.*\.py)|\.(proto)' args: - --start_year=2026 \ No newline at end of file diff --git a/SECURITY.md b/SECURITY.md index b05b34af0a..37d34fe7c3 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,5 +1,5 @@