Skip to content
Open
Show file tree
Hide file tree
Changes from 50 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
461ae4e
Allow `mpi_dims_mask` with geometry file
yguclu Sep 18, 2025
1e46072
unit test for mpi_dims_mask
Sep 19, 2025
3376e31
Update test_geometry.py
yguclu Sep 19, 2025
2704716
Update geometry.py
yguclu Sep 19, 2025
e1a13f8
Update test_geometry.py
yguclu Sep 19, 2025
51a32da
new tests for class Geometry
Sep 24, 2025
505db31
run only my tests
Sep 24, 2025
39c51a4
run only my tests
Sep 24, 2025
34e42e6
run only my tests
Sep 24, 2025
90553f9
run only my tests
Sep 24, 2025
243d2b1
run only my tests
Sep 24, 2025
9bfda59
run only my tests
Sep 24, 2025
f75df55
fixed failing tests due to deleting file in parallel
Sep 24, 2025
2a7bb4d
revert files
Sep 24, 2025
659831d
Merge branch 'devel' into yguclu-fix-mpi_dims_mask
alisa-kirkinskaia Sep 26, 2025
e7b6bfb
Avoid function check_decomposition in tests
yguclu Sep 30, 2025
f6afb54
Fix typo in test_geometry.py
yguclu Sep 30, 2025
81b1c6d
Improve Geometry class:
yguclu Sep 30, 2025
e3c30db
Update Geometry unit tests
yguclu Sep 30, 2025
8716dcb
Squashed commit of the following:
yguclu Oct 1, 2025
7111b8e
Do not create __psydac__ directory in parallel
yguclu Oct 1, 2025
cc097a3
Use Geometry.from_file in discretize_domain
yguclu Oct 1, 2025
cd925fb
Use correct parameter name (periods) in MultiPatchDomainDecomposition…
yguclu Oct 1, 2025
f1b6bb1
Add mandatory parameter pdim to Geometry.__init__
yguclu Oct 7, 2025
2716065
Clean up Geometry.read()
yguclu Oct 7, 2025
818be2a
Remove unused property is_parallel from Geometry
yguclu Oct 7, 2025
31fbb37
Merge branch 'devel' into yguclu-improve-Geometry
yguclu Oct 7, 2025
cb8ccb5
Clean up module psydac.mapping.discrete_gallery:
yguclu Oct 8, 2025
f47163e
Merge branch 'devel' into yguclu-improve-Geometry
yguclu Oct 21, 2025
2e56b10
Run fewer tests, only on Ubuntu with Python 3.11
yguclu Oct 21, 2025
2511593
Merge branch 'devel' into yguclu-improve-Geometry
yguclu Jan 26, 2026
b042a0a
Reactivate single-process tests on Ubuntu and macOS
yguclu Jan 26, 2026
0e6a9d6
Merge branch 'devel' into yguclu-improve-Geometry
yguclu Jan 26, 2026
6b6653f
Remove duplicated imports from test_geometry.py
yguclu Jan 26, 2026
8ea76a8
Improve docstring of Geometry class
yguclu Jan 27, 2026
739aee8
Add 'h5py' xdist_group to all unit tests in test_geometry.py
yguclu Jan 27, 2026
66205e7
Handle NumPy integers passed in ncells to Geometry constructor
yguclu Jan 27, 2026
ae6ebf8
Minor cleanup in Geometry constructor
yguclu Jan 27, 2026
7dff021
Run unit tests in mapping, fem, and feec folders
yguclu Jan 27, 2026
fdd357a
Run unit tests in api folder
yguclu Jan 27, 2026
001e592
Revert "Do not create __psydac__ directory in parallel"
yguclu Jan 27, 2026
fae70d3
Merge branch 'devel' into yguclu-improve-Geometry
yguclu Jan 28, 2026
b807f32
Update `CHANGELOG.md` with new and previous changes
yguclu Jan 28, 2026
a06a7d3
Use SymPDE branch clean-multipatch-domain
yguclu Feb 10, 2026
e968bc5
Provide interface orientation to Domain.join
yguclu Feb 10, 2026
a31e07a
Add interface orientation to multipatch geometry files
yguclu Feb 10, 2026
29e82cf
Merge branch 'devel' into yguclu-improve-Geometry
yguclu Feb 11, 2026
326952b
Use `ubuntu_install` action in `documentation` workflow
yguclu Feb 12, 2026
800e506
Clone the latest release of PETSc (see PR #539)
yguclu Feb 12, 2026
9f092d3
Install mpi4py >= 4.0.0 in `parallel_h5py` action
yguclu Feb 12, 2026
e41f301
Merge branch 'devel' into yguclu-improve-Geometry
yguclu Apr 21, 2026
3702e70
Add missing orientation (-1 or +1) to connectivity in test_plot_field
yguclu Apr 21, 2026
d91b2ba
Minor cleanup
yguclu Apr 21, 2026
0b426e2
Avoid deprecation warning about scipy.odr
yguclu Apr 21, 2026
349eee8
Check input domain type in Geometry.from_topological_domain
yguclu Apr 21, 2026
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
1 change: 1 addition & 0 deletions .github/actions/parallel_h5py/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ runs:
run: |
export CC="mpicc"
export HDF5_MPI="ON"
pip install 'mpi4py>=4.0.0'
pip install h5py --no-cache-dir --no-binary h5py
pip list

Expand Down
23 changes: 10 additions & 13 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@ permissions:
jobs:
build_docs:
runs-on: ubuntu-latest

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN}}
OMP_NUM_THREADS: 2

steps:
- name: Checkout
uses: actions/checkout@v5
Expand All @@ -36,18 +38,9 @@ jobs:
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install non-Python dependencies on Ubuntu
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: gfortran openmpi-bin libopenmpi-dev libhdf5-openmpi-dev
version: 1.0
execute_install_scripts: true

- name: Reconfigure non-Python dependencies on Ubuntu
run: |
sudo apt-get update
sudo apt-get install --reinstall openmpi-bin libhdf5-openmpi-dev liblapack-dev libblas-dev
sudo apt install graphviz pandoc
- name: Install non-Python dependencies on Ubuntu
uses: ./.github/actions/ubuntu_install

- name: Print information on MPI and HDF5 libraries
run: |
Expand All @@ -68,9 +61,9 @@ jobs:
key: petsc-${{ matrix.os }}-${{ matrix.python-version }}

- if: steps.cache-petsc.outputs.cache-hit != 'true'
name: Download a specific release of PETSc
name: Download the latest release of PETSc
run: |
git clone --depth 1 --branch v3.23.2 https://gitlab.com/petsc/petsc.git
git clone --depth 1 -b release https://gitlab.com/petsc/petsc.git

- if: steps.cache-petsc.outputs.cache-hit != 'true'
name: Install PETSc with complex support
Expand Down Expand Up @@ -107,6 +100,10 @@ jobs:
pip install .[test]
pip freeze

- name: Install non-Python dependencies for Documentation
run: |
sudo apt install graphviz pandoc

- name: Install Python dependencies for Documentation
run: |
pip install -r docs/requirements.txt
Expand Down
171 changes: 96 additions & 75 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ jobs:
fail-fast: false
matrix:
os: [ ubuntu-24.04, macos-14 ]
python-version: [ '3.10', '3.11', '3.12', '3.13', '3.14' ]
# python-version: [ '3.9', '3.10', '3.11', '3.12', '3.13' ]
python-version: [ '3.11', '3.12' ]
isMerge:
- ${{ github.event_name == 'push' && github.ref == 'refs/heads/devel' }}
exclude:
Expand Down Expand Up @@ -68,46 +69,46 @@ jobs:
run: |
pip install --upgrade pip setuptools wheel

- name: Cache PETSc
uses: actions/cache@v4
id: cache-petsc
env:
cache-name: cache-PETSc
with:
path: "./petsc"
key: petsc-${{ matrix.os }}-${{ matrix.python-version }}

- if: steps.cache-petsc.outputs.cache-hit != 'true'
name: Download a specific release of PETSc
run: |
git clone --depth 1 --branch v3.24.2 https://gitlab.com/petsc/petsc.git

- if: steps.cache-petsc.outputs.cache-hit != 'true'
name: Install PETSc with complex support
working-directory: ./petsc
run: |
export PETSC_DIR=$(pwd)
export PETSC_ARCH=petsc-cmplx
./configure --with-scalar-type=complex --with-fortran-bindings=0 --have-numpy=1
make all
echo "PETSC_DIR=$PETSC_DIR" > petsc.env
echo "PETSC_ARCH=$PETSC_ARCH" >> petsc.env

# This step is not really necessary and could be combined with PETSc install
# step; however it's good to verify if the cached PETSc installation really works!
- name: Test PETSc installation
working-directory: ./petsc
run: |
source petsc.env
make check
echo "PETSC_DIR=$PETSC_DIR" >> $GITHUB_ENV
echo "PETSC_ARCH=$PETSC_ARCH" >> $GITHUB_ENV

- name: Install petsc4py
working-directory: ./petsc
run: |
pip install wheel Cython numpy
pip install src/binding/petsc4py
# - name: Cache PETSc
# uses: actions/cache@v4
# id: cache-petsc
# env:
# cache-name: cache-PETSc
# with:
# path: "./petsc"
# key: petsc-${{ matrix.os }}-${{ matrix.python-version }}
#
# - if: steps.cache-petsc.outputs.cache-hit != 'true'
# name: Download a specific release of PETSc
# run: |
# git clone --depth 1 --branch v3.23.2 https://gitlab.com/petsc/petsc.git
#
# - if: steps.cache-petsc.outputs.cache-hit != 'true'
# name: Install PETSc with complex support
# working-directory: ./petsc
# run: |
# export PETSC_DIR=$(pwd)
# export PETSC_ARCH=petsc-cmplx
# ./configure --with-scalar-type=complex --with-fortran-bindings=0 --have-numpy=1
# make all
# echo "PETSC_DIR=$PETSC_DIR" > petsc.env
# echo "PETSC_ARCH=$PETSC_ARCH" >> petsc.env
#
# # This step is not really necessary and could be combined with PETSc install
# # step; however it's good to verify if the cached PETSc installation really works!
# - name: Test PETSc installation
# working-directory: ./petsc
# run: |
# source petsc.env
# make check
# echo "PETSC_DIR=$PETSC_DIR" >> $GITHUB_ENV
# echo "PETSC_ARCH=$PETSC_ARCH" >> $GITHUB_ENV
#
# - name: Install petsc4py
# working-directory: ./petsc
# run: |
# pip install wheel Cython numpy
# pip install src/binding/petsc4py

- name: Install h5py in parallel mode
uses: ./.github/actions/parallel_h5py
Expand All @@ -125,54 +126,74 @@ jobs:
run: |
mkdir pytest

- name: Run coverage tests on macOS
if: matrix.os == 'macos-14'
working-directory: ./pytest
run: >-
pytest -n auto
--cov psydac
--cov-config $GITHUB_WORKSPACE/pyproject.toml
--cov-report xml
--pyargs psydac -m "not mpi and not petsc" -ra

- name: Run single-process tests with Pytest on Ubuntu
if: matrix.os == 'ubuntu-24.04'
# - name: Run single-process tests with Pytest and coverage on macOS
# if: matrix.os == 'macos-14'
# working-directory: ./pytest
# run: >-
# python -m pytest -n auto
# --cov psydac
# --cov-config $GITHUB_WORKSPACE/pyproject.toml
# --cov-report xml
# --pyargs psydac -m "not parallel and not petsc"
#
# - name: Run single-process tests with Pytest on Ubuntu
# if: matrix.os == 'ubuntu-24.04'
# working-directory: ./pytest
# run: |
# psydac test

- name: Run single-process tests for CAD module
working-directory: ./pytest
run: |
psydac test

- name: Upload coverage report to Codacy
if: matrix.os == 'macos-14'
uses: codacy/codacy-coverage-reporter-action@v1.3.0
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ./pytest/coverage.xml
psydac test --mod psydac.cad -x -v

- name: Print detailed coverage results on macOS
if: matrix.os == 'macos-14'
- name: Run single-process tests for Mapping module
working-directory: ./pytest
run: |
coverage report --ignore-errors --show-missing --sort=cover
psydac test --mod psydac.mapping -x -v

- name: Run MPI tests with Pytest
- name: Run single-process tests for FEM module
working-directory: ./pytest
run: |
psydac test --mpi
psydac test --mod psydac.fem -x -v

- name: Run single-process PETSc tests with Pytest
- name: Run single-process tests for FEEC module
working-directory: ./pytest
run: |
psydac test --petsc
psydac test --mod psydac.feec -x -v

- name: Run MPI PETSc tests with Pytest
- name: Run single-process tests for API module
working-directory: ./pytest
run: |
psydac test --mpi --petsc

- name: Run single-process example tests with Pytest on Ubuntu
if: matrix.os == 'ubuntu-24.04'
run: |
python -m pytest examples/feec
psydac test --mod psydac.api -x -v

# - name: Upload coverage report to Codacy
# if: matrix.os == 'macos-14'
# uses: codacy/codacy-coverage-reporter-action@v1.3.0
# with:
# project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
# coverage-reports: ./pytest/coverage.xml
#
# - name: Print detailed coverage results on macOS
# if: matrix.os == 'macos-14'
# working-directory: ./pytest
# run: |
# coverage report --ignore-errors --show-missing --sort=cover
#
# - name: Run MPI tests with Pytest
# working-directory: ./pytest
# run: |
# psydac test --mpi
#
# - name: Run single-process PETSc tests with Pytest
# working-directory: ./pytest
# run: |
# psydac test --petsc
#
# - name: Run MPI PETSc tests with Pytest
# working-directory: ./pytest
# run: |
# psydac test --mpi --petsc

- name: Remove test directory
if: always()
Expand Down
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,18 @@ All notable changes to this project will be documented in this file.

### Added

- #567 : Improve `psydac test` command (with several new features)
- #565 : Expand editable install info in `README.md`

### Fixed

- #570 : Optimize PSYDAC logo
- #565 : Expand editable install info in `README.md`
- #567 : Fix parallel creation of folder `__psydac__` in `psydac.api.fem_bilinear_form`
- #566 : Fix command `psydac test --mpi` on Ubuntu machines

### Changed

- #527 : Improve `Geometry` class in module `psydac.cad.geometry`
- #570 : Optimize PSYDAC logo
- [DEVELOPER] Do not check file changes to trigger testing workflow on PRs
- [DEVELOPER] Run documentation workflow whenever `README.md` is modified
- [DEVELOPER] Run testing workflow on PRs only when set to "ready for review"
Expand Down
2 changes: 1 addition & 1 deletion psydac/api/discretization.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ def discretize_domain(domain, *, filename=None, ncells=None, periodic=None, comm
raise ValueError("Cannot provide both 'filename' and 'ncells'")

elif filename:
return Geometry(filename=filename, comm=comm, mpi_dims_mask=mpi_dims_mask)
return Geometry.from_file(filename, comm=comm, mpi_dims_mask=mpi_dims_mask)

Comment on lines +581 to 582

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

elif ncells:
return Geometry.from_topological_domain(domain, ncells, periodic=periodic, comm=comm, mpi_dims_mask=mpi_dims_mask)
Expand Down
4 changes: 2 additions & 2 deletions psydac/api/tests/test_2d_complex.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ def test_complex_poisson_2d_multipatch():
A = Square('A',bounds1=(0, 0.5), bounds2=(0, 1))
B = Square('B',bounds1=(0.5, 1.), bounds2=(0, 1))

domain = Domain.join([A, B], [((0, 0, 1), (1, 0, -1))], 'domain')
domain = Domain.join([A, B], [((0, 0, 1), (1, 0, -1), 1)], 'domain')

x, y = domain.coordinates

Expand Down Expand Up @@ -495,7 +495,7 @@ def test_maxwell_2d_2_patch_dirichlet_parallel_0():
D1 = mapping_1(A)
D2 = mapping_2(B)

domain = Domain.join([D1, D2], [((0, 1, 1), (1, 1, -1))], 'domain')
domain = Domain.join([D1, D2], [((0, 1, 1), (1, 1, -1), 1)], 'domain')

x, y = domain.coordinates

Expand Down
4 changes: 2 additions & 2 deletions psydac/api/tests/test_2d_multipatch_mapping_maxwell.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def test_maxwell_2d_2_patch_dirichlet_0():
D1 = mapping_1(A)
D2 = mapping_2(B)

connectivity = [((0,1,1),(1,1,-1))]
connectivity = [((0, 1, 1), (1, 1,-1), 1)]
patches = [D1,D2]
domain = Domain.join(patches, connectivity, 'domain')

Expand Down Expand Up @@ -203,7 +203,7 @@ def test_maxwell_2d_2_patch_dirichlet_parallel_0():
D1 = mapping_1(A)
D2 = mapping_2(B)

connectivity = [((0,1,1),(1,1,-1))]
connectivity = [((0, 1, 1), (1, 1,-1), 1)]
patches = [D1,D2]
domain = Domain.join(patches, connectivity, 'domain')
x,y = domain.coordinates
Expand Down
Loading
Loading