Skip to content

Commit

Permalink
Merge branch 'main' into hotfix/2.0.10
Browse files Browse the repository at this point in the history
  • Loading branch information
sblauth committed Aug 24, 2023
2 parents b6292d7 + 39543a7 commit c3c80e4
Show file tree
Hide file tree
Showing 51 changed files with 1,074 additions and 229 deletions.
8 changes: 6 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@ updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
interval: "daily"
time: "06:00"
timezone: Europe/Berlin

- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
interval: "daily"
time: "06:00"
timezone: Europe/Berlin
allow:
- dependency-type: "all"
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@v3.5.2
uses: actions/checkout@v3.5.3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .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@v3.5.2
uses: actions/checkout@v3.5.3

- name: Log in to the Container registry
uses: docker/login-action@v2
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@v3.5.2
uses: actions/checkout@v3.5.3

# 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
6 changes: 3 additions & 3 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@v3.5.2
uses: actions/checkout@v3.5.3

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

- name: Checkout repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3


- name: Get tag name
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3

- name: Set up Python 3.11
uses: actions/setup-python@v4
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/test_demos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3

- name: Install micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: .github/micromamba/testenv.yml
extra-specs: |
create-args: >-
fenics=2019
meshio">=5.0.0"
pytest">=7.0.0"
gmsh">=4.8"
occt"<=7.7.0"
meshio>=5.0.0
pytest>=7.0.0
gmsh>=4.8
occt<=7.7.0
matplotlib
python=3.11
Expand All @@ -55,18 +55,18 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3

- name: Install micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: .github/micromamba/testenv.yml
extra-specs: |
create-args: >-
fenics=2019
meshio">=5.0.0"
pytest">=7.0.0"
gmsh">=4.8"
occt"<=7.7.0"
meshio>=5.0.0
pytest>=7.0.0
gmsh>=4.8
occt<=7.7.0
mpich
matplotlib
python=3.11
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/tests_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3

- name: Install micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: .github/micromamba/testenv.yml
extra-specs: |
create-args: >-
python=${{ matrix.python-version }}
fenics=2019
meshio">=5.0.0"
pytest">=7.0.0"
gmsh">=4.8"
occt"<=7.7.0"
meshio>=5.0.0
pytest>=7.0.0
gmsh>=4.8
occt<=7.7.0
- name: Install package
run: |
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/tests_parallel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3

- name: Install micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: .github/micromamba/testenv.yml
extra-specs: |
create-args: >-
fenics=2019
meshio">=5.0.0"
pytest">=7.0.0"
gmsh">=4.8"
occt"<=7.7.0"
meshio>=5.0.0
pytest>=7.0.0
gmsh>=4.8
occt<=7.7.0
${{ matrix.mpi }}
python=${{ matrix.python-version }}
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/tests_serial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3.5.2
uses: actions/checkout@v3.5.3

- name: Install micromamba
uses: mamba-org/provision-with-micromamba@main
uses: mamba-org/setup-micromamba@v1
with:
environment-file: .github/micromamba/testenv.yml
extra-specs: |
create-args: >-
fenics=2019
meshio">=5.0.0"
pytest">=7.0.0"
gmsh">=4.8"
occt"<=7.7.0"
meshio>=5.0.0
pytest>=7.0.0
gmsh>=4.8
occt<=7.7.0
python=${{ matrix.python-version }}
- name: Install package
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ htmlcov
*.vtu
*.pvtu

**/checkpoints/
**/xdmf/

### pip
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
- id: pyroma

- repo: https://github.com/psf/black
rev: 23.3.0
rev: 23.7.0
hooks:
- id: black

Expand All @@ -26,7 +26,7 @@ repos:


- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
rev: 6.1.0
hooks:
- id: flake8
files: cashocs/
Expand All @@ -40,14 +40,14 @@ repos:


- repo: https://github.com/PyCQA/pylint
rev: v3.0.0a6
rev: v3.0.0a7
hooks:
- id: pylint
files: cashocs/


- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.3.0
rev: v1.5.1
hooks:
- id: mypy
files: cashocs/
Expand Down
1 change: 1 addition & 0 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ disable=abstract-method,
cmp-method,
coerce-builtin,
coerce-method,
cyclic-import,
delslice-method,
div-method,
duplicate-code,
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.0.10",
"version": "v2.0.10",
"title": "cashocs v2.1.0-dev",
"version": "v2.1.0-dev",
"upload_type": "software",
"creators": [
{
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,35 @@ of the maintenance releases, please take a look at
`<https://github.com/sblauth/cashocs/releases>`_.


2.1.0 (in development)
----------------------

* Add the keyword arguments :python:`pre_callback` and :python:`post_callback` to define callbacks when an optimization problem is instanciated.

* Add a new function :py:func:`cashocs.io.extract_mesh_from_xdmf` which extracts (any, not only Gmsh) meshes from some XDMF state file (e.g. written by cashocs) and saves the underlying mesh in Gmsh file format.

* Add a new command line interface :bash:`cashocs-extract_mesh` which can be used to invoke :py:func:`cashocs.io.extract_mesh_from_xdmf`.

* The output routines save the xdmf files not in a folder called `xdmf` anymore, but the folder is called `checkpoints`

* The output parameter `save_mesh` does now not only save the optimized mesh, but also writes a Gmsh .msh file of the current iterated mesh for each iteration. This is very useful for restarting simulations.

* Added the function :py:func:`cashocs.io.import_function` which can be used to load a XDMF Function with a function space. This is very useful for checkpointing (first, read the saved mesh, define the function space, then call :py:func:`cashocs.io.import_function`.

* :py:func:`cashocs.import_mesh` can now also directly import a Gmsh mesh file. Internally, the mesh is directly converted to xdmf and then read. At the moment, this only supports the conversion mode `physical`.

* New configuration file parameters:

* Section LineSearch

* :ini:`fail_if_not_converged` determines, whether the line search is cancelled once the state system cannot be solved or if a new iterate is tried instead.

* Section MeshQuality

* :ini:`remesh_iter` is used to perform a remeshing after a certain amount of iterations.



2.0.0 (May 16, 2023)
--------------------

Expand Down
Loading

0 comments on commit c3c80e4

Please sign in to comment.