cashocs
computational adjoint-based shape optimization and optimal control software for python
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 24 DOI reference(s) in README -
○Academic publication links
-
✓Committers with academic emails
2 of 6 committers (33.3%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.5%) to scientific vocabulary
Keywords
fenics
optimization
python
Last synced: 4 months ago
·
JSON representation
·
Repository
computational adjoint-based shape optimization and optimal control software for python
Basic Info
- Host: GitHub
- Owner: sblauth
- License: gpl-3.0
- Language: Python
- Default Branch: main
- Homepage: https://cashocs.readthedocs.io/
- Size: 142 MB
Statistics
- Stars: 57
- Watchers: 3
- Forks: 10
- Open Issues: 5
- Releases: 101
Topics
fenics
optimization
python
Created over 5 years ago
· Last pushed 4 months ago
Metadata Files
Readme
Changelog
Contributing
License
Code of conduct
Citation
Security
Zenodo
README.rst
.. image:: https://raw.githubusercontent.com/sblauth/cashocs/main/logos/cashocs_banner.jpg
:width: 800
:align: center
:target: https://github.com/sblauth/cashocs
.. image:: https://img.shields.io/pypi/v/cashocs?style=flat-square
:target: https://pypi.org/project/cashocs/
.. image:: https://img.shields.io/conda/vn/conda-forge/cashocs?style=flat-square
:target: https://anaconda.org/conda-forge/cashocs
.. image:: https://img.shields.io/pypi/pyversions/cashocs?style=flat-square
:target: https://pypi.org/project/cashocs/
.. image:: https://img.shields.io/badge/DOI-10.5281%2Fzenodo.4035939-informational?style=flat-square
:target: https://doi.org/10.5281/zenodo.4035939
.. image:: https://img.shields.io/pypi/l/cashocs?color=informational&style=flat-square
:target: https://pypi.org/project/cashocs/
.. image:: https://img.shields.io/pypi/dm/cashocs?color=informational&style=flat-square
:target: https://pypistats.org/packages/cashocs
|
.. image:: https://img.shields.io/github/actions/workflow/status/sblauth/cashocs/tests.yml?branch=main&label=tests&style=flat-square
:target: https://github.com/sblauth/cashocs/actions/workflows/tests.yml
.. image:: https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2Fsblauth%2Fcashocs%2Fcoverage%2Fendpoint.json&style=flat-square
:target: https://htmlpreview.github.io/?https://github.com/sblauth/cashocs/blob/coverage/htmlcov/index.html
.. image:: https://readthedocs.org/projects/cashocs/badge/?version=latest&style=flat-square
:target: https://cashocs.readthedocs.io/en/latest/?badge=latest
|
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.
.. contents:: :local:
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 `cashocs 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 ``_.
For some applications and further information about cashocs, we also refer to the website `Fluid Dynamical Shape Optimization with cashocs `_.
.. readme_start_installation
Installation
============
Via conda-forge
---------------
cashocs is available via the conda package manager, and you can install it (to your currently activated environment) with
.. code-block:: bash
conda install -c conda-forge cashocs
Alternatively, you might want to create a new, clean conda environment with the command
.. code-block:: bash
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
.. code-block:: bash
pip install cashocs
- You can install the newest (development) version of cashocs with
.. code-block:: bash
pip install git+https://github.com/sblauth/cashocs.git
- To get the latest (development) version of cashocs, clone this repository with git and install it with pip
.. code-block:: bash
git clone https://github.com/sblauth/cashocs.git
cd cashocs
pip install .
.. note::
To verify that the installation was successful, run the tests for cashocs
with
.. code-block:: bash
python -m pytest tests/
or simply
.. code-block:: bash
pytest tests/
from the repository root directory. Note that it might take some
time to perform all of these tests for the very first time, as FEniCS
compiles the necessary code. However, on subsequent iterations the
compiled code is retrieved from a cache, so that the tests are singificantly
faster.
.. readme_end_installation
Usage
=====
The complete cashocs documentation is available here ``_. For a detailed
introduction, see the `cashocs tutorial `_. The python source code
for the demo programs is located inside the "demos" folder.
.. _citing:
Citing
======
If you use cashocs for your research, please cite the following paper
.. code-block:: text
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
.. code-block:: bibtex
@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 ` `_.
References for PDE Constrained Optimization and FEniCS
======================================================
.. readme_start_disclaimer
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
- `Hinze, Ulbrich, Ulbrich, and Pinnau - Optimization with PDE Constraints `_
- `Trltzsch - Optimal Control of Partial Differential Equations `_
- Shape Optimization
- `Delfour and Zolesio - Shapes and Geometries `_
- `Sokolowski and Zolesio - Introduction to Shape Optimization `_
- Topology Optimization
- `Sokolowski and Novotny - Topological Derivatives in Shape Optimization `_
- `Amstutz - An Introduction to the Topological Derivative `_
- FEniCS
- `Logg, Mardal, and Wells - Automated Solution of Differential Equations by the Finite Element Method `_
- `The FEniCS demos `_
.. readme_end_disclaimer
.. readme_start_license
.. _license:
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 ` `_.
.. readme_end_license
.. readme_start_about
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 ` `_.
.. readme_end_about
Owner
- Name: Sebastian Blauth
- Login: sblauth
- Kind: user
- Website: https://sblauth.github.io/
- Repositories: 4
- Profile: https://github.com/sblauth
Scientific employee at Fraunhofer ITWM
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Blauth"
given-names: "Sebastian"
orcid: "https://orcid.org/ 0000-0001-9173-0866"
title: "cashocs: A Computational, Adjoint-Based Shape Optimization and Optimal Control Software"
doi: 10.5281/zenodo.4035939
url: "https://github.com/sblauth/cashocs"
preferred-citation:
type: article
authors:
- family-names: "Blauth"
given-names: "Sebastian"
orcid: "https://orcid.org/ 0000-0001-9173-0866"
doi: "10.1016/j.softx.2020.100646"
journal: "SoftwareX"
month: 1
start: 1
end: 7
title: "cashocs: A Computational, Adjoint-Based Shape Optimization and Optimal Control Software"
volume: 13
year: 2021
Committers
Last synced: over 2 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Sebastian Blauth | s****h@i****e | 1,012 |
| pre-commit-ci[bot] | 6****]@u****m | 42 |
| dependabot[bot] | 4****]@u****m | 20 |
| sebastian | b****s@i****e | 14 |
| Sebastian Blauth | p****d@g****e | 6 |
| snyk-bot | s****t@s****o | 3 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 4 months ago
All Time
- Total issues: 135
- Total pull requests: 680
- Average time to close issues: 3 months
- Average time to close pull requests: 3 days
- Total issue authors: 7
- Total pull request authors: 5
- Average comments per issue: 0.5
- Average comments per pull request: 0.74
- Merged pull requests: 617
- Bot issues: 1
- Bot pull requests: 381
Past Year
- Issues: 28
- Pull requests: 353
- Average time to close issues: 1 day
- Average time to close pull requests: about 12 hours
- Issue authors: 3
- Pull request authors: 3
- Average comments per issue: 0.21
- Average comments per pull request: 0.85
- Merged pull requests: 320
- Bot issues: 1
- Bot pull requests: 213
Top Authors
Issue Authors
- sblauth (129)
- francesco-ballarin (1)
- JamJamhr (1)
- irenier (1)
- bladesaber (1)
- AudreyDemafo (1)
- pre-commit-ci[bot] (1)
Pull Request Authors
- sblauth (296)
- dependabot[bot] (254)
- pre-commit-ci[bot] (127)
- leonbaeck (2)
- snyk-bot (1)
Top Labels
Issue Labels
development (61)
enhancement (38)
bug (28)
documentation (11)
task (11)
question (6)
CI/CD (5)
ci (2)
dependencies (1)
Support Request (1)
config (1)
Pull Request Labels
dependencies (264)
github_actions (146)
python (111)
bug (78)
enhancement (71)
development (52)
documentation (29)
CI/CD (18)
ci (15)
config (2)
Packages
- Total packages: 2
-
Total downloads:
- pypi 538 last-month
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 1
(may contain duplicates) - Total versions: 156
- Total maintainers: 1
pypi.org: cashocs
Computational Adjoint-Based Shape Optimization and Optimal Control Software
- Documentation: https://cashocs.readthedocs.io/en/stable
- License: GNU General Public License v3 or later (GPLv3+)
-
Latest release: 2.6.1
published 5 months ago
Rankings
Stargazers count: 10.0%
Dependent packages count: 10.1%
Forks count: 11.9%
Downloads: 13.1%
Average: 13.3%
Dependent repos count: 21.6%
Maintainers (1)
Last synced:
4 months ago
conda-forge.org: cashocs
cashocs is a software for automatically solving PDE constrained shape optimization and optimal control problems.
- Homepage: https://github.com/sblauth/cashocs
- License: GPL-3.0-or-later
-
Latest release: 1.8.12
published about 3 years ago
Rankings
Dependent repos count: 34.0%
Average: 44.0%
Stargazers count: 44.9%
Forks count: 46.0%
Dependent packages count: 51.2%
Last synced:
4 months ago
Dependencies
.github/workflows/codeql-analysis.yml
actions
- actions/checkout v3.3.0 composite
- github/codeql-action/analyze v2 composite
- github/codeql-action/autobuild v2 composite
- github/codeql-action/init v2 composite
.github/workflows/docker.yml
actions
- actions/checkout v3.3.0 composite
.github/workflows/docker_ghcr.yml
actions
- actions/checkout v3.3.0 composite
- docker/build-push-action v4 composite
- docker/login-action v2 composite
- docker/metadata-action v4 composite
.github/workflows/ossar-analysis.yml
actions
- actions/checkout v3.3.0 composite
- github/codeql-action/upload-sarif v2 composite
- github/ossar-action v1 composite
.github/workflows/publish.yml
actions
- actions/checkout v3.3.0 composite
- actions/setup-python v4 composite
- nowsprinting/check-version-format-action v3 composite
- pypa/gh-action-pypi-publish release/v1 composite
- softprops/action-gh-release v1 composite
.github/workflows/test_demos.yml
actions
- actions/checkout v3.3.0 composite
- mamba-org/provision-with-micromamba main composite
.github/workflows/tests.yml
actions
- actions/checkout v3.3.0 composite
- codacy/codacy-coverage-reporter-action v1 composite
- codecov/codecov-action v3 composite
.github/workflows/tests_macos.yml
actions
- actions/checkout v3.3.0 composite
- mamba-org/provision-with-micromamba main composite
.github/workflows/tests_parallel.yml
actions
- actions/checkout v3.3.0 composite
- mamba-org/provision-with-micromamba main composite
.github/workflows/tests_serial.yml
actions
- actions/checkout v3.3.0 composite
- mamba-org/provision-with-micromamba main composite
.github/docker/Dockerfile
docker
- continuumio/miniconda3 latest build
- test-env latest build
docs/requirements.txt
pypi
- Sphinx ==5.3
- docutils ==0.19
- jupytext ==1.14.4
- meshio ==5.0.4
- myst-parser ==0.18.1
- pydata-sphinx-theme ==0.12
- pygments >=2.7.4
- setuptools >=65.5.1
- sphinx-argparse ==0.4.0
- sphinx-copybutton ==0.5.1
- sphinx-design ==0.3
- typing_extensions *