diff --git a/.devcontainer/codespaces-docs/requirements.txt b/.devcontainer/codespaces-docs/requirements.txt index 413ecb0b00..f20ef9bb4c 100644 --- a/.devcontainer/codespaces-docs/requirements.txt +++ b/.devcontainer/codespaces-docs/requirements.txt @@ -18,8 +18,7 @@ pythreejs==2.4.2 sphinx-autobuild==2024.4.16 sphinx-autodoc-typehints==1.25.2 sphinx-copybutton==0.5.2 -sphinx-design==0.6.0 -sphinx-design==0.6.0 +sphinx-design==0.6.1 sphinx-gallery==0.16.0 sphinx-notfound-page==1.0.2 sphinx-reredirects==0.1.4 diff --git a/.devcontainer/devcontainer-local/requirements.txt b/.devcontainer/devcontainer-local/requirements.txt index baae7ff36d..8b43beda39 100644 --- a/.devcontainer/devcontainer-local/requirements.txt +++ b/.devcontainer/devcontainer-local/requirements.txt @@ -26,7 +26,7 @@ scipy==1.14.0 sphinx-autobuild==2024.4.16 sphinx-autodoc-typehints==1.25.2 sphinx-copybutton==0.5.2 -sphinx-design==0.6.0 +sphinx-design==0.6.1 sphinx-gallery==0.16.0 sphinx-notfound-page==1.0.2 sphinx-reredirects==0.1.4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c73c016a9b..46ebc759e6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ on: env: PROJECT_NAME: 'PyMAPDL' - MAIN_PYTHON_VERSION: '3.10' + MAIN_PYTHON_VERSION: '3.11' PACKAGE_NAME: 'ansys-mapdl-core' PACKAGE_NAMESPACE: 'ansys.mapdl.core' DOCUMENTATION_CNAME: 'mapdl.docs.pyansys.com' @@ -69,7 +69,7 @@ jobs: contents: write pull-requests: write steps: - - uses: ansys/actions/doc-deploy-changelog@v6 + - uses: ansys/actions/doc-deploy-changelog@v7 with: token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} @@ -81,7 +81,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check branch name - uses: ansys/actions/branch-name-style@v6 + uses: ansys/actions/branch-name-style@v7 commit-name: @@ -90,7 +90,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check commit name - uses: ansys/actions/commit-style@v6 + uses: ansys/actions/commit-style@v7 with: token: ${{ secrets.GITHUB_TOKEN }} @@ -103,7 +103,7 @@ jobs: folder: ["doc", "examples"] steps: - name: "Ansys documentation style checks" - uses: ansys/actions/doc-style@v6 + uses: ansys/actions/doc-style@v7 with: token: ${{ secrets.GITHUB_TOKEN }} files: ${{ matrix.folder }} @@ -120,7 +120,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] - python-version: ['3.9', '3.10', '3.11', '3.12'] + python-version: ['3.10', '3.11', '3.12'] # Only perform wheelhouse builds for macOS when releasing should-release: - ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags') }} @@ -129,7 +129,7 @@ jobs: os: macos-latest steps: - name: "Build wheelhouse and perform smoke test" - uses: ansys/actions/build-wheelhouse@v6 + uses: ansys/actions/build-wheelhouse@v7 with: library-name: ${{ env.PACKAGE_NAME }} operating-system: ${{ matrix.os }} @@ -161,7 +161,7 @@ jobs: uses: actions/checkout@v4.1.7 - name: "Login in Github container registry" - uses: docker/login-action@v3.2.0 + uses: docker/login-action@v3.3.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -395,7 +395,7 @@ jobs: uses: actions/checkout@v4.1.7 - name: "Login in Github container registry" - uses: docker/login-action@v3.2.0 + uses: docker/login-action@v3.3.0 with: registry: ghcr.io username: ${{ github.actor }} @@ -916,7 +916,7 @@ jobs: runs-on: ubuntu-latest steps: - name: "Build library source and wheel artifacts" - uses: ansys/actions/build-library@v6 + uses: ansys/actions/build-library@v7 with: library-name: ${{ env.PACKAGE_NAME }} python-version: ${{ env.MAIN_PYTHON_VERSION }} @@ -934,13 +934,13 @@ jobs: contents: write steps: - name: "Release to the public PyPI repository" - uses: ansys/actions/release-pypi-public@v6 + uses: ansys/actions/release-pypi-public@v7 with: library-name: ${{ env.PACKAGE_NAME }} use-trusted-publisher: true - name: "Release to GitHub" - uses: ansys/actions/release-github@v6 + uses: ansys/actions/release-github@v7 with: library-name: ${{ env.PACKAGE_NAME }} additional-artifacts: "minimum_requirements.txt" @@ -986,7 +986,7 @@ jobs: echo "VERSION_MEILI=$VERSION_MEILI" >> $GITHUB_ENV - name: "Deploy the latest documentation index" - uses: ansys/actions/doc-deploy-index@v6 + uses: ansys/actions/doc-deploy-index@v7 with: cname: ${{ env.DOCUMENTATION_CNAME }}/version/${{ env.VERSION }} index-name: pymapdl-v${{ env.VERSION_MEILI }} @@ -1014,7 +1014,7 @@ jobs: needs: upload-dev-docs steps: - name: "Deploy the latest documentation index" - uses: ansys/actions/doc-deploy-index@v6 + uses: ansys/actions/doc-deploy-index@v7 with: cname: ${{ env.DOCUMENTATION_CNAME }}/version/dev index-name: pymapdl-vdev diff --git a/.github/workflows/docker_clean_untagged.yml b/.github/workflows/docker_clean_untagged.yml index 2c1472c0c4..d33bf114cc 100644 --- a/.github/workflows/docker_clean_untagged.yml +++ b/.github/workflows/docker_clean_untagged.yml @@ -22,7 +22,7 @@ jobs: steps: - name: "Perform versions cleanup - except certain tags" - uses: ansys/actions/hk-package-clean-untagged@v6 + uses: ansys/actions/hk-package-clean-untagged@v7 with: package-name: 'mapdl' token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml index 665f2f82bf..be1b959316 100644 --- a/.github/workflows/label.yml +++ b/.github/workflows/label.yml @@ -127,6 +127,6 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: ansys/actions/doc-changelog@v6 + - uses: ansys/actions/doc-changelog@v7 with: token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/linkchecker.yml b/.github/workflows/linkchecker.yml index 6692304c11..5f9a14a275 100644 --- a/.github/workflows/linkchecker.yml +++ b/.github/workflows/linkchecker.yml @@ -34,7 +34,7 @@ jobs: uses: actions/checkout@v4.1.7 - name: "Login in Github container registry" - uses: docker/login-action@v3.2.0 + uses: docker/login-action@v3.3.0 with: registry: ghcr.io username: ${{ secrets.GH_USERNAME }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b80dd13364..008d95e92c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,9 +3,11 @@ fail_fast: True repos: - repo: https://github.com/ansys/pre-commit-hooks - rev: v0.3.1 + rev: v0.4.3 hooks: - id: add-license-headers + args: + - --start_year=2016 - repo: https://github.com/pycqa/isort rev: 5.13.2 @@ -13,7 +15,7 @@ repos: - id: isort - repo: https://github.com/numpy/numpydoc - rev: v1.7.0 + rev: v1.8.0 hooks: - id: numpydoc-validation exclude: | @@ -26,7 +28,7 @@ repos: ) - repo: https://github.com/psf/black - rev: 24.4.2 # If version changes --> modify "blacken-docs" manually as well. + rev: 24.8.0 # If version changes --> modify "blacken-docs" manually as well. hooks: - id: black args: @@ -36,10 +38,10 @@ repos: rev: 1.18.0 hooks: - id: blacken-docs - additional_dependencies: [black==24.4.2] + additional_dependencies: [black==24.8.0] - repo: https://github.com/PyCQA/flake8 - rev: 7.1.0 + rev: 7.1.1 hooks: - id: flake8 @@ -65,6 +67,6 @@ repos: # this validates our github workflow files - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.29.0 + rev: 0.29.1 hooks: - id: check-github-workflows diff --git a/LICENSE b/LICENSE index 0add15780d..f91e210be6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 ANSYS, Inc. and/or its affiliates. +Copyright (c) 2016 - 2024 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/doc/changelog.d/3293.miscellaneous.md b/doc/changelog.d/3293.miscellaneous.md new file mode 100644 index 0000000000..07a57f7b11 --- /dev/null +++ b/doc/changelog.d/3293.miscellaneous.md @@ -0,0 +1 @@ +feat/adding missing argument \ No newline at end of file diff --git a/doc/changelog.d/3295.fixed.md b/doc/changelog.d/3295.fixed.md new file mode 100644 index 0000000000..df85a71f1f --- /dev/null +++ b/doc/changelog.d/3295.fixed.md @@ -0,0 +1 @@ +fix: missing arguments in secdata \ No newline at end of file diff --git a/doc/changelog.d/3296.miscellaneous.md b/doc/changelog.d/3296.miscellaneous.md new file mode 100644 index 0000000000..9711f0b2b0 --- /dev/null +++ b/doc/changelog.d/3296.miscellaneous.md @@ -0,0 +1 @@ +docs: adding warning about *mwrite. Update *vwrite warning to include *mwrite \ No newline at end of file diff --git a/doc/changelog.d/3299.dependencies.md b/doc/changelog.d/3299.dependencies.md new file mode 100644 index 0000000000..28dacd57ce --- /dev/null +++ b/doc/changelog.d/3299.dependencies.md @@ -0,0 +1 @@ +build: bump grpcio from 1.65.0 to 1.65.1 in the grpc-deps group \ No newline at end of file diff --git a/doc/changelog.d/3300.dependencies.md b/doc/changelog.d/3300.dependencies.md new file mode 100644 index 0000000000..069e024ccf --- /dev/null +++ b/doc/changelog.d/3300.dependencies.md @@ -0,0 +1 @@ +build: bump sphinx from 7.4.4 to 7.4.6 in the documentation group \ No newline at end of file diff --git a/doc/changelog.d/3304.fixed.md b/doc/changelog.d/3304.fixed.md new file mode 100644 index 0000000000..04376eab96 --- /dev/null +++ b/doc/changelog.d/3304.fixed.md @@ -0,0 +1 @@ +fix: filename with /OUTPUT command in stored commands \ No newline at end of file diff --git a/doc/changelog.d/3306.changed.md b/doc/changelog.d/3306.changed.md new file mode 100644 index 0000000000..d0c77bb61b --- /dev/null +++ b/doc/changelog.d/3306.changed.md @@ -0,0 +1 @@ +ci: bump docker/login-action from 3.2.0 to 3.3.0 in the actions group \ No newline at end of file diff --git a/doc/changelog.d/3307.fixed.md b/doc/changelog.d/3307.fixed.md new file mode 100644 index 0000000000..3dcead84a4 --- /dev/null +++ b/doc/changelog.d/3307.fixed.md @@ -0,0 +1 @@ +fix: license headers \ No newline at end of file diff --git a/doc/changelog.d/3309.changed.md b/doc/changelog.d/3309.changed.md new file mode 100644 index 0000000000..102ca38fcd --- /dev/null +++ b/doc/changelog.d/3309.changed.md @@ -0,0 +1 @@ +build: bump importlib-metadata from 8.0.0 to 8.2.0 in the minimal group \ No newline at end of file diff --git a/doc/changelog.d/3310.dependencies.md b/doc/changelog.d/3310.dependencies.md new file mode 100644 index 0000000000..22cb61bd01 --- /dev/null +++ b/doc/changelog.d/3310.dependencies.md @@ -0,0 +1 @@ +build: bump ansys-tools-visualization-interface from 0.2.6 to 0.3.0 in the core group \ No newline at end of file diff --git a/doc/changelog.d/3311.dependencies.md b/doc/changelog.d/3311.dependencies.md new file mode 100644 index 0000000000..ee0f7490e6 --- /dev/null +++ b/doc/changelog.d/3311.dependencies.md @@ -0,0 +1 @@ +build: bump the documentation group with 3 updates \ No newline at end of file diff --git a/doc/changelog.d/3312.dependencies.md b/doc/changelog.d/3312.dependencies.md new file mode 100644 index 0000000000..c8655e832b --- /dev/null +++ b/doc/changelog.d/3312.dependencies.md @@ -0,0 +1 @@ +build: bump pytest from 8.2.2 to 8.3.2 in the testing group \ No newline at end of file diff --git a/doc/changelog.d/3315.fixed.md b/doc/changelog.d/3315.fixed.md new file mode 100644 index 0000000000..3fc2c39816 --- /dev/null +++ b/doc/changelog.d/3315.fixed.md @@ -0,0 +1 @@ +fix: Making sure we skip all the pool unit tests. \ No newline at end of file diff --git a/doc/changelog.d/3316.miscellaneous.md b/doc/changelog.d/3316.miscellaneous.md new file mode 100644 index 0000000000..b42b241032 --- /dev/null +++ b/doc/changelog.d/3316.miscellaneous.md @@ -0,0 +1 @@ +[pre-commit.ci] pre-commit autoupdate \ No newline at end of file diff --git a/doc/changelog.d/3319.miscellaneous.md b/doc/changelog.d/3319.miscellaneous.md new file mode 100644 index 0000000000..2042f86d5c --- /dev/null +++ b/doc/changelog.d/3319.miscellaneous.md @@ -0,0 +1 @@ +feat: adding more descriptive errors \ No newline at end of file diff --git a/doc/changelog.d/3322.dependencies.md b/doc/changelog.d/3322.dependencies.md new file mode 100644 index 0000000000..7744570c75 --- /dev/null +++ b/doc/changelog.d/3322.dependencies.md @@ -0,0 +1 @@ +build: bump grpcio from 1.65.1 to 1.65.2 in the grpc-deps group \ No newline at end of file diff --git a/doc/changelog.d/3323.dependencies.md b/doc/changelog.d/3323.dependencies.md new file mode 100644 index 0000000000..a3da3e9cb7 --- /dev/null +++ b/doc/changelog.d/3323.dependencies.md @@ -0,0 +1 @@ +build: bump ansys-tools-visualization-interface from 0.3.0 to 0.4.0 in the core group \ No newline at end of file diff --git a/doc/changelog.d/3324.dependencies.md b/doc/changelog.d/3324.dependencies.md new file mode 100644 index 0000000000..ee0f7490e6 --- /dev/null +++ b/doc/changelog.d/3324.dependencies.md @@ -0,0 +1 @@ +build: bump the documentation group with 3 updates \ No newline at end of file diff --git a/doc/changelog.d/3326.added.md b/doc/changelog.d/3326.added.md new file mode 100644 index 0000000000..a48fcb25fc --- /dev/null +++ b/doc/changelog.d/3326.added.md @@ -0,0 +1 @@ +chore: drop python3.9 support \ No newline at end of file diff --git a/doc/changelog.d/3328.dependencies.md b/doc/changelog.d/3328.dependencies.md new file mode 100644 index 0000000000..b1e9f37c9a --- /dev/null +++ b/doc/changelog.d/3328.dependencies.md @@ -0,0 +1 @@ +feat: adding `PYMAPDL_APDL_LOG` env var for testing \ No newline at end of file diff --git a/doc/changelog.d/3330.miscellaneous.md b/doc/changelog.d/3330.miscellaneous.md new file mode 100644 index 0000000000..b42b241032 --- /dev/null +++ b/doc/changelog.d/3330.miscellaneous.md @@ -0,0 +1 @@ +[pre-commit.ci] pre-commit autoupdate \ No newline at end of file diff --git a/doc/changelog.d/3339.changed.md b/doc/changelog.d/3339.changed.md new file mode 100644 index 0000000000..65de95256a --- /dev/null +++ b/doc/changelog.d/3339.changed.md @@ -0,0 +1 @@ +build: update pre-commit-hook \ No newline at end of file diff --git a/doc/changelog.d/3340.miscellaneous.md b/doc/changelog.d/3340.miscellaneous.md new file mode 100644 index 0000000000..19e44c26b4 --- /dev/null +++ b/doc/changelog.d/3340.miscellaneous.md @@ -0,0 +1 @@ +feat: adding channel subscription method and tests \ No newline at end of file diff --git a/doc/changelog.d/3344.dependencies.md b/doc/changelog.d/3344.dependencies.md new file mode 100644 index 0000000000..b0affd6d75 --- /dev/null +++ b/doc/changelog.d/3344.dependencies.md @@ -0,0 +1 @@ +build: bump grpcio from 1.65.2 to 1.65.4 in the grpc-deps group \ No newline at end of file diff --git a/doc/changelog.d/3345.dependencies.md b/doc/changelog.d/3345.dependencies.md new file mode 100644 index 0000000000..7c5203d58d --- /dev/null +++ b/doc/changelog.d/3345.dependencies.md @@ -0,0 +1 @@ +build: bump the core group with 2 updates \ No newline at end of file diff --git a/doc/changelog.d/3346.dependencies.md b/doc/changelog.d/3346.dependencies.md new file mode 100644 index 0000000000..181e8527ec --- /dev/null +++ b/doc/changelog.d/3346.dependencies.md @@ -0,0 +1 @@ +build: bump sphinx-gallery from 0.17.0 to 0.17.1 in the documentation group \ No newline at end of file diff --git a/doc/changelog.d/3351.miscellaneous.md b/doc/changelog.d/3351.miscellaneous.md new file mode 100644 index 0000000000..b42b241032 --- /dev/null +++ b/doc/changelog.d/3351.miscellaneous.md @@ -0,0 +1 @@ +[pre-commit.ci] pre-commit autoupdate \ No newline at end of file diff --git a/doc/changelog.d/3352.dependencies.md b/doc/changelog.d/3352.dependencies.md new file mode 100644 index 0000000000..99fc83e4e2 --- /dev/null +++ b/doc/changelog.d/3352.dependencies.md @@ -0,0 +1 @@ +ci: bump ansys/actions from 6 to 7 in the actions group \ No newline at end of file diff --git a/doc/changelog.d/3355.fixed.md b/doc/changelog.d/3355.fixed.md new file mode 100644 index 0000000000..cda6a43a41 --- /dev/null +++ b/doc/changelog.d/3355.fixed.md @@ -0,0 +1 @@ +fix: reuploading file on CDREAD \ No newline at end of file diff --git a/doc/changelog.d/3357.maintenance.md b/doc/changelog.d/3357.maintenance.md new file mode 100644 index 0000000000..9835f5f64f --- /dev/null +++ b/doc/changelog.d/3357.maintenance.md @@ -0,0 +1 @@ +build: bump pyansys-tools-versioning from 0.5.0 to 0.6.0 in the minimal group \ No newline at end of file diff --git a/doc/changelog.d/3358.dependencies.md b/doc/changelog.d/3358.dependencies.md new file mode 100644 index 0000000000..7c5203d58d --- /dev/null +++ b/doc/changelog.d/3358.dependencies.md @@ -0,0 +1 @@ +build: bump the core group with 2 updates \ No newline at end of file diff --git a/doc/changelog.d/3360.dependencies.md b/doc/changelog.d/3360.dependencies.md new file mode 100644 index 0000000000..8ff93a3e2b --- /dev/null +++ b/doc/changelog.d/3360.dependencies.md @@ -0,0 +1 @@ +build: bump pyansys-tools-report from 0.7.3 to 0.8.0 in the testing group \ No newline at end of file diff --git a/doc/changelog.d/3361.fixed.md b/doc/changelog.d/3361.fixed.md new file mode 100644 index 0000000000..e95b2f060d --- /dev/null +++ b/doc/changelog.d/3361.fixed.md @@ -0,0 +1 @@ +fix: warning raised in v251 \ No newline at end of file diff --git a/doc/changelog.d/3362.miscellaneous.md b/doc/changelog.d/3362.miscellaneous.md new file mode 100644 index 0000000000..8affdc40b3 --- /dev/null +++ b/doc/changelog.d/3362.miscellaneous.md @@ -0,0 +1 @@ +Update conftest.py to switch mapdl.tbdat to mapdl.tbdata \ No newline at end of file diff --git a/doc/changelog.d/3363.dependencies.md b/doc/changelog.d/3363.dependencies.md new file mode 100644 index 0000000000..36ec12fcae --- /dev/null +++ b/doc/changelog.d/3363.dependencies.md @@ -0,0 +1 @@ +build: bump the documentation group across 1 directory with 3 updates \ No newline at end of file diff --git a/doc/changelog.d/3371.added.md b/doc/changelog.d/3371.added.md new file mode 100644 index 0000000000..815ee5502d --- /dev/null +++ b/doc/changelog.d/3371.added.md @@ -0,0 +1 @@ +chore: update image cache \ No newline at end of file diff --git a/doc/source/examples/extended_examples/ex_01-gmsh_example/gmsh_generator.py b/doc/source/examples/extended_examples/ex_01-gmsh_example/gmsh_generator.py index 83333be2ca..dd76f89136 100644 --- a/doc/source/examples/extended_examples/ex_01-gmsh_example/gmsh_generator.py +++ b/doc/source/examples/extended_examples/ex_01-gmsh_example/gmsh_generator.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/doc/source/examples/extended_examples/ex_01-gmsh_example/mesh_converter.py b/doc/source/examples/extended_examples/ex_01-gmsh_example/mesh_converter.py index 38b1fcc113..fba914233a 100644 --- a/doc/source/examples/extended_examples/ex_01-gmsh_example/mesh_converter.py +++ b/doc/source/examples/extended_examples/ex_01-gmsh_example/mesh_converter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/doc/source/examples/extended_examples/ex_01-gmsh_example/modal_analysis.py b/doc/source/examples/extended_examples/ex_01-gmsh_example/modal_analysis.py index b902776e15..9e37717777 100644 --- a/doc/source/examples/extended_examples/ex_01-gmsh_example/modal_analysis.py +++ b/doc/source/examples/extended_examples/ex_01-gmsh_example/modal_analysis.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/doc/source/examples/extended_examples/executable/cli_rotor.py b/doc/source/examples/extended_examples/executable/cli_rotor.py index 49951e198a..646316a331 100644 --- a/doc/source/examples/extended_examples/executable/cli_rotor.py +++ b/doc/source/examples/extended_examples/executable/cli_rotor.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/doc/source/examples/extended_examples/executable/rotor.py b/doc/source/examples/extended_examples/executable/rotor.py index 9f24cba3c6..83aa5dc409 100644 --- a/doc/source/examples/extended_examples/executable/rotor.py +++ b/doc/source/examples/extended_examples/executable/rotor.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/doc/source/examples/extended_examples/gui/gui_app.py b/doc/source/examples/extended_examples/gui/gui_app.py index 343dc1a831..8099095408 100644 --- a/doc/source/examples/extended_examples/gui/gui_app.py +++ b/doc/source/examples/extended_examples/gui/gui_app.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/doc/source/examples/extended_examples/hpc/ml_ga_beam.py b/doc/source/examples/extended_examples/hpc/ml_ga_beam.py index 5f94b66822..a2772d498b 100644 --- a/doc/source/examples/extended_examples/hpc/ml_ga_beam.py +++ b/doc/source/examples/extended_examples/hpc/ml_ga_beam.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/doc/source/user_guide/convert.rst b/doc/source/user_guide/convert.rst index 7f44316df5..51090e155c 100644 --- a/doc/source/user_guide/convert.rst +++ b/doc/source/user_guide/convert.rst @@ -288,9 +288,9 @@ which can be done with: Note that some of the commands with ``/`` are not directly translated to functions and are instead run as "classic" commands like -``mapdl.run('/COM')``. Also, note that the ``*VWRITE`` command -requires a command immediately following it. This normally locks the -interface, so it's implemented in the background as an input file +``mapdl.run('/COM')``. Also, note that the ``*VWRITE`` and ``*MWRITE`` commands +require a command immediately following it with the desire output format. +This normally locks the interface, so it's implemented in the background as an input file using the :attr:`Mapdl.non_interactive ` attribute. diff --git a/doc/source/user_guide/mapdl.rst b/doc/source/user_guide/mapdl.rst index cb5f566ffd..6885e9252c 100644 --- a/doc/source/user_guide/mapdl.rst +++ b/doc/source/user_guide/mapdl.rst @@ -1087,6 +1087,8 @@ are unsupported. +---------------+---------------------------------------------------------------------------------------------------------------------------------+----------------------------------+----------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+ | * ``*VWRITE`` | |:x:| Not available | |:white_check_mark:| Available | |:exclamation:| Only in :attr:`Mapdl.non_interactive ` | If you are working in a local session, it is recommended you use Python function such as ``open``. | +---------------+---------------------------------------------------------------------------------------------------------------------------------+----------------------------------+----------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+ +| * ``*MWRITE`` | |:x:| Not available | |:white_check_mark:| Available | |:exclamation:| Only in :attr:`Mapdl.non_interactive ` | If you are working in a local session, it is recommended you use Python function such as ``open``. | ++---------------+---------------------------------------------------------------------------------------------------------------------------------+----------------------------------+----------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+ | * ``LSWRITE`` | |:white_check_mark:| Available (Internally running in :attr:`Mapdl.non_interactive `) | |:white_check_mark:| Available | |:exclamation:| Only in :attr:`Mapdl.non_interactive ` | | +---------------+---------------------------------------------------------------------------------------------------------------------------------+----------------------------------+----------------------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------+ diff --git a/examples/00-mapdl-examples/2d_magnetostatic_solenoid-BodyFlux_Averaging.py b/examples/00-mapdl-examples/2d_magnetostatic_solenoid-BodyFlux_Averaging.py index 894d3a8808..a6a0cda21a 100644 --- a/examples/00-mapdl-examples/2d_magnetostatic_solenoid-BodyFlux_Averaging.py +++ b/examples/00-mapdl-examples/2d_magnetostatic_solenoid-BodyFlux_Averaging.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/2d_plate_with_a_hole.py b/examples/00-mapdl-examples/2d_plate_with_a_hole.py index 2d7900fd83..78716ee207 100644 --- a/examples/00-mapdl-examples/2d_plate_with_a_hole.py +++ b/examples/00-mapdl-examples/2d_plate_with_a_hole.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/2d_pressure_vessel.py b/examples/00-mapdl-examples/2d_pressure_vessel.py index 5a4831be15..ed21c801a2 100644 --- a/examples/00-mapdl-examples/2d_pressure_vessel.py +++ b/examples/00-mapdl-examples/2d_pressure_vessel.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/3d_notch.py b/examples/00-mapdl-examples/3d_notch.py index a2fd139d82..e90bfebbed 100644 --- a/examples/00-mapdl-examples/3d_notch.py +++ b/examples/00-mapdl-examples/3d_notch.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/3d_plate_thermal.py b/examples/00-mapdl-examples/3d_plate_thermal.py index 178983a286..0eb3202c79 100644 --- a/examples/00-mapdl-examples/3d_plate_thermal.py +++ b/examples/00-mapdl-examples/3d_plate_thermal.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/acoustic_analysis.py b/examples/00-mapdl-examples/acoustic_analysis.py index 660209f155..f37ded1a7e 100644 --- a/examples/00-mapdl-examples/acoustic_analysis.py +++ b/examples/00-mapdl-examples/acoustic_analysis.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/basic_dpf_example.py b/examples/00-mapdl-examples/basic_dpf_example.py index 7a7ebfae42..11d574cde5 100644 --- a/examples/00-mapdl-examples/basic_dpf_example.py +++ b/examples/00-mapdl-examples/basic_dpf_example.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/bracket_static.py b/examples/00-mapdl-examples/bracket_static.py index 0f0c7f5df9..38d6fdddce 100644 --- a/examples/00-mapdl-examples/bracket_static.py +++ b/examples/00-mapdl-examples/bracket_static.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/composite_dcb.py b/examples/00-mapdl-examples/composite_dcb.py index 769c7786cf..f12c414e3f 100644 --- a/examples/00-mapdl-examples/composite_dcb.py +++ b/examples/00-mapdl-examples/composite_dcb.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/contact_elements.py b/examples/00-mapdl-examples/contact_elements.py index 58b4c18939..06a40dacb0 100644 --- a/examples/00-mapdl-examples/contact_elements.py +++ b/examples/00-mapdl-examples/contact_elements.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/cyclic_analysis.py b/examples/00-mapdl-examples/cyclic_analysis.py index 60060a32f4..88628ec02a 100644 --- a/examples/00-mapdl-examples/cyclic_analysis.py +++ b/examples/00-mapdl-examples/cyclic_analysis.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/cyclic_static.py b/examples/00-mapdl-examples/cyclic_static.py index a1e279b8ae..01fa28e4b1 100644 --- a/examples/00-mapdl-examples/cyclic_static.py +++ b/examples/00-mapdl-examples/cyclic_static.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/exhaust_manifold_thermal_stress.py b/examples/00-mapdl-examples/exhaust_manifold_thermal_stress.py index eae36c8252..c795270524 100644 --- a/examples/00-mapdl-examples/exhaust_manifold_thermal_stress.py +++ b/examples/00-mapdl-examples/exhaust_manifold_thermal_stress.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/geometry.py b/examples/00-mapdl-examples/geometry.py index 8a70c29e77..b4e0f6ab02 100644 --- a/examples/00-mapdl-examples/geometry.py +++ b/examples/00-mapdl-examples/geometry.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/lathe_cutter.py b/examples/00-mapdl-examples/lathe_cutter.py index cbfb1b5235..844b65987a 100644 --- a/examples/00-mapdl-examples/lathe_cutter.py +++ b/examples/00-mapdl-examples/lathe_cutter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/mapdl_3d_beam.py b/examples/00-mapdl-examples/mapdl_3d_beam.py index c7090f5f74..db94474280 100644 --- a/examples/00-mapdl-examples/mapdl_3d_beam.py +++ b/examples/00-mapdl-examples/mapdl_3d_beam.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/mapdl_beam.py b/examples/00-mapdl-examples/mapdl_beam.py index f4486a458e..880550e875 100644 --- a/examples/00-mapdl-examples/mapdl_beam.py +++ b/examples/00-mapdl-examples/mapdl_beam.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/modal_beam.py b/examples/00-mapdl-examples/modal_beam.py index 55707a1abf..262e83e9c8 100644 --- a/examples/00-mapdl-examples/modal_beam.py +++ b/examples/00-mapdl-examples/modal_beam.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/path_operations.py b/examples/00-mapdl-examples/path_operations.py index 9d95e493e5..c589769c15 100644 --- a/examples/00-mapdl-examples/path_operations.py +++ b/examples/00-mapdl-examples/path_operations.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/pressure_vessel.py b/examples/00-mapdl-examples/pressure_vessel.py index ee7e62cf43..6062b06e84 100644 --- a/examples/00-mapdl-examples/pressure_vessel.py +++ b/examples/00-mapdl-examples/pressure_vessel.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/pyvista_mesh.py b/examples/00-mapdl-examples/pyvista_mesh.py index b07897ab69..b8af80774d 100644 --- a/examples/00-mapdl-examples/pyvista_mesh.py +++ b/examples/00-mapdl-examples/pyvista_mesh.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/slashmap_cfx_mapping.py b/examples/00-mapdl-examples/slashmap_cfx_mapping.py index 86caffb013..ae0ce233a3 100644 --- a/examples/00-mapdl-examples/slashmap_cfx_mapping.py +++ b/examples/00-mapdl-examples/slashmap_cfx_mapping.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/spotweld.py b/examples/00-mapdl-examples/spotweld.py index 54806dc7f8..0557d0d768 100644 --- a/examples/00-mapdl-examples/spotweld.py +++ b/examples/00-mapdl-examples/spotweld.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/torsional_load.py b/examples/00-mapdl-examples/torsional_load.py index b8a0a68574..dbd0ebff5e 100644 --- a/examples/00-mapdl-examples/torsional_load.py +++ b/examples/00-mapdl-examples/torsional_load.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/00-mapdl-examples/transient_thermal.py b/examples/00-mapdl-examples/transient_thermal.py index 604eda4030..e199b3dbe2 100644 --- a/examples/00-mapdl-examples/transient_thermal.py +++ b/examples/00-mapdl-examples/transient_thermal.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/01-geometry/00-keypoints.py b/examples/01-geometry/00-keypoints.py index 249138cb1b..02e89cd1e5 100644 --- a/examples/01-geometry/00-keypoints.py +++ b/examples/01-geometry/00-keypoints.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/01-geometry/01-lines.py b/examples/01-geometry/01-lines.py index 10712dc6bf..e7690cd705 100644 --- a/examples/01-geometry/01-lines.py +++ b/examples/01-geometry/01-lines.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/01-geometry/02-areas.py b/examples/01-geometry/02-areas.py index e33ac64d68..98ed596ce4 100644 --- a/examples/01-geometry/02-areas.py +++ b/examples/01-geometry/02-areas.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/01-geometry/03-volumes.py b/examples/01-geometry/03-volumes.py index ce2e65d80e..a2c03754f2 100644 --- a/examples/01-geometry/03-volumes.py +++ b/examples/01-geometry/03-volumes.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/01-geometry/04-primitives.py b/examples/01-geometry/04-primitives.py index 4d6aaba4fb..b33568c14d 100644 --- a/examples/01-geometry/04-primitives.py +++ b/examples/01-geometry/04-primitives.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/02-tips-n-tricks/00-example-template.py b/examples/02-tips-n-tricks/00-example-template.py index 99f969ca44..511ca53042 100644 --- a/examples/02-tips-n-tricks/00-example-template.py +++ b/examples/02-tips-n-tricks/00-example-template.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/02-tips-n-tricks/01-smoothing-element-size-transitions.py b/examples/02-tips-n-tricks/01-smoothing-element-size-transitions.py index 23f925b1dc..1c07af7d7d 100644 --- a/examples/02-tips-n-tricks/01-smoothing-element-size-transitions.py +++ b/examples/02-tips-n-tricks/01-smoothing-element-size-transitions.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/02-tips-n-tricks/03-using_inline_functions_and_Query.py b/examples/02-tips-n-tricks/03-using_inline_functions_and_Query.py index d5636b4801..50e32db4d7 100644 --- a/examples/02-tips-n-tricks/03-using_inline_functions_and_Query.py +++ b/examples/02-tips-n-tricks/03-using_inline_functions_and_Query.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/02-tips-n-tricks/04-rotational-displacement.py b/examples/02-tips-n-tricks/04-rotational-displacement.py index 95e7c41460..e33c02dce9 100644 --- a/examples/02-tips-n-tricks/04-rotational-displacement.py +++ b/examples/02-tips-n-tricks/04-rotational-displacement.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/02-tips-n-tricks/05-explore_mapdl_files.py b/examples/02-tips-n-tricks/05-explore_mapdl_files.py index 5dc46dfa0b..1b16688808 100644 --- a/examples/02-tips-n-tricks/05-explore_mapdl_files.py +++ b/examples/02-tips-n-tricks/05-explore_mapdl_files.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/examples/03-general-fea/00-how_finite_element_works.py b/examples/03-general-fea/00-how_finite_element_works.py index c36a44b115..aa5f655d27 100644 --- a/examples/03-general-fea/00-how_finite_element_works.py +++ b/examples/03-general-fea/00-how_finite_element_works.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/minimum_requirements.txt b/minimum_requirements.txt index fc7874820d..2dabc2d709 100644 --- a/minimum_requirements.txt +++ b/minimum_requirements.txt @@ -1,6 +1,6 @@ ansys-api-mapdl==0.5.2 -importlib-metadata==8.0.0 +importlib-metadata==8.2.0 numpy==1.26.4 platformdirs==4.2.2 psutil==6.0.0 -pyansys-tools-versioning==0.5.0 +pyansys-tools-versioning==0.6.0 diff --git a/pyproject.toml b/pyproject.toml index 5d9a7111a0..314cd46cd3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ name = "ansys-mapdl-core" version = "0.69.dev0" description = "A Python wrapper for Ansys MAPDL." readme = "README.md" -requires-python = ">=3.9,<3.13" # Update also 'MINIMUM_PYTHON_VERSION' in src/ansys/mapdl/core/__init__.py +requires-python = ">=3.10,<3.13" # Update also 'MINIMUM_PYTHON_VERSION' in src/ansys/mapdl/core/__init__.py license = {file = "LICENSE"} authors = [{ name = "ANSYS, Inc.", email = "pyansys.core@ansys.com" }] maintainers = [{ name = "ANSYS, Inc.", email = "pyansys.core@ansys.com" }] @@ -58,34 +58,34 @@ jupyter = [ tests = [ "ansys-dpf-core==0.10.1", - "ansys-tools-visualization-interface==0.2.6", + "ansys-tools-visualization-interface==0.4.0", "autopep8==2.3.1", - "matplotlib==3.9.1", + "matplotlib==3.9.2", "pandas==2.2.2", - "pyansys-tools-report==0.7.3", + "pyansys-tools-report==0.8.0", "pyiges[full]==0.3.1", "pytest-cov==5.0.0", "pytest-memprof<0.3.0", "pytest-pyvista==0.1.9", "pytest-rerunfailures==14.0", - "pytest==8.2.2", + "pytest==8.3.2", "scipy==1.14.0", "vtk==9.3.1", ] doc = [ "ansys-dpf-core==0.10.1", "ansys-mapdl-reader==0.53.0", - "ansys-tools-visualization-interface==0.2.6", - "ansys-sphinx-theme==0.16.6", - "grpcio==1.65.0", + "ansys-tools-visualization-interface==0.4.0", + "ansys-sphinx-theme==1.0.5", + "grpcio==1.65.4", "imageio-ffmpeg==0.5.1", - "imageio==2.34.2", + "imageio==2.35.1", "jupyter_sphinx==0.5.3", "jupyterlab>=3.2.8", - "matplotlib==3.9.1", - "numpydoc==1.7.0", + "matplotlib==3.9.2", + "numpydoc==1.8.0", "pandas==2.2.2", - "plotly==5.22.0", + "plotly==5.23.0", "pyiges[full]==0.3.1", "pypandoc==1.13", "pytest-sphinx==0.6.3", @@ -93,11 +93,11 @@ doc = [ "sphinx-autobuild==2024.4.16", "sphinx-autodoc-typehints==1.25.2", "sphinx-copybutton==0.5.2", - "sphinx-design==0.6.0", - "sphinx-gallery==0.16.0", - "sphinx-notfound-page==1.0.2", - "sphinx==7.4.4", - "sphinxcontrib-websupport==1.2.7", + "sphinx-design==0.6.1", + "sphinx-gallery==0.17.1", + "sphinx-notfound-page==1.0.4", + "sphinx==8.0.2", + "sphinxcontrib-websupport==2.0.0", "sphinxemoji==0.3.1", "vtk==9.3.1", ] @@ -116,6 +116,7 @@ pymapdl_convert_script = "ansys.mapdl.core.cli:old_pymapdl_convert_script_entry_ pymapdl = "ansys.mapdl.core.cli:main" [tool.pytest.ini_options] +addopts = "-ra -vvv" junit_family = "legacy" filterwarnings = [ "ignore::FutureWarning", @@ -260,4 +261,18 @@ showcontent = true [[tool.towncrier.type]] directory = "miscellaneous" name = "Miscellaneous" -showcontent = true \ No newline at end of file +showcontent = true +[[tool.towncrier.type]] +directory = "documentation" +name = "Documentation" +showcontent = true + +[[tool.towncrier.type]] +directory = "maintenance" +name = "Maintenance" +showcontent = true + +[[tool.towncrier.type]] +directory = "test" +name = "Test" +showcontent = true diff --git a/src/ansys/mapdl/core/__init__.py b/src/ansys/mapdl/core/__init__.py index 93d73ce203..6e2a224da3 100644 --- a/src/ansys/mapdl/core/__init__.py +++ b/src/ansys/mapdl/core/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # @@ -36,7 +36,7 @@ os.makedirs(USER_DATA_PATH) DEPRECATING_MINIMUM_PYTHON_VERSION = True -MINIMUM_PYTHON_VERSION = (3, 9) +MINIMUM_PYTHON_VERSION = (3, 10) first_time_file = os.path.join(USER_DATA_PATH, ".firstime") if not os.path.exists(first_time_file): # pragma: no cover diff --git a/src/ansys/mapdl/core/_commands/__init__.py b/src/ansys/mapdl/core/_commands/__init__.py index a95b96476b..aa3054dc1b 100644 --- a/src/ansys/mapdl/core/_commands/__init__.py +++ b/src/ansys/mapdl/core/_commands/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/apdl/__init__.py b/src/ansys/mapdl/core/_commands/apdl/__init__.py index f2adae5e82..81269ecb9c 100644 --- a/src/ansys/mapdl/core/_commands/apdl/__init__.py +++ b/src/ansys/mapdl/core/_commands/apdl/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/apdl/abbreviations.py b/src/ansys/mapdl/core/_commands/apdl/abbreviations.py index bff4f124c9..8567d9c234 100644 --- a/src/ansys/mapdl/core/_commands/apdl/abbreviations.py +++ b/src/ansys/mapdl/core/_commands/apdl/abbreviations.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/apdl/array_param.py b/src/ansys/mapdl/core/_commands/apdl/array_param.py index b697e3515d..8306549d67 100644 --- a/src/ansys/mapdl/core/_commands/apdl/array_param.py +++ b/src/ansys/mapdl/core/_commands/apdl/array_param.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # @@ -353,6 +353,10 @@ def mwrite( APDL Command: ``*MWRITE`` + .. warning:: + This command cannot be run interactively. See + :func:`non_interactive `. + Parameters ---------- parr diff --git a/src/ansys/mapdl/core/_commands/apdl/macro_files.py b/src/ansys/mapdl/core/_commands/apdl/macro_files.py index 21e44a24eb..1593861eae 100644 --- a/src/ansys/mapdl/core/_commands/apdl/macro_files.py +++ b/src/ansys/mapdl/core/_commands/apdl/macro_files.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/apdl/matrix_op.py b/src/ansys/mapdl/core/_commands/apdl/matrix_op.py index 99395622a8..ac4af814e6 100644 --- a/src/ansys/mapdl/core/_commands/apdl/matrix_op.py +++ b/src/ansys/mapdl/core/_commands/apdl/matrix_op.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/apdl/parameter_definition.py b/src/ansys/mapdl/core/_commands/apdl/parameter_definition.py index 533af1a79e..1a2e6a11a4 100644 --- a/src/ansys/mapdl/core/_commands/apdl/parameter_definition.py +++ b/src/ansys/mapdl/core/_commands/apdl/parameter_definition.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/apdl/process_controls.py b/src/ansys/mapdl/core/_commands/apdl/process_controls.py index d5c24d6c6d..69d48e02e6 100644 --- a/src/ansys/mapdl/core/_commands/apdl/process_controls.py +++ b/src/ansys/mapdl/core/_commands/apdl/process_controls.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/aux12_/__init__.py b/src/ansys/mapdl/core/_commands/aux12_/__init__.py index 1f3279d596..bf2f90a475 100644 --- a/src/ansys/mapdl/core/_commands/aux12_/__init__.py +++ b/src/ansys/mapdl/core/_commands/aux12_/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/aux12_/general_radiation.py b/src/ansys/mapdl/core/_commands/aux12_/general_radiation.py index 62675ff7c8..58463614df 100644 --- a/src/ansys/mapdl/core/_commands/aux12_/general_radiation.py +++ b/src/ansys/mapdl/core/_commands/aux12_/general_radiation.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/aux12_/radiation_mat.py b/src/ansys/mapdl/core/_commands/aux12_/radiation_mat.py index e82b43a7c7..ee9354a129 100644 --- a/src/ansys/mapdl/core/_commands/aux12_/radiation_mat.py +++ b/src/ansys/mapdl/core/_commands/aux12_/radiation_mat.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/aux12_/radiosity_solver.py b/src/ansys/mapdl/core/_commands/aux12_/radiosity_solver.py index 1a4176e446..580637f1d2 100644 --- a/src/ansys/mapdl/core/_commands/aux12_/radiosity_solver.py +++ b/src/ansys/mapdl/core/_commands/aux12_/radiosity_solver.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # @@ -22,7 +22,7 @@ class RadiositySolver: - def hemiopt(self, hres="", **kwargs): + def hemiopt(self, hres="", tolerance="", **kwargs): """Specifies options for Hemicube view factor calculation. APDL Command: HEMIOPT diff --git a/src/ansys/mapdl/core/_commands/aux15_.py b/src/ansys/mapdl/core/_commands/aux15_.py index 00c6f58792..eeaf734280 100644 --- a/src/ansys/mapdl/core/_commands/aux15_.py +++ b/src/ansys/mapdl/core/_commands/aux15_.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/aux2_/__init__.py b/src/ansys/mapdl/core/_commands/aux2_/__init__.py index 3aade4eaa2..09bdaa997b 100644 --- a/src/ansys/mapdl/core/_commands/aux2_/__init__.py +++ b/src/ansys/mapdl/core/_commands/aux2_/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/aux2_/bin_dump.py b/src/ansys/mapdl/core/_commands/aux2_/bin_dump.py index 8e7538ec35..29eb8fcd0d 100644 --- a/src/ansys/mapdl/core/_commands/aux2_/bin_dump.py +++ b/src/ansys/mapdl/core/_commands/aux2_/bin_dump.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/aux2_/bin_manip.py b/src/ansys/mapdl/core/_commands/aux2_/bin_manip.py index 303b1a40cb..0723d718e4 100644 --- a/src/ansys/mapdl/core/_commands/aux2_/bin_manip.py +++ b/src/ansys/mapdl/core/_commands/aux2_/bin_manip.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/aux3_.py b/src/ansys/mapdl/core/_commands/aux3_.py index 54c5f6fef0..6dbde5503b 100644 --- a/src/ansys/mapdl/core/_commands/aux3_.py +++ b/src/ansys/mapdl/core/_commands/aux3_.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/conn.py b/src/ansys/mapdl/core/_commands/conn.py index d843d95c25..39d8fa699a 100644 --- a/src/ansys/mapdl/core/_commands/conn.py +++ b/src/ansys/mapdl/core/_commands/conn.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/database/__init__.py b/src/ansys/mapdl/core/_commands/database/__init__.py index befa827cad..931aa61355 100644 --- a/src/ansys/mapdl/core/_commands/database/__init__.py +++ b/src/ansys/mapdl/core/_commands/database/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/database/components.py b/src/ansys/mapdl/core/_commands/database/components.py index 32ce86a4d0..9911aff565 100644 --- a/src/ansys/mapdl/core/_commands/database/components.py +++ b/src/ansys/mapdl/core/_commands/database/components.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/database/coord_sys.py b/src/ansys/mapdl/core/_commands/database/coord_sys.py index 7b22606fef..7d6fd9d779 100644 --- a/src/ansys/mapdl/core/_commands/database/coord_sys.py +++ b/src/ansys/mapdl/core/_commands/database/coord_sys.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/database/picking.py b/src/ansys/mapdl/core/_commands/database/picking.py index ccc4c8d612..16fbc282f2 100644 --- a/src/ansys/mapdl/core/_commands/database/picking.py +++ b/src/ansys/mapdl/core/_commands/database/picking.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/database/selecting.py b/src/ansys/mapdl/core/_commands/database/selecting.py index 7593769d8e..21831ab7cb 100644 --- a/src/ansys/mapdl/core/_commands/database/selecting.py +++ b/src/ansys/mapdl/core/_commands/database/selecting.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/database/setup.py b/src/ansys/mapdl/core/_commands/database/setup.py index 3d47be41e8..c73c27f597 100644 --- a/src/ansys/mapdl/core/_commands/database/setup.py +++ b/src/ansys/mapdl/core/_commands/database/setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/database/working_plane.py b/src/ansys/mapdl/core/_commands/database/working_plane.py index 345e5844fb..3acbd48521 100644 --- a/src/ansys/mapdl/core/_commands/database/working_plane.py +++ b/src/ansys/mapdl/core/_commands/database/working_plane.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/display_/__init__.py b/src/ansys/mapdl/core/_commands/display_/__init__.py index bbdc4b21c9..69da8824a9 100644 --- a/src/ansys/mapdl/core/_commands/display_/__init__.py +++ b/src/ansys/mapdl/core/_commands/display_/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/display_/setup.py b/src/ansys/mapdl/core/_commands/display_/setup.py index 3c48c32f37..061e1a8145 100644 --- a/src/ansys/mapdl/core/_commands/display_/setup.py +++ b/src/ansys/mapdl/core/_commands/display_/setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/graphics_/__init__.py b/src/ansys/mapdl/core/_commands/graphics_/__init__.py index e7e63f6652..83fc982ed8 100644 --- a/src/ansys/mapdl/core/_commands/graphics_/__init__.py +++ b/src/ansys/mapdl/core/_commands/graphics_/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/graphics_/annotation.py b/src/ansys/mapdl/core/_commands/graphics_/annotation.py index 8ebf08a3ec..41622d9309 100644 --- a/src/ansys/mapdl/core/_commands/graphics_/annotation.py +++ b/src/ansys/mapdl/core/_commands/graphics_/annotation.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/graphics_/graphs.py b/src/ansys/mapdl/core/_commands/graphics_/graphs.py index 777d33825f..b7de8b316e 100644 --- a/src/ansys/mapdl/core/_commands/graphics_/graphs.py +++ b/src/ansys/mapdl/core/_commands/graphics_/graphs.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/graphics_/labeling.py b/src/ansys/mapdl/core/_commands/graphics_/labeling.py index ff06e4bf16..f5b255c3c3 100644 --- a/src/ansys/mapdl/core/_commands/graphics_/labeling.py +++ b/src/ansys/mapdl/core/_commands/graphics_/labeling.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/graphics_/scaling.py b/src/ansys/mapdl/core/_commands/graphics_/scaling.py index 3759120d55..56cb163773 100644 --- a/src/ansys/mapdl/core/_commands/graphics_/scaling.py +++ b/src/ansys/mapdl/core/_commands/graphics_/scaling.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/graphics_/setup.py b/src/ansys/mapdl/core/_commands/graphics_/setup.py index 765b952e14..9c05629368 100644 --- a/src/ansys/mapdl/core/_commands/graphics_/setup.py +++ b/src/ansys/mapdl/core/_commands/graphics_/setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/graphics_/style.py b/src/ansys/mapdl/core/_commands/graphics_/style.py index 42279358be..958660d95d 100644 --- a/src/ansys/mapdl/core/_commands/graphics_/style.py +++ b/src/ansys/mapdl/core/_commands/graphics_/style.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/graphics_/views.py b/src/ansys/mapdl/core/_commands/graphics_/views.py index c240d67559..5cbfa487be 100644 --- a/src/ansys/mapdl/core/_commands/graphics_/views.py +++ b/src/ansys/mapdl/core/_commands/graphics_/views.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/hidden.py b/src/ansys/mapdl/core/_commands/hidden.py index dbbcd8c3d7..e5518c1a1c 100644 --- a/src/ansys/mapdl/core/_commands/hidden.py +++ b/src/ansys/mapdl/core/_commands/hidden.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/inq_func.py b/src/ansys/mapdl/core/_commands/inq_func.py index 359b6c6d94..47b45a4e02 100644 --- a/src/ansys/mapdl/core/_commands/inq_func.py +++ b/src/ansys/mapdl/core/_commands/inq_func.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/map_cmd.py b/src/ansys/mapdl/core/_commands/map_cmd.py index 972b842f12..5c5649bd3b 100644 --- a/src/ansys/mapdl/core/_commands/map_cmd.py +++ b/src/ansys/mapdl/core/_commands/map_cmd.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/misc/__init__.py b/src/ansys/mapdl/core/_commands/misc/__init__.py index dc7e9eabf5..7ca71db770 100644 --- a/src/ansys/mapdl/core/_commands/misc/__init__.py +++ b/src/ansys/mapdl/core/_commands/misc/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/misc/misc.py b/src/ansys/mapdl/core/_commands/misc/misc.py index 170e02c049..b167898b4c 100644 --- a/src/ansys/mapdl/core/_commands/misc/misc.py +++ b/src/ansys/mapdl/core/_commands/misc/misc.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/parse.py b/src/ansys/mapdl/core/_commands/parse.py index 74904e3e7a..87f4ab43b7 100644 --- a/src/ansys/mapdl/core/_commands/parse.py +++ b/src/ansys/mapdl/core/_commands/parse.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post1_/__init__.py b/src/ansys/mapdl/core/_commands/post1_/__init__.py index 383ff75cce..7da12c9c15 100644 --- a/src/ansys/mapdl/core/_commands/post1_/__init__.py +++ b/src/ansys/mapdl/core/_commands/post1_/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post1_/animation.py b/src/ansys/mapdl/core/_commands/post1_/animation.py index de3b6734aa..fc0fa0be42 100644 --- a/src/ansys/mapdl/core/_commands/post1_/animation.py +++ b/src/ansys/mapdl/core/_commands/post1_/animation.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post1_/controls.py b/src/ansys/mapdl/core/_commands/post1_/controls.py index 9f3d6c2715..d5b356da35 100644 --- a/src/ansys/mapdl/core/_commands/post1_/controls.py +++ b/src/ansys/mapdl/core/_commands/post1_/controls.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post1_/element_table.py b/src/ansys/mapdl/core/_commands/post1_/element_table.py index 7a89f3be48..74cfb80978 100644 --- a/src/ansys/mapdl/core/_commands/post1_/element_table.py +++ b/src/ansys/mapdl/core/_commands/post1_/element_table.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post1_/failure_criteria.py b/src/ansys/mapdl/core/_commands/post1_/failure_criteria.py index ded63eae6a..b16d69ded7 100644 --- a/src/ansys/mapdl/core/_commands/post1_/failure_criteria.py +++ b/src/ansys/mapdl/core/_commands/post1_/failure_criteria.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post1_/listing.py b/src/ansys/mapdl/core/_commands/post1_/listing.py index 3f5af59f58..4e43929c80 100644 --- a/src/ansys/mapdl/core/_commands/post1_/listing.py +++ b/src/ansys/mapdl/core/_commands/post1_/listing.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post1_/load_case.py b/src/ansys/mapdl/core/_commands/post1_/load_case.py index d78398a600..a3baca367b 100644 --- a/src/ansys/mapdl/core/_commands/post1_/load_case.py +++ b/src/ansys/mapdl/core/_commands/post1_/load_case.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post1_/magnetics_calc.py b/src/ansys/mapdl/core/_commands/post1_/magnetics_calc.py index d6a8db35f2..e04478870f 100644 --- a/src/ansys/mapdl/core/_commands/post1_/magnetics_calc.py +++ b/src/ansys/mapdl/core/_commands/post1_/magnetics_calc.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post1_/path_operations.py b/src/ansys/mapdl/core/_commands/post1_/path_operations.py index 3e6d22a1a3..ead389b32b 100644 --- a/src/ansys/mapdl/core/_commands/post1_/path_operations.py +++ b/src/ansys/mapdl/core/_commands/post1_/path_operations.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post1_/results.py b/src/ansys/mapdl/core/_commands/post1_/results.py index 858a28b55a..ffb5f61036 100644 --- a/src/ansys/mapdl/core/_commands/post1_/results.py +++ b/src/ansys/mapdl/core/_commands/post1_/results.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post1_/setup.py b/src/ansys/mapdl/core/_commands/post1_/setup.py index a602279850..318f4f9c7f 100644 --- a/src/ansys/mapdl/core/_commands/post1_/setup.py +++ b/src/ansys/mapdl/core/_commands/post1_/setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post1_/special.py b/src/ansys/mapdl/core/_commands/post1_/special.py index 4b243c1fd3..391c02a9cb 100644 --- a/src/ansys/mapdl/core/_commands/post1_/special.py +++ b/src/ansys/mapdl/core/_commands/post1_/special.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post1_/status.py b/src/ansys/mapdl/core/_commands/post1_/status.py index e0c61d06a1..db6c545899 100644 --- a/src/ansys/mapdl/core/_commands/post1_/status.py +++ b/src/ansys/mapdl/core/_commands/post1_/status.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post1_/surface_operations.py b/src/ansys/mapdl/core/_commands/post1_/surface_operations.py index 5f62625e2d..da3aff7c8d 100644 --- a/src/ansys/mapdl/core/_commands/post1_/surface_operations.py +++ b/src/ansys/mapdl/core/_commands/post1_/surface_operations.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post1_/trace_points.py b/src/ansys/mapdl/core/_commands/post1_/trace_points.py index fb3b573ef1..c116e9065e 100644 --- a/src/ansys/mapdl/core/_commands/post1_/trace_points.py +++ b/src/ansys/mapdl/core/_commands/post1_/trace_points.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post26_/__init__.py b/src/ansys/mapdl/core/_commands/post26_/__init__.py index 624ea4a768..83cc0ecb60 100644 --- a/src/ansys/mapdl/core/_commands/post26_/__init__.py +++ b/src/ansys/mapdl/core/_commands/post26_/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post26_/controls.py b/src/ansys/mapdl/core/_commands/post26_/controls.py index ced2de1a8d..d68c5514e3 100644 --- a/src/ansys/mapdl/core/_commands/post26_/controls.py +++ b/src/ansys/mapdl/core/_commands/post26_/controls.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post26_/display.py b/src/ansys/mapdl/core/_commands/post26_/display.py index 879ba35dcc..11c63d0de9 100644 --- a/src/ansys/mapdl/core/_commands/post26_/display.py +++ b/src/ansys/mapdl/core/_commands/post26_/display.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post26_/listing.py b/src/ansys/mapdl/core/_commands/post26_/listing.py index 8e25656ab3..9130320622 100644 --- a/src/ansys/mapdl/core/_commands/post26_/listing.py +++ b/src/ansys/mapdl/core/_commands/post26_/listing.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post26_/operations.py b/src/ansys/mapdl/core/_commands/post26_/operations.py index 76e9467b90..bdb5daee3a 100644 --- a/src/ansys/mapdl/core/_commands/post26_/operations.py +++ b/src/ansys/mapdl/core/_commands/post26_/operations.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post26_/setup.py b/src/ansys/mapdl/core/_commands/post26_/setup.py index ba7327e154..eb3ac34de6 100644 --- a/src/ansys/mapdl/core/_commands/post26_/setup.py +++ b/src/ansys/mapdl/core/_commands/post26_/setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post26_/special.py b/src/ansys/mapdl/core/_commands/post26_/special.py index 7c2d047a40..0dd8ed8d35 100644 --- a/src/ansys/mapdl/core/_commands/post26_/special.py +++ b/src/ansys/mapdl/core/_commands/post26_/special.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/post26_/status.py b/src/ansys/mapdl/core/_commands/post26_/status.py index 00a10a34c2..0cad542a57 100644 --- a/src/ansys/mapdl/core/_commands/post26_/status.py +++ b/src/ansys/mapdl/core/_commands/post26_/status.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/__init__.py b/src/ansys/mapdl/core/_commands/preproc/__init__.py index 460f2e4a08..fef3ab8ae8 100644 --- a/src/ansys/mapdl/core/_commands/preproc/__init__.py +++ b/src/ansys/mapdl/core/_commands/preproc/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/areas.py b/src/ansys/mapdl/core/_commands/preproc/areas.py index 4f078e045e..1fedf0d65d 100644 --- a/src/ansys/mapdl/core/_commands/preproc/areas.py +++ b/src/ansys/mapdl/core/_commands/preproc/areas.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/artificially_matched_layers.py b/src/ansys/mapdl/core/_commands/preproc/artificially_matched_layers.py index 203a908fd1..0b3e00a8f5 100644 --- a/src/ansys/mapdl/core/_commands/preproc/artificially_matched_layers.py +++ b/src/ansys/mapdl/core/_commands/preproc/artificially_matched_layers.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/booleans.py b/src/ansys/mapdl/core/_commands/preproc/booleans.py index 8b6610e29b..0d161beab7 100644 --- a/src/ansys/mapdl/core/_commands/preproc/booleans.py +++ b/src/ansys/mapdl/core/_commands/preproc/booleans.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/constraint_equations.py b/src/ansys/mapdl/core/_commands/preproc/constraint_equations.py index 49539f3511..598d7c2d56 100644 --- a/src/ansys/mapdl/core/_commands/preproc/constraint_equations.py +++ b/src/ansys/mapdl/core/_commands/preproc/constraint_equations.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/coupled_dof.py b/src/ansys/mapdl/core/_commands/preproc/coupled_dof.py index 928f95651f..ad2ef604dc 100644 --- a/src/ansys/mapdl/core/_commands/preproc/coupled_dof.py +++ b/src/ansys/mapdl/core/_commands/preproc/coupled_dof.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/database.py b/src/ansys/mapdl/core/_commands/preproc/database.py index c914f684c3..416e6b4465 100644 --- a/src/ansys/mapdl/core/_commands/preproc/database.py +++ b/src/ansys/mapdl/core/_commands/preproc/database.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/digitizing.py b/src/ansys/mapdl/core/_commands/preproc/digitizing.py index 402500bd8c..a2b5d76066 100644 --- a/src/ansys/mapdl/core/_commands/preproc/digitizing.py +++ b/src/ansys/mapdl/core/_commands/preproc/digitizing.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/element_type.py b/src/ansys/mapdl/core/_commands/preproc/element_type.py index 74027963d0..9e1c97b535 100644 --- a/src/ansys/mapdl/core/_commands/preproc/element_type.py +++ b/src/ansys/mapdl/core/_commands/preproc/element_type.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/elements.py b/src/ansys/mapdl/core/_commands/preproc/elements.py index ba74cfd682..ac5358060e 100644 --- a/src/ansys/mapdl/core/_commands/preproc/elements.py +++ b/src/ansys/mapdl/core/_commands/preproc/elements.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/explicit_dynamics.py b/src/ansys/mapdl/core/_commands/preproc/explicit_dynamics.py index 59a452c910..41206e0ed3 100644 --- a/src/ansys/mapdl/core/_commands/preproc/explicit_dynamics.py +++ b/src/ansys/mapdl/core/_commands/preproc/explicit_dynamics.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/hard_points.py b/src/ansys/mapdl/core/_commands/preproc/hard_points.py index c7053c8929..1c15c77921 100644 --- a/src/ansys/mapdl/core/_commands/preproc/hard_points.py +++ b/src/ansys/mapdl/core/_commands/preproc/hard_points.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/keypoints.py b/src/ansys/mapdl/core/_commands/preproc/keypoints.py index 2573f32587..a68e7192d3 100644 --- a/src/ansys/mapdl/core/_commands/preproc/keypoints.py +++ b/src/ansys/mapdl/core/_commands/preproc/keypoints.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/lines.py b/src/ansys/mapdl/core/_commands/preproc/lines.py index c17324e721..ce8084ecaf 100644 --- a/src/ansys/mapdl/core/_commands/preproc/lines.py +++ b/src/ansys/mapdl/core/_commands/preproc/lines.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/material_data_tables.py b/src/ansys/mapdl/core/_commands/preproc/material_data_tables.py index 7edf5ad19d..a5769de079 100644 --- a/src/ansys/mapdl/core/_commands/preproc/material_data_tables.py +++ b/src/ansys/mapdl/core/_commands/preproc/material_data_tables.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/materials.py b/src/ansys/mapdl/core/_commands/preproc/materials.py index 071aa35f74..1bc5c548ff 100644 --- a/src/ansys/mapdl/core/_commands/preproc/materials.py +++ b/src/ansys/mapdl/core/_commands/preproc/materials.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/meshing.py b/src/ansys/mapdl/core/_commands/preproc/meshing.py index 2f7090c5b9..20a7dbe19b 100644 --- a/src/ansys/mapdl/core/_commands/preproc/meshing.py +++ b/src/ansys/mapdl/core/_commands/preproc/meshing.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/morphing.py b/src/ansys/mapdl/core/_commands/preproc/morphing.py index 6264af674c..f8ecc35c85 100644 --- a/src/ansys/mapdl/core/_commands/preproc/morphing.py +++ b/src/ansys/mapdl/core/_commands/preproc/morphing.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/nodes.py b/src/ansys/mapdl/core/_commands/preproc/nodes.py index c5685a3c43..f0407732f3 100644 --- a/src/ansys/mapdl/core/_commands/preproc/nodes.py +++ b/src/ansys/mapdl/core/_commands/preproc/nodes.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/primitives.py b/src/ansys/mapdl/core/_commands/preproc/primitives.py index 8bf194b98a..a4cd6cb2ae 100644 --- a/src/ansys/mapdl/core/_commands/preproc/primitives.py +++ b/src/ansys/mapdl/core/_commands/preproc/primitives.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/real_constants.py b/src/ansys/mapdl/core/_commands/preproc/real_constants.py index 3ae61ef98b..208be4b966 100644 --- a/src/ansys/mapdl/core/_commands/preproc/real_constants.py +++ b/src/ansys/mapdl/core/_commands/preproc/real_constants.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/sections.py b/src/ansys/mapdl/core/_commands/preproc/sections.py index 8c57479ea0..d95d7d1886 100644 --- a/src/ansys/mapdl/core/_commands/preproc/sections.py +++ b/src/ansys/mapdl/core/_commands/preproc/sections.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # @@ -622,6 +622,8 @@ def secdata( val10="", val11="", val12="", + val13="", + val14="", **kwargs, ): """Describes the geometry of a section. @@ -630,7 +632,7 @@ def secdata( Parameters ---------- - val1, val2, val3, . . . , val12 + val1, val2, val3, . . . , val14 Values, such as thickness or the length of a side or the numbers of cells along the width, that describe the geometry of a section. The terms VAL1, VAL2, etc. are specialized for each type of cross- @@ -681,7 +683,7 @@ def secdata( Type: BEAM, Subtype: HATS """ - command = f"SECDATA,{val1},{val2},{val3},{val4},{val5},{val6},{val7},{val8},{val9},{val10},{val11},{val12}" + command = f"SECDATA,{val1},{val2},{val3},{val4},{val5},{val6},{val7},{val8},{val9},{val10},{val11},{val12},{val13},{val14}" return self.run(command, **kwargs) def secjoint( diff --git a/src/ansys/mapdl/core/_commands/preproc/special_purpose.py b/src/ansys/mapdl/core/_commands/preproc/special_purpose.py index 3670785345..4679846207 100644 --- a/src/ansys/mapdl/core/_commands/preproc/special_purpose.py +++ b/src/ansys/mapdl/core/_commands/preproc/special_purpose.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/status.py b/src/ansys/mapdl/core/_commands/preproc/status.py index e82472e8f8..f0beda5f80 100644 --- a/src/ansys/mapdl/core/_commands/preproc/status.py +++ b/src/ansys/mapdl/core/_commands/preproc/status.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/superelements.py b/src/ansys/mapdl/core/_commands/preproc/superelements.py index 4848b6d15d..e84bee2fa4 100644 --- a/src/ansys/mapdl/core/_commands/preproc/superelements.py +++ b/src/ansys/mapdl/core/_commands/preproc/superelements.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/preproc/volumes.py b/src/ansys/mapdl/core/_commands/preproc/volumes.py index 3b5c0c757c..5b19646c70 100644 --- a/src/ansys/mapdl/core/_commands/preproc/volumes.py +++ b/src/ansys/mapdl/core/_commands/preproc/volumes.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/reduced/__init__.py b/src/ansys/mapdl/core/_commands/reduced/__init__.py index e800553061..58ba254361 100644 --- a/src/ansys/mapdl/core/_commands/reduced/__init__.py +++ b/src/ansys/mapdl/core/_commands/reduced/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/reduced/generation.py b/src/ansys/mapdl/core/_commands/reduced/generation.py index 20351a729f..f712df48a2 100644 --- a/src/ansys/mapdl/core/_commands/reduced/generation.py +++ b/src/ansys/mapdl/core/_commands/reduced/generation.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/reduced/preparation.py b/src/ansys/mapdl/core/_commands/reduced/preparation.py index 1779494f6a..f346efbf99 100644 --- a/src/ansys/mapdl/core/_commands/reduced/preparation.py +++ b/src/ansys/mapdl/core/_commands/reduced/preparation.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/reduced/setup.py b/src/ansys/mapdl/core/_commands/reduced/setup.py index fae1a2b05e..4101a0a21a 100644 --- a/src/ansys/mapdl/core/_commands/reduced/setup.py +++ b/src/ansys/mapdl/core/_commands/reduced/setup.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/reduced/use_pass.py b/src/ansys/mapdl/core/_commands/reduced/use_pass.py index 7e7cc9c0ed..32fad9af8f 100644 --- a/src/ansys/mapdl/core/_commands/reduced/use_pass.py +++ b/src/ansys/mapdl/core/_commands/reduced/use_pass.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/session/__init__.py b/src/ansys/mapdl/core/_commands/session/__init__.py index 4d13bc8dc5..ec94194b59 100644 --- a/src/ansys/mapdl/core/_commands/session/__init__.py +++ b/src/ansys/mapdl/core/_commands/session/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/session/files.py b/src/ansys/mapdl/core/_commands/session/files.py index 0b2f9ecaa0..8fb0bfef7a 100644 --- a/src/ansys/mapdl/core/_commands/session/files.py +++ b/src/ansys/mapdl/core/_commands/session/files.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/session/list_controls.py b/src/ansys/mapdl/core/_commands/session/list_controls.py index 0ce478e04c..6bcf014900 100644 --- a/src/ansys/mapdl/core/_commands/session/list_controls.py +++ b/src/ansys/mapdl/core/_commands/session/list_controls.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/session/processor_entry.py b/src/ansys/mapdl/core/_commands/session/processor_entry.py index 01b122c8df..6808731f03 100644 --- a/src/ansys/mapdl/core/_commands/session/processor_entry.py +++ b/src/ansys/mapdl/core/_commands/session/processor_entry.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/session/run_controls.py b/src/ansys/mapdl/core/_commands/session/run_controls.py index 39c520caf1..6981a401e9 100644 --- a/src/ansys/mapdl/core/_commands/session/run_controls.py +++ b/src/ansys/mapdl/core/_commands/session/run_controls.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/__init__.py b/src/ansys/mapdl/core/_commands/solution/__init__.py index 1e2e50d205..5e380d5786 100644 --- a/src/ansys/mapdl/core/_commands/solution/__init__.py +++ b/src/ansys/mapdl/core/_commands/solution/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/all_others.py b/src/ansys/mapdl/core/_commands/solution/all_others.py index a95b96476b..aa3054dc1b 100644 --- a/src/ansys/mapdl/core/_commands/solution/all_others.py +++ b/src/ansys/mapdl/core/_commands/solution/all_others.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/analysis_options.py b/src/ansys/mapdl/core/_commands/solution/analysis_options.py index a5aad3cb64..eab0a0d6cc 100644 --- a/src/ansys/mapdl/core/_commands/solution/analysis_options.py +++ b/src/ansys/mapdl/core/_commands/solution/analysis_options.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/birth_and_death.py b/src/ansys/mapdl/core/_commands/solution/birth_and_death.py index f077f4b9ae..4ec4724e92 100644 --- a/src/ansys/mapdl/core/_commands/solution/birth_and_death.py +++ b/src/ansys/mapdl/core/_commands/solution/birth_and_death.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/dynamic_options.py b/src/ansys/mapdl/core/_commands/solution/dynamic_options.py index 6e991e3a50..9be51e5846 100644 --- a/src/ansys/mapdl/core/_commands/solution/dynamic_options.py +++ b/src/ansys/mapdl/core/_commands/solution/dynamic_options.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/fe_body_loads.py b/src/ansys/mapdl/core/_commands/solution/fe_body_loads.py index 832c097cd5..72eed11123 100644 --- a/src/ansys/mapdl/core/_commands/solution/fe_body_loads.py +++ b/src/ansys/mapdl/core/_commands/solution/fe_body_loads.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/fe_constraints.py b/src/ansys/mapdl/core/_commands/solution/fe_constraints.py index 503ea5863f..7b5bcf7c06 100644 --- a/src/ansys/mapdl/core/_commands/solution/fe_constraints.py +++ b/src/ansys/mapdl/core/_commands/solution/fe_constraints.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/fe_forces.py b/src/ansys/mapdl/core/_commands/solution/fe_forces.py index 702720c562..68584dfcad 100644 --- a/src/ansys/mapdl/core/_commands/solution/fe_forces.py +++ b/src/ansys/mapdl/core/_commands/solution/fe_forces.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/fe_surface_loads.py b/src/ansys/mapdl/core/_commands/solution/fe_surface_loads.py index 47e66f0397..1df5d96e69 100644 --- a/src/ansys/mapdl/core/_commands/solution/fe_surface_loads.py +++ b/src/ansys/mapdl/core/_commands/solution/fe_surface_loads.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/gap_conditions.py b/src/ansys/mapdl/core/_commands/solution/gap_conditions.py index a277a10ca0..c73e56070a 100644 --- a/src/ansys/mapdl/core/_commands/solution/gap_conditions.py +++ b/src/ansys/mapdl/core/_commands/solution/gap_conditions.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/inertia.py b/src/ansys/mapdl/core/_commands/solution/inertia.py index d954b92a6c..a456de49ea 100644 --- a/src/ansys/mapdl/core/_commands/solution/inertia.py +++ b/src/ansys/mapdl/core/_commands/solution/inertia.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/load_step_operations.py b/src/ansys/mapdl/core/_commands/solution/load_step_operations.py index 94369be259..28cf878d34 100644 --- a/src/ansys/mapdl/core/_commands/solution/load_step_operations.py +++ b/src/ansys/mapdl/core/_commands/solution/load_step_operations.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/load_step_options.py b/src/ansys/mapdl/core/_commands/solution/load_step_options.py index df4f339040..d3b92330cd 100644 --- a/src/ansys/mapdl/core/_commands/solution/load_step_options.py +++ b/src/ansys/mapdl/core/_commands/solution/load_step_options.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/master_dof.py b/src/ansys/mapdl/core/_commands/solution/master_dof.py index ae4eaab2a0..3e308853fd 100644 --- a/src/ansys/mapdl/core/_commands/solution/master_dof.py +++ b/src/ansys/mapdl/core/_commands/solution/master_dof.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/miscellaneous_loads.py b/src/ansys/mapdl/core/_commands/solution/miscellaneous_loads.py index 6d45cce41b..4d52bdbfd3 100644 --- a/src/ansys/mapdl/core/_commands/solution/miscellaneous_loads.py +++ b/src/ansys/mapdl/core/_commands/solution/miscellaneous_loads.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_convergence_controls.py b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_convergence_controls.py index 48a448fb58..fb0b66cb4d 100644 --- a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_convergence_controls.py +++ b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_convergence_controls.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_definition_commands.py b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_definition_commands.py index a2f7daddc5..a58b531e28 100644 --- a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_definition_commands.py +++ b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_definition_commands.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_global_controls.py b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_global_controls.py index 034d1471a9..a47bd97577 100644 --- a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_global_controls.py +++ b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_global_controls.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_interface_mapping.py b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_interface_mapping.py index 1c1f6e0694..3a84e76db1 100644 --- a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_interface_mapping.py +++ b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_interface_mapping.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_load_transfer.py b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_load_transfer.py index 4b1861bf25..e12f27e5fe 100644 --- a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_load_transfer.py +++ b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_load_transfer.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_time_controls.py b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_time_controls.py index 6c95c1179c..6a495523b3 100644 --- a/src/ansys/mapdl/core/_commands/solution/multi_field_solver_time_controls.py +++ b/src/ansys/mapdl/core/_commands/solution/multi_field_solver_time_controls.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/nonlinear_options.py b/src/ansys/mapdl/core/_commands/solution/nonlinear_options.py index d95561b41c..aea81e12b8 100644 --- a/src/ansys/mapdl/core/_commands/solution/nonlinear_options.py +++ b/src/ansys/mapdl/core/_commands/solution/nonlinear_options.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/ocean.py b/src/ansys/mapdl/core/_commands/solution/ocean.py index 94aeb88434..af8669f56c 100644 --- a/src/ansys/mapdl/core/_commands/solution/ocean.py +++ b/src/ansys/mapdl/core/_commands/solution/ocean.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/radiosity.py b/src/ansys/mapdl/core/_commands/solution/radiosity.py index ff2e1d852d..67063800b4 100644 --- a/src/ansys/mapdl/core/_commands/solution/radiosity.py +++ b/src/ansys/mapdl/core/_commands/solution/radiosity.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/rezoning.py b/src/ansys/mapdl/core/_commands/solution/rezoning.py index e9c55e6d73..a6b9ff95ef 100644 --- a/src/ansys/mapdl/core/_commands/solution/rezoning.py +++ b/src/ansys/mapdl/core/_commands/solution/rezoning.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/solid_body_loads.py b/src/ansys/mapdl/core/_commands/solution/solid_body_loads.py index bff6a9e3ae..1a66374b53 100644 --- a/src/ansys/mapdl/core/_commands/solution/solid_body_loads.py +++ b/src/ansys/mapdl/core/_commands/solution/solid_body_loads.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/solid_constraints.py b/src/ansys/mapdl/core/_commands/solution/solid_constraints.py index 38123eb2b6..1198c6a44d 100644 --- a/src/ansys/mapdl/core/_commands/solution/solid_constraints.py +++ b/src/ansys/mapdl/core/_commands/solution/solid_constraints.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/solid_forces.py b/src/ansys/mapdl/core/_commands/solution/solid_forces.py index 2bd834c55a..811e2fd5c1 100644 --- a/src/ansys/mapdl/core/_commands/solution/solid_forces.py +++ b/src/ansys/mapdl/core/_commands/solution/solid_forces.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/solid_surface_loads.py b/src/ansys/mapdl/core/_commands/solution/solid_surface_loads.py index bace777dc6..948862075a 100644 --- a/src/ansys/mapdl/core/_commands/solution/solid_surface_loads.py +++ b/src/ansys/mapdl/core/_commands/solution/solid_surface_loads.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/solution_status.py b/src/ansys/mapdl/core/_commands/solution/solution_status.py index ef88d52be8..85a9c5ccd7 100644 --- a/src/ansys/mapdl/core/_commands/solution/solution_status.py +++ b/src/ansys/mapdl/core/_commands/solution/solution_status.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/spectrum_options.py b/src/ansys/mapdl/core/_commands/solution/spectrum_options.py index bd61e0b5fa..5dc638af54 100644 --- a/src/ansys/mapdl/core/_commands/solution/spectrum_options.py +++ b/src/ansys/mapdl/core/_commands/solution/spectrum_options.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_commands/solution/twod_to_3d_analysis.py b/src/ansys/mapdl/core/_commands/solution/twod_to_3d_analysis.py index efa3feefa7..fcdc1b47fc 100644 --- a/src/ansys/mapdl/core/_commands/solution/twod_to_3d_analysis.py +++ b/src/ansys/mapdl/core/_commands/solution/twod_to_3d_analysis.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/_version.py b/src/ansys/mapdl/core/_version.py index 2b73beb61c..b378890816 100644 --- a/src/ansys/mapdl/core/_version.py +++ b/src/ansys/mapdl/core/_version.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/cli/__init__.py b/src/ansys/mapdl/core/cli/__init__.py index 9ad1d21c8e..a3cedac94a 100644 --- a/src/ansys/mapdl/core/cli/__init__.py +++ b/src/ansys/mapdl/core/cli/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/cli/convert.py b/src/ansys/mapdl/core/cli/convert.py index 61224e49e2..c618ee14ef 100644 --- a/src/ansys/mapdl/core/cli/convert.py +++ b/src/ansys/mapdl/core/cli/convert.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/cli/list_instances.py b/src/ansys/mapdl/core/cli/list_instances.py index 11a3dba169..644fa75d00 100644 --- a/src/ansys/mapdl/core/cli/list_instances.py +++ b/src/ansys/mapdl/core/cli/list_instances.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/cli/start.py b/src/ansys/mapdl/core/cli/start.py index 6d0d2de0fa..7bd1ee8110 100644 --- a/src/ansys/mapdl/core/cli/start.py +++ b/src/ansys/mapdl/core/cli/start.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/cli/stop.py b/src/ansys/mapdl/core/cli/stop.py index 582d3c3747..2e16a7404b 100644 --- a/src/ansys/mapdl/core/cli/stop.py +++ b/src/ansys/mapdl/core/cli/stop.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/commands.py b/src/ansys/mapdl/core/commands.py index ab317d2172..4a74c124ac 100644 --- a/src/ansys/mapdl/core/commands.py +++ b/src/ansys/mapdl/core/commands.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/common_grpc.py b/src/ansys/mapdl/core/common_grpc.py index 14fe850012..373397c4ca 100644 --- a/src/ansys/mapdl/core/common_grpc.py +++ b/src/ansys/mapdl/core/common_grpc.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/component.py b/src/ansys/mapdl/core/component.py index 31ea84deb8..c67eb6def5 100644 --- a/src/ansys/mapdl/core/component.py +++ b/src/ansys/mapdl/core/component.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/convert.py b/src/ansys/mapdl/core/convert.py index 55d364a3a9..cbce45f5d4 100644 --- a/src/ansys/mapdl/core/convert.py +++ b/src/ansys/mapdl/core/convert.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/database/__init__.py b/src/ansys/mapdl/core/database/__init__.py index cca1816d53..15ab923f7a 100644 --- a/src/ansys/mapdl/core/database/__init__.py +++ b/src/ansys/mapdl/core/database/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/database/database.py b/src/ansys/mapdl/core/database/database.py index 5877af5f6e..77258d07b6 100644 --- a/src/ansys/mapdl/core/database/database.py +++ b/src/ansys/mapdl/core/database/database.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # @@ -33,8 +33,7 @@ import grpc from ansys.mapdl.core.errors import MapdlConnectionError - -from ..mapdl_grpc import MapdlGrpc +from ansys.mapdl.core.mapdl_grpc import MAX_MESSAGE_LENGTH, MapdlGrpc MINIMUM_MAPDL_VERSION = "21.1" FAILING_DATABASE_MAPDL = ["24.1", "24.2"] @@ -280,7 +279,12 @@ def start(self, timeout=10): self._server = {"ip": self._ip, "port": db_port} self._channel_str = f"{self._ip}:{db_port}" - self._channel = grpc.insecure_channel(self._channel_str) + self._channel = grpc.insecure_channel( + self._channel_str, + options=[ + ("grpc.max_receive_message_length", MAX_MESSAGE_LENGTH), + ], + ) self._state = grpc.channel_ready_future(self._channel) self._stub = mapdl_db_pb2_grpc.MapdlDbServiceStub(self._channel) diff --git a/src/ansys/mapdl/core/database/elems.py b/src/ansys/mapdl/core/database/elems.py index 3339d6728c..2e96528d9d 100644 --- a/src/ansys/mapdl/core/database/elems.py +++ b/src/ansys/mapdl/core/database/elems.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/database/nodes.py b/src/ansys/mapdl/core/database/nodes.py index d256bd0b1e..c98c469b01 100644 --- a/src/ansys/mapdl/core/database/nodes.py +++ b/src/ansys/mapdl/core/database/nodes.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/errors.py b/src/ansys/mapdl/core/errors.py index dd6c8df4f7..119446a66a 100644 --- a/src/ansys/mapdl/core/errors.py +++ b/src/ansys/mapdl/core/errors.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # @@ -21,13 +21,12 @@ # SOFTWARE. """PyMAPDL specific errors""" - from functools import wraps import signal import threading from typing import Callable, Optional -from grpc._channel import _InactiveRpcError, _MultiThreadedRendezvous +import grpc from ansys.mapdl.core import LOG as logger @@ -270,6 +269,13 @@ def __init__(self, msg=""): super().__init__(msg) +class MapdlgRPCError(MapdlRuntimeError): + """Raised when gRPC issues are found""" + + def __init__(self, msg=""): + super().__init__(msg) + + # handler for protect_grpc def handler(sig, frame): # pragma: no cover """Pass signal to custom interrupt handler.""" @@ -302,35 +308,26 @@ def wrapper(*args, **kwargs): # Capture gRPC exceptions try: out = func(*args, **kwargs) - except (_InactiveRpcError, _MultiThreadedRendezvous) as error: - # can't use isinstance here due to circular imports - try: - class_name = args[0].__class__.__name__ - except: - class_name = "" - - # trying to get "cmd" argument: - cmd = args[1] if len(args) >= 2 else "" - cmd = kwargs.get("cmd", cmd) - - caller = func.__name__ - - if cmd: - msg_ = f"running:\n{cmd}\ncalled by:\n{caller}" - else: - msg_ = f"calling:{caller}\nwith the following arguments:\nargs: {list(*args)}\nkwargs: {list(**kwargs_)}" - - if class_name == "MapdlGrpc": - mapdl = args[0] - elif hasattr(args[0], "_mapdl"): - mapdl = args[0]._mapdl - - # Must close unfinished processes - mapdl._close_process() - raise MapdlExitedError( - f"MAPDL server connection terminated unexpectedly while {msg_}\nwith the following error\n{error}" - ) from None - + except grpc.RpcError as error: + # Custom errors + if error.code() == grpc.StatusCode.RESOURCE_EXHAUSTED: + if "Received message larger than max" in error.details(): + try: + lim_ = int(error.details().split("(")[1].split("vs")[0]) + except IndexError: + lim_ = int(512 * 1024**2) + + raise MapdlgRPCError( + f"RESOURCE_EXHAUSTED: {error.details()}. " + "You can try to increase the gRPC message length size using 'PYMAPDL_MAX_MESSAGE_LENGTH'" + " environment variable. For instance:\n\n" + f"$ export PYMAPDL_MAX_MESSAGE_LENGTH={lim_}" + ) + + # Generic error + handle_generic_grpc_error(error, func, args, kwargs) + + # No exceptions if threading.current_thread().__class__.__name__ == "_MainThread": received_interrupt = bool(SIGINT_TRACKER) @@ -347,6 +344,53 @@ def wrapper(*args, **kwargs): return wrapper +def handle_generic_grpc_error(error, func, args, kwargs): + """Handle non-custom gRPC errors""" + + # can't use isinstance here due to circular imports + try: + class_name = args[0].__class__.__name__ + except (IndexError, AttributeError): + class_name = "" + + # trying to get "cmd" argument: + cmd = args[1] if len(args) >= 2 else "" + cmd = kwargs.get("cmd", cmd) + + caller = func.__name__ + + if cmd: + msg_ = f"running:\n {cmd}\ncalled by:\n {caller}\n" + else: + msg_ = f"calling:{caller}\nwith the following arguments:\n args: {args}\n kwargs: {kwargs}" + + if class_name == "MapdlGrpc": + mapdl = args[0] + elif hasattr(args[0], "_mapdl"): + mapdl = args[0]._mapdl + + msg = ( + f"Error:\nMAPDL server connection terminated unexpectedly while {msg_}\n" + "Error:\n" + f" {error.details()}\n" + f"Full error:\n{error}" + ) + + # MAPDL gRPC is unavailable. + if error.code() == grpc.StatusCode.UNAVAILABLE: + raise MapdlExitedError(msg) + + # Generic error + # Test if MAPDL is alive or not. + if mapdl.is_alive: + raise MapdlRuntimeError(msg) + + else: + # Must close unfinished processes + mapdl._close_process() + raise MapdlExitedError(msg) + + def protect_from( exception, match: Optional[str] = None, condition: Optional[bool] = None ) -> Callable: diff --git a/src/ansys/mapdl/core/examples/__init__.py b/src/ansys/mapdl/core/examples/__init__.py index d4d8445fbb..c5af09b6b6 100644 --- a/src/ansys/mapdl/core/examples/__init__.py +++ b/src/ansys/mapdl/core/examples/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/examples/downloads.py b/src/ansys/mapdl/core/examples/downloads.py index 3b791ddd1e..cb8ec7966f 100644 --- a/src/ansys/mapdl/core/examples/downloads.py +++ b/src/ansys/mapdl/core/examples/downloads.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/examples/examples.py b/src/ansys/mapdl/core/examples/examples.py index 5ee96fdbde..bbb8a2715e 100644 --- a/src/ansys/mapdl/core/examples/examples.py +++ b/src/ansys/mapdl/core/examples/examples.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/examples/verif_files.py b/src/ansys/mapdl/core/examples/verif_files.py index 0d1d4dc667..7a6ccb2ccd 100755 --- a/src/ansys/mapdl/core/examples/verif_files.py +++ b/src/ansys/mapdl/core/examples/verif_files.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/inline_functions/__init__.py b/src/ansys/mapdl/core/inline_functions/__init__.py index bc453f9232..466797780e 100644 --- a/src/ansys/mapdl/core/inline_functions/__init__.py +++ b/src/ansys/mapdl/core/inline_functions/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/inline_functions/component_queries.py b/src/ansys/mapdl/core/inline_functions/component_queries.py index 08576ce3e4..5cb10f5dac 100644 --- a/src/ansys/mapdl/core/inline_functions/component_queries.py +++ b/src/ansys/mapdl/core/inline_functions/component_queries.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/inline_functions/connectivity_queries.py b/src/ansys/mapdl/core/inline_functions/connectivity_queries.py index 51d52a1b62..a39fc9d432 100644 --- a/src/ansys/mapdl/core/inline_functions/connectivity_queries.py +++ b/src/ansys/mapdl/core/inline_functions/connectivity_queries.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/inline_functions/core.py b/src/ansys/mapdl/core/inline_functions/core.py index 4e8d9d6daf..65d7d59d9e 100644 --- a/src/ansys/mapdl/core/inline_functions/core.py +++ b/src/ansys/mapdl/core/inline_functions/core.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/inline_functions/geometry_queries.py b/src/ansys/mapdl/core/inline_functions/geometry_queries.py index ce3bf4c7a7..a9c3d14a4d 100644 --- a/src/ansys/mapdl/core/inline_functions/geometry_queries.py +++ b/src/ansys/mapdl/core/inline_functions/geometry_queries.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/inline_functions/inline_functions.py b/src/ansys/mapdl/core/inline_functions/inline_functions.py index 837d6a8492..724409ebed 100644 --- a/src/ansys/mapdl/core/inline_functions/inline_functions.py +++ b/src/ansys/mapdl/core/inline_functions/inline_functions.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/inline_functions/line_queries.py b/src/ansys/mapdl/core/inline_functions/line_queries.py index de8d9b455f..2b4b9f87ca 100644 --- a/src/ansys/mapdl/core/inline_functions/line_queries.py +++ b/src/ansys/mapdl/core/inline_functions/line_queries.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/inline_functions/nearest_queries.py b/src/ansys/mapdl/core/inline_functions/nearest_queries.py index c6d7f63801..9fbb41b637 100644 --- a/src/ansys/mapdl/core/inline_functions/nearest_queries.py +++ b/src/ansys/mapdl/core/inline_functions/nearest_queries.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/inline_functions/normals_queries.py b/src/ansys/mapdl/core/inline_functions/normals_queries.py index c286cb983e..151733f77b 100644 --- a/src/ansys/mapdl/core/inline_functions/normals_queries.py +++ b/src/ansys/mapdl/core/inline_functions/normals_queries.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/inline_functions/scalar_queries.py b/src/ansys/mapdl/core/inline_functions/scalar_queries.py index 8693e8cd5e..038ea4fb80 100644 --- a/src/ansys/mapdl/core/inline_functions/scalar_queries.py +++ b/src/ansys/mapdl/core/inline_functions/scalar_queries.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/inline_functions/selection_queries.py b/src/ansys/mapdl/core/inline_functions/selection_queries.py index 76ac2e8b03..10b5b1b30e 100644 --- a/src/ansys/mapdl/core/inline_functions/selection_queries.py +++ b/src/ansys/mapdl/core/inline_functions/selection_queries.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/jupyter.py b/src/ansys/mapdl/core/jupyter.py index 4794f139d9..754ac92280 100644 --- a/src/ansys/mapdl/core/jupyter.py +++ b/src/ansys/mapdl/core/jupyter.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/krylov.py b/src/ansys/mapdl/core/krylov.py index a7dad0d1de..9f2ebb6333 100644 --- a/src/ansys/mapdl/core/krylov.py +++ b/src/ansys/mapdl/core/krylov.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/launcher.py b/src/ansys/mapdl/core/launcher.py index 085824b66e..ff15fbc138 100644 --- a/src/ansys/mapdl/core/launcher.py +++ b/src/ansys/mapdl/core/launcher.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # @@ -1646,6 +1646,7 @@ def launch_mapdl( loglevel=loglevel, set_no_abort=set_no_abort, use_vtk=use_vtk, + log_apdl=log_apdl, **start_parm, ) if clear_on_connect: diff --git a/src/ansys/mapdl/core/licensing.py b/src/ansys/mapdl/core/licensing.py index b44cafe1e8..8740084ca9 100644 --- a/src/ansys/mapdl/core/licensing.py +++ b/src/ansys/mapdl/core/licensing.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/logging.py b/src/ansys/mapdl/core/logging.py index 2183946b62..9c5b8f62f2 100644 --- a/src/ansys/mapdl/core/logging.py +++ b/src/ansys/mapdl/core/logging.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/mapdl.py b/src/ansys/mapdl/core/mapdl.py index ee3d75ecf1..6528dcaa2b 100644 --- a/src/ansys/mapdl/core/mapdl.py +++ b/src/ansys/mapdl/core/mapdl.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/mapdl_console.py b/src/ansys/mapdl/core/mapdl_console.py index 58410dbf0b..88c480fb69 100644 --- a/src/ansys/mapdl/core/mapdl_console.py +++ b/src/ansys/mapdl/core/mapdl_console.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/mapdl_core.py b/src/ansys/mapdl/core/mapdl_core.py index 02738de47b..7ad1d2a002 100644 --- a/src/ansys/mapdl/core/mapdl_core.py +++ b/src/ansys/mapdl/core/mapdl_core.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # @@ -104,20 +104,22 @@ "WRITTEN TO FILE" ) # getting the file name is buggy. -VWRITE_REPLACEMENT = """ -Cannot use *VWRITE directly as a command in MAPDL +VWRITE_MWRITE_REPLACEMENT = """ +Cannot use *VWRITE/*MWRITE directly as a command in MAPDL service mode. Instead, run it as ``non_interactive``. -For example: +For example, in the *VWRITE case: with self.non_interactive: self.vwrite('%s(1)' % parm_name) self.run('(F20.12)') + """ ## Invalid commands in interactive mode. INVAL_COMMANDS = { - "*VWR": VWRITE_REPLACEMENT, + "*VWR": VWRITE_MWRITE_REPLACEMENT, + "*MWR": VWRITE_MWRITE_REPLACEMENT, "*CFO": "Run CFOPEN as ``non_interactive``", "*CRE": "Create a function within python or run as non_interactive", "*END": "Create a function within python or run as non_interactive", @@ -158,6 +160,7 @@ VALID_SELECTION_ENTITY_TP = Literal["VOLU", "AREA", "LINE", "KP", "ELEM", "NODE"] GUI_FONT_SIZE = 15 +LOG_APDL_DEFAULT_FILE_NAME = "apdl.log" def parse_to_short_cmd(command): @@ -309,6 +312,9 @@ def __init__( self._componentmanager: ComponentManager = ComponentManager(self) + if isinstance(log_apdl, bool) and log_apdl: + log_apdl = LOG_APDL_DEFAULT_FILE_NAME + if log_apdl: self.open_apdl_log(log_apdl, mode="w") @@ -1878,7 +1884,7 @@ def _flush_stored(self): self._log.debug("Flushing stored commands") rnd_str = random_string() tmp_out = os.path.join(tempfile.gettempdir(), f"tmp_{rnd_str}.out") - self._stored_commands.insert(0, "/OUTPUT, f'{tmp_out}'") + self._stored_commands.insert(0, f"/OUTPUT, {tmp_out}") self._stored_commands.append("/OUTPUT") commands = "\n".join(self._stored_commands) if self._apdl_log: diff --git a/src/ansys/mapdl/core/mapdl_extended.py b/src/ansys/mapdl/core/mapdl_extended.py index 573569c145..a1a785727a 100644 --- a/src/ansys/mapdl/core/mapdl_extended.py +++ b/src/ansys/mapdl/core/mapdl_extended.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # @@ -1509,7 +1509,7 @@ def vwrite( # cannot be run in interactive mode if not self._store_commands: raise MapdlRuntimeError( - "VWRTIE cannot run interactively. \n\nPlease use " + "*VWRITE cannot run interactively. \n\nPlease use " "``with mapdl.non_interactive:``" ) @@ -1536,6 +1536,30 @@ def vwrite( **kwargs, ) + @wraps(_MapdlCore.mwrite) + def mwrite( + self, parr="", fname="", ext="", label="", n1="", n2="", n3="", **kwargs + ): + """Wrapping *MWRITE""" + + # cannot be run in interactive mode + if not self._store_commands: + raise MapdlRuntimeError( + "*MWRITE cannot run interactively. \n\nPlease use " + "``with mapdl.non_interactive:``" + ) + + return super().mwrite( + parr=parr, + fname=fname, + ext=ext, + label=label, + n1=n1, + n2=n2, + n3=n3, + **kwargs, + ) + @wraps(_MapdlCore.nrm) def nrm(self, name="", normtype="", parr="", normalize="", **kwargs): """Wraps *NRM""" diff --git a/src/ansys/mapdl/core/mapdl_geometry.py b/src/ansys/mapdl/core/mapdl_geometry.py index ee0446cdef..58dacf70b0 100644 --- a/src/ansys/mapdl/core/mapdl_geometry.py +++ b/src/ansys/mapdl/core/mapdl_geometry.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/mapdl_grpc.py b/src/ansys/mapdl/core/mapdl_grpc.py index 32f60d1a13..c713a5c421 100644 --- a/src/ansys/mapdl/core/mapdl_grpc.py +++ b/src/ansys/mapdl/core/mapdl_grpc.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # @@ -397,6 +397,9 @@ def __init__( self._state: Optional[grpc.Future] = None self._timeout: int = timeout self._pids: List[Union[int, None]] = [] + self._channel_state: grpc.ChannelConnectivity = ( + grpc.ChannelConnectivity.CONNECTING + ) if channel is None: self._log.debug("Creating channel to %s:%s", ip, port) @@ -405,6 +408,9 @@ def __init__( self._log.debug("Using provided channel") self._channel: grpc.Channel = channel + # Subscribe to channel for channel state updates + self._subscribe_to_channel() + # connect and validate to the channel self._mapdl_process: Popen = start_parm.pop("process", None) @@ -487,6 +493,31 @@ def _create_channel(self, ip: str, port: int) -> grpc.Channel: ], ) + def _subscribe_to_channel(self): + """Subscribe to channel status and store the value in 'mapdl._channel_state'""" + + # Callback function to monitor state changes + def connectivity_callback(connectivity): + self._log.debug(f"Channel connectivity changed to: {connectivity}") + self._channel_state = connectivity + + # Subscribe to channel state changes + self._channel.subscribe(connectivity_callback, try_to_connect=True) + + @property + def channel_state(self) -> str: + """Returns the gRPC channel state. + + The possible values are: + + - 0 - 'IDLE' + - 1 - 'CONNECTING' + - 2 - 'READY' + - 3 - 'TRANSIENT_FAILURE' + - 4 - 'SHUTDOWN' + """ + return self._channel_state.name + def _multi_connect(self, n_attempts=5, timeout=15): """Try to connect over a series of attempts to the channel. @@ -1733,9 +1764,20 @@ def input( fname = tmp_modified_file # Running method - # always check if file is present as the grpc and MAPDL errors - # are unclear - filename = self._get_file_path(fname, progress_bar) + # + if "CDRE" in orig_cmd.upper(): + # CDREAD already uploads the file, and since the priority in + # `_get_file_path` is for the files in the python working directory, + # we skip that function here. + self._log.debug( + f"Avoid uploading the file {fname} because `CDREAD` should have upload it already." + ) + filename = fname + + else: + # Always check if file is present as the grpc and MAPDL errors + # are unclear + filename = self._get_file_path(fname, progress_bar) if time_step_stream is not None: if time_step_stream <= 0: @@ -2528,13 +2570,35 @@ def _download_as_raw(self, target_name: str) -> str: @property def is_alive(self) -> bool: """True when there is an active connect to the gRPC server""" + if self.channel_state not in ["IDLE", "READY"]: + self._log.debug( + "MAPDL instance is not alive because the channel is not 'IDLE' o 'READY'." + ) + return False + if self._exited: + self._log.debug("MAPDL instance is not alive because it is exited.") return False if self.busy: + self._log.debug("MAPDL instance is alive because it is busy.") return True + try: - return bool(self.inquire("", "JOBNAME")) - except: + check = bool(self._ctrl("VERSION")) + if check: + self._log.debug( + "MAPDL instance is alive because version was retrieved." + ) + else: + self._log.debug( + "MAPDL instance is not alive because version was not retrieved. Maybe output is muted?." + ) + return check + + except Exception as error: + self._log.debug( + f"MAPDL instance is not alive because retrieving version failed with:\n{error}" + ) return False @property diff --git a/src/ansys/mapdl/core/mapdl_inprocess.py b/src/ansys/mapdl/core/mapdl_inprocess.py index 272fee3bca..4ff91dad1a 100644 --- a/src/ansys/mapdl/core/mapdl_inprocess.py +++ b/src/ansys/mapdl/core/mapdl_inprocess.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/mapdl_types.py b/src/ansys/mapdl/core/mapdl_types.py index 13cdf13a79..22afd033fc 100644 --- a/src/ansys/mapdl/core/mapdl_types.py +++ b/src/ansys/mapdl/core/mapdl_types.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/mesh/__init__.py b/src/ansys/mapdl/core/mesh/__init__.py index a95b96476b..aa3054dc1b 100644 --- a/src/ansys/mapdl/core/mesh/__init__.py +++ b/src/ansys/mapdl/core/mesh/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/mesh/mesh.py b/src/ansys/mapdl/core/mesh/mesh.py index 907839d375..10099b0f03 100644 --- a/src/ansys/mapdl/core/mesh/mesh.py +++ b/src/ansys/mapdl/core/mesh/mesh.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/mesh_grpc.py b/src/ansys/mapdl/core/mesh_grpc.py index b067b5ce62..b196cb9915 100644 --- a/src/ansys/mapdl/core/mesh_grpc.py +++ b/src/ansys/mapdl/core/mesh_grpc.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/misc.py b/src/ansys/mapdl/core/misc.py index e7a55f700d..d69c758ee3 100644 --- a/src/ansys/mapdl/core/misc.py +++ b/src/ansys/mapdl/core/misc.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/parameters.py b/src/ansys/mapdl/core/parameters.py index 8796afa2d3..32c96bbef8 100644 --- a/src/ansys/mapdl/core/parameters.py +++ b/src/ansys/mapdl/core/parameters.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # @@ -548,7 +548,7 @@ def _get_parameter_array(self, parm_name, shape): if not escaped: # pragma: no cover raise MapdlRuntimeError( f"The array '{parm_name}' has a number format " - "that could not be read using '{format_str}'." + f"that could not be read using '{format_str}'." ) arr_flat = np.fromstring(output, sep="\n").reshape(shape) diff --git a/src/ansys/mapdl/core/plotting/__init__.py b/src/ansys/mapdl/core/plotting/__init__.py index 061720ce5c..0939c45e6f 100644 --- a/src/ansys/mapdl/core/plotting/__init__.py +++ b/src/ansys/mapdl/core/plotting/__init__.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/plotting/consts.py b/src/ansys/mapdl/core/plotting/consts.py index 7a26d8fe35..d091473eaf 100644 --- a/src/ansys/mapdl/core/plotting/consts.py +++ b/src/ansys/mapdl/core/plotting/consts.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/plotting/plotting_defaults.py b/src/ansys/mapdl/core/plotting/plotting_defaults.py index 0d723b7652..562af2a585 100644 --- a/src/ansys/mapdl/core/plotting/plotting_defaults.py +++ b/src/ansys/mapdl/core/plotting/plotting_defaults.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/plotting/theme.py b/src/ansys/mapdl/core/plotting/theme.py index 3af940f242..1cb40bfd1f 100644 --- a/src/ansys/mapdl/core/plotting/theme.py +++ b/src/ansys/mapdl/core/plotting/theme.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/plotting/visualizer.py b/src/ansys/mapdl/core/plotting/visualizer.py index 8e60d45b86..1ff21832c7 100644 --- a/src/ansys/mapdl/core/plotting/visualizer.py +++ b/src/ansys/mapdl/core/plotting/visualizer.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/pool.py b/src/ansys/mapdl/core/pool.py index feff0540c0..28a74e2809 100755 --- a/src/ansys/mapdl/core/pool.py +++ b/src/ansys/mapdl/core/pool.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/post.py b/src/ansys/mapdl/core/post.py index cd4d39188c..ec77ffd2f7 100644 --- a/src/ansys/mapdl/core/post.py +++ b/src/ansys/mapdl/core/post.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/solution.py b/src/ansys/mapdl/core/solution.py index ed75d3084c..09d6478e44 100644 --- a/src/ansys/mapdl/core/solution.py +++ b/src/ansys/mapdl/core/solution.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/src/ansys/mapdl/core/xpl.py b/src/ansys/mapdl/core/xpl.py index e2f9d167f3..a49d180adb 100644 --- a/src/ansys/mapdl/core/xpl.py +++ b/src/ansys/mapdl/core/xpl.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/.image_cache/bc_plot_options[False-False-False].png b/tests/.image_cache/bc_plot_options[False-False-False].png index 52107b86a4..77e20d8e3c 100644 Binary files a/tests/.image_cache/bc_plot_options[False-False-False].png and b/tests/.image_cache/bc_plot_options[False-False-False].png differ diff --git a/tests/.image_cache/bc_plot_options[False-False-True].png b/tests/.image_cache/bc_plot_options[False-False-True].png index 52107b86a4..77e20d8e3c 100644 Binary files a/tests/.image_cache/bc_plot_options[False-False-True].png and b/tests/.image_cache/bc_plot_options[False-False-True].png differ diff --git a/tests/.image_cache/bc_plot_options[False-True-False].png b/tests/.image_cache/bc_plot_options[False-True-False].png index 15a0e526e6..39cf9ba04a 100644 Binary files a/tests/.image_cache/bc_plot_options[False-True-False].png and b/tests/.image_cache/bc_plot_options[False-True-False].png differ diff --git a/tests/.image_cache/bc_plot_options[False-True-True].png b/tests/.image_cache/bc_plot_options[False-True-True].png index 15a0e526e6..39cf9ba04a 100644 Binary files a/tests/.image_cache/bc_plot_options[False-True-True].png and b/tests/.image_cache/bc_plot_options[False-True-True].png differ diff --git a/tests/.image_cache/bc_plot_options[True-False-False].png b/tests/.image_cache/bc_plot_options[True-False-False].png index d3290c3988..21163ec93d 100644 Binary files a/tests/.image_cache/bc_plot_options[True-False-False].png and b/tests/.image_cache/bc_plot_options[True-False-False].png differ diff --git a/tests/.image_cache/bc_plot_options[True-False-True].png b/tests/.image_cache/bc_plot_options[True-False-True].png index d3290c3988..21163ec93d 100644 Binary files a/tests/.image_cache/bc_plot_options[True-False-True].png and b/tests/.image_cache/bc_plot_options[True-False-True].png differ diff --git a/tests/.image_cache/bc_plot_options[True-True-False].png b/tests/.image_cache/bc_plot_options[True-True-False].png index 6a3c990623..483dc37688 100644 Binary files a/tests/.image_cache/bc_plot_options[True-True-False].png and b/tests/.image_cache/bc_plot_options[True-True-False].png differ diff --git a/tests/.image_cache/bc_plot_options[True-True-True].png b/tests/.image_cache/bc_plot_options[True-True-True].png index 6a3c990623..483dc37688 100644 Binary files a/tests/.image_cache/bc_plot_options[True-True-True].png and b/tests/.image_cache/bc_plot_options[True-True-True].png differ diff --git a/tests/.image_cache/bc_plot_options_fields[loads0-field0].png b/tests/.image_cache/bc_plot_options_fields[loads0-field0].png index 03268c0878..912bf8d85d 100644 Binary files a/tests/.image_cache/bc_plot_options_fields[loads0-field0].png and b/tests/.image_cache/bc_plot_options_fields[loads0-field0].png differ diff --git a/tests/.image_cache/bc_plot_options_fields[loads0-field3].png b/tests/.image_cache/bc_plot_options_fields[loads0-field3].png index 1c564a73ba..001bff1027 100644 Binary files a/tests/.image_cache/bc_plot_options_fields[loads0-field3].png and b/tests/.image_cache/bc_plot_options_fields[loads0-field3].png differ diff --git a/tests/.image_cache/bc_plot_options_fields[loads1-field0].png b/tests/.image_cache/bc_plot_options_fields[loads1-field0].png index 58b511f064..e0e26c0578 100644 Binary files a/tests/.image_cache/bc_plot_options_fields[loads1-field0].png and b/tests/.image_cache/bc_plot_options_fields[loads1-field0].png differ diff --git a/tests/.image_cache/bc_plot_options_fields[loads1-field3].png b/tests/.image_cache/bc_plot_options_fields[loads1-field3].png index 2720306051..8f514e4cd2 100644 Binary files a/tests/.image_cache/bc_plot_options_fields[loads1-field3].png and b/tests/.image_cache/bc_plot_options_fields[loads1-field3].png differ diff --git a/tests/.image_cache/bc_plot_options_fields[loads2-field0].png b/tests/.image_cache/bc_plot_options_fields[loads2-field0].png index 3c3dfc8410..d203f4c364 100644 Binary files a/tests/.image_cache/bc_plot_options_fields[loads2-field0].png and b/tests/.image_cache/bc_plot_options_fields[loads2-field0].png differ diff --git a/tests/.image_cache/bc_plot_options_fields[loads2-field3].png b/tests/.image_cache/bc_plot_options_fields[loads2-field3].png index cffdffa563..6dbc09ac34 100644 Binary files a/tests/.image_cache/bc_plot_options_fields[loads2-field3].png and b/tests/.image_cache/bc_plot_options_fields[loads2-field3].png differ diff --git a/tests/.image_cache/bc_plot_options_fields[loads3-field0].png b/tests/.image_cache/bc_plot_options_fields[loads3-field0].png index eb0ec48b58..f242cf13be 100644 Binary files a/tests/.image_cache/bc_plot_options_fields[loads3-field0].png and b/tests/.image_cache/bc_plot_options_fields[loads3-field0].png differ diff --git a/tests/.image_cache/bc_plot_options_fields[loads3-field3].png b/tests/.image_cache/bc_plot_options_fields[loads3-field3].png index 99cf1bd001..e962edd946 100644 Binary files a/tests/.image_cache/bc_plot_options_fields[loads3-field3].png and b/tests/.image_cache/bc_plot_options_fields[loads3-field3].png differ diff --git a/tests/.image_cache/single_glyph[0-FX].png b/tests/.image_cache/single_glyph[0-FX].png index f6e8df7445..7fc02eabc4 100644 Binary files a/tests/.image_cache/single_glyph[0-FX].png and b/tests/.image_cache/single_glyph[0-FX].png differ diff --git a/tests/.image_cache/single_glyph[0-FZ].png b/tests/.image_cache/single_glyph[0-FZ].png index 334639e914..dd38219352 100644 Binary files a/tests/.image_cache/single_glyph[0-FZ].png and b/tests/.image_cache/single_glyph[0-FZ].png differ diff --git a/tests/.image_cache/single_glyph[0-UY].png b/tests/.image_cache/single_glyph[0-UY].png index 8addb1fb2e..003c0f9ce5 100644 Binary files a/tests/.image_cache/single_glyph[0-UY].png and b/tests/.image_cache/single_glyph[0-UY].png differ diff --git a/tests/.image_cache/single_glyph[0-UZ].png b/tests/.image_cache/single_glyph[0-UZ].png index 128e77c877..801d9502e9 100644 Binary files a/tests/.image_cache/single_glyph[0-UZ].png and b/tests/.image_cache/single_glyph[0-UZ].png differ diff --git a/tests/.image_cache/single_glyph[50-FX].png b/tests/.image_cache/single_glyph[50-FX].png index f3100a50a9..e1aef4d8b3 100644 Binary files a/tests/.image_cache/single_glyph[50-FX].png and b/tests/.image_cache/single_glyph[50-FX].png differ diff --git a/tests/.image_cache/single_glyph[50-FY].png b/tests/.image_cache/single_glyph[50-FY].png index 7a60397568..49ad49345e 100644 Binary files a/tests/.image_cache/single_glyph[50-FY].png and b/tests/.image_cache/single_glyph[50-FY].png differ diff --git a/tests/.image_cache/single_glyph[50-FZ].png b/tests/.image_cache/single_glyph[50-FZ].png index 1bb393508a..0870f213a9 100644 Binary files a/tests/.image_cache/single_glyph[50-FZ].png and b/tests/.image_cache/single_glyph[50-FZ].png differ diff --git a/tests/.image_cache/single_glyph[50-UX].png b/tests/.image_cache/single_glyph[50-UX].png index 1aa9986ba5..f5a70405b3 100644 Binary files a/tests/.image_cache/single_glyph[50-UX].png and b/tests/.image_cache/single_glyph[50-UX].png differ diff --git a/tests/.image_cache/single_glyph[50-UY].png b/tests/.image_cache/single_glyph[50-UY].png index 683b5e6bc8..132c7fd73f 100644 Binary files a/tests/.image_cache/single_glyph[50-UY].png and b/tests/.image_cache/single_glyph[50-UY].png differ diff --git a/tests/.image_cache/single_glyph[50-UZ].png b/tests/.image_cache/single_glyph[50-UZ].png index 4451e53fd6..93658b978f 100644 Binary files a/tests/.image_cache/single_glyph[50-UZ].png and b/tests/.image_cache/single_glyph[50-UZ].png differ diff --git a/tests/.image_cache/single_glyph[500-FX].png b/tests/.image_cache/single_glyph[500-FX].png index 4b0fc096ac..ba7e256dc7 100644 Binary files a/tests/.image_cache/single_glyph[500-FX].png and b/tests/.image_cache/single_glyph[500-FX].png differ diff --git a/tests/.image_cache/single_glyph[500-FY].png b/tests/.image_cache/single_glyph[500-FY].png index 201d7d42de..f1f142e19d 100644 Binary files a/tests/.image_cache/single_glyph[500-FY].png and b/tests/.image_cache/single_glyph[500-FY].png differ diff --git a/tests/.image_cache/single_glyph[500-FZ].png b/tests/.image_cache/single_glyph[500-FZ].png index 84c976ffc7..9ab83b0a5b 100644 Binary files a/tests/.image_cache/single_glyph[500-FZ].png and b/tests/.image_cache/single_glyph[500-FZ].png differ diff --git a/tests/.image_cache/single_glyph[500-UX].png b/tests/.image_cache/single_glyph[500-UX].png index 82dc27cc40..90a66e340d 100644 Binary files a/tests/.image_cache/single_glyph[500-UX].png and b/tests/.image_cache/single_glyph[500-UX].png differ diff --git a/tests/.image_cache/single_glyph[500-UY].png b/tests/.image_cache/single_glyph[500-UY].png index aa7b593fb9..2ecc9d525a 100644 Binary files a/tests/.image_cache/single_glyph[500-UY].png and b/tests/.image_cache/single_glyph[500-UY].png differ diff --git a/tests/.image_cache/single_glyph[500-UZ].png b/tests/.image_cache/single_glyph[500-UZ].png index 31cde85387..3b26ccd550 100644 Binary files a/tests/.image_cache/single_glyph[500-UZ].png and b/tests/.image_cache/single_glyph[500-UZ].png differ diff --git a/tests/common.py b/tests/common.py index 29f0eb492c..91fa9b12b1 100644 --- a/tests/common.py +++ b/tests/common.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # @@ -137,6 +137,19 @@ def testing_minimal(): return os.environ.get("TESTING_MINIMAL", "NO").upper().strip() in ["YES", "TRUE"] +def log_apdl() -> bool: + if "PYMAPDL_LOG_APDL" in os.environ and os.environ.get("PYMAPDL_LOG_APDL", ""): + log_apdl = os.environ.get("PYMAPDL_LOG_APDL") + + if log_apdl.lower() in ["true", "false", "yes", "no"]: + return log_apdl.lower() in ["true", "yes"] + else: + return log_apdl + + else: + return False + + def is_float(s: str) -> bool: try: float(s) diff --git a/tests/conftest.py b/tests/conftest.py index 6702346cba..47438a40c2 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # @@ -21,6 +21,7 @@ # SOFTWARE. from collections import namedtuple +from collections.abc import Generator import os from pathlib import Path from shutil import get_terminal_size @@ -32,6 +33,7 @@ import psutil import pytest +from ansys.mapdl.core.launcher import is_ansys_process from common import ( Element, Node, @@ -44,6 +46,7 @@ is_on_ubuntu, is_running_on_student, is_smp, + log_apdl, support_plotting, testing_minimal, ) @@ -70,6 +73,7 @@ HAS_DPF = has_dpf() SUPPORT_PLOTTING = support_plotting() IS_SMP = is_smp() +LOG_APDL = log_apdl() QUICK_LAUNCH_SWITCHES = "-smp -m 100 -db 100" VALID_PORTS = [] @@ -87,6 +91,11 @@ reason="Skipping because not on local. ", ) +skip_if_not_remote = pytest.mark.skipif( + ON_LOCAL, + reason="Skipping because not on remote. ", +) + skip_if_on_cicd = pytest.mark.skipif( ON_CI, reason="""Skip if on CI/CD.""", @@ -116,6 +125,16 @@ ) +PROCESS_OK_STATUS = [ + psutil.STATUS_RUNNING, # + psutil.STATUS_SLEEPING, # + psutil.STATUS_DISK_SLEEP, + psutil.STATUS_DEAD, + psutil.STATUS_PARKED, # (Linux) + psutil.STATUS_IDLE, # (Linux, macOS, FreeBSD) +] + + def import_module(requirement): from importlib import import_module @@ -146,6 +165,9 @@ def requires(requirement: str): elif "local" == requirement: return skip_if_not_local + elif "remote" == requirement: + return skip_if_not_remote + elif "cicd" == requirement: return skip_if_on_cicd @@ -272,10 +294,13 @@ def pytest_report_header(config, start_path, startdir): for env_var in [ "PYMAPDL_START_INSTANCE", "PYMAPDL_PORT", + "PYMAPDL_PORT2", "PYMAPDL_DB_PORT", "PYMAPDL_IP", + "PYMAPDL_IP2", "DPF_PORT", "DPF_START_SERVER", + "IGNORE_POOL", ]: env_var_value = os.environ.get(env_var, None) if env_var_value is not None: @@ -409,11 +434,41 @@ def running_test(): @pytest.fixture(autouse=True, scope="function") -def run_before_and_after_tests(request, mapdl): +def run_before_and_after_tests( + request: pytest.FixtureRequest, mapdl: Mapdl +) -> Generator[Mapdl]: """Fixture to execute asserts before and after a test is run""" - # Setup: fill with any logic you want - def is_exited(mapdl): + # Relaunching MAPDL if dead + mapdl = restart_mapdl(mapdl) + + # Write test info to log_apdl + if LOG_APDL: + log_test_start(mapdl) + + # check if the local/remote state has changed or not + prev = mapdl.is_local + + yield # this is where the testing happens + + assert prev == mapdl.is_local + + make_sure_not_instances_are_left_open() + + # Teardown + if mapdl.is_local and mapdl._exited: + # The test exited MAPDL, so it has failed. + test_name = os.environ.get( + "PYTEST_CURRENT_TEST", "**test id could not get retrieved.**" + ) + + assert ( + False + ), f"Test {test_name} failed at the teardown." # this will fail the test + + +def restart_mapdl(mapdl: Mapdl) -> Mapdl: + def is_exited(mapdl: Mapdl): try: _ = mapdl._ctrl("VERSION") return False @@ -441,44 +496,43 @@ def is_exited(mapdl): override=True, run_location=mapdl._path, cleanup_on_exit=mapdl._cleanup, + log_apdl=LOG_APDL, ) # Restoring the local configuration mapdl._local = local_ - yield # this is where the testing happens + return mapdl - # Teardown : fill with any logic you want - if mapdl.is_local and mapdl._exited: - # The test exited MAPDL, so it is fail. - assert False # this will fail the test +def log_test_start(mapdl: Mapdl) -> None: + test_name = os.environ.get( + "PYTEST_CURRENT_TEST", "**test id could not get retrieved.**" + ) -@pytest.fixture(autouse=True, scope="function") -def run_before_and_after_tests_2(request, mapdl): - """Make sure we are not changing these properties in tests""" - prev = mapdl.is_local + mapdl.run("!") + mapdl.run(f"! PyMAPDL running test: {test_name}") + mapdl.run("!") - yield + # To see it also in MAPDL terminal output + if len(test_name) > 75: + # terminal output is limited to 75 characters + test_name = test_name.split("::") + if len(test_name) > 2: + types_ = ["File path", "Test class", "Method"] + else: + types_ = ["File path", "Test function"] - assert prev == mapdl.is_local + mapdl._run("/com,Running test in:", mute=True) + for type_, name_ in zip(types_, test_name): + mapdl._run(f"/com, {type_}: {name_}", mute=True) + else: + mapdl._run(f"/com,Running test: {test_name}", mute=True) -@pytest.fixture(autouse=True, scope="function") -def run_before_and_after_tests_3(request, mapdl): - """Make sure we leave no MAPDL running behind""" - from ansys.mapdl.core.launcher import is_ansys_process - - PROCESS_OK_STATUS = [ - psutil.STATUS_RUNNING, # - psutil.STATUS_SLEEPING, # - psutil.STATUS_DISK_SLEEP, - psutil.STATUS_DEAD, - psutil.STATUS_PARKED, # (Linux) - psutil.STATUS_IDLE, # (Linux, macOS, FreeBSD) - ] - yield +def make_sure_not_instances_are_left_open() -> None: + """Make sure we leave no MAPDL running behind""" if ON_LOCAL: for proc in psutil.process_iter(): @@ -526,7 +580,7 @@ def mapdl_console(request): "Valid versions are up to 2020R2." ) - mapdl = launch_mapdl(console_path) + mapdl = launch_mapdl(console_path, log_apdl=LOG_APDL) from ansys.mapdl.core.mapdl_console import MapdlConsole assert isinstance(mapdl, MapdlConsole) @@ -557,6 +611,7 @@ def mapdl(request, tmpdir_factory): cleanup_on_exit=cleanup, license_server_check=False, start_timeout=50, + log_apdl=LOG_APDL, ) mapdl._show_matplotlib_figures = False # CI: don't show matplotlib figures MAPDL_VERSION = mapdl.version # Caching version @@ -645,6 +700,10 @@ def box_with_fields(cleared, mapdl): mapdl.mp("ex", 1, 2e10) mapdl.mp("perx", 1, 1) mapdl.mp("murx", 1, 1) + if mapdl.version >= 25.1: + mapdl.tb("pm", 1, "", "", "perm") + mapdl.tbdata("", 0) + mapdl.et(1, "SOLID70") mapdl.et(2, "CPT215") mapdl.keyopt(2, 12, 1) # Activating PRES DOF diff --git a/tests/test_cli.py b/tests/test_cli.py index 2f11ecc9a2..2925bc1804 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_commands.py b/tests/test_commands.py index b5b17d1180..347b2f56ed 100644 --- a/tests/test_commands.py +++ b/tests/test_commands.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_component.py b/tests/test_component.py index 098dd8cbd8..976460aae5 100644 --- a/tests/test_component.py +++ b/tests/test_component.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_console.py b/tests/test_console.py index 78aa29c308..dcfe410f80 100644 --- a/tests/test_console.py +++ b/tests/test_console.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_convert.py b/tests/test_convert.py index 1c2e93d6c2..a1eae9a8f5 100644 --- a/tests/test_convert.py +++ b/tests/test_convert.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_database.py b/tests/test_database.py index 406aceaab2..6630b10281 100644 --- a/tests/test_database.py +++ b/tests/test_database.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_dpf.py b/tests/test_dpf.py index ed8ce2316c..fa8a1c5ce2 100644 --- a/tests/test_dpf.py +++ b/tests/test_dpf.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_element.py b/tests/test_element.py index 4d95bf0209..0758b69a63 100644 --- a/tests/test_element.py +++ b/tests/test_element.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_errors.py b/tests/test_errors.py index 280714af85..80c51d7b0f 100644 --- a/tests/test_errors.py +++ b/tests/test_errors.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_examples.py b/tests/test_examples.py index 723b417b7b..5a1851f98d 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_geometry.py b/tests/test_geometry.py index 3284c568b1..0ee6d6810a 100644 --- a/tests/test_geometry.py +++ b/tests/test_geometry.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_grpc.py b/tests/test_grpc.py index c1d7229fe2..d4286a6230 100644 --- a/tests/test_grpc.py +++ b/tests/test_grpc.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # @@ -26,6 +26,7 @@ import shutil import sys +import grpc import pytest from ansys.mapdl.core import examples @@ -33,8 +34,10 @@ from ansys.mapdl.core.errors import ( MapdlCommandIgnoredError, MapdlExitedError, + MapdlgRPCError, MapdlRuntimeError, ) +from ansys.mapdl.core.mapdl_grpc import MAX_MESSAGE_LENGTH, MapdlGrpc from ansys.mapdl.core.misc import random_string PATH = os.path.dirname(os.path.abspath(__file__)) @@ -100,20 +103,20 @@ def setup_for_cmatrix(mapdl, cleared): mapdl.run("/solu") -def test_connect_via_channel(mapdl): - """Validate MapdlGrpc can be created directly from a channel.""" - - import grpc - - from ansys.mapdl.core.mapdl_grpc import MAX_MESSAGE_LENGTH, MapdlGrpc - +@pytest.fixture(scope="function") +def grpc_channel(mapdl): channel = grpc.insecure_channel( mapdl._channel_str, options=[ ("grpc.max_receive_message_length", MAX_MESSAGE_LENGTH), ], ) - mapdl = MapdlGrpc(channel=channel) + return channel + + +def test_connect_via_channel(grpc_channel): + """Validate MapdlGrpc can be created directly from a channel.""" + mapdl = MapdlGrpc(channel=grpc_channel) assert mapdl.is_alive @@ -138,11 +141,14 @@ def test_clear_multiple(mapdl): mapdl.run("/CLEAR") -@pytest.mark.xfail( - reason="MAPDL bug 867421", raises=(MapdlExitedError, UnicodeDecodeError) -) def test_invalid_get_bug(mapdl): - with pytest.raises((MapdlRuntimeError, MapdlCommandIgnoredError)): + # versions before 24.1 should raise an error + if mapdl.version < 24.1: + context = pytest.raises(MapdlCommandIgnoredError) + else: + context = pytest.raises((MapdlRuntimeError, MapdlCommandIgnoredError)) + + with context: mapdl.get_value("ACTIVE", item1="SET", it1num="invalid") @@ -570,3 +576,77 @@ def test__check_stds(mapdl): mapdl._read_stds() assert mapdl._stdout is not None assert mapdl._stderr is not None + + +def test_subscribe_to_channel(mapdl): + assert mapdl.channel_state in [ + "IDLE", + "CONNECTING", + "READY", + "TRANSIENT_FAILURE", + "SHUTDOWN", + ] + assert mapdl._channel_state in [ + grpc.ChannelConnectivity.IDLE, + grpc.ChannelConnectivity.CONNECTING, + grpc.ChannelConnectivity.READY, + grpc.ChannelConnectivity.TRANSIENT_FAILURE, + grpc.ChannelConnectivity.SHUTDOWN, + ] + + +@requires("remote") +def test_exception_message_length(mapdl): + # This test does not fail if running on local + channel = grpc.insecure_channel( + mapdl._channel_str, + options=[ + ("grpc.max_receive_message_length", int(1024)), + ], + ) + mapdl2 = MapdlGrpc(channel=channel) + assert mapdl2.is_alive + + mapdl2.prep7() + mapdl2.dim("myarr", "", 1e5) + mapdl2.vfill("myarr", "rand", 0, 1) # filling array with random numbers + + # Retrieving + with pytest.raises(MapdlgRPCError, match="Received message larger than max"): + values = mapdl2.parameters["myarr"] + + assert mapdl2.is_alive + + # Deleting generated mapdl instance and channel. + channel.close() + mapdl2._exited = True # To avoid side effects. + mapdl2.exit() + + +def test_generic_grpc_exception(monkeypatch, grpc_channel): + mapdl = MapdlGrpc(channel=grpc_channel) + assert mapdl.is_alive + + class UnavailableError(grpc.RpcError): + def __init__(self, message="Service is temporarily unavailable."): + self._message = message + self._code = grpc.StatusCode.UNAVAILABLE + super().__init__(message) + + def code(self): + return self._code + + def details(self): + return self._message + + def _raise_error_code(args, **kwargs): + raise UnavailableError() + + monkeypatch.setattr(mapdl._stub, "SendCommand", _raise_error_code) + + with pytest.raises( + MapdlExitedError, match="MAPDL server connection terminated unexpectedly while" + ): + mapdl.prep7() + + assert mapdl.is_alive diff --git a/tests/test_importing_geometries.py b/tests/test_importing_geometries.py index 48de13681a..adcd622686 100644 --- a/tests/test_importing_geometries.py +++ b/tests/test_importing_geometries.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_inline_functions/test_component_queries.py b/tests/test_inline_functions/test_component_queries.py index 8b278e2efb..b2f5bfa8d1 100644 --- a/tests/test_inline_functions/test_component_queries.py +++ b/tests/test_inline_functions/test_component_queries.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_inline_functions/test_connectivity_queries.py b/tests/test_inline_functions/test_connectivity_queries.py index 4d3a3381ea..2078d2fb3c 100644 --- a/tests/test_inline_functions/test_connectivity_queries.py +++ b/tests/test_inline_functions/test_connectivity_queries.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_inline_functions/test_field_component_queries.py b/tests/test_inline_functions/test_field_component_queries.py index e14e37abb1..b1dfeaea86 100644 --- a/tests/test_inline_functions/test_field_component_queries.py +++ b/tests/test_inline_functions/test_field_component_queries.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_inline_functions/test_geometry_queries.py b/tests/test_inline_functions/test_geometry_queries.py index 41dfe93e5a..a6cdd4a56e 100644 --- a/tests/test_inline_functions/test_geometry_queries.py +++ b/tests/test_inline_functions/test_geometry_queries.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_inline_functions/test_line_component_queries.py b/tests/test_inline_functions/test_line_component_queries.py index ed5e7cf40c..e7916a0ec3 100644 --- a/tests/test_inline_functions/test_line_component_queries.py +++ b/tests/test_inline_functions/test_line_component_queries.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_inline_functions/test_nearest_queries.py b/tests/test_inline_functions/test_nearest_queries.py index f8c93594d0..08b57cfdbc 100644 --- a/tests/test_inline_functions/test_nearest_queries.py +++ b/tests/test_inline_functions/test_nearest_queries.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_inline_functions/test_normals_queries.py b/tests/test_inline_functions/test_normals_queries.py index 09dcda9d38..f86cc8bde2 100644 --- a/tests/test_inline_functions/test_normals_queries.py +++ b/tests/test_inline_functions/test_normals_queries.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_inline_functions/test_query.py b/tests/test_inline_functions/test_query.py index bfa0eeeaf0..067d98d05c 100644 --- a/tests/test_inline_functions/test_query.py +++ b/tests/test_inline_functions/test_query.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_inline_functions/test_selection_queries.py b/tests/test_inline_functions/test_selection_queries.py index c8196b7fb5..7708d44ce2 100644 --- a/tests/test_inline_functions/test_selection_queries.py +++ b/tests/test_inline_functions/test_selection_queries.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_krylov.py b/tests/test_krylov.py index 615e94efc1..066dc6ba1f 100644 --- a/tests/test_krylov.py +++ b/tests/test_krylov.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_launcher.py b/tests/test_launcher.py index 8f2b7d1136..23aa6749af 100644 --- a/tests/test_launcher.py +++ b/tests/test_launcher.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_launcher_remote.py b/tests/test_launcher_remote.py index b717a187d9..5b13afed37 100644 --- a/tests/test_launcher_remote.py +++ b/tests/test_launcher_remote.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_licensing.py b/tests/test_licensing.py index 2e77a80e98..ed2f88daf0 100644 --- a/tests/test_licensing.py +++ b/tests/test_licensing.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_logging.py b/tests/test_logging.py index 277cbe10b4..ac4a96ac1e 100644 --- a/tests/test_logging.py +++ b/tests/test_logging.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_mapdl.py b/tests/test_mapdl.py index 5849218f8f..bebf02622e 100644 --- a/tests/test_mapdl.py +++ b/tests/test_mapdl.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # @@ -1131,7 +1131,7 @@ def test_cdread_in_apdl_directory(mapdl, cleared): @pytest.mark.parametrize( - "each_cmd", ["*END", "*vwrite", "/eof", "cmatrix", "*REpeAT", "lSread"] + "each_cmd", ["*END", "*vwrite", "/eof", "cmatrix", "*REpeAT", "lSread", "*mwrite"] ) def test_inval_commands(mapdl, cleared, each_cmd): """Test the output of invalid commands""" @@ -2249,6 +2249,11 @@ def test_vwrite_error(mapdl): mapdl.vwrite("adf") +def test_mwrite_error(mapdl): + with pytest.raises(MapdlRuntimeError): + mapdl.mwrite("adf") + + def test_vwrite(mapdl): with mapdl.non_interactive: mapdl.run("/out,test_vwrite.txt") diff --git a/tests/test_mesh_grpc.py b/tests/test_mesh_grpc.py index 00858fb12f..ae4eb13a0b 100644 --- a/tests/test_mesh_grpc.py +++ b/tests/test_mesh_grpc.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_misc.py b/tests/test_misc.py index 46f5db3301..ed8754a636 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_parameters.py b/tests/test_parameters.py index f0bcca7c08..3d9ef44c01 100644 --- a/tests/test_parameters.py +++ b/tests/test_parameters.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_plotting.py b/tests/test_plotting.py index aaa6eda88f..1871a0eb64 100644 --- a/tests/test_plotting.py +++ b/tests/test_plotting.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_pool.py b/tests/test_pool.py index ffa136cfcf..467b4e285b 100644 --- a/tests/test_pool.py +++ b/tests/test_pool.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # @@ -46,13 +46,16 @@ # skip entire module unless HAS_GRPC pytestmark = requires("grpc") +# Check env var +IGNORE_POOL = os.environ.get("IGNORE_POOL", "").upper() == "TRUE" + # skipping if ON_STUDENT and ON_LOCAL because we cannot spawn that many instances. if ON_STUDENT and ON_LOCAL: pytest.skip(allow_module_level=True) skip_if_ignore_pool = pytest.mark.skipif( - os.environ.get("IGNORE_POOL", "").upper() == "TRUE", + IGNORE_POOL, reason="Ignoring Pool tests.", ) @@ -140,6 +143,7 @@ def test_invalid_exec(self): additional_switches=QUICK_LAUNCH_SWITCHES, ) + @skip_if_ignore_pool def test_heal(self, pool): pool_sz = len(pool) pool_names = pool._names # copy pool names @@ -362,6 +366,7 @@ def test_ip(self, monkeypatch): assert args["ips"] == ips assert args["ports"] == ports + @skip_if_ignore_pool def test_next(self, pool): # Check the instances are free for each_instance in pool: @@ -378,6 +383,7 @@ def test_next(self, pool): assert not each_instance.locked assert not each_instance._busy + @skip_if_ignore_pool def test_next_with_returns_index(self, pool): # Check the instances are free for each_instance in pool: diff --git a/tests/test_post.py b/tests/test_post.py index c362168cb3..42ed1f3d4d 100644 --- a/tests/test_post.py +++ b/tests/test_post.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_solution.py b/tests/test_solution.py index a7487e00b5..731e805b33 100644 --- a/tests/test_solution.py +++ b/tests/test_solution.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_theme.py b/tests/test_theme.py index 54d8c97c4f..4138dcc8fe 100644 --- a/tests/test_theme.py +++ b/tests/test_theme.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # # diff --git a/tests/test_xpl.py b/tests/test_xpl.py index 6c98705f63..467a101976 100644 --- a/tests/test_xpl.py +++ b/tests/test_xpl.py @@ -1,4 +1,4 @@ -# Copyright (C) 2024 ANSYS, Inc. and/or its affiliates. +# Copyright (C) 2016 - 2024 ANSYS, Inc. and/or its affiliates. # SPDX-License-Identifier: MIT # #