Skip to content

Commit

Permalink
Merge branch 'main' into hotfix/2.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
sblauth committed Jul 11, 2024
2 parents 97dd799 + 6fb903a commit f906275
Show file tree
Hide file tree
Showing 155 changed files with 169,949 additions and 179,653 deletions.
1 change: 1 addition & 0 deletions .github/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ RUN micromamba install -y -n base -c conda-forge \
coverage">=7.1.0" \
mpich \
petsc"<=3.19" \
scipy \
python=3.11 && \
micromamba clean --all --yes

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
TAG_PREFIX: ${{ steps.tag_name.outputs.TAG_PREFIX }}
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7

- name: Get tag name
id: tag_name
Expand Down Expand Up @@ -47,7 +47,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7

- name: Log into the Dockerhub registry
run: echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docker_ghcr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7

- name: Log in to the Container registry
uses: docker/login-action@v3
Expand All @@ -51,7 +51,7 @@ jobs:
type=semver,pattern={{major}}.{{minor}}
- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
file: ./.github/docker/Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ossar-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7

# Ensure a compatible version of dotnet is installed.
# The [Microsoft Security Code Analysis CLI](https://aka.ms/mscadocs) is built with dotnet v3.1.201.
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
rm -R /home/mambauser/cashocs
- name: Checkout repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7

- name: Install cashocs
shell: bash
Expand All @@ -45,7 +45,7 @@ jobs:
steps:

- name: Checkout repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7


- name: Get tag name
Expand All @@ -63,7 +63,7 @@ jobs:

- name: Create Github release
id: create_release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
name: cashocs ${{ steps.tag_name.outputs.TAG_PREFIX }}
generate_release_notes: ${{ steps.check_version.outputs.is_stable == 'true' }}
Expand All @@ -80,7 +80,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7

- name: Set up Python 3.11
uses: actions/setup-python@v5
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/test_demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7

- name: Install micromamba
uses: mamba-org/setup-micromamba@v1
Expand All @@ -30,6 +30,7 @@ jobs:
gmsh>=4.8
matplotlib
petsc<=3.19
scipy
python=3.11
- name: Install package
Expand All @@ -55,7 +56,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7

- name: Install micromamba
uses: mamba-org/setup-micromamba@v1
Expand All @@ -69,6 +70,7 @@ jobs:
mpich
matplotlib
petsc<=3.19
scipy
python=3.11
- name: Install package
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
rm -R /home/mambauser/cashocs
- name: Checkout repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7

- name: Install cashocs
shell: bash
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tests_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7

- name: Install micromamba
uses: mamba-org/setup-micromamba@v1
Expand All @@ -33,6 +33,7 @@ jobs:
pytest>=7.2.0
gmsh>=4.8
petsc<=3.19
scipy
- name: Install package
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tests_parallel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7

- name: Install micromamba
uses: mamba-org/setup-micromamba@v1
Expand All @@ -36,6 +36,7 @@ jobs:
pytest>=7.2.0
gmsh>=4.8
petsc<=3.19
scipy
${{ matrix.mpi }}
python=${{ matrix.python-version }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/tests_serial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.1.7

- name: Install micromamba
uses: mamba-org/setup-micromamba@v1
Expand All @@ -33,6 +33,7 @@ jobs:
pytest>=7.2.0
gmsh>=4.8
petsc<=3.19
scipy
python=${{ matrix.python-version }}
- name: Install package
Expand Down
29 changes: 8 additions & 21 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,60 +1,47 @@
repos:
default_language_version:
python: python3.11

repos:
- repo: https://github.com/regebro/pyroma
rev: "4.2"
hooks:
- id: pyroma

- repo: https://github.com/psf/black
rev: 24.1.1
rev: 24.4.2
hooks:
- id: black


- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort


- repo: https://github.com/PyCQA/pydocstyle
rev: 6.3.0
hooks:
- id: pydocstyle
additional_dependencies: ["tomli"]
files: cashocs/


- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
rev: 7.1.0
hooks:
- id: flake8
files: cashocs/


- repo: https://github.com/PyCQA/bandit
rev: 1.7.7
rev: 1.7.9
hooks:
- id: bandit
files: cashocs/


- repo: https://github.com/PyCQA/pylint
rev: v3.0.3
rev: v3.2.5
hooks:
- id: pylint
files: cashocs/


- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
rev: v1.10.1
hooks:
- id: mypy
files: cashocs/
additional_dependencies: ["numpy"]
args: [--config-file, pyproject.toml]


- repo: https://github.com/PyCQA/prospector
rev: v1.10.3
hooks:
Expand Down
4 changes: 2 additions & 2 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"description": "<p>cashocs is a computational, adjoint-based shape optimization and optimal control software.</p>",
"license": "GPL-3.0+",
"title": "cashocs v2.1.4",
"version": "v2.1.4",
"title": "cashocs v2.2.0-dev",
"version": "v2.2.0-dev",
"upload_type": "software",
"creators": [
{
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,33 @@ of the maintenance releases, please take a look at
`<https://github.com/sblauth/cashocs/releases>`_.


2.2.0 (in development)
----------------------

* Add a wrapper for PETSc's SNES solver for nonlinear equations. This is used internally in cashocs whenever possible. For the solution of the state system, our own Newton solver is the default for backwards compatibility. Users can use the new SNES backend by specifying :ini:`backend = petsc` in the Section StateSystem of the configuration.

* Allows nesting of PETSc Fieldsplit PCs with the command line option "pc_fieldsplit_%d_fields <a,b,...>, as explained at `<https://petsc.org/main/manualpages/PC/PCFieldSplitSetFields/>`_

* Increase the precision of the Gmsh output from cashocs

* Add mesh quality constraints for shape optimization: These ensure that the angles of the (solid) angles of triangles and tetrahedrons cannot fall below a specified threshold.

* New configuration file parameters:

* Section StateSystem

* :ini:`backend` specifies which backend is used for solving nonlinear equations. The default is :ini:`backend = cashocs`, which is the "old" behavior, and :ini:`backend = petsc` uses the new PETSc SNES interface.

* Section ShapeGradient

* :ini:`test_for_intersections` is used to disable the (post mesh movement) check for intersections of the mesh, which ensures physically reasonable designs. This should not be set to `False`.

* Section MeshQualityConstraints

* This section includes parameters for the new mesh quality constraints for shape optimization. These are described in the documentation at `<https://cashocs.readthedocs.io/en/stable/user/demos/shape_optimization/doc_config/#section-meshqualityconstraints>`_



2.1.0 (February 6, 2024)
------------------------

Expand Down
Loading

0 comments on commit f906275

Please sign in to comment.