Commit a0875192 authored by Steffen Müthing's avatar Steffen Müthing

Merge branch 'feature/upstream-merge-2017-05' into 'master'

2017-05 upstream merge

See merge request !1
parents 7fb64eeb f3f0a77a
dune-localfunctions-*.tar.gz
aclocal.m4
am
autom4te.cache
compile
config.guess
config.h
config.h.in
config.log
config.lt
config.sub
config.status
config.guess
configure
dependencies.m4
depcomp
dune.summary
dune-localfunctions.pc
install-sh
lib
libtool
ltmain.sh
Makefile
Makefile.in
missing
stamp-h1
*.swp
*.tmp
*.o
*.lo
*.la
*~
.deps/
.libs/
test-driver
build-*/
/build*/
---
before_script:
- duneci-install-module https://gitlab.dune-project.org/core/dune-common.git
- duneci-install-module https://gitlab.dune-project.org/core/dune-geometry.git
debian:9--gcc:
image: duneci/base:9
script: duneci-standard-test
debian:9--clang:
image: duneci/base:9
script: duneci-standard-test --opts=/duneci/opts.clang
debian:8--gcc:
image: duneci/base:8
script: duneci-standard-test
debian:8-backports--clang:
image: duneci/base:8-backports
script: duneci-standard-test --opts=/duneci/opts.clang
ubuntu:16.04--gcc:
image: duneci/base:16.04
script: duneci-standard-test
ubuntu:16.04--clang:
image: duneci/base:16.04
script: duneci-standard-test --opts=/duneci/opts.clang
......@@ -24,6 +24,5 @@ dune_project()
add_subdirectory(doc)
add_subdirectory(dune)
add_subdirectory(m4)
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
This diff is collapsed.
LICENSE.md
\ No newline at end of file
Installation Instructions
=========================
For a full explanation of the DUNE installation process please read
the installation notes [0]. The following introduction is meant for
the impatient.
Getting started
---------------
Suppose you have downloaded all DUNE modules of interest to your
computer and extracted then in one common directory. See [1] for a
list of available modules.
To compile the modules Dune has to check several components of
your system and whether prerequisites within the modules are met. For
the ease of users we have designed a custom build system on top of CMake.
Run
./dune-common/bin/dunecontrol all
to commence those tests and build all modules you have
downloaded. Don't worry about messages telling you that libraries are
missing: they are only needed for grid-self-checks we need for
developing.
You can customize the build to your specific needs by using an options file
(see below)
./dune-common/bin/dunecontrol --opts=/path_to/file.opts
If you did not tell dunecontrol to install with an options file you
need to run
./dune-common/bin/dunecontrol make install
to install Dune (you may need root-permissions for the install
part depending on the prefix set)
A more comprehensive introduction to the build system can be found in [0].
Passing options to the build process
------------------------------------
Using the dunecontrol script the following atomic commands can be
executed:
- configure (runs the CMake configuration tests for each module)
- exec (executes a command in each module source directory)
- bexec (executes a command in each module build directory)
- make (builds each module)
- update (updates the Git or Subversion version)
The composite command all simply runs configure and make for
each module.
As it is often not convenient to specify the desired options after
the duncontroll call, one can pass the options via a file specified
by the --opts=<file> option. Specify the options via the variable
CMAKE_FLAGS=<flags>
An example of an options file is
# use a special compiler (g++ version 5.0),
# install to a custom directory, default is /usr/local/bin,
# disable the external library SuperLU,
# and use Ninja-build instead of make as the build-tool
CMAKE_FLAGS="-DCMAKE_CXX_COMPILER=g++-5 -DCMAKE_INSTALL_PREFIX='/tmp/HuHu' -DCMAKE_DISABLE_FIND_PACKAGE_SuperLU=true -GNinja"
Links
-----
0. https://www.dune-project.org/doc/installation
1. https://dune-project.org/releases
This diff is collapsed.
# we need the module file to be able to build via dunecontrol
EXTRA_DIST= CMakeLists.txt dune.module
# don't follow the full GNU-standard
# we need automake 1.9 or newer
AUTOMAKE_OPTIONS = foreign 1.9
SUBDIRS = dune doc m4
# pass most important options when "make distcheck" is used
DISTCHECK_CONFIGURE_FLAGS = --with-dune-common="$(DUNE_COMMON_ROOT)" CXX="$(CXX)" CC="$(CC)"
include $(top_srcdir)/am/top-rules
include $(top_srcdir)/am/global-rules
# Distribute and install config.h.cmake
configdir = $(datadir)/dune-localfunctions
dist_config_DATA = config.h.cmake
include $(top_srcdir)/am/cmake-pkg-config
Preparing the Sources
=========================
Additional to the software mentioned in README you'll need the
following programs installed on your system:
automake >= 1.5
autoconf >= 2.50
libtool
Getting started
---------------
If these preliminaries are met, you should run
dunecontrol all
which will find all installed dune modules as well as all dune modules
(not installed) which sources reside in a subdirectory of the current
directory. Note that if dune is not installed properly you will either
have to add the directory where the dunecontrol script resides (probably
./dune-common/bin) to your path or specify the relative path of the script.
On your project and all uninstalled DUNE source modules found the script
will then calls the GNU autoconf/automake to create a ./configure-script
and the Makefiles. Afterwards that configure script will be called and the
modules will be build using make all
Most probably you'll have to provide additional information to dunecontrol
(e. g. compilers, configure options) and/or make options.
The most convenient way is to use options files in this case. The files
defining three variables:
AUTOGEN_FLAGS flags passed to autogen
CONFIGURE_FLAGS flags passed to configure
MAKE_FLAGS flags passed to make
An example options file might look like this:
#use this options to autogen, configure and make if no other options are given
AUTOGEN_FLAGS="--ac=2.50 --ac=1.8" #Forces automake 2,50 and autoconf 1.8
CONFIGURE_FLAGS="CXX=g++-3.4 --prefix=/install/path" #force g++-3.4 as compiler
MAKE_FLAGS=install #Per default run make install instead of simply make
If you save this information into example.opts you can path the opts file to
dunecontrol via the --opts option, e. g.
dunecontrol --opts=example.opts all
To get a full list of available configure flags just run
dunecontrol configure --help
after running at least
dunecontrol autogen
More info
---------
See
dunecontrol --help
for further options.
The full build-system is described in the dune-common/doc/buildsystem (Git version) or under share/doc/dune-common/buildsystem if you installed DUNE!
DUNE-library
============
DUNE, the Distributed and Unified Numerics Environment is a modular toolbox
for solving partial differential equations with grid-based methods.
The main intention is to create slim interfaces allowing an efficient use of
legacy and/or new libraries. Using C++ techniques DUNE allows to use very
different implementation of the same concept (i.e. grid, solver, ...) under
a common interface with a very low overhead.
DUNE was designed with flexibility in mind. It supports easy discretization
using methods, like Finite Elements, Finite Volume and also Finite
Differences.
Dune-localfunctions
-------------------
This module provides interfaces and implementations for local
finite element ansatz spaces, i.e., shape functions, associated
interpolation functionals, and relation to grid entities.
More information
----------------
Check dune-common for more details concerning dependencies, known bugs,
license and installation.
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.50)
DUNE_AC_INIT # gets module version from dune.module file
AC_CONFIG_SRCDIR([dune/localfunctions/common/localbasis.hh])
AC_CONFIG_HEADERS([config.h])
# add configure flags needed to create log files for dune-autobuild
DUNE_AUTOBUILD_FLAGS
# we need no more than the standard DE-stuff
# this module depends on dune-common
# this implies checking for [dune-common]
DUNE_CHECK_ALL
# preset variable to path such that #include <dune/...> works
# implicitly set the Dune-flags everywhere
AC_SUBST([DUNE_LOCALFUNCTIONS_ROOT], '$(top_builddir)')
AC_SUBST([LOCAL_LIBS], '$(top_builddir)/lib/liblocalfunctions.la')
AC_SUBST(AM_CPPFLAGS, '$(DUNE_CPPFLAGS) -I$(top_srcdir)')
AC_SUBST(AM_LDFLAGS, $DUNE_LDFLAGS)
LIBS="$DUNE_LIBS"
AC_CONFIG_FILES([
Makefile
doc/doxygen/Doxyfile
doc/doxygen/Makefile
doc/Makefile
dune-localfunctions.pc
dune/localfunctions/brezzidouglasmarini/Makefile
dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube2d/Makefile
dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube3d/Makefile
dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2cube2d/Makefile
dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1simplex2d/Makefile
dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini2simplex2d/Makefile
dune/localfunctions/common/Makefile
dune/localfunctions/dualmortarbasis/Makefile
dune/localfunctions/dualmortarbasis/dualp1/Makefile
dune/localfunctions/dualmortarbasis/dualq1/Makefile
dune/localfunctions/dualmortarbasis/test/Makefile
dune/localfunctions/hierarchical/hierarchicalp2/Makefile
dune/localfunctions/hierarchical/hierarchicalp2withelementbubble/Makefile
dune/localfunctions/hierarchical/hierarchicalprismp2/Makefile
dune/localfunctions/hierarchical/Makefile
dune/localfunctions/lagrange/Makefile
dune/localfunctions/lagrange/p0/Makefile
dune/localfunctions/lagrange/p1/Makefile
dune/localfunctions/lagrange/p23d/Makefile
dune/localfunctions/lagrange/pk1d/Makefile
dune/localfunctions/lagrange/pk2d/Makefile
dune/localfunctions/lagrange/pk3d/Makefile
dune/localfunctions/lagrange/prismp1/Makefile
dune/localfunctions/lagrange/prismp2/Makefile
dune/localfunctions/lagrange/pyramidp1/Makefile
dune/localfunctions/lagrange/pyramidp2/Makefile
dune/localfunctions/lagrange/q1/Makefile
dune/localfunctions/lagrange/qk/Makefile
dune/localfunctions/Makefile
dune/localfunctions/meta/Makefile
dune/localfunctions/meta/power/Makefile
dune/localfunctions/mimetic/Makefile
dune/localfunctions/monomial/Makefile
dune/localfunctions/orthonormal/Makefile
dune/localfunctions/rannacherturek/Makefile
dune/localfunctions/rannacherturek/rannacherturek2d/Makefile
dune/localfunctions/rannacherturek/rannacherturek3d/Makefile
dune/localfunctions/raviartthomas/Makefile
dune/localfunctions/raviartthomas/raviartthomas02d/Makefile
dune/localfunctions/raviartthomas/raviartthomas0cube2d/Makefile
dune/localfunctions/raviartthomas/raviartthomas0cube3d/Makefile
dune/localfunctions/raviartthomas/raviartthomas12d/Makefile
dune/localfunctions/raviartthomas/raviartthomas1cube2d/Makefile
dune/localfunctions/raviartthomas/raviartthomas1cube3d/Makefile
dune/localfunctions/raviartthomas/raviartthomas2cube2d/Makefile
dune/localfunctions/raviartthomas/raviartthomas3cube2d/Makefile
dune/localfunctions/raviartthomas/raviartthomas4cube2d/Makefile
dune/localfunctions/raviartthomas/raviartthomassimplex/Makefile
dune/localfunctions/refined/common/Makefile
dune/localfunctions/refined/Makefile
dune/localfunctions/refined/refinedp0/Makefile
dune/localfunctions/refined/refinedp1/Makefile
dune/localfunctions/test/Makefile
dune/localfunctions/utility/Makefile
dune/localfunctions/whitney/edges0.5/Makefile
dune/localfunctions/whitney/Makefile
dune/Makefile
m4/Makefile
])
AC_OUTPUT
# finally print the summary information
DUNE_SUMMARY_ALL
*.backup
*.aux
*.toc
*.out
*.log
*.dvi
Makefile.dist.in
Makefile.dist
Makefile.in
Makefile
dune-localfunctions-manual.pdf
add_subdirectory(doxygen)
dune_add_latex_document(dune-localfunctions-manual.tex
FATHER_TARGET doc
DEFAULT_PDF)
dune_add_latex_document(dune-localfunctions-manual.tex)
create_doc_install(${CMAKE_CURRENT_BINARY_DIR}/dune-localfunctions-manual.pdf
${CMAKE_INSTALL_DOCDIR})
${CMAKE_INSTALL_DOCDIR} dune-localfunctions-manual_safepdf)
SUBDIRS = doxygen
TEXSOURCES = dune-localfunctions-manual.tex
if BUILD_DOCS
DOCFILES = dune-localfunctions-manual.pdf
EXTRA_DIST = CMakeLists.txt $(DOCFILES)
EXTRAINSTALL = $(DOCFILES)
endif
# setting like in dune-web
BASEDIR=../..
CURDIR=doc/localfunctions
docdir=$(datadir)/doc/dune-localfunctions
include $(top_srcdir)/am/global-rules
include $(top_srcdir)/am/webstuff
include $(top_srcdir)/am/latex
Makefile.in
Makefile
doxy-header.html
doxygen.log
doxyerr.log
Doxyfile
Doxyfile.in
html
doxygen-tag
# setting like in dune-web
BASEDIR=../..
CURDIR=doc/doxygen
WHAT=
doxydir = $(datadir)/doc/dune-localfunctions/doxygen
dist_doxy_DATA = $(WHAT)
#we need this in the distribution
EXTRA_DIST = CMakeLists.txt $(WHAT) $(DOXYGENDISTFILES)
all: $(WHAT) $(DOXYGENFILES)
include $(top_srcdir)/am/doxygen
include $(top_srcdir)/am/global-rules
# file to clean only in svn and not in tarball tree
SVNCLEANFILES = html $(WHAT) $(DOXYGENHEADER)
clean-local:
if test "x$(VPATH)" != "x" && test ! -e $(srcdir)/doxygen-tag; then \
if test -e $(top_srcdir)/doc/doxygen/Doxydep; then \
rm -rf $(SVNCLEANFILES); \
fi; \
fi
Makefile
Makefile.in
*.swp
dunedir = $(includedir)/dune
SUBDIRS = localfunctions
include $(top_srcdir)/am/global-rules
EXTRA_DIST = CMakeLists.txt
localfunctionsdir = $(includedir)/dune/localfunctions
localfunctions_HEADERS = \
dualmortarbasis.hh \
lagrange.hh \
mimetic.hh \
monomial.hh \
orthonormal.hh \
rannacherturek.hh \
raviartthomas.hh \
refined.hh
SUBDIRS = \
brezzidouglasmarini \
common \
dualmortarbasis \
hierarchical \
lagrange \
meta \
mimetic \
monomial \
orthonormal \
rannacherturek \
raviartthomas \
refined \
test \
utility \
whitney
include $(top_srcdir)/am/global-rules
EXTRA_DIST = CMakeLists.txt
brezzidouglasmarinidir = $(includedir)/dune/localfunctions/brezzidouglasmarini
brezzidouglasmarini_HEADERS = \
brezzidouglasmarini1cube2d.hh \
brezzidouglasmarini1cube3d.hh \
brezzidouglasmarini2cube2d.hh \
brezzidouglasmarini1simplex2d.hh \
brezzidouglasmarini2simplex2d.hh
SUBDIRS = \
brezzidouglasmarini1cube2d \
brezzidouglasmarini1cube3d \
brezzidouglasmarini2cube2d \
brezzidouglasmarini1simplex2d \
brezzidouglasmarini2simplex2d
include $(top_srcdir)/am/global-rules
EXTRA_DIST = CMakeLists.txt
brezzidouglasmarini1cube2ddir = \
$(includedir)/dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube2d
brezzidouglasmarini1cube2d_HEADERS = \
brezzidouglasmarini1cube2dlocalbasis.hh \
brezzidouglasmarini1cube2dlocalcoefficients.hh \
brezzidouglasmarini1cube2dlocalinterpolation.hh
include $(top_srcdir)/am/global-rules
EXTRA_DIST = CMakeLists.txt
......@@ -4,8 +4,9 @@
#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE2D_LOCALBASIS_HH
#include <array>
#include <vector>
#include <bitset>
#include <numeric>
#include <vector>
#include <dune/common/fmatrix.hh>
......@@ -135,6 +136,77 @@ namespace Dune
out[7][1][1] = 6.0*in[0] - 3.0;
}
//! \brief Evaluate partial derivatives of all shape functions
void partial (const std::array<unsigned int, 2>& order,
const typename Traits::DomainType& in, // position
std::vector<typename Traits::RangeType>& out) const // return value
{
auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
if (totalOrder == 0) {
evaluateFunction(in, out);
} else if (totalOrder == 1) {
out.resize(size());
auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
switch (direction) {
case 0:
out[0][0] = sign_[0];
out[0][1] = 0.0;
out[1][0] = 6.0*in[1] - 3.0;
out[1][1] = 0.0;
out[2][0] = sign_[1];
out[2][1] = 0.0;
out[3][0] = -6.0*in[1] + 3.0;
out[3][1] = 0.0;
out[4][0] = 0.0;
out[4][1] = 0.0;
out[5][0] = 6.0*in[0] - 3.0;
out[5][1] = -6.0*in[1] + 6.0;
out[6][0] = 0.0;
out[6][1] = 0.0;
out[7][0] = -6.0*in[0] + 3.0;
out[7][1] = 6.0*in[1];
break;
case 1:
out[0][0] = 0.0;
out[0][1] = 0.0;
out[1][0] = 6.0*in[0] - 6.0;
out[1][1] = -6.0*in[1] + 3.0;
out[2][0] = 0.0;
out[2][1] = 0.0;
out[3][0] = -6.0*in[0];
out[3][1] = 6.0*in[1] - 3.0;
out[4][0] = 0.0;
out[4][1] = sign_[2];
out[5][0] = 0.0;
out[5][1] = -6.0*in[0] + 3.0;
out[6][0] = 0.0;
out[6][1] = sign_[3];
out[7][0] = 0.0;
out[7][1] = 6.0*in[0] - 3.0;
break;
default:
DUNE_THROW(RangeError, "Component out of range.");
}
} else {
DUNE_THROW(NotImplemented, "Desired derivative order is not implemented");
}
}
//! \brief Polynomial order of the shape functions
unsigned int order () const
{
......
brezzidouglasmarini1cube3ddir = \
$(includedir)/dune/localfunctions/brezzidouglasmarini/brezzidouglasmarini1cube3d
brezzidouglasmarini1cube3d_HEADERS = \
brezzidouglasmarini1cube3dlocalbasis.hh \
brezzidouglasmarini1cube3dlocalcoefficients.hh \
brezzidouglasmarini1cube3dlocalinterpolation.hh
include $(top_srcdir)/am/global-rules
EXTRA_DIST = CMakeLists.txt
......@@ -4,8 +4,9 @@
#define DUNE_LOCALFUNCTIONS_BREZZIDOUGLASMARINI1_CUBE3D_LOCALBASIS_HH
#include <array>
#include <vector>
#include <bitset>
#include <numeric>
#include <vector>
#include <dune/common/fmatrix.hh>
......@@ -212,6 +213,246 @@ namespace Dune
out[17][2][0] = 0.0; out[17][2][1] = 6*in[2]; out[17][2][2] = 6*in[1]-3;
}
//! \brief Evaluate partial derivatives of all shape functions
void partial (const std::array<unsigned int, 3>& order,
const typename Traits::DomainType& in, // position
std::vector<typename Traits::RangeType>& out) const // return value
{
auto totalOrder = std::accumulate(order.begin(), order.end(), 0);
if (totalOrder == 0) {
evaluateFunction(in, out);
} else if (totalOrder == 1) {
out.resize(size());
auto const direction = std::distance(order.begin(), std::find(order.begin(), order.end(), 1));
switch (direction) {
case 0:
out[0][0] = sign_[0];