diff --git a/.devcontainer/codespaces-dev/requirements.txt b/.devcontainer/codespaces-dev/requirements.txt index 98ab828342..528e88e771 100644 --- a/.devcontainer/codespaces-dev/requirements.txt +++ b/.devcontainer/codespaces-dev/requirements.txt @@ -1,14 +1,16 @@ ansys-dpf-core==0.10.1 -ansys-tools-visualization-interface==0.2.6 +ansys-tools-visualization-interface==0.5.0 autopep8==2.3.1 -matplotlib==3.9.0 -pandas==2.2.2 -pyansys-tools-report==0.7.3 +matplotlib==3.9.2 +pandas==2.2.3 +pyansys-tools-report==0.8.1 +pyfakefs==5.7.1 pyiges[full]==0.3.1 -pytest-cov==5.0.0 +pytest-cov==6.0.0 pytest-memprof<0.3.0 pytest-pyvista==0.1.9 -pytest-rerunfailures==14.0 -pytest==8.2.2 -scipy==1.14.0 -vtk==9.3.0 \ No newline at end of file +pytest-random-order==1.1.1 +pytest-rerunfailures==15.0 +pytest==8.3.3 +scipy==1.14.1 +vtk==9.3.1 \ No newline at end of file diff --git a/.devcontainer/codespaces-docs/requirements.txt b/.devcontainer/codespaces-docs/requirements.txt index f20ef9bb4c..a6253ea2f8 100644 --- a/.devcontainer/codespaces-docs/requirements.txt +++ b/.devcontainer/codespaces-docs/requirements.txt @@ -1,28 +1,29 @@ ansys-dpf-core==0.10.1 -ansys-mapdl-reader==0.53.0 +ansys-mapdl-reader==0.54.2 ansys-sphinx-theme==0.16.6 -ansys-tools-visualization-interface==0.2.6 -grpcio==1.64.1 +ansys-tools-visualization-interface==0.5.0 +grpcio==1.68.0 imageio-ffmpeg==0.5.1 -imageio==2.34.2 +imageio==2.36.0 jupyter_sphinx==0.5.3 jupyterlab>=3.2.8 -matplotlib==3.9.0 -numpydoc==1.7.0 -pandas==2.2.2 -plotly==5.22.0 +matplotlib==3.9.2 +numpydoc==1.8.0 +pandas==2.2.3 +plotly==5.24.1 pyiges[full]==0.3.1 -pypandoc==1.13 +pypandoc==1.14 pytest-sphinx==0.6.3 pythreejs==2.4.2 -sphinx-autobuild==2024.4.16 +sphinx-autobuild==2024.10.3 sphinx-autodoc-typehints==1.25.2 sphinx-copybutton==0.5.2 sphinx-design==0.6.1 -sphinx-gallery==0.16.0 -sphinx-notfound-page==1.0.2 +sphinx-gallery==0.18.0 +sphinx-jinja==2.0.2 +sphinx-notfound-page==1.0.4 sphinx-reredirects==0.1.4 -sphinx==7.3.7 -sphinxcontrib-websupport==1.2.7 +sphinx==8.1.3 +sphinxcontrib-websupport==2.0.0 sphinxemoji==0.3.1 -vtk==9.3.0 +vtk==9.3.1 \ No newline at end of file diff --git a/.devcontainer/devcontainer-local/docker-compose.yml b/.devcontainer/devcontainer-local/docker-compose.yml index 66e667fddf..93c6eb8c7f 100644 --- a/.devcontainer/devcontainer-local/docker-compose.yml +++ b/.devcontainer/devcontainer-local/docker-compose.yml @@ -1,11 +1,11 @@ # Setting codespaces/development container version: '3.3' +name: "PyMAPDL-Development" # this needs to be updated/unique if you want to have multiple containers services: pymapdldev: restart: always - shm_size: '2gb' # Increase the shared memory directory - # to avoid running issues. By Default this is very small (64MB) - container_name: PyMAPDL-Development + shm_size: '2gb' # Increase the shared memory directory to avoid running issues. By Default this is very small (64MB) + container_name: "PyMAPDL-Development" # this needs to be updated/unique if you want to have multiple containers mem_reservation: 8g image: 'ghcr.io/ansys/mapdl:v24.1-ubuntu-student' build: diff --git a/.devcontainer/devcontainer-local/requirements.txt b/.devcontainer/devcontainer-local/requirements.txt index 8b43beda39..ab6cb9c35f 100644 --- a/.devcontainer/devcontainer-local/requirements.txt +++ b/.devcontainer/devcontainer-local/requirements.txt @@ -1,35 +1,38 @@ ansys-dpf-core==0.10.1 -ansys-mapdl-reader==0.53.0 -ansys-sphinx-theme==0.16.6 -ansys-tools-visualization-interface==0.2.6 +ansys-mapdl-reader==0.54.2 +ansys-sphinx-theme==1.2.2 +ansys-tools-visualization-interface==0.5.0 autopep8==2.3.1 -grpcio==1.64.1 +grpcio==1.68.0 imageio-ffmpeg==0.5.1 -imageio==2.34.2 +imageio==2.36.0 jupyter_sphinx==0.5.3 jupyterlab>=3.2.8 -matplotlib==3.9.0 -numpydoc==1.7.0 -pandas==2.2.2 -plotly==5.22.0 -pyansys-tools-report==0.7.3 +matplotlib==3.9.2 +numpydoc==1.8.0 +pandas==2.2.3 +plotly==5.24.1 +pyansys-tools-report==0.8.1 +pyfakefs==5.7.1 pyiges[full]==0.3.1 -pypandoc==1.13 -pytest-cov==5.0.0 +pypandoc==1.14 +pytest-cov==6.0.0 pytest-memprof<0.3.0 pytest-pyvista==0.1.9 -pytest-rerunfailures==14.0 +pytest-random-order==1.1.1 +pytest-rerunfailures==15.0 pytest-sphinx==0.6.3 -pytest==8.2.2 +pytest==8.3.3 pythreejs==2.4.2 -scipy==1.14.0 -sphinx-autobuild==2024.4.16 +scipy==1.14.1 +sphinx-autobuild==2024.10.3 sphinx-autodoc-typehints==1.25.2 sphinx-copybutton==0.5.2 sphinx-design==0.6.1 -sphinx-gallery==0.16.0 -sphinx-notfound-page==1.0.2 +sphinx-gallery==0.18.0 +sphinx-jinja==2.0.2 +sphinx-notfound-page==1.0.4 sphinx-reredirects==0.1.4 -sphinx==7.3.7 -sphinxcontrib-websupport==1.2.7 +sphinx==8.1.3 +sphinxcontrib-websupport==2.0.0 sphinxemoji==0.3.1 \ No newline at end of file diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000000..f63ce6a104 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,76 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL Advanced" + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + schedule: + - cron: '32 3 * * 2' + +jobs: + analyze: + name: Analyze (${{ matrix.language }}) + # Runner size impacts CodeQL analysis time. To learn more, please see: + # - https://gh.io/recommended-hardware-resources-for-running-codeql + # - https://gh.io/supported-runners-and-hardware-resources + # - https://gh.io/using-larger-runners (GitHub.com only) + # Consider using larger runners or machines with greater resources for possible analysis time improvements. + runs-on: 'ubuntu-latest' + permissions: + # required for all workflows + security-events: write + + # required to fetch internal or private CodeQL packs + packages: read + + # only required for workflows in private repositories + actions: read + contents: read + + strategy: + fail-fast: false + matrix: + include: + - language: python + build-mode: none + # CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' + # Use `c-cpp` to analyze code written in C, C++ or both + # Use 'java-kotlin' to analyze code written in Java, Kotlin or both + # Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both + # To learn more about changing the languages that are analyzed or customizing the build mode for your analysis, + # see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning. + # If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how + # your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + build-mode: ${{ matrix.build-mode }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + + # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 81afb69b51..739a29436b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -78,6 +78,6 @@ repos: # this validates our github workflow files - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.29.4 + rev: 0.30.0 hooks: - id: check-github-workflows diff --git a/doc/changelog.d/3573.added.md b/doc/changelog.d/3573.added.md new file mode 100644 index 0000000000..95bbfdd6b4 --- /dev/null +++ b/doc/changelog.d/3573.added.md @@ -0,0 +1 @@ +refactor: replace `get_ansys_path` with `get_mapdl_path` \ No newline at end of file diff --git a/doc/changelog.d/3580.documentation.md b/doc/changelog.d/3580.documentation.md new file mode 100644 index 0000000000..50f8ff2ab4 --- /dev/null +++ b/doc/changelog.d/3580.documentation.md @@ -0,0 +1 @@ +docs: update docker instructions \ No newline at end of file diff --git a/doc/changelog.d/3582.fixed.md b/doc/changelog.d/3582.fixed.md new file mode 100644 index 0000000000..d6c82a7222 --- /dev/null +++ b/doc/changelog.d/3582.fixed.md @@ -0,0 +1 @@ +fix: components typo \ No newline at end of file diff --git a/doc/changelog.d/3584.documentation.md b/doc/changelog.d/3584.documentation.md new file mode 100644 index 0000000000..0a948cb5e2 --- /dev/null +++ b/doc/changelog.d/3584.documentation.md @@ -0,0 +1 @@ +docs: adding some info for getting multiple compose running \ No newline at end of file diff --git a/doc/changelog.d/3585.maintenance.md b/doc/changelog.d/3585.maintenance.md new file mode 100644 index 0000000000..d1dc9b079a --- /dev/null +++ b/doc/changelog.d/3585.maintenance.md @@ -0,0 +1 @@ +ci: adding codeql.yml \ No newline at end of file diff --git a/doc/changelog.d/3589.fixed.md b/doc/changelog.d/3589.fixed.md new file mode 100644 index 0000000000..bc7f39a54b --- /dev/null +++ b/doc/changelog.d/3589.fixed.md @@ -0,0 +1 @@ +fix: linkchecker and cheatsheet links \ No newline at end of file diff --git a/doc/changelog.d/3590.miscellaneous.md b/doc/changelog.d/3590.miscellaneous.md new file mode 100644 index 0000000000..913c469727 --- /dev/null +++ b/doc/changelog.d/3590.miscellaneous.md @@ -0,0 +1 @@ +feat: improving load_array to reduce format line length \ No newline at end of file diff --git a/doc/changelog.d/3593.dependencies.md b/doc/changelog.d/3593.dependencies.md new file mode 100644 index 0000000000..89ae38f55a --- /dev/null +++ b/doc/changelog.d/3593.dependencies.md @@ -0,0 +1 @@ +build: bump imageio from 2.36.0 to 2.36.1 in the documentation group \ No newline at end of file diff --git a/doc/changelog.d/3599.maintenance.md b/doc/changelog.d/3599.maintenance.md new file mode 100644 index 0000000000..23264207b9 --- /dev/null +++ b/doc/changelog.d/3599.maintenance.md @@ -0,0 +1 @@ +ci: pre-commit autoupdate \ No newline at end of file diff --git a/doc/changelog.d/3601.dependencies.md b/doc/changelog.d/3601.dependencies.md new file mode 100644 index 0000000000..805682d25f --- /dev/null +++ b/doc/changelog.d/3601.dependencies.md @@ -0,0 +1 @@ +build: bump grpcio from 1.68.0 to 1.68.1 in the grpc-deps group \ No newline at end of file diff --git a/doc/changelog.d/3603.dependencies.md b/doc/changelog.d/3603.dependencies.md new file mode 100644 index 0000000000..0bd643879e --- /dev/null +++ b/doc/changelog.d/3603.dependencies.md @@ -0,0 +1 @@ +build: bump pytest from 8.3.3 to 8.3.4 in the testing group \ No newline at end of file diff --git a/doc/changelog.d/3604.dependencies.md b/doc/changelog.d/3604.dependencies.md new file mode 100644 index 0000000000..9eccbc1776 --- /dev/null +++ b/doc/changelog.d/3604.dependencies.md @@ -0,0 +1 @@ +build: bump pyfakefs from 5.7.1 to 5.7.2 \ No newline at end of file diff --git a/doc/changelog.d/3608.fixed.md b/doc/changelog.d/3608.fixed.md new file mode 100644 index 0000000000..46f20d76a2 --- /dev/null +++ b/doc/changelog.d/3608.fixed.md @@ -0,0 +1 @@ +fix: avoid verbose grpc interface when solving \ No newline at end of file diff --git a/doc/source/conf.py b/doc/source/conf.py index 235c3db45b..d6b87ea018 100755 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -205,7 +205,7 @@ with open("links.rst") as f: rst_epilog += f.read() -rst_epilog = rst_epilog.replace("%%VERSION%%", "v231") +rst_epilog = rst_epilog.replace("%%VERSION%%", "v242") rst_epilog = rst_epilog.replace("%%PYMAPDLVERSION%%", release) @@ -219,8 +219,10 @@ linkcheck_ignore = [ "https://github.com/ansys/pymapdl/*", "https://mapdl.docs.pyansys.com/*", - "https://ansysaccount.b2clogin.com/*", # behind payfirewall - "https://ansyshelp.ansys.com/*", # behind payfirewall + "https://www.ansys.com/*", # behind firewall + "https://download.ansys.com/*", # behind firewall + "https://ansysaccount.b2clogin.com/*", # behind authentication + "https://ansyshelp.ansys.com/*", # behind authentication "https://forum.ansys.com/forums/*", # It is detected as broken "https://courses.ansys.com/*", # It is detected as broken ] @@ -239,7 +241,7 @@ f"https://github.com/ansys/pymapdl/releases/tag/v{__version__}" ) -user_agent = """curl https://www.ansys.com -A "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.3""" +user_agent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36 Edg/123.0.2420.81" # noqa: E501 # The name of the Pygments (syntax highlighting) style to use. pygments_style = "sphinx" diff --git a/doc/source/getting_started/learning.rst b/doc/source/getting_started/learning.rst index 5ab22e88b3..4e11737715 100644 --- a/doc/source/getting_started/learning.rst +++ b/doc/source/getting_started/learning.rst @@ -40,7 +40,7 @@ Downloads .. jinja:: cheat_sheet - - View and download :download:`PyMAPDL cheatsheet ` + - View and download :download:`PyMAPDL cheatsheet ` to help you to learn PyMAPDL. - Visit :ref:`ref_examples` to learn how PyMAPDL can be used to solve different real problems. diff --git a/doc/source/getting_started/project.rst b/doc/source/getting_started/project.rst index 9bf7d7d202..e0d7a29554 100644 --- a/doc/source/getting_started/project.rst +++ b/doc/source/getting_started/project.rst @@ -174,8 +174,9 @@ In the upper right corner of the documentation's title bar, there is an option f viewing the documentation for the latest stable release to viewing the documentation for the development version or previously released versions. -You can also `download `_ the PyMAPDL cheat sheet. This one-page reference provides -syntax rules and commands for using PyMAPDL. +You can also download the +:download:`PyMAPDL cheat sheet `. +This one-page reference provides syntax rules and commands for using PyMAPDL. On the `PyMAPDL Issues `_ page, you can create issues to report bugs and request new features. On the `PyMAPDL Discussions diff --git a/doc/source/links.rst b/doc/source/links.rst index 6d4cea20b0..ee717569a8 100644 --- a/doc/source/links.rst +++ b/doc/source/links.rst @@ -137,6 +137,7 @@ .. _lmod_docs: https://lmod.readthedocs.io/en/latest/ .. _pygad_docs: https://pygad.readthedocs.io/en/latest/ .. _ga_article: https://blog.derlin.ch/genetic-algorithms-with-pygad +.. _simutech_linux_dependencies: https://install.simutechgroup.com/info-required-linux-packages-and-libraries .. #Github links: diff --git a/doc/source/user_guide/components.rst b/doc/source/user_guide/components.rst index 3c606eb099..a83a599346 100644 --- a/doc/source/user_guide/components.rst +++ b/doc/source/user_guide/components.rst @@ -36,7 +36,7 @@ Set a component without specifying the type, by default it is ``NODE``: >>> mapdl.components["mycomp4"] = (1, 2, 3) /Users/german.ayuso/pymapdl/src/ansys/mapdl/core/component.py:347: UserWarning: Assuming a KP selection. It is recommended you use the following notation to avoid this warning: - > mapdl.components['mycomp4'] = 'KP' (1, 2, 3) + > mapdl.components['mycomp4'] = 'KP', (1, 2, 3) Alternatively, you disable this warning using: > mapdl.components.default_entity_warning=False warnings.warn( diff --git a/doc/source/user_guide/troubleshoot.rst b/doc/source/user_guide/troubleshoot.rst index 74a2b63f35..aa60eefb05 100644 --- a/doc/source/user_guide/troubleshoot.rst +++ b/doc/source/user_guide/troubleshoot.rst @@ -412,6 +412,8 @@ dependencies. libxp6 +An useful resource is `HOW TO - Install Ansys' Required Linux Packages & Libraries `_. + .. _conflicts_student_version: Conflicts with student version diff --git a/docker/.dockerignore b/docker/.dockerignore index 801a0c3889..8de9f1e4ab 100644 --- a/docker/.dockerignore +++ b/docker/.dockerignore @@ -7,6 +7,7 @@ **/aisol/AUTODYN **/aisol/bin **/aisol/BladeModeler +**/aisol/CADIntegration **/aisol/CommonFiles **/aisol/DesignSpace **/aisol/dll @@ -20,18 +21,18 @@ **/aisol/lib/linx64/libaddress_sorting.so **/aisol/lib/linx64/libans.autodyn.adbatch.so **/aisol/lib/linx64/libans.autodyn.results_api.so -**/aisol/lib/linx64/libans.cadint.assemblycontainer231.so -**/aisol/lib/linx64/libans.cadint.assemblycontainerdrawing231.so -**/aisol/lib/linx64/libans.cadint.assemblycontainerdrawingold231.so -**/aisol/lib/linx64/libans.cadint.assemblycontainerserializer231.so -**/aisol/lib/linx64/libans.cadint.assemblycontainertesselation231.so -**/aisol/lib/linx64/libans.cadint.assemblycontainervirtualhelper231.so +**/aisol/lib/linx64/libans.cadint.assemblycontainer242.so +**/aisol/lib/linx64/libans.cadint.assemblycontainerdrawing242.so +**/aisol/lib/linx64/libans.cadint.assemblycontainerdrawingold242.so +**/aisol/lib/linx64/libans.cadint.assemblycontainerserializer242.so +**/aisol/lib/linx64/libans.cadint.assemblycontainertesselation242.so +**/aisol/lib/linx64/libans.cadint.assemblycontainervirtualhelper242.so **/aisol/lib/linx64/libans.cadint.autovt.so -**/aisol/lib/linx64/libans.cadint.brepcomponent231.so -**/aisol/lib/linx64/libans.cadint.brepcomponentmeshinghelper231.so -**/aisol/lib/linx64/libans.cadint.brepcomponenttesselation231.so -**/aisol/lib/linx64/libans.cadint.brepgeometry231.so -**/aisol/lib/linx64/libans.cadint.brepserializer231.so +**/aisol/lib/linx64/libans.cadint.brepcomponent242.so +**/aisol/lib/linx64/libans.cadint.brepcomponentmeshinghelper242.so +**/aisol/lib/linx64/libans.cadint.brepcomponenttesselation242.so +**/aisol/lib/linx64/libans.cadint.brepgeometry242.so +**/aisol/lib/linx64/libans.cadint.brepserializer242.so **/aisol/lib/linx64/libans.cadint.virtualtopo.so **/aisol/lib/linx64/libans.modelmanager.core.so **/aisol/lib/linx64/libans.modelmanager.engine.pm.so @@ -80,21 +81,7 @@ **/aisol/lib/linx64/libgpr.so **/aisol/lib/linx64/libgrpc.so **/aisol/lib/linx64/libgrpcpp_channelz.so -**/aisol/lib/linx64/libhdf5-gcc820-1_10_5.so -**/aisol/lib/linx64/libhdf5-gcc820-1_10_5.so.103 -**/aisol/lib/linx64/libhdf5-gcc820-1_10_5.so.103.1.0 -**/aisol/lib/linx64/libhdf5_cpp-gcc820-1_10_5.so -**/aisol/lib/linx64/libhdf5_cpp-gcc820-1_10_5.so.103 -**/aisol/lib/linx64/libhdf5_cpp-gcc820-1_10_5.so.103.1.0 -**/aisol/lib/linx64/libhdf5_hl-gcc820-1_10_5.so -**/aisol/lib/linx64/libhdf5_hl-gcc820-1_10_5.so.100 -**/aisol/lib/linx64/libhdf5_hl-gcc820-1_10_5.so.100.1.2 -**/aisol/lib/linx64/libhdf5_hl_cpp-gcc820-1_10_5.so -**/aisol/lib/linx64/libhdf5_hl_cpp-gcc820-1_10_5.so.100 -**/aisol/lib/linx64/libhdf5_hl_cpp-gcc820-1_10_5.so.100.1.3 -**/aisol/lib/linx64/libhdf5_tools-gcc820-1_10_5.so -**/aisol/lib/linx64/libhdf5_tools-gcc820-1_10_5.so.100 -**/aisol/lib/linx64/libhdf5_tools-gcc820-1_10_5.so.100.1.2 +**/aisol/lib/linx64/libhdf5* **/aisol/lib/linx64/libifcore.so.5 **/aisol/lib/linx64/libifport.so.5 **/aisol/lib/linx64/libimf.so @@ -151,32 +138,32 @@ **/aisol/StartPage **/aisol/WBAddins **/aisol/WBMWRegistry -**/ans_uninstall231 +**/ans_uninstall242 **/ansys/bin/.change_ansysdir2022r2 -**/ansys/bin/.change_ansysdir231 +**/ansys/bin/.change_ansysdir242 **/ansys/bin/about.admin **/ansys/bin/ans_admin -**/ansys/bin/ans_admin231 +**/ansys/bin/ans_admin242 **/ansys/bin/ansconnect -**/ansys/bin/ansconnect231 +**/ansys/bin/ansconnect242 **/ansys/bin/anshelp -**/ansys/bin/anshelp231 +**/ansys/bin/anshelp242 **/ansys/bin/ansslurm -**/ansys/bin/ansslurm231 +**/ansys/bin/ansslurm242 **/ansys/bin/anstclsh -**/ansys/bin/anstclsh231 +**/ansys/bin/anstclsh242 **/ansys/bin/ansuge -**/ansys/bin/ansuge231 +**/ansys/bin/ansuge242 **/ansys/bin/answish -**/ansys/bin/answish231 +**/ansys/bin/answish242 **/ansys/bin/ansysts -**/ansys/bin/ansysts231 +**/ansys/bin/ansysts242 **/ansys/bin/bintst -**/ansys/bin/bintst231 +**/ansys/bin/bintst242 **/ansys/bin/launcher -**/ansys/bin/launcher231 +**/ansys/bin/launcher242 **/ansys/bin/launchertcl -**/ansys/bin/launchertcl231 +**/ansys/bin/launchertcl242 **/ansys/bin/linx64/.ansys_installed **/ansys/bin/linx64/lsdyna_dp.e **/ansys/bin/linx64/lsdyna_dp_mpp.e @@ -185,33 +172,31 @@ **/ansys/bin/linx64/lsl2a.e **/ansys/bin/linx64/lsl2a_dp.e **/ansys/bin/lsdyna -**/ansys/bin/lsdyna231 +**/ansys/bin/lsdyna242 **/ansys/bin/lsl2a -**/ansys/bin/lsl2a231 +**/ansys/bin/lsl2a242 **/ansys/bin/lsrun -**/ansys/bin/lsrun231 +**/ansys/bin/lsrun242 **/ansys/bin/nlhist -**/ansys/bin/nlhist231 +**/ansys/bin/nlhist242 **/ansys/bin/rdresu -**/ansys/bin/rdresu231 +**/ansys/bin/rdresu242 **/ansys/bin/rdsubs -**/ansys/bin/rdsubs231 +**/ansys/bin/rdsubs242 **/ansys/bin/ResRdDemo -**/ansys/bin/ResRdDemo231 +**/ansys/bin/ResRdDemo242 **/ansys/bin/ResWrDemo -**/ansys/bin/ResWrDemo231 +**/ansys/bin/ResWrDemo242 **/ansys/bin/userprog -**/ansys/bin/userprog231 +**/ansys/bin/userprog242 **/ansys/bin/wrtres -**/ansys/bin/wrtres231 +**/ansys/bin/wrtres242 **/ansys/bin/wrtsub -**/ansys/bin/wrtsub231 +**/ansys/bin/wrtsub242 **/ansys/bin/xansadmin.tcl **/ansys/data **/ansys/docu/ansadmin.hlp -**/ansys/docu/LS-DYNA_Manual_Volume_I_R12.pdf -**/ansys/docu/LS-DYNA_Manual_Volume_II_R12_Ver2.pdf -**/ansys/docu/LS-DYNA_Manual_Volume_III_R12_Ver2.pdf +**/ansys/docu/LS-DYNA_Manual* **/ansys/gui/en-us/images **/ansys/gui/en-us/matlib **/ansys/gui/en-us/resources @@ -225,9 +210,12 @@ **/ansys/syslib/boost/libboost_thread.so.1 **/ansys/syslib/boost/libboost_thread.so.1.71.0 **/ansys/syslib/CPython +**/ansys/syslib/daal/*.a +**/ansys/syslib/daal/libonedal_dpc.so* +**/ansys/syslib/daal/libJavaAPI.so* **/ansys/syslib/PyQt -**/ansys/syslib/ubuntu **/builddate.txt +**/CADConfigLogs **/commonfiles/AAS/bin/linx64/AasAgentDotNetCore.dll **/commonfiles/AAS/bin/linx64/AnsysSessionManager.idl **/commonfiles/AAS/bin/linx64/APECSwizard.scm @@ -271,17 +259,29 @@ **/commonfiles/AAS/bin/linx64/scale001.jpg **/commonfiles/AAS/bin/linx64/SimulationAasDotNetStandard.dll **/commonfiles/AAS/bin/linx64/steer.scm +**/commonfiles/AMD/BLIS/v3.2.1 +**/commonfiles/AMD/BLIS/v4.1.0 +**/commonfiles/AMD/BLIS/v4.1.1 **/commonfiles/branch.txt +**/commonfiles/CAD/Hoops +**/commonfiles/CAD/Parasolid +**/commonfiles/CAD/Siemens +**/commonfiles/CAD/Spatial +**/commonfiles/CAD/examples **/commonfiles/CFX **/commonfiles/configs +**/commonfiles/CPython **/commonfiles/DebugControl **/commonfiles/examples **/commonfiles/fluids **/commonfiles/Fonts +**/commonfiles/globalsettings **/commonfiles/help **/commonfiles/images **/commonfiles/installer **/commonfiles/IronPython +**/commonfiles/language/de +**/commonfiles/language/en-us/CAD **/commonfiles/language/en-us/launcher **/commonfiles/language/fr **/commonfiles/language/ko @@ -289,13 +289,16 @@ **/commonfiles/launcher **/commonfiles/launcherQt **/commonfiles/MainWin +**/commonfiles/MPI **/commonfiles/registry **/commonfiles/Stride **/commonfiles/SystemCoupling **/commonfiles/Textures **/commonfiles/tools **/commonfiles/UnitsLibrary +**/commonfiles/WBAddinConfiguration **/dcs +**/dpf **/Electronics **/Framework **/Images @@ -306,6 +309,9 @@ **/licensingclient/linx64/libFlxComm64.so.2020.12 **/licensingclient/linx64/libFlxCore64.so.2020.12 **/licensingclient/linx64/lmutil +**/licensingclient/linx64/LicensingSettingsUtility +**/licensingclient/linx64/LicensingSettings +**/meshing/Prime **/ProductConfig.sh **/RSM **/SEC @@ -322,76 +328,84 @@ **/tp/CUEUnits **/tp/d3 **/tp/ffmpeg -**/tp/hdf5/1_10_5/linx64/bin -**/tp/hdf5/1_10_5/linx64/include -**/tp/hdf5/1_10_5/linx64/lib/libhdf5.a -**/tp/hdf5/1_10_5/linx64/lib/libhdf5.settings -**/tp/hdf5/1_10_5/linx64/lib/libhdf5_cpp.a -**/tp/hdf5/1_10_5/linx64/lib/libhdf5_hl.a -**/tp/hdf5/1_10_5/linx64/lib/libhdf5_hl_cpp.a -**/tp/hdf5/1_10_5/linx64/lib/libhdf5_tools.a -**/tp/hdf5/1_10_5/linx64/lib/libhdf5_tools.so -**/tp/hdf5/1_10_5/linx64/lib/libhdf5_tools.so.100 -**/tp/hdf5/1_10_5/linx64/lib/libhdf5_tools.so.100.1.2 -**/tp/hdf5/1_10_5/linx64/lib/pkgconfig -**/tp/hdf5/1_10_5/linx64/share -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_avx.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_avx2.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_blacs_intelmpi_ilp64.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_blacs_intelmpi_ilp64.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_blacs_intelmpi_lp64.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_blacs_openmpi_ilp64.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_blacs_openmpi_ilp64.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_blacs_openmpi_lp64.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_blacs_sgimpt_ilp64.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_blacs_sgimpt_ilp64.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_blacs_sgimpt_lp64.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_blacs_sgimpt_lp64.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_blas95_ilp64.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_blas95_lp64.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_cdft_core.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_cdft_core.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_core.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_gf_ilp64.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_gf_ilp64.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_gf_lp64.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_gf_lp64.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_gnu_thread.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_intel_ilp64.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_intel_ilp64.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_intel_lp64.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_intel_thread.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_lapack95_ilp64.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_lapack95_lp64.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_mc.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_mc3.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_pgi_thread.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_pgi_thread.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_rt.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_scalapack_ilp64.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_scalapack_ilp64.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_scalapack_lp64.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_sequential.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_sequential.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_tbb_thread.a -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_tbb_thread.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_vml_avx.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_vml_avx2.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_vml_cmpt.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_vml_def.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_vml_mc.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_vml_mc2.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/libmkl_vml_mc3.so -**/tp/IntelMKL/2020.0.166/linx64/lib/intel64/locale +**/tp/hdf5/1_12_2/linx64/bin +**/tp/hdf5/1_12_2/linx64/include +**/tp/hdf5/1_12_2/linx64/lib/libhdf5-serial.a +**/tp/hdf5/1_12_2/linx64/lib/libhdf5.settings +**/tp/hdf5/1_12_2/linx64/lib/libhdf5_cpp-serial.a +**/tp/hdf5/1_12_2/linx64/lib/libhdf5_hl-serial.a +**/tp/hdf5/1_12_2/linx64/lib/libhdf5_hl_cpp-serial.a +**/tp/hdf5/1_12_2/linx64/lib/libhdf5_tools-serial.a +**/tp/hdf5/1_12_2/linx64/lib/libhdf5_tools-serial.so +**/tp/hdf5/1_12_2/linx64/lib/libhdf5_tools-serial.so.200 +**/tp/hdf5/1_12_2/linx64/lib/libhdf5_tools-serial.so.200.1.1 +**/tp/hdf5/1_12_2/linx64/lib/pkgconfig +**/tp/hdf5/1_12_2/linx64/share +**/tp/IntelMKL/2020.0.166 **/tp/IntelMKL/2021.3.0 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_avx.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_avx2.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_avx512.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_blacs_intelmpi_ilp64.so +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_blacs_intelmpi_ilp64.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_blacs_openmpi_ilp64.so +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_blacs_openmpi_ilp64.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_cdft_core.so +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_cdft_core.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_gf_ilp64.so +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_gf_ilp64.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_gf_lp64.so +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_gf_lp64.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_intel_ilp64.so +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_intel_ilp64.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_mc.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_mc3.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_pgi_thread.so +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_pgi_thread.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_rt.so +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_rt.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_scalapack_ilp64.so +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_scalapack_ilp64.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_sequential.so +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_sequential.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_sycl.so* +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_tbb_thread.so +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_tbb_thread.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_vml_avx.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_vml_avx2.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_vml_cmpt.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_vml_def.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_vml_mc.so.2 +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/libmkl_vml_mc3.so +**/tp/IntelMKL/2023.1.0/linx64/lib/intel64/locale **/tp/jquery +**/tp/MPI/Intel/2018.3.222 +**/tp/MPI/Intel/2019.12.320 +**/tp/MPI/Intel/2021.5.0 +**/tp/MPI/Intel/2021.6.0 +**/tp/MPI/Intel/2021.8.0 +**/tp/MPI/Intel/2021.10.0 +**/tp/MPI/Intel/2021.11.0/linx64/lib/debug +**/tp/MPI/Intel/2021.11.0/linx64/lib/mpi/debug +**/tp/MPI/Intel/2021.11.0/linx64/lib/release/libmpi.a +**/tp/MPI/Intel/2021.11.0/linx64/lib/release/libmpi.dbg +**/tp/MPI/OpenMPI/5.0.0 **/tp/ngInfiniteScroll +**/tp/nss **/tp/nvd3 **/tp/openjre **/tp/qt **/tp/qt* **/tp/signalr **/tp/zlib +*_Certified_artifactory/ +*_Certified_artifactory/**/* +*_docker +*_docker/**/* +workdir +.workdir +*swp +*swo # working directories .dockerignore diff --git a/docker/Dockerfile b/docker/Dockerfile index a756c98f0b..41f7ed03fb 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -11,8 +11,7 @@ ENV ANSYS_VERSION=$VERSION # Location env var # This var needs to be updated when version changes. -ENV AWP_ROOT222=/ansys_inc - +ENV AWP_ROOT242=/ansys_inc # LABELS LABEL description="MAPDL on Ubuntu" @@ -23,16 +22,25 @@ LABEL org.opencontainers.image.documentation="https://mapdl.docs.pyansys.com" # Update packages before packing and # installing dependencies +# libxp.so missing. This is a workaround +#https://bugs.launchpad.net/ubuntu/+source/libxp/+bug/1517884 RUN apt-get update && \ apt-get install -y \ sudo \ git \ python3.10-venv \ + python3-pip \ openssh-client \ + libgomp1 \ libgl1 \ libglu1 \ libxm4 \ - libxi6 + libxi6 && \ + apt install -y software-properties-common \ + && add-apt-repository -y ppa:zeehio/libxp \ + && apt-get update \ + && apt-get install -y libxp6 && \ + mkdir -p /ansys_inc # libxp.so missing. This is a workaround #https://bugs.launchpad.net/ubuntu/+source/libxp/+bug/1517884 @@ -41,35 +49,37 @@ RUN apt install -y software-properties-common \ && apt-get update \ && apt-get install -y libxp6 +# Setting home directory +ENV HOME=/home/$USERNAME -# Create the user -RUN groupadd --gid $USER_GID $USERNAME \ - && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME - +# Setting working directory +ENV WORKING_DIRECTORY=/jobs # Copying files -RUN mkdir -p /ansys_inc COPY $MAPDL_PATH /ansys_inc +# Adding locales +RUN apt-get install -y locales && \ + locale-gen 'en_US.UTF-8' && \ + update-locale LC_ALL='en_US.UTF-8' && \ + sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen && \ + locale-gen && \ + echo -e '\nexport LANG=en_US.UTF-8\nexport LANGUAGE=en_US:en\nexport LC_ALL=en_US.UTF-8' >> ~/.bashrc + # Cleaning RUN rm -rf .dockerignore \ && rm -rf Dockerfile \ && rm -rf *.log - -# Setting working directory -ENV WORKING_DIRECTORY=/jobs - -# Setting home directory -ENV HOME=/home/$USERNAME - # License server # (Optional) # ENV LICENSE_SERVER=111.222.333.444 # ENV ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER -# Add a working directory and make it accessible to any user -RUN mkdir -p /home/$USERNAME/$WORKING_DIRECTORY \ +# Add username, create the working directory and make it accessible to any user +RUN groupadd --gid $USER_GID $USERNAME \ + && useradd --uid $USER_UID --gid $USER_GID -m $USERNAME && \ + mkdir -p /home/$USERNAME/$WORKING_DIRECTORY \ && \ chown -R $USERNAME:$USERNAME /home/$USERNAME/$WORKING_DIRECTORY \ && \ @@ -78,14 +88,16 @@ RUN mkdir -p /home/$USERNAME/$WORKING_DIRECTORY \ # Setting other env vars ## For MAPDL awareness ENV ON_DOCKER=TRUE +ENV DEBIAN_FRONTEND=noninteractive ENV OMPI_ALLOW_RUN_AS_ROOT=1 ENV OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 # Adding alias to ansys executable -RUN printf '#!/bin/bash\n/ansys_inc/v$ANSYS_VERSION/ansys/bin/mapdl "$@"' > /usr/bin/ansys && \ - chmod +x /usr/bin/ansys -RUN printf '#!/bin/bash\n/ansys_inc/v$ANSYS_VERSION/ansys/bin/mapdl -grpc "$@"' > /usr/bin/ansysgrpc && \ +RUN echo 'alias ansys="/ansys_inc/v$ANSYS_VERSION/ansys/bin/mapdl"' >> ~/.bashrc && \ + printf '#!/bin/bash\n/ansys_inc/v$ANSYS_VERSION/ansys/bin/mapdl "$@"' > /usr/bin/ansys && \ + chmod +x /usr/bin/ansys && \ + printf '#!/bin/bash\n/ansys_inc/v$ANSYS_VERSION/ansys/bin/mapdl -grpc "$@"' > /usr/bin/ansysgrpc && \ chmod +x /usr/bin/ansysgrpc # Setting user diff --git a/docker/make_container.rst b/docker/make_container.rst index 225f1e5d50..8ad141fc86 100644 --- a/docker/make_container.rst +++ b/docker/make_container.rst @@ -15,7 +15,7 @@ and then copy the generated files to the container. Requirements ============ -* A linux machine, preferable with Ubuntu 18.04 or later. +* A linux machine, preferable with Ubuntu 20.04 or later. CentOS Linux distribution is not supported anymore. This machine needs to have `Docker `_ installed. @@ -87,8 +87,8 @@ which you should modify to adapt it to your needs. cp ./path-to-pymapdl/pymapdl/docker/.dockerignore # Creating env vars for the Dockerfile - export VERSION=222 - export TAG="V222" + export VERSION=242 # MAPDL version + export TAG="V242" # docker container tag export MAPDL_PATH=/path_to_mapdl_installation/ansys_inc # Build Docker image diff --git a/pyproject.toml b/pyproject.toml index 981ba88736..c14c4f6868 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,14 +60,14 @@ tests = [ "matplotlib==3.9.2", "pandas==2.2.3", "pyansys-tools-report==0.8.1", - "pyfakefs==5.7.1", + "pyfakefs==5.7.2", "pyiges[full]==0.3.1", "pytest-cov==6.0.0", "pytest-memprof<0.3.0", "pytest-pyvista==0.1.9", "pytest-random-order==1.1.1", "pytest-rerunfailures==15.0", - "pytest==8.3.3", + "pytest==8.3.4", "scipy==1.14.1", "vtk==9.3.1", ] @@ -76,9 +76,9 @@ doc = [ "ansys-mapdl-reader==0.54.2", "ansys-sphinx-theme==1.2.2", "ansys-tools-visualization-interface==0.5.0", - "grpcio==1.68.0", + "grpcio==1.68.1", "imageio-ffmpeg==0.5.1", - "imageio==2.36.0", + "imageio==2.36.1", "jupyter_sphinx==0.5.3", "jupyter==1.1.1", "jupyterlab>=3.2.8", diff --git a/src/ansys/mapdl/core/__init__.py b/src/ansys/mapdl/core/__init__.py index 66eefed548..9ed873482d 100644 --- a/src/ansys/mapdl/core/__init__.py +++ b/src/ansys/mapdl/core/__init__.py @@ -128,8 +128,8 @@ from ansys.tools.path.path import ( change_default_ansys_path, find_mapdl, - get_ansys_path, get_available_ansys_installations, + get_mapdl_path, save_ansys_path, ) diff --git a/src/ansys/mapdl/core/component.py b/src/ansys/mapdl/core/component.py index d04fbcc392..21bc4765c0 100644 --- a/src/ansys/mapdl/core/component.py +++ b/src/ansys/mapdl/core/component.py @@ -74,7 +74,7 @@ warning_entity = ( "Assuming a {default_entity} selection.\n" "It is recommended you use the following notation to avoid this warning:\n" - ">>> mapdl.components['{key}'] = '{default_entity}' {value}\n" + ">>> mapdl.components['{key}'] = '{default_entity}', {value}\n" "Alternatively, you disable this warning using:\n" ">>> mapdl.components.default_entity_warning=False" ) @@ -204,7 +204,7 @@ class ComponentManager: >>> mapdl.components["mycomp4"] = (1, 2, 3) /Users/german.ayuso/pymapdl/src/ansys/mapdl/core/component.py:282: UserWarning: Assuming a NODES selection. It is recommended you use the following notation to avoid this warning: - \>\>\> mapdl.components['mycomp3'] = 'NODES' (1, 2, 3) + \>\>\> mapdl.components['mycomp3'] = 'NODES', (1, 2, 3) Alternatively, you disable this warning using: > mapdl.components.default_entity_warning=False warnings.warn( diff --git a/src/ansys/mapdl/core/launcher.py b/src/ansys/mapdl/core/launcher.py index a66a2f3cce..650ba4a252 100644 --- a/src/ansys/mapdl/core/launcher.py +++ b/src/ansys/mapdl/core/launcher.py @@ -65,7 +65,7 @@ import ansys.platform.instancemanagement as pypim if _HAS_ATP: - from ansys.tools.path import find_mapdl, get_ansys_path + from ansys.tools.path import find_mapdl, get_mapdl_path from ansys.tools.path import version_from_path as _version_from_path @wraps(_version_from_path) @@ -856,7 +856,7 @@ def get_default_ansys_version(): def check_valid_ansys(): """Checks if a valid version of ANSYS is installed and preconfigured""" - ansys_bin = get_ansys_path(allow_input=False) + ansys_bin = get_mapdl_path(allow_input=False) if ansys_bin is not None: version = version_from_path("mapdl", ansys_bin) return not (version < 170 and os.name != "posix") @@ -2358,7 +2358,7 @@ def get_exec_file(args: Dict[str, Any]) -> None: return LOG.debug("Using default executable.") - args["exec_file"] = get_ansys_path(version=args.get("version")) + args["exec_file"] = get_mapdl_path(version=args.get("version")) # Edge case if args["exec_file"] is None: diff --git a/src/ansys/mapdl/core/licensing.py b/src/ansys/mapdl/core/licensing.py index 3ae21047b4..6fd4d8beea 100644 --- a/src/ansys/mapdl/core/licensing.py +++ b/src/ansys/mapdl/core/licensing.py @@ -35,7 +35,7 @@ from ansys.mapdl.core.misc import threaded_daemon if _HAS_ATP: - from ansys.tools.path import get_ansys_path, version_from_path + from ansys.tools.path import get_mapdl_path, version_from_path LOCALHOST = "127.0.0.1" LIC_PATH_ENVAR = "ANSYSLIC_DIR" @@ -498,7 +498,7 @@ def get_ansys_license_debug_file_name(): # pragma: no cover hostname = socket.gethostname() appname = APP_NAME # This is the type of license my client requests (Windows 10, 2021R2) - version = version_from_path("mapdl", get_ansys_path(allow_input=False)) + version = version_from_path("mapdl", get_mapdl_path(allow_input=False)) ending = "out" if version < 221: diff --git a/src/ansys/mapdl/core/mapdl_core.py b/src/ansys/mapdl/core/mapdl_core.py index 88eb52fedb..b04700bb0a 100644 --- a/src/ansys/mapdl/core/mapdl_core.py +++ b/src/ansys/mapdl/core/mapdl_core.py @@ -1626,7 +1626,7 @@ def open_gui(self, include_result=None, inplace=None): # pragma: no cover >>> mapdl.eplot() """ # lazy load here to avoid circular import - from ansys.mapdl.core.launcher import get_ansys_path + from ansys.mapdl.core.launcher import get_mapdl_path if not self._local: raise MapdlRuntimeError( @@ -1703,7 +1703,7 @@ def open_gui(self, include_result=None, inplace=None): # pragma: no cover # issue system command to run ansys in GUI mode cwd = os.getcwd() os.chdir(run_dir) - exec_file = self._start_parm.get("exec_file", get_ansys_path(allow_input=False)) + exec_file = self._start_parm.get("exec_file", get_mapdl_path(allow_input=False)) nproc = self._start_parm.get("nproc", 2) add_sw = self._start_parm.get("additional_switches", "") @@ -2216,6 +2216,8 @@ def run( command = command.strip() + is_comment = command.startswith("!") or command.upper().startswith("/COM") + # always reset the cache self._reset_cache() @@ -2261,7 +2263,7 @@ def run( # simply return the contents of the file return self.list(*command.split(",")[1:]) - if "=" in command: + if "=" in command and not is_comment: # We are storing a parameter. param_name = command.split("=")[0].strip() @@ -2873,11 +2875,6 @@ def _raise_output_errors(self, response): [each for each in error_message.splitlines() if each] ) - # Trimming empty lines - error_message = "\n".join( - [each for each in error_message.splitlines() if each] - ) - # Checking for permitted error. for each_error in _PERMITTED_ERRORS: permited_error_message = re.search(each_error, error_message) diff --git a/src/ansys/mapdl/core/mapdl_extended.py b/src/ansys/mapdl/core/mapdl_extended.py index 94f2808fd4..a12ba23392 100644 --- a/src/ansys/mapdl/core/mapdl_extended.py +++ b/src/ansys/mapdl/core/mapdl_extended.py @@ -2314,7 +2314,7 @@ def load_array(self, name, array): np.savetxt( filename, array, - delimiter=",", + delimiter="", header="File generated by PyMAPDL:load_array", fmt="%24.18e", ) @@ -2329,7 +2329,7 @@ def load_array(self, name, array): n2 = imax n3 = kmax self.vread(name, filename, n1=n1, n2=n2, n3=n3, label=label, nskip=1) - fmt = "(" + ",',',".join(["E24.18" for i in range(jmax)]) + ")" + fmt = f"({jmax}E24.18)" logger.info("Using *VREAD with format %s in %s", fmt, filename) self.run(fmt) diff --git a/src/ansys/mapdl/core/mapdl_grpc.py b/src/ansys/mapdl/core/mapdl_grpc.py index a15982ce12..0ebd1618c3 100644 --- a/src/ansys/mapdl/core/mapdl_grpc.py +++ b/src/ansys/mapdl/core/mapdl_grpc.py @@ -931,6 +931,9 @@ def _set_no_abort(self): def _run_at_connect(self): """Run house-keeping commands when initially connecting to MAPDL.""" # increase the number of variables allowed in POST26 to the maximum + with self.run_as_routine("Begin level"): + self._run("/verify", mute=False) + with self.run_as_routine("POST26"): self.numvar(200, mute=True) @@ -1611,6 +1614,11 @@ def _ctrl(self, cmd: str, opt1: str = ""): return resp = self._stub.Ctrl(request) + + if cmd.lower() == "set_verb" and str(opt1) == "0": + warn("Disabling gRPC verbose ('_ctr') by issuing also '/VERIFY' command.") + self.run("/verify") + if hasattr(resp, "response"): return resp.response diff --git a/src/ansys/mapdl/core/pool.py b/src/ansys/mapdl/core/pool.py index c1b7f1204d..40e22ae2b1 100755 --- a/src/ansys/mapdl/core/pool.py +++ b/src/ansys/mapdl/core/pool.py @@ -41,7 +41,7 @@ from ansys.mapdl.core.misc import create_temp_dir, threaded, threaded_daemon if _HAS_ATP: - from ansys.tools.path import get_ansys_path, version_from_path + from ansys.tools.path import get_mapdl_path, version_from_path if _HAS_TQDM: from tqdm import tqdm @@ -281,7 +281,7 @@ def __init__( if not exec_file: # get default executable if _HAS_ATP: - exec_file = get_ansys_path() + exec_file = get_mapdl_path() else: raise ValueError( "Please use 'exec_file' argument to specify the location of the ansys installation.\n" diff --git a/tests/conftest.py b/tests/conftest.py index 724929fa6d..157472057d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -437,6 +437,8 @@ def run_before_and_after_tests( yield # this is where the testing happens + mapdl.prep7() + # Check resetting state assert prev == mapdl.is_local assert not mapdl.exited, "MAPDL is exited after the test. It should have not!" diff --git a/tests/test_mapdl.py b/tests/test_mapdl.py index 2c2634a401..ed2d611c0b 100644 --- a/tests/test_mapdl.py +++ b/tests/test_mapdl.py @@ -2429,8 +2429,15 @@ def test_not_correct_et_element(mapdl, cleared): def test_ctrl(mapdl, cleared): - mapdl._ctrl("set_verb", 5) # Setting verbosity on the server - mapdl._ctrl("set_verb", 0) # Returning to non-verbose + with patch("ansys.mapdl.core.mapdl_grpc.MapdlGrpc.run") as mck_run: + + mapdl._ctrl("set_verb", 5) # Setting verbosity on the server + mapdl._ctrl("set_verb", 0) # Returning to non-verbose + + assert "/verify" in mck_run.call_args_list[0].args[0] + + mapdl.finish() + mapdl.run("/verify") # mocking might skip running this inside mapdl._ctrl def test_cleanup_loggers(mapdl, cleared): diff --git a/tests/test_parameters.py b/tests/test_parameters.py index fa6cda4de6..417c6389cd 100644 --- a/tests/test_parameters.py +++ b/tests/test_parameters.py @@ -134,11 +134,20 @@ def test__get_parameter_array(mapdl, cleared, number): assert np.allclose(array, mapdl.parameters._get_parameter_array(name, shape)) # High number - with pytest.raises(MapdlRuntimeError): - shape = (100, 100) - array = np.ones(shape) * number - mapdl.load_array(name=name, array=array) - mapdl.parameters._get_parameter_array(name, shape) + shape = (100, 100) + array = np.ones(shape) * number + mapdl.load_array(name=name, array=array) + assert np.allclose(array, mapdl.parameters._get_parameter_array(name, shape)) + + # Random number + array = np.random.rand(*shape) + mapdl.load_array(name=name, array=array) + assert np.allclose(array, mapdl.parameters._get_parameter_array(name, shape)) + + # Random big number + array = np.random.rand(*shape) * number + mapdl.load_array(name=name, array=array) + assert np.allclose(array, mapdl.parameters._get_parameter_array(name, shape)) def parameters_name(mapdl, func, par_name):