Skip to content
Commits on Source (53)
[![Build Status](https://gitlab.dune-project.org/copasi/dune-copasi/badges/master/pipeline.svg)](https://gitlab.dune-project.org/copasi/dune-copasi/pipelines)
[![Build Status](https://travis-ci.org/SoilRos/dune-copasi.svg?branch=master)](https://travis-ci.org/SoilRos/dune-copasi)
[![Build status](https://ci.appveyor.com/api/projects/status/6605joy2w17qvca8/branch/master?svg=true)](https://ci.appveyor.com/project/SoilRos/dune-copasi/branch/master)
[![Build Status](https://travis-ci.org/dune-copasi/dune-copasi.svg?branch=master)](https://travis-ci.org/dune-copasi/dune-copasi)
[![Build Status](https://ci.appveyor.com/api/projects/status/e7w7u5dt50kue5sb/branch/master?svg=true)](https://ci.appveyor.com/project/SoilRos/dune-copasi-3gv18/branch/master)
## How does this CI works?
We have 3 Continous Integration services:
We have 3 Continous Integration services:
- [GitLab](https://docs.gitlab.com/ee/ci/)
- [Travis](https://travis-ci.org/)
- [AppVeyor](https://www.appveyor.com/)
The reason for this is because only one could not tackle all three platforms we want
to reach. That is:
The reason for this is because only one could not tackle all three platforms we
want to reach. That is:
- Linux
- macOS
- Windows
Sice the last two CI are better ingegrated with GitHub, we have set a repository there which
mirrors all modifications made in the main repository.
Sice the last two CI are better ingegrated with GitHub, we have set a repository
there which mirrors all modifications made in the main repository.
- Main repository: https://gitlab.dune-project.org/copasi/dune-copasi
- Mirror repository: https://github.com/SoilRos/dune-copasi
- Mirror repository: https://github.com/dune-copasi/dune-copasi
The main idea here is that they, the different CI, follow almost the same
instructions in the different stages. In all the cases, the scripts expect
to have defined `DUNECONTROL` and `DUNE_OPTIONS_FILE` variables for running
`dunecontrol` and for the configuration options.
instructions in the different stages. In all the cases, the scripts expect
to have defined `DUNECONTROL` and `DUNE_OPTIONS_FILE` variables for running
`dunecontrol` and for the configuration options.
### Stage: Setup
In this stage, we configure and install all the dependencies that `dune-copasi` requires.
In this case, Travis and Appveyor use the script [`setup.sh`](setup.sh) while gitlab uses
the dependencies docker image in the container registry. The latter only updated for the
`master` branch by the docker script [`dependencies.dockerfile`](../docker/dependencies.dockerfile).
This makes the GitLab CI run faster as all the dependencies are already installed.
In this stage, we configure and install all the dependencies that `dune-copasi`
requires. In this case, Travis and Appveyor use the script
[`setup.sh`](setup.sh) while gitlab uses the dependencies docker image in the
container registry. The latter only updated for the `master` branch by the
docker script [`dependencies.dockerfile`](../docker/dependencies.dockerfile).
This makes the GitLab CI run faster as all the dependencies are already
installed.
### Stage: Build
This stage builds `dune-copasi` following the [`build.sh`](build.sh) script which in turs run the
`dunecontrol` command for the project.
This stage builds `dune-copasi` following the [`build.sh`](build.sh) script
which in turs run the `dunecontrol` command for the project.
This stage always should be run.
### Stage: Unit Tests
This stage builds and runs the unit tests by running the [`unit_tests.sh`](unit_tests.sh)
script. `ctests` runs all tests with the tag `unit`. This stage always should be run.
This stage builds and runs the unit tests by running the
[`unit_tests.sh`](unit_tests.sh) script. `ctests` runs all tests with the tag
`unit`. This stage always should be run.
### Stage: System Tests
This stage runs all the system tests tagged with `DUNE_SYSTEMTEST` when running the
[`system_tests.sh`](system_tests.sh) script. Since most of the system tests are
generated by `dune-testools`, which is optional, this stage will only make
sense when `dune-testools` is installed in the setup stage. Currently, this is
This stage runs all the system tests tagged with `DUNE_SYSTEMTEST` when running
the [`system_tests.sh`](system_tests.sh) script. Since most of the system tests
are generated by `dune-testools`, which is optional, this stage will only make
sense when `dune-testools` is installed in the setup stage. Currently, this i
not feasible for windows due to the python environment setup.
......@@ -62,9 +65,9 @@ For getting them replace `<branch>` for the specific branch you want:
- Badge: [https://gitlab.dune-project.org/copasi/dune-copasi/badges/`<branch>`/pipeline.svg](https://gitlab.dune-project.org/copasi/dune-copasi/badges/master/pipeline.svg)
### Travis
- Link: https://travis-ci.org/SoilRos/dune-copasi
- Badge: [https://travis-ci.org/SoilRos/dune-copasi.svg?branch=`<branch>`](https://travis-ci.org/SoilRos/dune-copasi.svg?branch=master)
- Bagage [https://travis-ci.org/dune-copasi/dune-copasi.svg?branch=`<branch>`](https://travis-ci.org/dune-copasi/dune-copasi/branches)
### AppVeyor
- Link: [https://ci.appveyor.com/project/SoilRos/dune-copasi/branch/`<branch>`](https://ci.appveyor.com/project/SoilRos/dune-copasi/branch/master)
- Badge: [https://ci.appveyor.com/api/projects/status/6605joy2w17qvca8/branch/`<branch>`?svg=true](https://ci.appveyor.com/api/projects/status/6605joy2w17qvca8/branch/master?svg=true)
- Link: [https://ci.appveyor.com/project/SoilRos/dune-copasi/branch/`<branch>`](https://ci.appveyor.com/project/SoilRos/dune-copasi-3gv18/branch/master)
- Badge: [https://ci.appveyor.com/api/projects/status/e7w7u5dt50kue5sb/branch/`<branch>`?svg=true](https://ci.appveyor.com/api/projects/status/e7w7u5dt50kue5sb/branch/master?svg=true)
......@@ -40,12 +40,12 @@ do
done
for repo in dune-logging dune-typetree dune-pdelab dune-multidomaingrid
do
git clone -b support/dune-copasi --depth 1 --recursive https://gitlab.dune-project.org/copasi/$repo.git
git clone -b support/dune-copasi-v0.3 --depth 1 --recursive https://gitlab.dune-project.org/copasi/$repo.git
done
# python virtual environment does not work in windows yet
if [[ ! $MSYSTEM ]]; then
git clone -b feature/allow-multidomain-vtk-compare-to-have-same-thresholds https://gitlab.dune-project.org/quality/dune-testtools.git
git clone -b releases/$DUNE_VERSION https://gitlab.dune-project.org/quality/dune-testtools.git
fi
# on windows, symlinks from git repos don't work
......@@ -95,4 +95,4 @@ fi
for repo in dune-testtools dune-logging dune-pdelab dune-multidomaingrid
do
${DUNECONTROL} --opts=${DUNE_OPTIONS_FILE} --module=$repo all
done
\ No newline at end of file
done
......@@ -3,4 +3,20 @@ __pycache__/
*.py[cod]
*$py.class
python/dune/copasi/cli/cmake_variables.py
\ No newline at end of file
python/dune/copasi/cli/cmake_variables.py
#### Docusaurus ####
# Dependencies
doc/docusaurus/node_modules
# Production
doc/docusaurus/build
# Generated files
doc/docusaurus/.docusaurus
doc/docusaurus/.cache-loader
doc/docusaurus/npm-debug.log*
doc/docusaurus/yarn-debug.log*
doc/docusaurus/yarn-error.log*
......@@ -7,84 +7,74 @@ stages:
- system_tests
- deploy
.docker_variables: &docker_variables
image: docker:19.03.1
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
.default_tags: &default_tags
tags:
- "dind"
- "cores:4"
.general_definitions: &general_definitions
.dind_docker_tags: &dind_docker_tags
tags:
- "cores:4"
- "dind"
.global_variables: &global_variables
DUNE_OPTIONS_FILE: /duneci/dune.opts
DUNECONTROL: dunecontrol
BASE_IMAGE_VERSION: v1.0
.docker_variables: &docker_variables
DOCKER_IMAGE: docker:19.03.1
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
# OS setup
.debian_gcc: &debian_gcc
<<: *general_definitions
image: ${CI_REGISTRY}/copasi/dune-copasi/dependencies:debian-gcc-8-17
before_script:
- DUNECI_TOOLCHAIN="gcc-8-17"
- DUNECI_OS="debian"
- DUNECI_BASE_IMAGE=${CI_REGISTRY}/docker/ci/debian:10
- DUNE_COPASI_BASE_IMAGE=${CI_REGISTRY}/copasi/dune-copasi/dependencies:${DUNECI_OS}-${DUNECI_TOOLCHAIN}
- export DUNE_OPTIONS_FILE=/duneci/dune.opts
- export DUNECONTROL=dunecontrol
<<: *global_variables
TOOLCHAIN: gcc-8-17
DUNECI_OS: debian
DUNECI_BASE_IMAGE: ${CI_REGISTRY}/docker/ci/debian:10
DUNE_COPASI_BASE_IMAGE: ${CI_REGISTRY}/copasi/dune-copasi/dependencies:${DUNECI_OS}-${TOOLCHAIN}-${BASE_IMAGE_VERSION}
DEPLOY_LATEST: "true"
.debian_clang: &debian_clang
<<: *general_definitions
image: ${CI_REGISTRY}/copasi/dune-copasi/dependencies:debian-clang-7-libcpp-17
before_script:
- DUNECI_TOOLCHAIN="clang-7-libcpp-17"
- DUNECI_OS="debian"
- DUNECI_BASE_IMAGE=${CI_REGISTRY}/docker/ci/debian:10
- DUNE_COPASI_BASE_IMAGE=${CI_REGISTRY}/copasi/dune-copasi/dependencies:${DUNECI_OS}-${DUNECI_TOOLCHAIN}
- export DUNE_OPTIONS_FILE=/duneci/dune.opts
- export DUNECONTROL=dunecontrol
<<: *global_variables
TOOLCHAIN: clang-6-17
DUNECI_OS: debian
DUNECI_BASE_IMAGE: ${CI_REGISTRY}/docker/ci/debian:10
DUNE_COPASI_BASE_IMAGE: ${CI_REGISTRY}/copasi/dune-copasi/dependencies:${DUNECI_OS}-${TOOLCHAIN}-${BASE_IMAGE_VERSION}
.ubuntu_gcc: &ubuntu_gcc
<<: *general_definitions
image: ${CI_REGISTRY}/copasi/dune-copasi/dependencies:ubuntu-gcc-7-17
before_script:
- DUNECI_TOOLCHAIN="gcc-7-17"
- DUNECI_OS="ubuntu"
- DUNECI_BASE_IMAGE=${CI_REGISTRY}/docker/ci/ubuntu:18.04
- DUNE_COPASI_BASE_IMAGE=${CI_REGISTRY}/copasi/dune-copasi/dependencies:${DUNECI_OS}-${DUNECI_TOOLCHAIN}
- export DUNE_OPTIONS_FILE=/duneci/dune.opts
- export DUNECONTROL=dunecontrol
<<: *global_variables
TOOLCHAIN: gcc-7-17
DUNECI_OS: ubuntu
DUNECI_BASE_IMAGE: ${CI_REGISTRY}/docker/ci/ubuntu:18.04
DUNE_COPASI_BASE_IMAGE: ${CI_REGISTRY}/copasi/dune-copasi/dependencies:${DUNECI_OS}-${TOOLCHAIN}-${BASE_IMAGE_VERSION}
.ubuntu_clang: &ubuntu_clang
<<: *general_definitions
image: ${CI_REGISTRY}/copasi/dune-copasi/dependencies:ubuntu-clang-6-17
before_script:
- DUNECI_TOOLCHAIN="clang-6-17"
- DUNECI_OS="ubuntu"
- DUNECI_BASE_IMAGE=${CI_REGISTRY}/docker/ci/ubuntu:18.04
- DUNE_COPASI_BASE_IMAGE=${CI_REGISTRY}/copasi/dune-copasi/dependencies:${DUNECI_OS}-${DUNECI_TOOLCHAIN}
- export DUNE_OPTIONS_FILE=/duneci/dune.opts
- export DUNECONTROL=dunecontrol
# Stages
<<: *global_variables
TOOLCHAIN: clang-6-17
DUNECI_OS: ubuntu
DUNECI_BASE_IMAGE: ${CI_REGISTRY}/docker/ci/ubuntu:18.04
DUNE_COPASI_BASE_IMAGE: ${CI_REGISTRY}/copasi/dune-copasi/dependencies:${DUNECI_OS}-${TOOLCHAIN}-${BASE_IMAGE_VERSION}
.setup: &setup
<<: *docker_variables
image: ${DOCKER_IMAGE}
stage: setup
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY/copasi/dune-copasi
- echo "$CI_REGISTRY_PASSWORD" | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY/copasi/dune-copasi
- docker build -f docker/dependencies.dockerfile
--build-arg BASE_IMAGE=${DUNECI_BASE_IMAGE}
-t ${CI_REGISTRY}/copasi/dune-copasi/dependencies:${DUNECI_OS}-${DUNECI_TOOLCHAIN} .
- docker push ${CI_REGISTRY}/copasi/dune-copasi/dependencies:${DUNECI_OS}-${DUNECI_TOOLCHAIN}
--build-arg TOOLCHAIN=${TOOLCHAIN}
-t ${DUNE_COPASI_BASE_IMAGE} .
- docker push ${DUNE_COPASI_BASE_IMAGE}
- docker logout $CI_REGISTRY/copasi/dune-copasi
only:
variables:
# Run job if branch is master, job is scheduled or the variable REBUILD_BASE_IMAGE is defined
- $CI_COMMIT_BRANCH == "master"
- $CI_PIPELINE_SOURCE == "schedule"
- $REBUILD_BASE_IMAGE
rules:
- if: '$REBUILD_BASE_IMAGE'
- if: '$CI_COMMIT_TAG'
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
- if: '$CI_COMMIT_BRANCH == "latest"'
<<: *dind_docker_tags
.build: &build
image: ${DUNE_COPASI_BASE_IMAGE}
stage: build
script:
- cd ..
......@@ -93,8 +83,10 @@ stages:
paths:
- build-cmake
expire_in: 30 mins
<<: *default_tags
.unit_tests: &unit_tests
image: ${DUNE_COPASI_BASE_IMAGE}
stage: unit_tests
script:
- echo 'CMAKE_FLAGS+=" -DCMAKE_BUILD_TYPE=Debug"' >> /duneci/cmake-flags/dune_copasi.opts
......@@ -104,8 +96,10 @@ stages:
paths:
- build-cmake/test
expire_in: 1 day
<<: *default_tags
.system_tests: &system_tests
image: ${DUNE_COPASI_BASE_IMAGE}
stage: system_tests
script:
- cd ..
......@@ -115,104 +109,135 @@ stages:
- cd ..
- build-cmake/test
expire_in: 1 day
<<: *default_tags
.deploy: &deploy
<<: *docker_variables
image: ${DOCKER_IMAGE}
stage: deploy
script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY/copasi/dune-copasi
- echo "$CI_REGISTRY_PASSWORD" | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY/copasi/dune-copasi
- DOCKER_TAG="${DUNECI_OS}-${TOOLCHAIN}-${CI_COMMIT_REF_NAME}"
- docker build -f docker/dune-copasi.dockerfile
--build-arg BASE_IMAGE=${DUNE_COPASI_BASE_IMAGE}
--build-arg BRANCH=${CI_COMMIT_REF_NAME}
-t $CI_REGISTRY/copasi/dune-copasi/dune-copasi:${DUNECI_OS}-${DUNECI_TOOLCHAIN}-${CI_COMMIT_REF_NAME} .
- docker push $CI_REGISTRY/copasi/dune-copasi/dune-copasi:${DUNECI_OS}-${DUNECI_TOOLCHAIN}-${CI_COMMIT_REF_NAME}
--build-arg BASE_IMAGE=${DUNE_COPASI_BASE_IMAGE}
--build-arg BRANCH=${CI_COMMIT_REF_NAME}
-t $CI_REGISTRY/copasi/dune-copasi/dune-copasi:${DOCKER_TAG} .
- docker push $CI_REGISTRY/copasi/dune-copasi/dune-copasi:${DOCKER_TAG}
- |
if [ "$CI_COMMIT_BRANCH" == "latest" && $DEPLOY_LATEST ]; then
docker tag $CI_REGISTRY/copasi/dune-copasi/dune-copasi:${DOCKER_TAG} $CI_REGISTRY/copasi/dune-copasi/dune-copasi:latest
docker push $CI_REGISTRY/copasi/dune-copasi/dune-copasi:latest
fi
- docker logout $CI_REGISTRY/copasi/dune-copasi
only:
- master
rules:
- if: '$CI_COMMIT_TAG'
- if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
- if: '$CI_COMMIT_BRANCH == "latest"'
<<: *dind_docker_tags
# debian gcc
setup:debian_gcc:
<<: *debian_gcc
variables:
<<: *docker_variables
<<: *debian_gcc
<<: *setup
build:debian_gcc:
<<: *debian_gcc
variables:
<<: *debian_gcc
<<: *build
dependencies:
- setup:debian_gcc
unit_tests:debian_gcc:
<<: *debian_gcc
variables:
<<: *debian_gcc
<<: *unit_tests
dependencies:
- build:debian_gcc
system_tests:debian_gcc:
<<: *debian_gcc
variables:
<<: *debian_gcc
<<: *system_tests
dependencies:
- build:debian_gcc
deploy:debian_gcc:
<<: *debian_gcc
variables:
<<: *docker_variables
<<: *debian_gcc
<<: *deploy
dependencies:
- system_tests:debian_gcc
# # ubuntu gcc
# setup:ubuntu_gcc:
# <<: *ubuntu_gcc
# variables:
# <<: *docker_variables
# <<: *ubuntu_gcc
# <<: *setup
# build:ubuntu_gcc:
# <<: *ubuntu_gcc
# variables:
# <<: *ubuntu_gcc
# <<: *build
# dependencies:
# - setup:ubuntu_gcc
# unit_tests:ubuntu_gcc:
# <<: *ubuntu_gcc
# variables:
# <<: *ubuntu_gcc
# <<: *unit_tests
# dependencies:
# - build:ubuntu_gcc
# system_tests:ubuntu_gcc:
# <<: *ubuntu_gcc
# variables:
# <<: *ubuntu_gcc
# <<: *system_tests
# dependencies:
# - build:ubuntu_gcc
# deploy:ubuntu_gcc:
# <<: *ubuntu_gcc
# variables:
# <<: *docker_variables
# <<: *ubuntu_gcc
# <<: *deploy
# dependencies:
# - system_tests:ubuntu_gcc
# debian clang
setup:debian_clang:
<<: *debian_clang
variables:
<<: *docker_variables
<<: *debian_clang
<<: *setup
build:debian_clang:
<<: *debian_clang
variables:
<<: *debian_clang
<<: *build
dependencies:
- setup:debian_clang
unit_tests:debian_clang:
<<: *debian_clang
variables:
<<: *debian_clang
<<: *unit_tests
dependencies:
- build:debian_clang
system_tests:debian_clang:
<<: *debian_clang
variables:
<<: *debian_clang
<<: *system_tests
dependencies:
- build:debian_clang
deploy:debian_clang:
<<: *debian_clang
variables:
<<: *docker_variables
<<: *debian_clang
<<: *deploy
dependencies:
- system_tests:debian_clang
......@@ -244,4 +269,4 @@ deploy:debian_clang:
# <<: *ubuntu_clang
# <<: *deploy
# dependencies:
# - system_tests:ubuntu_clang
\ No newline at end of file
# - system_tests:ubuntu_clang
......@@ -2,28 +2,34 @@
_Fill this in_
### Is there something that needs to be double checked?
<!-- Is there something a reviewer should look out for _especially_? -->
<!-- Is there something a reviewer should be aware of or needs to be discussed? -->
_Fill this in_
### Can this MR be accepted?
- [ ] Implemented ...
- [ ] ...
- [ ] Added/Updated tests:
- [ ] ...
- [ ] I've read [`contribution guide`](../../CONTRIBUTING.md)
- [ ] Implemented <!-- Break down the list of new features if possible -->
- [ ] Added/Updated tests
- [ ] Added/Updated documentation
- [ ] Pipelines passing <!-- please check for new warnings -->
<!-- change all occurences of <branch> for your branch name -->
<!-- change all occurences of <branch> for your branch name and uncomment
- [ ] [![Build Status](https://gitlab.dune-project.org/copasi/dune-copasi/badges/<branch>/pipeline.svg)](https://gitlab.dune-project.org/copasi/dune-copasi/pipelines)
- [ ] [![Build Status](https://travis-ci.org/SoilRos/dune-copasi.svg?branch=<branch>)](https://travis-ci.org/SoilRos/dune-copasi/branches)
- [ ] [![Build status](https://ci.appveyor.com/api/projects/status/6605joy2w17qvca8/branch/<branch>?svg=true)](https://ci.appveyor.com/project/SoilRos/dune-copasi/history)
- [ ] [![Build Status](https://travis-ci.org/dune-copasi/dune-copasi.svg?branch=<branch>)](https://travis-ci.org/dune-copasi/dune-copasi/branches)
- [ ] [https://ci.appveyor.com/api/projects/status/e7w7u5dt50kue5sb/branch/<branch>?svg=true](https://ci.appveyor.com/api/projects/status/e7w7u5dt50kue5sb/branch/<branch>?svg=true)
-->
- [ ] Delete branch option set <!-- unless there's a good reason -->
- [ ] Added entry to `CHANGELOG.md`
- [ ] [Fast-forwaded git merge](https://ariya.io/2013/09/fast-forward-git-merge) is possible
<!-- If fast-forward git merge is not possible, rebase this branch onto the
target branch (e.g. master). If you do not know how to do it, ask
maintainer's help or try it out by yourself (just try to keep a copy of
your changes somewhere else since rebasing changes history and things can
get messy for newcomers) -->
- [ ] Added entry to [`CHANGELOG.md`](../../CHANGELOG.md)
### Related issues
Closes #
<!-- For automatic closing, do not forget the commas between issue numbers-->
Closes #
<!--
PLEASE READ THIS!
......@@ -32,6 +38,12 @@ A Merge Request should be associated to a certain task or issue.
Its changes are supposed to be merged into the master branch.
Briefly explain __how__ you achieved the proposal of the task.
MR are supposed to evolve with code.
IMPORTANT: Make sure to set the merge request as Work In Progress (WIP) or Draft
until you want to get the MR to be reviewed by a mantainer.
IMPORTANT: Make sure to set the merge request WIP if you are not finished yet.
It is not necessary to fill everything while the MR is in WIP. Feel free to fill
the required information as you get the feature ready by editing the initial
post.
-->
[submodule "dune/copasi/common/ghc"]
path = ext/ghc
url = https://github.com/gulrak/filesystem
......@@ -32,8 +32,8 @@ before_install:
- gcc --version
- g++ --version
# download muparser, gmp and libtiff as static libraries
- wget "https://github.com/lkeegan/libsbml-static/releases/latest/download/libsbml-static-$TRAVIS_OS_NAME.tgz"
- sudo tar xzvf libsbml-static-$TRAVIS_OS_NAME.tgz -C /
- wget "https://github.com/spatial-model-editor/sme_deps_common/releases/latest/download/sme_deps_common_$TRAVIS_OS_NAME.tgz"
- sudo tar xzvf sme_deps_common_$TRAVIS_OS_NAME.tgz -C /
- cd ..
install:
- echo 'CMAKE_FLAGS+=" -G '"'"'Unix Makefiles'"'"' "' >> dune.opts
......@@ -42,9 +42,10 @@ install:
- echo 'CMAKE_FLAGS+=" -DDUNE_PYTHON_VIRTUALENV_PATH='"$PWD"'/ext/dune-python-venv"' >> dune.opts
- echo 'CMAKE_FLAGS+=" -DCMAKE_DISABLE_FIND_PACKAGE_QuadMath=TRUE -DBUILD_TESTING=OFF"' >> dune.opts
- echo 'CMAKE_FLAGS+=" -DDUNE_USE_ONLY_STATIC_LIBS=ON -DCMAKE_BUILD_TYPE=Release"' >> dune.opts
- echo 'CMAKE_FLAGS+=" -DF77=true -DCMAKE_PREFIX_PATH=/opt/libs"' >> dune.opts
- echo 'CMAKE_FLAGS+=" -Dmuparser_INCLUDE_DIR:PATH=/opt/libs/include -Dmuparser_LIBRARIES:FILEPATH=opt/libs/lib/libmuparser.a"' >> dune.opts
- echo 'CMAKE_FLAGS+=" -DF77=true -DCMAKE_PREFIX_PATH=/opt/smelibs"' >> dune.opts
- echo 'CMAKE_FLAGS+=" -Dmuparser_INCLUDE_DIR:PATH=/opt/smelibs/include -Dmuparser_LIBRARIES:FILEPATH=opt/smelibs/lib/libmuparser.a"' >> dune.opts
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then echo 'CMAKE_FLAGS+=" -DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3"' >> dune.opts; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then echo 'CMAKE_FLAGS+=" -DUSE_FALLBACK_FILESYSTEM=ON"' >> dune.opts ; fi
- echo 'MAKE_FLAGS="-j2 VERBOSE=1"' >> dune.opts
- export DUNE_OPTIONS_FILE="dune.opts"
- export DUNECONTROL=./dune-common/bin/dunecontrol
......
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
......@@ -25,14 +26,37 @@ Types of changes
Security in case of vulnerabilities.
-->
## [Unreleased]
## [Unreleased] ([git-diff][Unreleased-diff])
## [0.3.0] ([git-diff][0.3.0-diff]) - 2020-10-07
### Added
- User documentation !28
- Scape VTK write by omitting `[writer]` section !24
- Added Explicit and Diagonally Runge-Kutta time solvers !25
- 3D simulations are now possible !27
### Changed
- Improved errors when a config file is incorrect !25
- Update meaningful logging values on the test ini file !25
- Clean up logger output !25
- Time stepping is now done outside the model class !25
- Writer might write on different files on request !25
- Move read/write responsibility to model state !25
- States are now independent from models !25
- Output files changed its name scheme !25
- Configuration file changed its structure (see git diff on tests) !25
### Removed
- Coefficient mapper and its use on local operators !25
- Remove the operator map of objects within the model class !25
### Fixed
- Violation of the One-Definition-Rule due to external linkage of `LocalOperatorApply` lambdas !23
- Error on the gaussian equation used on comparisons !23
## [0.2.0] - 2020-02-20
## [0.2.0] ([git-diff][0.2.0-diff]) - 2020-02-20
### Added
- Code documentation
- Data Context concept for factories
- Factory concept for arbitrary object instantiation
- Add factories for finite element and finite element mas
- Add factories for finite element and finite element map
- Brief installation instructions
- Models can interpolate grid functions
- Grid utilities to recognize and mark tripes of entities
......@@ -55,6 +79,10 @@ Types of changes
- [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
- Solver for reaction-diffusion systems in multiple compartments.
[Unreleased]: https://gitlab.dune-project.org/copasi/dune-copasi/compare/v0.2.0...master
[0.2.0]: https://gitlab.dune-project.org/copasi/dune-copasi/compare/v0.1.0...0.2.0
[0.1.0]: https://gitlab.dune-project.org/copasi/dune-copasi/-/tags/v0.1.0
\ No newline at end of file
[Unreleased-diff]: https://gitlab.dune-project.org/copasi/dune-copasi/compare/v0.3.0...master
[0.3.0-diff]: https://gitlab.dune-project.org/copasi/dune-copasi/compare/v0.2.0...v0.3.0
[0.2.0-diff]: https://gitlab.dune-project.org/copasi/dune-copasi/compare/v0.1.0...v0.2.0
[0.3.0]: https://gitlab.dune-project.org/copasi/dune-copasi/-/releases/v0.3.0
[0.2.0]: https://gitlab.dune-project.org/copasi/dune-copasi/-/releases/v0.2.0
[0.1.0]: https://gitlab.dune-project.org/copasi/dune-copasi/-/releases/v0.1.0
......@@ -24,6 +24,14 @@ dune_project()
dune_enable_all_packages()
set(USE_FALLBACK_FILESYSTEM no CACHE BOOL "Use bundled std::filesystem alternative (enable this for macOS older than 10.15)")
if(USE_FALLBACK_FILESYSTEM)
add_subdirectory(ext/ghc)
install(FILES ext/ghc/include/ghc/filesystem.hpp
COMPONENT Development
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/ghc")
endif()
add_subdirectory(src)
add_subdirectory(dune)
add_subdirectory(lib)
......@@ -35,4 +43,4 @@ add_subdirectory(test)
add_subdirectory(cmake/modules)
# finalize the dune project, e.g. generating config.h etc.
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
\ No newline at end of file
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
# Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
*santiago.ospina at uni-heidelberg.de*.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
https://www.contributor-covenant.org/faq. Translations are available at
https://www.contributor-covenant.org/translations.
# Contributing
When contributing to `DuneCopasi`, first discuss the change you wish to make via the
[issue tracker](https://gitlab.dune-project.org/copasi/dune-copasi/-/issues).
Try to do this before anything else. This will greately improve both your and
our experience working together :-). We follow the
[GitLab Workflow](https://about.gitlab.com/blog/2016/10/25/gitlab-workflow-an-overview/)
in our software development cycle and we expet you to be part of it. In short,
contributing single features can be summarized by following these steps:
1. **ISSUE**: Create an issue in our
[Gitlab repository](https://gitlab.dune-project.org/copasi/dune-copasi)
containing a proposal for your modification. We call this a *task*. If your
proposal has a major change, create a *meta-task*, which should divide the
proposal in several tasks. Use a suitable issue template for your proposal.
2. In the created issue, discuss with others the whole idea of your proposal.
This is important because you may get input from someone that know the
software on how to do it effectively, and poimting out considerations you may
have missed. It also syncronizes ideas so that changes are more easily
accepted.
3. **CODE**: Implement what you proposed :-) in a new branch.
4. Create a [Merge Request (MR)](https://docs.gitlab.com/ee/gitlab-basics/add-merge-request.html)
using suitable template. Mark the MR as
[*Work In Progres* (WIP)](https://docs.gitlab.com/ee/user/project/merge_requests/work_in_progress_merge_requests.html)
until is sent to review for approval. MR differ from issues in that MR
discuss *how* to implement the idea rather than the idea itself. A MR is
filled of technical details that ensure that the *task* idea is fullfiled.
5. **COMMIT**: In the MR, discuss with others the details of your
implementation. If discussions show that your proposal has to be modified to
be accepted, push new commits and update the MR with the new technical
details.
6. If applicable, create a
[unit test](https://en.wikipedia.org/wiki/Unit_testing) that proves that your
implementation has the expected behavior. Ensure that the created test is
being run by the [Gitlab CI](https://docs.gitlab.com/ee/ci/pipelines.html).
7. **TEST**: Once implementation and test are finished, ensure that your MR is
passing the different [pipelines](https://gitlab.dune-project.org/copasi/dune-copasi/-/tree/master/.ci).
8. Update the [CHANGELOG](CHANGELOG.md) with changes to the interface. It
must include a link to the associated MR and a short description that
summarizes the changes.
9. **REVIEW**: Send the MR to review for approval unmarking the WIP and
assigning a maintainer to review your modification.
Check out our [code of conduct](CODE_OF_CONDUCT.md), please follow it in our interactions.
[![Build Status](https://gitlab.dune-project.org/copasi/dune-copasi/badges/master/pipeline.svg)](https://gitlab.dune-project.org/copasi/dune-copasi/pipelines)
[![Build Status](https://travis-ci.org/SoilRos/dune-copasi.svg?branch=master)](https://travis-ci.org/SoilRos/dune-copasi)
[![Build status](https://ci.appveyor.com/api/projects/status/6605joy2w17qvca8/branch/master?svg=true)](https://ci.appveyor.com/project/SoilRos/dune-copasi/history)
[![Build Status](https://travis-ci.org/dune-copasi/dune-copasi.svg?branch=master)](https://travis-ci.org/dune-copasi/dune-copasi)
[![Build status](https://ci.appveyor.com/api/projects/status/e7w7u5dt50kue5sb/branch/master?svg=true)](https://ci.appveyor.com/project/SoilRos/dune-copasi-3gv18/branch/master)
[![Netlify Status](https://api.netlify.com/api/v1/badges/6fc6d371-87df-49b5-8e72-e1873fa5d54b/deploy-status)](https://app.netlify.com/sites/dune-copasi/deploys)
# dune-copasi
# DuneCopasi
Solver for reaction-diffusion systems in multiple compartments
......@@ -11,230 +12,8 @@ Solver for reaction-diffusion systems in multiple compartments
* Neumann flux at the interface of compartments for variables with
the same name on the two compartments
* Easy to modify configuration file
* Initial conditions can be a TIFF file or a math expression
* Solved using the finite element or finite volume method
* Initial conditions can be a TIFF file or/and a math expression
* Using the finite element
* Output in the VTK format
* Currently it only supports 2D simulations
This project is made under the umbrella of the
[*Distributed and Unified Numerics Environment* `DUNE`](https://www.dune-project.org/) and the
[*Biochemical System Simulator* `COPASI`](http://copasi.org/).
Altought the rationale of the design is always driven by biochemical process (e.g. cell biology),
this software is not limited to this scope and can be used for other processes involving reaction-diffusion systems.
## Graphical User Interface for SBML files
For those working in bio-informatics there exist a grafical user interface for [`SBML`](https://en.wikipedia.org/wiki/SBML) files!
The GUI is able to convert non-spatial SBML models of bio-chemical reactions into
2D spatial models, and to simulate them with `dune-copasi`:
https://github.com/lkeegan/spatial-model-editor
## Installation
This requires that you have installed the following packages before the actual installation of `dune-copasi`.
| Software | Version/Branch | Comments |
| ---------| -------------- | -------- |
| [CMake](https://cmake.org/) | 3.1 |
| C++ compiler | [C++17](https://en.wikipedia.org/wiki/List_of_compilers#C++_compilers) |
| [libTIFF](http://www.libtiff.org/) | 3.6.1 |
| [muParser](https://beltoforion.de/article.php?a=muparser) | 2.2.5 |
| [dune-common](https://gitlab.dune-project.org/copasi/dune-common) | releases/2.7 | https://gitlab.dune-project.org/core/dune-common
| [dune-geometry](https://gitlab.dune-project.org/core/dune-geometry) | releases/2.7 | https://gitlab.dune-project.org/core/dune-geometry
| [dune-grid](https://gitlab.dune-project.org/core/dune-grid) | releases/2.7 | https://gitlab.dune-project.org/core/dune-grid
| [dune-uggrid](https://gitlab.dune-project.org/staging/dune-uggrid) | releases/2.7 | https://gitlab.dune-project.org/staging/dune-uggrid
| [dune-istl](https://gitlab.dune-project.org/core/dune-istl) | releases/2.7 | https://gitlab.dune-project.org/core/dune-istl
| [dune-localfunctions](https://gitlab.dune-project.org/core/dune-localfunctions) | releases/2.7 | https://gitlab.dune-project.org/core/dune-localfunctions
| [dune-functions](https://gitlab.dune-project.org/staging/dune-functions) | releases/2.7 | https://gitlab.dune-project.org/staging/dune-functions
| [dune-logging](https://gitlab.dune-project.org/staging/dune-logging) | support/dune-copasi (recursive) | https://gitlab.dune-project.org/copasi/dune-logging
| [dune-typetree](https://gitlab.dune-project.org/copasi/dune-typetree) | support/dune-copasi | https://gitlab.dune-project.org/copasi/dune-typetree
| [dune-pdelab](https://gitlab.dune-project.org/copasi/dune-pdelab) | support/dune-copasi | https://gitlab.dune-project.org/copasi/dune-pdelab
| [dune-multidomaingrid](https://gitlab.dune-project.org/copasi/dune-multidomaingrid) | support/dune-copasi | https://gitlab.dune-project.org/copasi/dune-multidomaingrid
The first four can be obtained by your prefered package manager in unix-like operating systems. e.g.
```bash
# if you are in a debian/ubuntu OS
apt update
apt install cmake gcc g++ libtiff-dev libmuparser-dev git
# if you are in a macOS
xcode-select --install # Apple Command Line Tools
brew update
brew install cmake gcc libtiff muparser git
```
Now, the dune modules (including `dune-copasi`) can be all checkout in a same folder and be installed in one go.
```bash
# prepare a folder to download and build dune modules
mkdir ~/dune-modules && cd ~/dune-modules
# fetch dependencies & dune-copasi in ~/dune-modules folder
git clone -b releases/2.7 https://gitlab.dune-project.org/core/dune-common
git clone -b releases/2.7 https://gitlab.dune-project.org/core/dune-geometry
git clone -b releases/2.7 https://gitlab.dune-project.org/core/dune-grid
git clone -b releases/2.7 https://gitlab.dune-project.org/staging/dune-uggrid
git clone -b releases/2.7 https://gitlab.dune-project.org/core/dune-istl
git clone -b releases/2.7 https://gitlab.dune-project.org/core/dune-localfunctions
git clone -b releases/2.7 https://gitlab.dune-project.org/staging/dune-functions
git clone -b support/dune-copasi --recursive https://gitlab.dune-project.org/copasi/dune-logging
git clone -b support/dune-copasi https://gitlab.dune-project.org/copasi/dune-typetree
git clone -b support/dune-copasi https://gitlab.dune-project.org/copasi/dune-pdelab
git clone -b support/dune-copasi https://gitlab.dune-project.org/copasi/dune-multidomaingrid
git clone -b master https://gitlab.dune-project.org/copasi/dune-copasi
# configure and build dune modules
./dune-common/bin/dunecontrol make all
# install dune-copasi (this operation may requiere sudo)
./dune-common/bin/dunecontrol --only=dune-copasi bexec make install
# if you do not want to install dune-copasi system-wide, you can set
# the CMAKE_INSTALL_PREFIX to a non restricted folder
# see https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html
# remove source and build files
cd .. && rm -r ~/dune-modules
```
For further info on dune module installation process, please check out
the [dune-project web page](https://www.dune-project.org/doc/installation/)
## Usage
If you installed `dune-copasi` system-wide, you should be able to call the program
`dune_copasi_md` from your command line accompained with a configuration file.
```bash
dune_copasi_md config.ini
```
### Configuration File
The configuration file follows [INI file format](https://en.wikipedia.org/wiki/INI_file).
It should contain at least two sections: `grid`, and `model`, whereas a third section
`logging` is optional.
#### Grid
The grid section is fairly simple as it only contains the path to a [gmsh file](http://gmsh.info/)
and its initial refinement level:
```ini
[grid]
file = my_gmsh_file.msh
initial_level = 1
```
The grid should be formed by 2D traingles and squares where each *physical group* can only
only be formed by one of these type. That is, each *physical group* can have different types of
geometries, but whithin each *physical group* there cannot be more than one type. The GMSH file
should be v2 and it should not contain the *physical group* identifiers at the begining of the file
(this is a bug in the `dune-grid` reader).
#### Model
The model section starts with the definitions of the simulation time interval
and the polynomal order of the local finite element (currently only supports `0`, `1` and `2`),
where `0` refers for finite volume and higher for continuous galerking methods. This order refers
to the domains composed with triangles. Domains compose with squares are always solved with the
finite volume method.
```ini
[model]
begin_time = 0.
end_time = 10
time_step = 0.1
order = 1
```
The following is the definition of the compartments of the model.
Each compartment corresponds to a *physical group* in the gmsh jargon.
Although the gmsh format allows you to name such physical groups,
we still need to assign them to a `dune-copasi` compartmet and for that
we use the *physical group* index. Notice that `dune-copasi` uses 0-based
indices while `gmsh` uses 1-based indices. In other words,
`<gmsh_physical_group> = <dune_copasi_compartment> + 1`.
Let's say for example that there is two *physical groups* in our gmsh file
and we are going to use them as `nucleous` and `cytoplasm` compartments:
```ini
[model.compartments]
# nucleous corresponds to the physical group 1 in the gmsh file
nucleous = 0
# cytoplasm corresponds to the physical group 2 in the gmsh file
cytoplasm = 0
```
Now, each of these compartments will define its own initial conditions,
its diffusion-reaction system, and its vtk writter. For that, you have to expand
the `model` section with the defined compartments, e.g. `model.nucleous` or `model.cytoplasm`.
The subsection `initial`, `reaction`, `diffusion` and `operator` define the system variables
and its properties. You can put as many variables as desired as long as they are the same
in this three subsections. Notice that each variable defines a new diffusion-reaction partial
differential equation associated with it.
* The `initial` subsection allow the initialization of each of the variables.
* The `diffusion` subsection defines the diffusion coefficient math
expression associated with each variable. It may only depend on the grid coordinates `x` and `y`.
* The `reaction` subsection defines the reaction part of each equation in the PDE.
Since this is the souce of non-linearities, it allows to be dependent on other defined variables
within the compartment. This section has to include yet another subsection called `jacobian`.
* The `reaction.jacobian` subsection must describe the
[jacobian matrix](https://en.wikipedia.org/wiki/Jacobian_matrix_and_determinant)
of the `reaction` part. It must follow the syntax of `d<var_i>_d<var_j>`, which
reads as the *partial derivate of `<var_i>` with respect to `<var_j>`*.
* The `operator` subsection is an experimental feature and we recommend to set all variables to the
same index, e.g. 0.
* Finally, the subsection `writer` will define the file name for the vtk output.
For example, the following `mode.nucleous` section defines a [Gray-Scott
model with `F=0.0420` and `k=0.0610`](http://mrob.com/pub/comp/xmorphia/F420/F420-k610.html):
```ini
[model.nucleous.initial]
u = 0.5
v = (x>0) && (x<0.5) && (y>0.) && (y<0.5) ? 1 : 0
[model.nucleous.diffusion]
u = 2e-5
v = 2e-5/2
[model.nucleous.reaction]
u = -u*v^2+0.0420*(1-u)
v = u*v^2-(0.0420+0.0610)*v
[model.nucleous.reaction.jacobian]
du_du = -v^2-0.0420
du_dv = -2*u*v
dv_du = v^2
dv_dv = 2*u*v-(0.0420+0.0610)
[model.nucleous.operator]
u = 0
v = 0
[model.nucleous.writer]
file_name = nucleous_output
```
The `model.cytoplasm` would have to be defined in similar way. An important aspect when working
with different compartments is the interface fluxes. In `dune-copasi` thex fluxes are set
automatically to [dirichlet-dirichlet](https://en.wikipedia.org/wiki/Dirichlet_boundary_condition)
boundary conditions iff the variable is shared between the two intersecting domains. Further
improvements will come for interface treatment.
#### Logging
The logging settings are directly forwarded to the `dune-logging` module. Please check
its doxygen documentation for detailed information. A simple configuration is the following:
```ini
[logging]
# possible levels: off, critical, error, waring, notice, info, debug, trace, all
default.level = trace
[logging.sinks.stdout]
pattern = [{reldays:0>2}-{reltime:8%T}] [{backend}] {msg}
```
\ No newline at end of file
Get started [here](https://dune-copasi.netlify.app/docs/).
0.2.0
\ No newline at end of file
0.3.0
......@@ -7,14 +7,9 @@ clone_folder: C:\msys64\home\appveyor\dune-copasi
install:
- set PATH=C:\msys64\usr\bin;%PATH%
# download muparser, gmp and libtiff as static libraries: install to C:\libs
- mkdir temp
- cd temp
- appveyor DownloadFile "https://github.com/lkeegan/libsbml-static/releases/latest/download/libsbml-static-windows.zip"
- 7z x libsbml-static-windows.zip
- mkdir C:\libs
- mv include C:\libs\.
- mv lib C:\libs\.
- dir "C:\libs"
- appveyor DownloadFile "https://github.com/spatial-model-editor/sme_deps_common/releases/latest/download/sme_deps_common_win64.tgz"
- tar xf sme_deps_common_win64.tgz -C /
- dir "C:\smelibs"
- cd C:\msys64\home\appveyor
before_build:
......@@ -23,11 +18,11 @@ before_build:
- echo CMAKE_FLAGS+=" -DCMAKE_DISABLE_FIND_PACKAGE_QuadMath=TRUE" >> C:\msys64\home\appveyor\dune.txt
- echo CMAKE_FLAGS+=" -DBUILD_TESTING=OFF -DDUNE_USE_ONLY_STATIC_LIBS=ON " >> C:\msys64\home\appveyor\dune.txt
- echo CMAKE_FLAGS+=" -DF77=true -DCMAKE_CXX_FLAGS='-Wa,-mbig-obj -static -static-libgcc -static-libstdc++' " >> C:\msys64\home\appveyor\dune.txt
- echo CMAKE_FLAGS+=" -DGMPXX_INCLUDE_DIR:PATH=C:/libs/include " >> C:\msys64\home\appveyor\dune.txt
- echo CMAKE_FLAGS+=" -DGMPXX_LIB:FILEPATH=C:/libs/lib/libgmpxx.a " >> C:\msys64\home\appveyor\dune.txt
- echo CMAKE_FLAGS+=" -DGMP_LIB:FILEPATH=C:/libs/lib/libgmp.a " >> C:\msys64\home\appveyor\dune.txt
- echo CMAKE_FLAGS+=" -DCMAKE_PREFIX_PATH=C:/libs " >> C:\msys64\home\appveyor\dune.txt
- echo CMAKE_FLAGS+=" -Dfmt_ROOT=C:/libs " >> C:\msys64\home\appveyor\dune.txt
- echo CMAKE_FLAGS+=" -DGMPXX_INCLUDE_DIR:PATH=C:/smelibs/include " >> C:\msys64\home\appveyor\dune.txt
- echo CMAKE_FLAGS+=" -DGMPXX_LIB:FILEPATH=C:/smelibs/lib/libgmpxx.a " >> C:\msys64\home\appveyor\dune.txt
- echo CMAKE_FLAGS+=" -DGMP_LIB:FILEPATH=C:/smelibs/lib/libgmp.a " >> C:\msys64\home\appveyor\dune.txt
- echo CMAKE_FLAGS+=" -DCMAKE_PREFIX_PATH=C:/smelibs " >> C:\msys64\home\appveyor\dune.txt
- echo CMAKE_FLAGS+=" -Dfmt_ROOT=C:/smelibs " >> C:\msys64\home\appveyor\dune.txt
- echo MAKE_FLAGS="-j2 VERBOSE=1" >> C:\msys64\home\appveyor\dune.txt
- type C:\msys64\home\appveyor\dune.txt
- set DUNE_OPTIONS_FILE=dune.txt
......
......@@ -2,3 +2,4 @@
find_package (muparser REQUIRED)
find_package (TIFF REQUIRED)
find_package (Filesystem)
\ No newline at end of file
# https://github.com/vector-of-bool/CMakeCM/blob/master/modules/FindFilesystem.cmake
# commit 6cb8a6ada09eb40c271d2f83a032e03cd4005fa3
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#[=======================================================================[.rst:
FindFilesystem
##############
This module supports the C++17 standard library's filesystem utilities. Use the
:imp-target:`std::filesystem` imported target to
Options
*******
The ``COMPONENTS`` argument to this module supports the following values:
.. find-component:: Experimental
:name: fs.Experimental
Allows the module to find the "experimental" Filesystem TS version of the
Filesystem library. This is the library that should be used with the
``std::experimental::filesystem`` namespace.
.. find-component:: Final
:name: fs.Final
Finds the final C++17 standard version of the filesystem library.
If no components are provided, behaves as if the
:find-component:`fs.Final` component was specified.
If both :find-component:`fs.Experimental` and :find-component:`fs.Final` are
provided, first looks for ``Final``, and falls back to ``Experimental`` in case
of failure. If ``Final`` is found, :imp-target:`std::filesystem` and all
:ref:`variables <fs.variables>` will refer to the ``Final`` version.
Imported Targets
****************
.. imp-target:: std::filesystem
The ``std::filesystem`` imported target is defined when any requested
version of the C++ filesystem library has been found, whether it is
*Experimental* or *Final*.
If no version of the filesystem library is available, this target will not
be defined.
.. note::
This target has ``cxx_std_17`` as an ``INTERFACE``
:ref:`compile language standard feature <req-lang-standards>`. Linking
to this target will automatically enable C++17 if no later standard
version is already required on the linking target.
.. _fs.variables:
Variables
*********
.. variable:: CXX_FILESYSTEM_IS_EXPERIMENTAL
Set to ``TRUE`` when the :find-component:`fs.Experimental` version of C++
filesystem library was found, otherwise ``FALSE``.
.. variable:: CXX_FILESYSTEM_HAVE_FS
Set to ``TRUE`` when a filesystem header was found.
.. variable:: CXX_FILESYSTEM_HEADER
Set to either ``filesystem`` or ``experimental/filesystem`` depending on
whether :find-component:`fs.Final` or :find-component:`fs.Experimental` was
found.
.. variable:: CXX_FILESYSTEM_NAMESPACE
Set to either ``std::filesystem`` or ``std::experimental::filesystem``
depending on whether :find-component:`fs.Final` or
:find-component:`fs.Experimental` was found.
Examples
********
Using `find_package(Filesystem)` with no component arguments:
.. code-block:: cmake
find_package(Filesystem REQUIRED)
add_executable(my-program main.cpp)
target_link_libraries(my-program PRIVATE std::filesystem)
#]=======================================================================]
if(TARGET std::filesystem)
# This module has already been processed. Don't do it again.
return()
endif()
cmake_minimum_required(VERSION 3.10)
include(CMakePushCheckState)
include(CheckIncludeFileCXX)
# If we're not cross-compiling, try to run test executables.
# Otherwise, assume that compile + link is a sufficient check.
if(CMAKE_CROSSCOMPILING)
include(CheckCXXSourceCompiles)
macro(_cmcm_check_cxx_source code var)
check_cxx_source_compiles("${code}" ${var})
endmacro()
else()
include(CheckCXXSourceRuns)
macro(_cmcm_check_cxx_source code var)
check_cxx_source_runs("${code}" ${var})
endmacro()
endif()
cmake_push_check_state()
set(CMAKE_REQUIRED_QUIET ${Filesystem_FIND_QUIETLY})
# All of our tests required C++17 or later
set(CMAKE_CXX_STANDARD 17)
# Normalize and check the component list we were given
set(want_components ${Filesystem_FIND_COMPONENTS})
if(Filesystem_FIND_COMPONENTS STREQUAL "")
set(want_components Final)
endif()
# Warn on any unrecognized components
set(extra_components ${want_components})
list(REMOVE_ITEM extra_components Final Experimental)
foreach(component IN LISTS extra_components)
message(WARNING "Extraneous find_package component for Filesystem: ${component}")
endforeach()
# Detect which of Experimental and Final we should look for
set(find_experimental TRUE)
set(find_final TRUE)
if(NOT "Final" IN_LIST want_components)
set(find_final FALSE)
endif()
if(NOT "Experimental" IN_LIST want_components)
set(find_experimental FALSE)
endif()
if(find_final)
check_include_file_cxx("filesystem" _CXX_FILESYSTEM_HAVE_HEADER)
mark_as_advanced(_CXX_FILESYSTEM_HAVE_HEADER)
if(_CXX_FILESYSTEM_HAVE_HEADER)
# We found the non-experimental header. Don't bother looking for the
# experimental one.
set(find_experimental FALSE)
endif()
else()
set(_CXX_FILESYSTEM_HAVE_HEADER FALSE)
endif()
if(find_experimental)
check_include_file_cxx("experimental/filesystem" _CXX_FILESYSTEM_HAVE_EXPERIMENTAL_HEADER)
mark_as_advanced(_CXX_FILESYSTEM_HAVE_EXPERIMENTAL_HEADER)
else()
set(_CXX_FILESYSTEM_HAVE_EXPERIMENTAL_HEADER FALSE)
endif()
if(_CXX_FILESYSTEM_HAVE_HEADER)
set(_have_fs TRUE)
set(_fs_header filesystem)
set(_fs_namespace std::filesystem)
set(_is_experimental FALSE)
elseif(_CXX_FILESYSTEM_HAVE_EXPERIMENTAL_HEADER)
set(_have_fs TRUE)
set(_fs_header experimental/filesystem)
set(_fs_namespace std::experimental::filesystem)
set(_is_experimental TRUE)
else()
set(_have_fs FALSE)
endif()
set(CXX_FILESYSTEM_HAVE_FS ${_have_fs} CACHE BOOL "TRUE if we have the C++ filesystem headers")
set(CXX_FILESYSTEM_HEADER ${_fs_header} CACHE STRING "The header that should be included to obtain the filesystem APIs")
set(CXX_FILESYSTEM_NAMESPACE ${_fs_namespace} CACHE STRING "The C++ namespace that contains the filesystem APIs")
set(CXX_FILESYSTEM_IS_EXPERIMENTAL ${_is_experimental} CACHE BOOL "TRUE if the C++ filesystem library is the experimental version")
set(_found FALSE)
if(CXX_FILESYSTEM_HAVE_FS)
# We have some filesystem library available. Do link checks
string(CONFIGURE [[
#include <cstdlib>
#include <@CXX_FILESYSTEM_HEADER@>
int main() {
auto cwd = @CXX_FILESYSTEM_NAMESPACE@::current_path();
printf("%s", cwd.c_str());
return EXIT_SUCCESS;
}
]] code @ONLY)
# Check a simple filesystem program without any linker flags
_cmcm_check_cxx_source("${code}" CXX_FILESYSTEM_NO_LINK_NEEDED)
set(can_link ${CXX_FILESYSTEM_NO_LINK_NEEDED})
if(NOT CXX_FILESYSTEM_NO_LINK_NEEDED)
set(prev_libraries ${CMAKE_REQUIRED_LIBRARIES})
# Add the libstdc++ flag
set(CMAKE_REQUIRED_LIBRARIES ${prev_libraries} -lstdc++fs)
_cmcm_check_cxx_source("${code}" CXX_FILESYSTEM_STDCPPFS_NEEDED)
set(can_link ${CXX_FILESYSTEM_STDCPPFS_NEEDED})
if(NOT CXX_FILESYSTEM_STDCPPFS_NEEDED)
# Try the libc++ flag
set(CMAKE_REQUIRED_LIBRARIES ${prev_libraries} -lc++fs)
_cmcm_check_cxx_source("${code}" CXX_FILESYSTEM_CPPFS_NEEDED)
set(can_link ${CXX_FILESYSTEM_CPPFS_NEEDED})
endif()
endif()
if(can_link)
add_library(std::filesystem INTERFACE IMPORTED)
set_property(TARGET std::filesystem APPEND PROPERTY INTERFACE_COMPILE_FEATURES cxx_std_17)
set(_found TRUE)
if(CXX_FILESYSTEM_NO_LINK_NEEDED)
# Nothing to add...
elseif(CXX_FILESYSTEM_STDCPPFS_NEEDED)
set_property(TARGET std::filesystem APPEND PROPERTY INTERFACE_LINK_LIBRARIES -lstdc++fs)
elseif(CXX_FILESYSTEM_CPPFS_NEEDED)
set_property(TARGET std::filesystem APPEND PROPERTY INTERFACE_LINK_LIBRARIES -lc++fs)
endif()
endif()
endif()
cmake_pop_check_state()
set(Filesystem_FOUND ${_found} CACHE BOOL "TRUE if we can run a program using std::filesystem" FORCE)
if(Filesystem_FIND_REQUIRED AND NOT Filesystem_FOUND)
message(FATAL_ERROR "Cannot run simple program using std::filesystem")
endif()
[![Netlify Status](https://api.netlify.com/api/v1/badges/6fc6d371-87df-49b5-8e72-e1873fa5d54b/deploy-status)](https://app.netlify.com/sites/dune-copasi/deploys)
# DuneCopasi Website
This website is built using [Docusaurus 2](https://v2.docusaurus.io/), a modern static website generator.
### Installation
```
$ yarn
```
### Local Development
```
$ yarn start
```
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
### Build
```
$ yarn build
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.
### Deployment
This is automatically done by Netlify on every branch of the GitHub mirror. See
https://app.netlify.com/teams/soilros/builds/.
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
---
id: xx
title: Xx Xx
author: Xx Xx
author_title: Xx Xx
author_url: https://x.com/
author_image_url: https://x.com/
tags: [xx, yy]
---
---
id: about
title: About
sidebar_label: About
---
`DuneCopasi` is a library that provides numerical solutions of
reaction-diffusion systems on single and multiple compartments. We do so by
providing [C++ classes](api.md) that represent a solution state as well as the
means to evolve them with respect to time. We also provide **ready-to-use**
executables able to perform forward simulations. Both classes and executables
shall be configured using a [Parameter Tree](param_tree.md).