Skip to content
Open
Show file tree
Hide file tree
Changes from 109 commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
eb3417b
draft
dipinknair Aug 18, 2025
498eb2d
draft
dipinknair Aug 18, 2025
3a2fa8f
feat: applying latest changes
clatapie Aug 19, 2025
6aa0102
Merge branch 'main' into feat/pymapdl-dpf
clatapie Sep 1, 2025
facb2d3
update path
dipinknair Sep 3, 2025
4bfe7bf
update workflow
dipinknair Sep 3, 2025
4d2042f
fix style
dipinknair Sep 3, 2025
4a00f5f
Merge branch 'main' into feat/pymapdl-dpf
dipinknair Sep 3, 2025
0ac3a44
add mapdl py file
dipinknair Sep 3, 2025
97a7814
update checkout
dipinknair Sep 3, 2025
fb97a97
change shel script permission
Sep 4, 2025
b0c784b
feat: using latest PyMAPDL docker files
clatapie Sep 10, 2025
1b923da
Merge branch 'main' into feat/pymapdl-dpf
clatapie Sep 10, 2025
2c00834
fix: MAPDL workflow
clatapie Sep 12, 2025
d29bbc9
fix: MAPDL workflow - 2
clatapie Sep 12, 2025
5263eee
fix: adding missing file
clatapie Sep 12, 2025
54a8b9e
fix: applying @germa89's suggestions
clatapie Sep 19, 2025
21df61a
fix: python version
clatapie Sep 19, 2025
68d167d
fix: applying @germa89 feedback
clatapie Sep 19, 2025
62b7628
fix: adding a venv
clatapie Sep 19, 2025
1fd3bf2
fix: activate venv
clatapie Sep 19, 2025
23dace6
fix: activate venv -2
clatapie Sep 19, 2025
f858ee5
fix: applying @germa89 feedback - 2
clatapie Sep 19, 2025
6d80a0f
fix: virtual environment
clatapie Sep 19, 2025
23e4b3c
fix: issue with source
clatapie Sep 19, 2025
99e95b6
fix: removing ` Login to GitHub Container Registry` step
clatapie Sep 19, 2025
7c61be0
fix: trying to fix ``start_mapdl.sh``
clatapie Sep 19, 2025
af82ebd
fix: DPF servie and test virtual framebuffer
clatapie Sep 19, 2025
433df22
fix: MAPDL version
clatapie Sep 19, 2025
dd550a2
fix: pre-commit
clatapie Sep 19, 2025
366dd8b
fix: commenting step as not used for the moment
clatapie Sep 19, 2025
f77b6bf
fix: ``start_mapdl.sh``
clatapie Sep 19, 2025
a1ff2ee
fix: removing CICD
clatapie Oct 6, 2025
641f930
fix: removing matrix for testing purpose
clatapie Oct 6, 2025
73a12b9
fix: requirements
clatapie Oct 6, 2025
e65dcdb
test: check if PyMAPDL port is free
clatapie Oct 6, 2025
8cb7d37
fix: few fixes in ``start_mapdl``
clatapie Oct 6, 2025
07547d6
fix: ``start_mapdl``
clatapie Oct 6, 2025
63264ed
fix: using ``nc`` approach
clatapie Oct 6, 2025
59db90e
fix: installing netcat
clatapie Oct 6, 2025
9dbac4b
fix: using ``netstat``
clatapie Oct 6, 2025
1425a1e
fix: CICD
clatapie Oct 6, 2025
998f213
fix: MAPDL_PID
clatapie Oct 6, 2025
e8b64a0
fix: ``start_mapdl``
clatapie Oct 6, 2025
55e74cf
fix: ``start_mapdl`` - 2
clatapie Oct 6, 2025
093f9db
fix: ``start_mapdl`` - 3
clatapie Oct 6, 2025
f6f389b
fix: removing sleep
clatapie Oct 7, 2025
db08801
feat: simplifying ``wf_mapdl-dpf.py`` for tests
clatapie Oct 7, 2025
7f72246
fix: pre-commit
clatapie Oct 7, 2025
5c99dfd
fix: make files
clatapie Oct 8, 2025
d43d8ef
Merge branch 'main' into feat/pymapdl-dpf
clatapie Oct 8, 2025
07ba8c8
fix: printing the logs
clatapie Oct 9, 2025
5aad9e8
test: reverting doc version
clatapie Oct 9, 2025
6038051
test: reverting doc version + testing MapdlPool
clatapie Oct 9, 2025
a865a2c
fix: launching two MAPDL instances
clatapie Oct 9, 2025
6881bb7
fix: MapdlPool
clatapie Oct 9, 2025
631083c
fix: MapdlPool
clatapie Oct 10, 2025
879e241
fix: MapdlPool - 2
clatapie Oct 10, 2025
39b17f4
feat: adding the all example
clatapie Oct 10, 2025
5d91422
fix: example
clatapie Oct 10, 2025
2ea8491
fix: pre-commit
clatapie Oct 10, 2025
a39a986
test: calling pydpf
clatapie Oct 10, 2025
45ddb75
fix: pydpf server
clatapie Oct 10, 2025
eb8b419
fix: DPF_PORT value
clatapie Oct 10, 2025
f9dda24
fix: DPF server
clatapie Oct 10, 2025
fc1f9db
fix: env variable
clatapie Oct 10, 2025
e3561aa
fix: DPF ports
clatapie Oct 10, 2025
0a29fdc
feat: adding the full example
clatapie Oct 10, 2025
43ce38d
fix: python file
clatapie Oct 10, 2025
b18fcd0
fix: running python script in ``xvfb`` mode
clatapie Oct 10, 2025
af97bb5
fix: pyvista off_screen
clatapie Oct 10, 2025
7d3242c
fix: pyvista off_screen - 2
clatapie Oct 10, 2025
2dc3d6a
docs: run the doc
clatapie Oct 10, 2025
e4f7c9f
fix: documentation build
clatapie Oct 10, 2025
bd19bac
fix: install make
clatapie Oct 10, 2025
c7738db
fix: requirement files
clatapie Oct 10, 2025
0733db7
feat: adding ``bvp.png`` sketch
clatapie Oct 10, 2025
7c4c034
feat: clean up
clatapie Oct 13, 2025
3a9b70e
Merge branch 'main' into feat/pymapdl-dpf
clatapie Oct 15, 2025
112f1d4
Merge branch 'main' into feat/pymapdl-dpf
clatapie Oct 16, 2025
82792f2
chore: auto fixes from pre-commit hooks
pre-commit-ci[bot] Oct 16, 2025
832da11
docs: adding ``README.rst``
clatapie Oct 16, 2025
386eaf9
feat: outputs stored in ``outputs/mapdl-dpf`` folder
clatapie Oct 16, 2025
1d1cabf
fix: typo
clatapie Oct 16, 2025
5a89dc1
Update mapdl-dpf/wf_mapdl-dpf.py
clatapie Oct 16, 2025
730bd89
feat: move ``.ci`` into ``mapdl-dpf``
clatapie Oct 16, 2025
3988202
fix: file access
clatapie Oct 16, 2025
c42c096
Merge branch 'main' into feat/pymapdl-dpf
clatapie Oct 16, 2025
e24351d
feat: aligning to other workflows
clatapie Oct 16, 2025
c51ee63
Update doc/make.bat
clatapie Oct 16, 2025
386f1c6
fix: removing unused line
clatapie Oct 16, 2025
25d0e61
fix: typo
clatapie Oct 16, 2025
1c9eeab
Merge branch 'main' into feat/pymapdl-dpf
clatapie Oct 17, 2025
fd41640
Merge branch 'main' into feat/pymapdl-dpf
clatapie Oct 17, 2025
a402c77
fix: applying latest changes from #111
clatapie Oct 17, 2025
19d753d
Update mapdl-dpf/README.rst
clatapie Oct 17, 2025
c5488f1
fix: resizing README
clatapie Oct 17, 2025
65f6271
Update mapdl-dpf/wf_mapdl-dpf.py
clatapie Oct 17, 2025
56a564e
Apply suggestions from code review
clatapie Oct 17, 2025
7995e2f
Merge branch 'main' into feat/pymapdl-dpf
clatapie Oct 17, 2025
a9302b7
docs: README
clatapie Oct 17, 2025
54efe75
fix: download artifacts in ``docs.yml``
clatapie Oct 20, 2025
37413d1
Apply suggestions from code review
clatapie Oct 20, 2025
a0e1577
Apply suggestions from code review
clatapie Oct 20, 2025
b58e09b
Apply suggestions from code review
clatapie Oct 20, 2025
7f3bfe9
Update mapdl-dpf/wf_mapdl-dpf.py
clatapie Oct 20, 2025
12307de
fix: ``mapdl-dpf.py``
clatapie Oct 20, 2025
03e800e
fix: pre-commit
clatapie Oct 20, 2025
8b9880a
Merge branch 'main' into feat/pymapdl-dpf
clatapie Oct 20, 2025
717baad
Apply suggestions from code review
clatapie Oct 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ jobs:
with:
doc-build: true

mapdl-dpf:
uses: ./.github/workflows/mapdl-dpf.yml
secrets: inherit
with:
doc-build: true

speos-optislang:
uses: ./.github/workflows/speos-optislang.yml
secrets: inherit
Expand Down Expand Up @@ -94,6 +100,12 @@ jobs:
name: speos-optislang-docs
path: doc/

- name: Download artifacts for pymapdl-dpf
uses: actions/download-artifact@v5
with:
name: pymapdl-dpf-docs
path: doc/

- name: Build the documentation
run: |
cd doc
Expand Down
197 changes: 197 additions & 0 deletions .github/workflows/mapdl-dpf.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
name: MAPDL-DPF Workflow

on:
workflow_dispatch:
inputs:
doc-build:
required: false
default: false
type: boolean
description: 'Whether to build the documentation'
workflow_call:
inputs:
doc-build:
required: false
default: false
type: boolean
description: 'Whether to build the documentation'
push:
branches:
- main
pull_request:
paths:
- 'mapdl-dpf/**'

env:
ANSYSLMD_LICENSE_FILE: ${{ format('1055@{0}', secrets.LICENSE_SERVER )}}
MAIN_PYTHON_VERSION: "3.11"
MAPDL_DOCKER_IMAGE: 'ghcr.io/ansys/mapdl'
DPF_DOCKER_IMAGE: ghcr.io/ansys/mapdl:v25.2-rocky-dpf-standalone
PYANSYS_WORKFLOWS_CI: true
ANSYS_RELEASE_FOR_DOCS: 25.2
DPF_START_SERVER: false
ANSYS_DPF_ACCEPT_LA: Y
MAPDL_IMAGE_VERSION_DOCS_BUILD: v25.2.4-ubuntu-cicd
PYMAPDL_PORT_0: 21000
PYMAPDL_DB_PORT_0: 21001
PYMAPDL_PORT_1: 21002
PYMAPDL_DB_PORT_1: 21003
DPF_PORT_0: 21004
DPF_PORT_1: 21005
PYVISTA_OFF_SCREEN: true

jobs:

is-only-docs-required:
uses: ./.github/workflows/check-docs-required.yml
with:
doc-build: ${{ inputs.doc-build || false }}

mapdl-dpf:
name: MAPDL-DPF
runs-on: ubuntu-22.04
needs: is-only-docs-required
container:
image: "ghcr.io/ansys/mapdl:v25.2.4-ubuntu-cicd"
options: -u=0:0 --oom-kill-disable --memory=6656MB --memory-swap=16896MB --shm-size=1gb --entrypoint /bin/bash
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
strategy:
fail-fast: false
matrix:
ansys-release: ${{ needs.is-only-docs-required.outputs.only-docs == 'true' && fromJSON('[25.2]') || fromJSON('[25.2]') }}
env:
PYMAPDL_START_INSTANCE: FALSE
ON_DOCUMENTATION: TRUE
ON_CICD: TRUE

steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python ${{ env.MAIN_PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.MAIN_PYTHON_VERSION }}

- name: Create a virtual environment
shell: bash
run: |
python -m venv .venv
. .venv/bin/activate
apt-get update && apt-get -y install gcc mono-mcs g++

- name: Install dependencies
shell: bash
run: |
. .venv/bin/activate
python -m pip install --upgrade pip --root-user-action=ignore
pip install -r mapdl-dpf/requirements_${{ matrix.ansys-release }}.txt --root-user-action=ignore

- name: "Start MAPDL service directly (inside container)"
id: start_mapdl
shell: bash
env:
DISTRIBUTED_MODE: "dmp"
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
MAPDL_VERSION: ${{ env.MAPDL_IMAGE_VERSION_DOCS_BUILD }}
MAPDL_PACKAGE: ${{ env.MAPDL_DOCKER_IMAGE }}
ANSYSLMD_LICENSE_FILE: ${{ env.ANSYSLMD_LICENSE_FILE }}
ANSYS_DPF_ACCEPT_LA: ${{ env.ANSYS_DPF_ACCEPT_LA }}
run: |
. .venv/bin/activate

echo "Launching first MAPDL instance..."
export INSTANCE_NAME=MAPDL_0
export PYMAPDL_PORT=$PYMAPDL_PORT_0
export PYMAPDL_DB_PORT=$PYMAPDL_DB_PORT_0
export DPF_PORT=$DPF_PORT_0
mapdl-dpf/.ci/start_mapdl.sh & export MAPDL_PID=$!
echo "Launching MAPDL service at PID: $MAPDL_PID"
echo "MAPDL_PID=$(echo $MAPDL_PID)" >> $GITHUB_OUTPUT

echo "Launching second MAPDL instance..."
export INSTANCE_NAME=MAPDL_1
export PYMAPDL_PORT=$PYMAPDL_PORT_1
export PYMAPDL_DB_PORT=$PYMAPDL_DB_PORT_1
export DPF_PORT=$DPF_PORT_1
mapdl-dpf/.ci/start_mapdl.sh & export MAPDL_PID_1=$!
echo "Launching second MAPDL service at PID: $MAPDL_PID_1"
echo "MAPDL_PID_1=$(echo $MAPDL_PID_1)" >> $GITHUB_OUTPUT

- name: "DPF server setup"
shell: bash
run: |
. .venv/bin/activate
echo "DPF service will be available through MAPDL container"
echo "DPF_PORT: $DPF_PORT"
# DPF is already available in the MAPDL container

- name: "Test virtual framebuffer"
shell: bash
run: |
. .venv/bin/activate
echo "Testing virtual framebuffer..."
# Install xvfb if not available
which xvfb-run || (apt-get update && apt-get install -y xvfb)

# Test display if the script exists
if [ -f "mapdl-dpf/.ci/display_test.py" ]; then
xvfb-run python mapdl-dpf/.ci/display_test.py
else
echo "Display test script not found, skipping..."
fi

- name: "Retrieve PyMAPDL version"
id: version
shell: bash
run: |
. .venv/bin/activate
echo "PYMAPDL_VERSION=$(python -c 'from ansys.mapdl.core import __version__; print(__version__)')" >> $GITHUB_OUTPUT
echo "PyMAPDL version is: $(python -c "from ansys.mapdl.core import __version__; print(__version__)")"

- name: Run the MAPDL-DPF script
shell: bash
env:
LIBGL_ALWAYS_SOFTWARE: 1
PYANSYS_VISUALIZER_HTML_BACKEND: true
run: |
. .venv/bin/activate
echo "Building MAPDL-DPF workflow..."
echo "PYMAPDL_START_INSTANCE: $PYMAPDL_START_INSTANCE"
xvfb-run python mapdl-dpf/wf_mapdl-dpf.py

- name: "Install make"
shell: bash
run: |
apt-get update -qq && apt-get install -y make

- name: (DOCS) Build the documentation (only on ${{ env.ANSYS_RELEASE_FOR_DOCS}})
if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS
shell: bash
env:
BUILD_DOCS_SCRIPT: 'mapdl-dpf/wf_mapdl-dpf.py'
run: |
. .venv/bin/activate
cd doc
pip install -r requirements.txt --root-user-action=ignore
xvfb-run make html

- name: (DOCS) Upload docs artifacts
if: needs.is-only-docs-required.outputs.only-docs == 'true' && matrix.ansys-release == env.ANSYS_RELEASE_FOR_DOCS
uses: actions/upload-artifact@v4
with:
name: mapdl-dpf-docs
path: |
doc/_build/
doc/source/examples/mapdl-dpf/
overwrite: true

- name: print MAPDL log
if: failure()
shell: bash
run: |
echo "Printing MAPDL log for debugging..."
cat MAPDL_0.log
Binary file added doc/source/_static/bvp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions mapdl-dpf/.ci/display_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Copyright (C) 2024 - 2025 ANSYS, Inc. and/or its affiliates.
# SPDX-License-Identifier: MIT
#
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

"""Quickly check if VTK off screen plotting works."""

import pyvista
from pyvista.plotting import system_supports_plotting

print("system_supports_plotting", system_supports_plotting())
pyvista.OFF_SCREEN = True
pyvista.plot(pyvista.Sphere())
Loading