Computational Adjoint-Based Shape Optimization and Optimal Control Software
Project description
cashocs is a finite element software for the automated solution of shape optimization and optimal control problems. It is used to solve problems in fluid dynamics and multiphysics contexts. Its name is an acronym for computational adjoint-based shape optimization and optimal control software and the software is written in Python.
Introduction
cashocs is based on the finite element package FEniCS and uses its high-level unified form language UFL to treat general PDE constrained optimization problems, in particular, shape optimization and optimal control problems.
To get started with cashocs, take a look at cashocs in a nutshell as well as the in-depth tutorial. There, the core concepts and functionalities of cashocs are explained.
An overview over cashocs and its capabilities can be found in Blauth - cashocs: A Computational, Adjoint-Based Shape Optimization and Optimal Control Software and Blauth - Version 2.0 - cashocs: A Computational, Adjoint-Based Shape Optimization and Optimal Control Software. Moreover, note that the full cashocs documentation is available at https://cashocs.readthedocs.io.
For some applications and further information about cashocs, we also refer to the website Fluid Dynamical Shape Optimization with cashocs.
Installation
Via conda-forge
cashocs is available via the conda package manager, and you can install it (to your currently activated environment) with
conda install -c conda-forge cashocs
Alternatively, you might want to create a new, clean conda environment with the command
conda create -n ENV_NAME -c conda-forge cashocs
where ENV_NAME is the desired name of the new environment.
For more information about conda, please take a look at the conda documentation.
Manual Installation
First, install FEniCS, version 2019.1. Note that FEniCS should be compiled with PETSc and petsc4py. Moreover, note that cashocs is not yet compatible with the new dolfinx, which is currently under development.
Then, install meshio, with a h5py version that matches the HDF5 version used in FEniCS, and matplotlib. The version of meshio should be at least 4, but for compatibility it is recommended to use meshio 4.4.
You might also want to install Gmsh, version 4.8 or later. cashocs does not necessarily need this to work properly, but it is required for the remeshing functionality.
You can install cashocs via the PYPI as follows
pip install cashocsYou can install the newest (development) version of cashocs with
pip install git+https://github.com/sblauth/cashocs.gitTo get the latest (development) version of cashocs, clone this repository with git and install it with pip
git clone https://github.com/sblauth/cashocs.git cd cashocs pip install .
Usage
The complete cashocs documentation is available here https://cashocs.readthedocs.io. For a detailed introduction, see the cashocs tutorial. The python source code for the demo programs is located inside the “demos” folder.
Citing
If you use cashocs for your research, please cite the following paper
cashocs: A Computational, Adjoint-Based Shape Optimization and Optimal Control Software
Sebastian Blauth
SoftwareX, Volume 13, 2021
https://doi.org/10.1016/j.softx.2020.100646
or use the following bibtex entry
@Article{Blauth2021cashocs,
author = {Sebastian Blauth},
journal = {SoftwareX},
title = {{cashocs: A Computational, Adjoint-Based Shape Optimization and Optimal Control Software}},
year = {2021},
issn = {2352-7110},
pages = {100646},
volume = {13},
doi = {https://doi.org/10.1016/j.softx.2020.100646},
keywords = {PDE constrained optimization, Adjoint approach, Shape optimization, Optimal control},
}
For more details on how to cite cashocs please take a look at https://cashocs.readthedocs.io/en/stable/about/citing/.
References for PDE Constrained Optimization and FEniCS
We assume that you are (at least somewhat) familiar with PDE constrained optimization and FEniCS. For a introduction to these topics, we can recommend the textbooks
- Optimal Control and general PDE constrained optimization
License
cashocs is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
cashocs is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with cashocs. If not, see https://www.gnu.org/licenses/.
Contact / About
I’m Sebastian Blauth, a researcher at Fraunhofer ITWM. I started developing cashocs during my PhD studies and have further developed and refined it as part of my employment at Fraunhofer ITWM. If you have any questions / suggestions / feedback, etc., you can contact me via sebastian.blauth@itwm.fraunhofer.de. For more information, visit my website at https://sblauth.github.io/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cashocs-2.8.1.tar.gz.
File metadata
- Download URL: cashocs-2.8.1.tar.gz
- Upload date:
- Size: 304.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
33588564e7643edf784343783d26c3042bbcc0ec346c99b76f67352e97d180b6
|
|
| MD5 |
3786a607c41a6dae1ee4538df8784732
|
|
| BLAKE2b-256 |
4944b9c927218d5f39a8c742d5a133c832787feb61c536ccfd80312e81d5d25b
|
Provenance
The following attestation bundles were made for cashocs-2.8.1.tar.gz:
Publisher:
publish.yml on sblauth/cashocs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cashocs-2.8.1.tar.gz -
Subject digest:
33588564e7643edf784343783d26c3042bbcc0ec346c99b76f67352e97d180b6 - Sigstore transparency entry: 798131295
- Sigstore integration time:
-
Permalink:
sblauth/cashocs@6d21723a7d9a6b941f6e570203d9c152f0ccdbca -
Branch / Tag:
refs/tags/v2.8.1 - Owner: https://github.com/sblauth
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6d21723a7d9a6b941f6e570203d9c152f0ccdbca -
Trigger Event:
push
-
Statement type:
File details
Details for the file cashocs-2.8.1-py3-none-any.whl.
File metadata
- Download URL: cashocs-2.8.1-py3-none-any.whl
- Upload date:
- Size: 467.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
304d6585adbe0a369ad26acc9d8233be8f248cbf38025b63149337dd17d6a37a
|
|
| MD5 |
068427a23bdce62f9c0694f19d8c4230
|
|
| BLAKE2b-256 |
88610215c343fc8a1161c110d2c40f4db5ce37d79fa2df07fc05bdf00b4b97b7
|
Provenance
The following attestation bundles were made for cashocs-2.8.1-py3-none-any.whl:
Publisher:
publish.yml on sblauth/cashocs
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cashocs-2.8.1-py3-none-any.whl -
Subject digest:
304d6585adbe0a369ad26acc9d8233be8f248cbf38025b63149337dd17d6a37a - Sigstore transparency entry: 798131303
- Sigstore integration time:
-
Permalink:
sblauth/cashocs@6d21723a7d9a6b941f6e570203d9c152f0ccdbca -
Branch / Tag:
refs/tags/v2.8.1 - Owner: https://github.com/sblauth
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6d21723a7d9a6b941f6e570203d9c152f0ccdbca -
Trigger Event:
push
-
Statement type: