Commit 2bac83d8 authored by Lukas Riedel's avatar Lukas Riedel

Merge branch 'update/dune-v2.5.1' into feature/sphinx-doc-fix

parents 5a290dd4 8206188f
image: dorie/dune-env:2.5
image: dorie/dune-env:2.5.1
variables:
DUNE_CONTROL_PATH: /opt/dune:$CI_PROJECT_DIR
......@@ -14,7 +14,7 @@ build:main:
tags:
- docker
script:
- MAKE_FLAGS="-j 2" ./dune-common/bin/dunecontrol --only=dorie all
- CMAKE_FLAGS="-DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" MAKE_FLAGS="-j 2" ./dune-common/bin/dunecontrol --only=dorie all
- export PATH=/opt/dune/dorie/build-cmake/bin:$PATH
- ARGS="--output-on-failure -j 2" ./dune-common/bin/dunecontrol --only=dorie make test
- ./dune-common/bin/dunecontrol --only=dorie make doc
......@@ -25,25 +25,13 @@ build:main:
- $CI_PROJECT_DIR/build-cmake/doc/html/
expire_in: 1 week
build:python3:
tags:
- docker
script:
- ./dune-common/bin/dunecontrol --only=dune-python exec "rm -rf build-cmake"
- ./dune-common/bin/dunecontrol --only=dune-testtools exec "rm -rf build-cmake"
- ./dune-common/bin/dunecontrol --only=dorie exec "rm -rf build-cmake"
- CMAKE_FLAGS="-DDUNE_FORCE_PYTHON3=True" MAKE_FLAGS="-j 2" ./dune-common/bin/dunecontrol --module=dorie all
- export PATH=/opt/dune/dorie/build-cmake/bin:$PATH
- ARGS="--output-on-failure -j 2" ./dune-common/bin/dunecontrol --only=dorie make test
stage: build
build:update_dune:
tags:
- docker
script:
- ./dune-common/bin/dunecontrol update || true
- ./dune-common/bin/dunecontrol exec "rm -rf build-cmake"
- MAKE_FLAGS="-j 2" ./dune-common/bin/dunecontrol all
- CMAKE_FLAGS="-DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" MAKE_FLAGS="-j 2" ./dune-common/bin/dunecontrol all
- export PATH=/opt/dune/dorie/build-cmake/bin:$PATH
- ARGS="--output-on-failure -j 2" ./dune-common/bin/dunecontrol --only=dorie make test
stage: build
......@@ -52,7 +40,7 @@ build:debug:
tags:
- docker
script:
- CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug" ./dune-common/bin/dunecontrol --only=dorie all
- CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug -DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" ./dune-common/bin/dunecontrol --only=dorie all
stage: build
deploy:docs:
......
FROM dorie/dune-env:2.5
FROM dorie/dune-env:2.5.1
MAINTAINER Dion Häfner
WORKDIR /opt/dune
ADD . /opt/dune/dorie/
RUN source /opt/dune/venv/dorie/bin/activate && ./dune-common/bin/dunecontrol --only=dorie all
RUN CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release -DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" ./dune-common/bin/dunecontrol --only=dorie all
ENV PATH="/opt/dune/dorie/build-cmake/bin:${PATH}"
WORKDIR /sim
ENTRYPOINT ["/opt/dune/dorie/build-cmake/bin/dorie"]
\ No newline at end of file
......@@ -34,18 +34,13 @@ In the section 'Usage' you will find a list of possible commands. Note that inpu
## Docker Installation - Interactive Setup
This setup is intended for advanced users. You will gain access to the DORiE module outside the container, and be able to make changes to the source code.
We have prepared a [DORiE DUNE Environment Image on Dockerhub](https://hub.docker.com/r/dorie/dune-env/), which is a modified image of the Ubuntu OS that has all dependencies readily installed. The current version is 2.5 (referencing the DUNE module version 2.5).
Run a new container from this image by calling
We have prepared a [DORiE DUNE Environment Image on Dockerhub](https://hub.docker.com/r/dorie/dune-env/), which is a modified image of the Ubuntu OS that has all dependencies readily installed. The current version is 2.5.1 (referencing the DUNE module version 2.5). We will run a new container from this image and mount some local directory `<hostdir>/dorie` into it by calling
docker run -i -t dorie/dune-env:2.5 /bin/bash
docker run -v <hostdir>/dorie:/opt/dune/dorie -i -t dorie/dune-env:2.5.1 /bin/bash
Docker will automatically download the image if necessary. Use the `-v` option of the `run` command to mount a local directory into the container:
Docker will automatically download the image if necessary. Now you can access the content of the (still empty) folder of the virtual machine from your local `<hostdir>/dorie` directory. *Mounting directories is not possible after your container has been started!*
-v <hostdir/dorie>:/opt/dune/dorie
This way, you can access the content of the (still empty) folder of the virtual machine from your local `<hostdir>/dorie` directory. *Mounting directories is not possible after your container has been started!*
Next, use `git clone` to download the DORiE repository into the shared folder. Enter the container, and execute
Next, use `git clone` to download the DORiE repository into the shared (mounted) folder. Enter the container, and execute
dunecontrol --only=dorie all
......@@ -58,7 +53,7 @@ to build in parallel on `N` processes. Lastly, install the DORiE binaries by cal
dunecontrol --only=dorie make install
### Update DUNE
The DUNE modules in the repository might be outdated. You can update to the newest versions by calling
The DUNE modules (as well as DORiE itself) in the repository might be outdated. You can update to the newest versions by calling
dunecontrol update
......@@ -87,7 +82,7 @@ Depending on your system configuration, there will be more packages necessary to
| pip | 2.7 or 3.x |
| MPI | | Tested with OpenMPI
| SuperLU | 4.3 or 5.x |
| VirtualEnv | | Install via `pip` |
| VirtualEnv | | For Python 2 only. Install via `pip` |
| [dune-common](https://gitlab.dune-project.org/core/dune-common) | releases/2.5
| [dune-geometry](https://gitlab.dune-project.org/core/dune-geometry) | releases/2.5
| [dune-grid](https://gitlab.dune-project.org/core/dune-grid) | releases/2.5
......@@ -97,10 +92,18 @@ Depending on your system configuration, there will be more packages necessary to
| [dune-functions](https://gitlab.dune-project.org/staging/dune-functions) | releases/2.5
| [dune-typetree](https://gitlab.dune-project.org/staging/dune-typetree) | releases/2.5
| [dune-pdelab](https://gitlab.dune-project.org/pdelab/dune-pdelab) | releases/2.5
| [dune-python](https://gitlab.dune-project.org/quality/dune-python) | releases/2.5
| [dune-testtools](https://gitlab.dune-project.org/quality/dune-testtools) | releases/2.5
| [dune-testtools](https://gitlab.dune-project.org/quality/dune-testtools) | master
### Optional Packages
| Software | Version/Branch | Comments |
| ---------| -------------- | -------- |
| [doxygen](http://www.stack.nl/~dimitri/doxygen/) | | Builds documentation
| [Sphinx](http://www.sphinx-doc.org/en/stable/) | | Builds documentation
| [Breathe](https://github.com/michaeljones/breathe) | | Builds documentation
| [METIS](http://glaros.dtc.umn.edu/gkhome/views/metis) | 5 | For parallel runs
| [ParMETIS](http://glaros.dtc.umn.edu/gkhome/views/metis) | 4 | For parallel runs
If you also want to build the documentation, you will additionally need to install Doxygen, Sphinx and Breathe.
### Step-by-step Instructions
These instructions are suitable for a clean **Ubuntu** or **Mac OS X** setup. The main difference between the two systems is the package manager. Debian-based systems have the APT manager already built in. On Mac, we recommend installing [Homebrew](http://brew.sh/). If you prefer to use [MacPorts](https://www.macports.org/), you need to check if some of the packages require different installation options than displayed here.
......@@ -110,55 +113,57 @@ These instructions are suitable for a clean **Ubuntu** or **Mac OS X** setup. Th
**Ubuntu:**
apt update
apt install autoconf bison cmake flex gcc-5 g++-5 gfortran-5 \
apt install cmake doxygen gcc-5 g++-5 gfortran-5 \
git libatlas-base-dev libfftw3-dev libfftw3-mpi-dev \
libfreetype6-dev libhdf5-mpi-dev libopenmpi-dev libpng-dev \
libsuperlu-dev libxft-dev python-dev python-pip python-sphinx \
python-breathe doxygen
libsuperlu-dev libxft-dev python3-dev python3-pip
**Mac OS X:**
brew update
brew install automake cmake doxygen gcc libtool libpng open-mpi \
brew install cmake doxygen gcc libpng open-mpi \
pkg-config python3 superlu
brew install hdf5 --with-mpi
brew install fftw --with-mpi
2. Install the necessary Python packages using `pip`:
1. The parallel linear solver of DORiE can make use of the ParMETIS package. If you want to run DORiE in parallel on multiple processes, additionally install METIS and ParMETIS:
**Ubuntu:**
python -m pip install virtualenv
apt install libmetis-dev libparmetis-dev
**Mac OS X:**
sudo -H python3 -m pip install virtualenv sphinx breathe
brew install metis parmetis
**Parallel runs without these two packages are possible but not supported!**
2. Install the necessary Python packages using `pip`:
pip3 install --upgrade pip
pip3 install sphinx breathe
3. **Mac OS X** only:
The Apple Clang compiler shipped with CMake is not suitable for compiling DUNE and UG. Before proceeding, call
The Apple Clang compiler shipped with CMake is not suitable for compiling DORiE. Before proceeding, call
export CC=gcc-6
export CXX=g++-6
export CC=gcc-7
export CXX=g++-7
to enfore the Homebrew'd GCC compiler. Note that this variable export only lasts for your current terminal session. Always make sure that the configuration tool actually finds GCC instead of the Apple Clang.
4. Clone the DUNE modules and DORiE into a suitable folder on your machine. Make sure that you check out the correct branches (see above). Enter the parent folder, and call
**Ubuntu:**
MAKE_FLAGS="-j <N>" ./dune-common/bin/dunecontrol all
**Mac OS X:**
CMAKE_FLAGS="-DDUNE_FORCE_PYTHON3=True" MAKE_FLAGS="-j <N>" ./dune-common/bin/dunecontrol all
CMAKE_FLAGS="-DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" MAKE_FLAGS="-j <N>" ./dune-common/bin/dunecontrol all
to build all DUNE modules in parallel on `N` processes. If you installed software into paths not appended to your `PATH` variable, you will have to add `CMAKE_FLAGS` to the call to make sure that CMake finds all packages. Alternatively, you can add a custom options file. See the [DUNE Installation Instructions](https://dune-project.org/doc/installation/) for details. CMake will throw an error if required packages are not found.
5. To install all DUNE packages into system locations (so you can call `dunecontrol` and `dorie` from anywhere), you can run
5. After a successful build you can call the `dorie` wrapper located in `dorie/build-cmake/bin` from anywhere on your machine, but it is more handy to add this location to your search path. You can add the directory to your `PATH` variable by calling
PATH=<path/to/>dorie/build-cmake/bin:$PATH
./dune-common/bin/dunecontrol make install
However, this will only last for your current terminal session. Another option is to add this path permanently in your shell configuration file.
which may require `sudo` rights on your machine. This action is **optional and not required to run DORiE**. If you choose not to install DORiE, make sure to append the location of `dunecontrol` (`dune-common/bin`) and `dorie` (`dorie/build-cmake/bin`) to your search path.
**Installing DUNE and DORiE via `make install` into your usual work environment is strongly discouraged!**
## Recommended Third-Party Software
......@@ -186,14 +191,20 @@ The documentation can be built after DORiE has been properly configured (i.e., b
dunecontrol --only=dorie make doc
or navigate to the `dorie/build-cmake` directory and call
make doc
The documentation files can now be found in the subfolder `dorie/build-cmake/doc`.
## Run, DORiE, Run!
During `make install`, DORiE installs a wrapper to access the functions and executables of DORiE from any location on your device. After a successful installation, you can call the wrapper by simply executing
If you made the DORiE wrapper directory available through your `PATH` variable, you can call it by simply executing
dorie <command>
If you did not run `dunecontrol make install`, you can find the wrapper in the `dorie/build-cmake/bin` folder of your installation.
You can always find the wrapper in the `dorie/build-cmake/bin` folder of your installation and call it directly with
<path/to/>dorie/build-cmake/bin/dorie <command>
To start your first simulation run, create a new directory and enter it. Place some exemplary configuration and boundary condition data files in there by calling
......
#!/usr/bin/env python
#!/usr/bin/env python3
import os
import sys
......@@ -24,7 +24,7 @@ MPIEXEC_POSTFLAGS = "@MPIEXEC_POSTFLAGS@"
# set some paths
DORIE_EXECUTABLE = os.path.join(DORIEDIR, "dune/dorie/dorie")
PARAMETERDIR = os.path.join(DORIEDIR, "doc/default_files")
DORIE_PYTHON = os.path.join(DORIEDIR, "dune-env")
DORIE_PYTHON = os.path.join(DORIEDIR, "run-in-dune-env")
def MPIRUN(nproc,exe,*args,**kwargs):
mpi_flags = kwargs.get("mpi_flags") or []
return [k for k in [MPIEXEC,MPIEXEC_NUMPROC_FLAG,str(nproc)] \
......
......@@ -11,11 +11,6 @@ FIND_PACKAGE (FFTW REQUIRED)
FIND_PACKAGE (SuperLU REQUIRED)
FIND_PACKAGE (MPI REQUIRED)
if(NOT dune-uggrid_FOUND)
MESSAGE(STATUS "Module dune-uggrid was not found. Falling back to external UG grid manager")
FIND_PACKAGE(UG REQUIRED)
endif()
FIND_PACKAGE (METIS)
FIND_PACKAGE (ParMETIS)
......
function(scrape_parameters SOURCE_DIR XML_FILE CSS OUTPUT RESULT_NAME)
message(STATUS "Running parameter scraper on sources ${SOURCE_DIR}")
if(DEPLOY_SPHINX_SOURCE_URL)
execute_process(COMMAND ${CMAKE_BINARY_DIR}/dune-env scrape_folder.py --source ${SOURCE_DIR}
execute_process(COMMAND ${CMAKE_BINARY_DIR}/run-in-dune-env scrape_folder.py --source ${SOURCE_DIR}
--xml ${XML_FILE} --out ${OUTPUT} --css ${CSS}
--source_url ${DEPLOY_SPHINX_SOURCE_URL}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
RESULT_VARIABLE RETURN_CODE)
else()
execute_process(COMMAND ${CMAKE_BINARY_DIR}/dune-env scrape_folder.py --source ${SOURCE_DIR}
execute_process(COMMAND ${CMAKE_BINARY_DIR}/run-in-dune-env scrape_folder.py --source ${SOURCE_DIR}
--xml ${XML_FILE} --out ${OUTPUT} --css ${CSS}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
RESULT_VARIABLE RETURN_CODE)
......@@ -18,11 +18,11 @@ endfunction()
file(COPY ${CMAKE_CURRENT_LIST_DIR} DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/..)
scrape_parameters(${PROJECT_SOURCE_DIR}/dune/dorie-rfg ${CMAKE_CURRENT_SOURCE_DIR}/field-parameters.xml ${CMAKE_CURRENT_SOURCE_DIR}/parameters.css "parfield.ini;field-parameters.html;field-parameters.rst" FIELDPARSCRAPE_RETURN)
if (${FIELDPARSCRAPE_RETURN} GREATER 0)
if (NOT ${FIELDPARSCRAPE_RETURN} EQUAL 0)
message(FATAL_ERROR "Parameter scraper failed. DORiE can not be built.")
endif()
scrape_parameters(${PROJECT_SOURCE_DIR}/dune/dorie ${CMAKE_CURRENT_SOURCE_DIR}/parameters.xml ${CMAKE_CURRENT_SOURCE_DIR}/parameters.css "config.ini;parameters.html;parameters.rst" PARSCRAPE_RETURN)
if (${PARSCRAPE_RETURN} GREATER 0)
if (NOT ${PARSCRAPE_RETURN} EQUAL 0)
message(FATAL_ERROR "Parameter scraper failed. DORiE can not be built.")
endif()
......@@ -7,5 +7,5 @@ Module: dorie
Version: 0.9
Maintainer: dorieteam@iup.uni-heidelberg.de
#depending on
Depends: dune-python dune-pdelab
Suggests: dune-testtools dune-uggrid
Depends: dune-pdelab dune-uggrid
Suggests: dune-testtools
\ No newline at end of file
......@@ -25,7 +25,7 @@ protected:
/// LSGFS Helper
using LSGFSHelper = Dune::Dorie::GridFunctionSpaceHelper<GV,RF,0,Traits::GridGeometryType>;
using LSGFSHelper = Dune::Dorie::LinearSolverGridFunctionSpaceHelper<GV,RF,Traits::GridGeometryType>;
/// Linear solver GFS
using LSGFS = typename LSGFSHelper::Type;
/// LSGFS Constraints Container
......
......@@ -31,13 +31,14 @@ R estimate_mbe_entries (const int dim, const Dune::GeometryType::BasicType geo)
return 1;
}
/// Provide types and construction of the GridFunctionSpace. Has to be specialized.
template<typename GridView, typename RF, int order, Dune::GeometryType::BasicType GeometryType>
struct GridFunctionSpaceHelper
/// Provide types and construction of the GFS for the linear solver
template<typename GridView, typename RF, Dune::GeometryType::BasicType GeometryType>
struct LinearSolverGridFunctionSpaceHelper
{};
/// Provide types and construction of the GridFunctionSpace
template<typename GridView, typename RF>
struct GridFunctionSpaceHelper<GridView,RF,0,Dune::GeometryType::BasicType::simplex>
struct LinearSolverGridFunctionSpaceHelper<GridView,RF,Dune::GeometryType::BasicType::simplex>
{
private:
static constexpr int dim = GridView::dimension;
......@@ -70,7 +71,7 @@ public:
/// Provide types and construction of the GridFunctionSpace
template<typename GridView, typename RF>
struct GridFunctionSpaceHelper<GridView,RF,0,Dune::GeometryType::BasicType::cube>
struct LinearSolverGridFunctionSpaceHelper<GridView,RF,Dune::GeometryType::BasicType::cube>
{
private:
static constexpr int dim = GridView::dimension;
......@@ -101,6 +102,11 @@ public:
}
};
/// Provide types and construction of the GridFunctionSpace. Has to be specialized.
template<typename GridView, typename RF, int order, Dune::GeometryType::BasicType GeometryType>
struct GridFunctionSpaceHelper
{};
/// Provide types and construction of the GridFunctionSpace
/* \todo add constraints specialization depending on grid
*/
......
This diff is collapsed.
#ifndef DUNE_DORIE_ERROR_INDICATOR_HH
#define DUNE_DORIE_ERROR_INDICATOR_HH
#include<dune/geometry/referenceelements.hh>
#include<dune/pdelab/common/referenceelements.hh>
#include<dune/pdelab/common/quadraturerules.hh>
#include<dune/pdelab/localoperator/pattern.hh>
#include<dune/pdelab/localoperator/flags.hh>
#include<dune/pdelab/localoperator/idefault.hh>
#include<dune/pdelab/localoperator/defaultimp.hh>
#include<dune/pdelab/finiteelement/localbasiscache.hh>
namespace Dune {
......@@ -85,23 +95,22 @@ namespace Dune {
// geometric factor of penalty
const RF h_F = std::min(ig.inside().geometry().volume(),ig.outside().geometry().volume())/ig.geometry().volume(); // Houston!
// select quadrature rule
Dune::GeometryType gtface = ig.geometry().type();
const Dune::QuadratureRule<DF,dim-1>& rule = Dune::QuadratureRules<DF,dim-1>::rule(gtface,intorder);
// get element geometry
auto gtface = ig.geometry();
// container for sum of errors
RF sum(0.0);
int counter = 0;
// loop over quadrature points and integrate normal flux
for (typename Dune::QuadratureRule<DF,dim-1>::const_iterator it = rule.begin(); it != rule.end(); ++it)
const auto quadrature_rule = quadratureRule(gtface,intorder);
for (const auto& it : quadrature_rule)
{
const Dune::FieldVector<DF,dim> n_F = ig.unitOuterNormal(it->position());
// retrieve unit normal vector
const Dune::FieldVector<DF,dim> n_F = ig.unitOuterNormal(it.position());
// position of quadrature point in local coordinates of elements
const Domain local_s = ig.geometryInInside().global(it->position());
const Domain local_n = ig.geometryInOutside().global(it->position());
const Domain local_s = ig.geometryInInside().global(it.position());
const Domain local_n = ig.geometryInOutside().global(it.position());
// evaluate basis functions
std::vector<Scalar> phi_s(lfsu_s.size());
......@@ -142,15 +151,22 @@ namespace Dune {
for (unsigned int i = 0; i<lfsu_n.size(); i++)
gradu_n.axpy(x_n(lfsu_n,i),tgradphi_n[i]);
// offset for parameter queries
const RF eps = 1e-9;
// parameter queries: inside
const Domain xGlobal_s = ig.inside().geometry().global(local_s);
Domain xGlobal_s = ig.inside().geometry().global(local_s);
xGlobal_s = xGlobal_s.axpy(-eps,n_F);
const RF head_s = param.headMillerToRef(u_s,xGlobal_s);
const RF satCond_s = param.condRefToMiller(param.K(xGlobal_s),xGlobal_s);
const RF saturation_s = param.saturation(head_s,xGlobal_s);
const RF condFactor_s = param.condFactor(saturation_s,xGlobal_s);
// outside
const Domain xGlobal_n = ig.outside().geometry().global(local_n);
Domain xGlobal_n = ig.outside().geometry().global(local_n);
xGlobal_n = xGlobal_n.axpy(eps,n_F);
const RF head_n = param.headMillerToRef(u_n,xGlobal_n);
const RF satCond_n = param.condRefToMiller(param.K(xGlobal_n),xGlobal_n);
const RF saturation_n = param.saturation(head_n,xGlobal_n);
......@@ -182,14 +198,14 @@ namespace Dune {
const RF jump = omega_s * condFactor_s * numFlux_s - omega_n * condFactor_n * numFlux_n;
// integration factor
const RF factor = it->weight() * ig.geometry().integrationElement(it->position());
const RF factor = it.weight() * ig.geometry().integrationElement(it.position());
// add square of error
sum += jump*jump*factor*factor;
counter++;
}
// correct for the number of neighbors
sum *= 1. / counter;
sum *= 1. / quadrature_rule.size();
// what is this variable for?
DF h_T = 1;//std::max( diameter(ig.inside().geometry()),
......@@ -225,3 +241,5 @@ namespace Dune {
}
}
#endif // DUNE_DORIE_ERROR_INDICATOR_HH
\ No newline at end of file
......@@ -34,7 +34,7 @@ namespace Dune {
const InterpolationMethod method;
explicit InterpolatorBase(InterpolationMethod method_, const ParameterTree& config_, const Dune::MPIHelper& helper_, const int verbose_):
config(config_), helper(helper_), verbose(verbose_), eps(1e-8), initialized(false), method(method_)
config(config_), helper(helper_), verbose(verbose_), eps(1e-9), initialized(false), method(method_)
{}
RF evaluate(const Array& field, const Domain& pos)
......
function(install_python_package curdir packagelist)
message(STATUS "Installing python package dorie.${curdir}")
dune_install_python_package(PATH ${curdir} ADDITIONAL_PIP_PARAMS -r ${CMAKE_CURRENT_SOURCE_DIR}/${curdir}/requirements.txt -q)
set(${packagelist} ${${packagelist}} ${CMAKE_CURRENT_SOURCE_DIR}/${curdir} PARENT_SCOPE)
function(dorie_python_install_package directory)
dune_python_install_package(PATH ${directory}
ADDITIONAL_PIP_PARAMS --force-reinstall --upgrade --no-deps
-r ${CMAKE_CURRENT_SOURCE_DIR}/${directory}/requirements.txt)
endfunction()
set(python_paths "")
install_python_package("utilities" python_paths)
install_python_package("parscraper" python_paths)
# install required python modules
dorie_python_install_package(utilities)
dorie_python_install_package(parscraper)
add_subdirectory(parfield/wrapper)
install_python_package("parfield" python_paths)
dorie_python_install_package(parfield)
# install testing module
if(dune-testtools_FOUND)
add_subdirectory(testtools/wrapper)
install_python_package("testtools" python_paths)
add_subdirectory(testtools/wrapper)
dorie_python_install_package(testtools)
endif()
set(DORIE_PYTHON_MODULES ${python_paths} CACHE PATH "Paths to the python modules")
......@@ -2,6 +2,11 @@ import os
import h5py
import numpy as np
try: # Python 2.x compatibility
input = raw_input
except NameError:
pass
def read_parameter_file(in_path):
data_dict = {}
with h5py.File(in_path, 'r') as f:
......@@ -32,7 +37,7 @@ def write_parameter_file(group,data_dict,out_path,attrs=None,overwrite=False):
"""
if os.path.isfile(out_path) and not overwrite:
ow = raw_input("The output file {} already exists. Overwrite? [y/N] ".format(out_path))
ow = input("The output file {} already exists. Overwrite? [y/N] ".format(out_path))
if not ow.lower() in ["y","yes"]:
raise RuntimeError("Aborting")
......
h5py
Pillow
configparser
configparser
\ No newline at end of file
#!/usr/bin/env python
#!/usr/bin/env python3
import sys
from setuptools import setup
......@@ -14,6 +14,8 @@ setup(name='dorie.parfield',
author_email='dorieteam@iup.uni-heidelberg.de',
url='',
install_requires=['dorie.utilities'],
packages=['dorie.parfield'],
packages = ['dorie.parfield',
'dorie.parfield.converter',
'dorie.parfield.parameterization'],
scripts=randomfield_scripts()
)
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import absolute_import
......
......@@ -6,4 +6,4 @@ python-dateutil
pytz
scipy
six
wheel
wheel
\ No newline at end of file
#!/usr/bin/env python
#!/usr/bin/env python3
import sys
from setuptools import setup
......@@ -13,6 +13,9 @@ setup(name='dorie.parscraper',
author='Dion Häfner <mail@dionhaefner.de>',
author_email='dorieteam@iup.uni-heidelberg.de',
url='',
packages=['dorie.parscraper'],
packages= ['dorie.parscraper',
'dorie.parscraper.wrapper',
'dorie.parscraper.writers',
'dorie.parscraper.readers'],
scripts=dorie_parscraper_scripts()
)
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import absolute_import
......
......@@ -76,7 +76,7 @@ def evaluate(iniinfo,runtime):
r_y = []
for t in y:
if t - r.t > 1E-6: # ODE solver can't handle step sizes of ~ 0
if t - r.t > 1E-7: # ODE solver can't handle step sizes of ~ 0
r.integrate(t)
r_y.append(r.y[0])
r_y = np.array(r_y)
......
......@@ -6,4 +6,4 @@ python-dateutil
pytz
scipy
six
wheel
wheel
\ No newline at end of file
#!/usr/bin/env python
#!/usr/bin/env python3
import sys
from setuptools import setup
......@@ -14,6 +14,13 @@ setup(name='dorie.testtools',
author='Dion Häfner <mail@dionhaefner.de>',
author_email='dorieteam@iup.uni-heidelberg.de',
url='',
packages=['dorie.testtools'],
packages=['dorie.testtools',
'dorie.testtools.dorie_create',
'dorie.testtools.dorie_pfg',
'dorie.testtools.dorie_plot',
'dorie.testtools.dorie_run',
'dorie.testtools.utilities',
'dorie.testtools.wrapper'
],
install_requires=['dune.testtools'],
scripts=dorie_testtools_scripts())
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import absolute_import
......
......@@ -6,4 +6,4 @@ python-dateutil
pytz
scipy
six
wheel
wheel
\ No newline at end of file
#!/usr/bin/env python
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
......@@ -14,6 +14,7 @@ setup(name='dorie.utilities',
author='Dion Häfner <mail@dionhaefner.de>',
author_email='dorieteam@iup.uni-heidelberg.de',
url='',
packages=['dorie.utilities'],
packages=['dorie.utilities',
'dorie.utilities.vtktools'],
scripts=dorie_utilities_scripts()
)
#!/usr/bin/env python
#!/usr/bin/env python3
from __future__ import absolute_import
......
......@@ -10,8 +10,20 @@ function(dorie_add_system_test_dependency test1 test2)
endfunction()
# dorie run
dorie_add_system_test(dorie ode.mini)
dorie_add_system_test(dorie ode_higherorder.mini)
dorie_add_system_test(dorie ode_homogeneous_1.mini)
dorie_add_system_test(dorie ode_homogeneous_1_adapt.mini)
dorie_add_system_test(dorie ode_homogeneous_2.mini)
dorie_add_system_test(dorie ode_homogeneous_2_adapt.mini)
dorie_add_system_test(dorie ode_homogeneous_3.mini)
dorie_add_system_test(dorie ode_homogeneous_3_adapt.mini)
dorie_add_system_test(dorie ode_heterogeneous_1.mini)
dorie_add_system_test(dorie ode_heterogeneous_1_adapt.mini)
dorie_add_system_test(dorie ode_heterogeneous_2.mini)
dorie_add_system_test(dorie ode_heterogeneous_2_adapt.mini)
dorie_add_system_test(dorie ode_heterogeneous_3.mini)
dorie_add_system_test(dorie ode_heterogeneous_3_adapt.mini)
dorie_add_system_test(dorie ode_evaporation.mini)
dorie_add_system_test(dorie ode_linear_interpolator.mini)
dorie_add_system_test(dorie muphi.mini)
......@@ -24,9 +36,10 @@ dorie_add_system_test(dorie reference_interpolators.mini)
# dorie in parallel
dorie_add_system_test(dorie parallel_reference.mini)
dorie_add_system_test(dorie parallel_reference_compare.mini)
foreach(n RANGE 0 3)
dorie_add_system_test_dependency(dorie_parallel_reference_compare_000${n} dorie_parallel_reference)
endforeach()
dorie_add_system_test_dependency(dorie_parallel_reference_compare_0000 dorie_parallel_reference_0000)
dorie_add_system_test_dependency(dorie_parallel_reference_compare_0001 dorie_parallel_reference_0000)
dorie_add_system_test_dependency(dorie_parallel_reference_compare_0002 dorie_parallel_reference_0001)
dorie_add_system_test_dependency(dorie_parallel_reference_compare_0003 dorie_parallel_reference_0001)
# dorie pfg
dorie_add_system_test(dorie-rfg parfield.mini)
......
include ${CMAKE_BINARY_DIR}/doc/default_files/config.ini
__name = ode
__name = ode_heterogeneous_1
_test_command = run
_asset_path = "${CMAKE_CURRENT_LIST_DIR}"
_evaluation = ode
output.fileName = ode | unique