Commit 39f6786a authored by Praetorius, Simon's avatar Praetorius, Simon

Initial commit

parents
# /
/Makefile
/Makefile.in
/config.*
/configure
/aclocal.m4
/dependencies.m4
/autom4te.cache
/depcomp
/install-sh
/missing
/mkinstalldirs
/libtool
/dune-subgrid.pc
/semantic.cache
/configure.lineno
/stamp-h1
/dune-subgrid-*.tar.gz
/dune-subgrid-?.?
/ltmain.sh
/.libs
/am
# /doc/
/doc/Makefile
/doc/Makefile.in
/doc/Makefile.dist
/doc/Makefile.dist.in
# /doc/doxygen/
/doc/doxygen/Doxyfile.in
/doc/doxygen/doxygen-tag
/doc/doxygen/doxygen.log
/doc/doxygen/html
/doc/doxygen/html-dist
/doc/doxygen/Makefile
/doc/doxygen/Makefile.in
/doc/doxygen/semantic.cache
# /dune/
/dune/Makefile.in
/dune/Makefile
# /dune/subgrid/
/dune/subgrid/Makefile.in
/dune/subgrid/Makefile
# /dune/subgrid/subgrid/
/dune/subgrid/subgrid/Makefile.in
/dune/subgrid/subgrid/Makefile
# /dune/subgrid/test/
/dune/subgrid/test/Makefile.in
/dune/subgrid/test/Makefile
/dune/subgrid/test/semantic.cache
/dune/subgrid/test/.deps
/dune/subgrid/test/test-w-albertagrid
/dune/subgrid/test/test-w-alugrid
/dune/subgrid/test/test-w-sgrid
/dune/subgrid/test/test-w-onedgrid
/dune/subgrid/test/test-w-ug
/dune/subgrid/test/test-w-yaspgrid
# /m4/
/m4/Makefile.in
/m4/Makefile
# /subgrid/
/subgrid/Makefile.in
/subgrid/Makefile
# set up project
project("dune-subgrid" C CXX)
#circumvent not building docs
set(BUILD_DOCS 1)
# general stuff
cmake_minimum_required(VERSION 2.8.6)
if(NOT (dune-common_DIR OR dune-common_ROOT OR
"${CMAKE_PREFIX_PATH}" MATCHES ".*dune-common.*"))
string(REPLACE ${CMAKE_PROJECT_NAME} dune-common dune-common_DIR
${PROJECT_BINARY_DIR})
endif()
#find dune-common and set the module path
find_package(dune-common)
list(APPEND CMAKE_MODULE_PATH ${dune-common_MODULE_PATH}
"${CMAKE_SOURCE_DIR}/cmake/modules")# make sure our own modules are found
#include the dune macros
include(DuneMacros)
# start a dune project with information from dune.module
dune_project()
# we need the module file to be able to build via dunecontrol
set(EXTRA_DIST dune.module)
# don't follow the full GNU-standard
# need automake >= 1.5
set(AUTOMAKE_OPTIONS foreign 1.5)
set(SUBDIRS dune doc m4)
set(pkgconfigdir ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
set(pkgconfig_DATA dune-subgrid.pc)
# use configured compiler for "make distcheck"
# doxygen is difficult to convince to build in a special directory...
set(DISTCHECK_CONFIGURE_FLAGS --with-dune-common="${DUNE_COMMON_ROOT}" CXX="${CXX}" CC="${CC}" DOXYGEN="true")
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
install(FILES ${pkgconfig_DATA} DESTINATION ${pkgconfigdir})
foreach(i ${SUBDIRS})
if(${i} STREQUAL "test")
set(opt EXCLUDE_FROM_ALL)
endif(${i} STREQUAL "test")
add_subdirectory(${i} ${opt})
unset(opt)
endforeach(i ${SUBDIRS})
add_subdirectory(cmake/modules)
# finalize the dune project, e.g., generate config.h etc.
finalize_dune_project(GENERATE_CONFIG_H_CMAKE)
This diff is collapsed.
/**
\page KnownIssues Known Issues
The following issues are known when using dune-subgrid:
<ul>
<li>
LeafIntersectionIterator does not implement numerInNeighbor(),
intersectionXxxLocal().
</li>
<li>
Currently only grids with elements of a single geometry work as hostgrids.
</li>
<li>
LeafIntersectionIterator can return wrong intersections if working with dune-grid1.3svn Revision &lt; 5101
</li>
<li>
creating the (leaf-) end iterator can be costly (especially with ALU3dSimplexGrid). For a walk over all
(leaf-) entities we strongly(!) recommend creating the end iterator outside the loop:
Example:
<code>
ElementLeafIterator end=grid.leafend<0>();
for (ElementLeafIterator eltIt=grid.leafbegin<0>(); eltIt!=end; ++eltIt)
{...}
</code>
</li>
</ul>
Subgrid uses certain host grid features where you might not expect it.
If a subgrid behaves strange this might be caused by bugs in the host grid
you normally don't see. In this case you can define the macro
SUBGRID_VERBOSE to get more output and use the subgrid method report()
to check the subgrid indices.
*/
/**
\mainpage Dune-Subgrid Module
\section intro_sec Introduction
<a href="">Dune-subgrid</a> is a module for the <a href="http://www.dune-project.org">DUNE environment</a>.
The dune-subgrid module allows to mark elements of another hierarchical dune grid.
The set of marked elements can then be accessed as a hierarchical dune grid in its own right.
Dune-Subgrid provides the full grid interface including adaptive mesh refinement.
Further information on the features, interface and implementation of dune-subgrid
can be found in the <a href="http://www.matheon.de/preprints/5868_graeser_sander_subgrid.pdf">dune-subgrid paper</a>.
See also the page with the \ref KnownIssues "known issues".
\section deps_sec Dependencies
Dune-subgrid depends on the DUNE core modules dune-common, dune-grid and dune-istl.
\section install_sec Installation
Unpack the downloaded archive to the directory containing your dune modules
and use the dunecontrol script of the dune-common module to configure and
build it.
\section usage_sec Usage
Use the method createBegin() followed by the various insert methods to
insert elements in a subgrid. Finalize the subgrid creation by createEnd().
Please refer the class documentation for further usage information.
\section publications_sec Publications
Please \b cite the
<a href="http://www.matheon.de/preprints/5868_graeser_sander_subgrid.pdf">dune-subgrid paper</a>
in any publication using the dune-subgrid module.
C. Gr&auml;ser and O.Sander,
The dune-subgrid Module and Some Applications,
Preprint 566, Matheon, 2009.
\section license_sec License
The dune-subgrid library and headers are licensed under version 2 of the GNU
General Public License (see below), with a special exception for
linking and compiling against dune-subgrid, the so-called "runtime exception."
The license is intended to be similiar to the GNU Lesser General
Public License, which by itself isn't suitable for a template library.
The exact wording of the exception reads as follows:
As a special exception, you may use the dune-subgrid source files as part
of a software library or application without restriction.
Specifically, if other files instantiate templates or use macros or
inline functions from one or more of the dune-subgrid source files, or you
compile one or more of the dune-subgrid source files and link them with
other files to produce an executable, this does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License.
This licence clones the one of the libstc++ library. For further
implications of this library please see their
<a href="http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt01ch01s02.html">licence page</a>.
See the file COPYING for full copying permissions.
*/
# we need the module file to be able to build via dunecontrol
EXTRA_DIST=dune.module
# don't follow the full GNU-standard
# need automake >= 1.5
AUTOMAKE_OPTIONS = foreign 1.5
SUBDIRS = dune doc m4
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = dune-subgrid.pc
# use configured compiler for "make distcheck"
# doxygen is difficult to convince to build in a special directory...
DISTCHECK_CONFIGURE_FLAGS = --with-dune-common="$(DUNE_COMMON_ROOT)" CXX="$(CXX)" CC="$(CC)" DOXYGEN="true"
include $(top_srcdir)/am/global-rules
The Dune-Subgrid Module
=======================
Dune-subgrid [0] is a module for the DUNE environment [1].
The dune-subgrid module allows to mark elements of another hierarchical dune grid.
The set of marked elements can then be accessed as a hierarchical dune grid in its own right.
Dune-Subgrid provides the full grid interface including adaptive mesh refinement.
Further information on the features, interface and implementation of dune-subgrid
can be found in the dune-subgrid paper [2].
Dependencies
------------
Dune-subgrid depends on the DUNE core modules dune-common, dune-grid and dune-istl.
Installation
------------
Unpack the downloaded archive to the directory containing your dune modules
and use the dunecontrol script of the dune-common module to configure and
build it.
Usage
-----
Use the method createBegin() followed by the various insert methods to
insert elements in a subgrid. Finalize the subgrid creation by createEnd().
Please refer the class documentation for further usage information.
Publications
------------
Please cite the dune-subgrid paper [2] in any publication using the dune-subgrid module.
C. Gräser and O.Sander,
The dune-subgrid Module and Some Applications,
Preprint 566, Matheon, 2009.
License
-------
The dune-subgrid library and headers are licensed under version 2 of the GNU
General Public License (see below), with a special exception for
linking and compiling against dune-subgrid, the so-called "runtime exception."
The license is intended to be similiar to the GNU Lesser General
Public License, which by itself isn't suitable for a template library.
The exact wording of the exception reads as follows:
As a special exception, you may use the dune-subgrid source files as part
of a software library or application without restriction.
Specifically, if other files instantiate templates or use macros or
inline functions from one or more of the dune-subgrid source files, or you
compile one or more of the dune-subgrid source files and link them with
other files to produce an executable, this does not by itself cause
the resulting executable to be covered by the GNU General Public
License. This exception does not however invalidate any other
reasons why the executable file might be covered by the GNU General
Public License.
This licence clones the one of the libstc++ library. For further
implications of this library please see their licence page [3]
See the file COPYING for full copying permissions.
Links
-----
0.
1. http://www.dune-project.org
2. http://www.matheon.de/preprints/5868_graeser_sander_subgrid.pdf
3. http://gcc.gnu.org/onlinedocs/libstdc++/manual/bk01pt01ch01s02.html
- Remove code for old Dune numbering
- Allow host grids with more than one element type
- At least in 2.0, the leaf element iterator crashes if the subgrid is empty
- Implement SubGridSeed properly
- method Dune::GeometryType::basicType() was removed in Dune 2.3svn but is used in subgrid:
dune-subgrid/dune/subgrid/subgrid/subgridindexstorage.hh:217:36: error: 'const class Dune::GeometryType' has no member named 'basicType'
Find a replacement!
set(modules
DuneSubgridMacros.cmake
)
install(FILES "${modules}" DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/cmake/modules)
message(AUTHOR_WARNING "TODO: Implement module test.")
\ No newline at end of file
#! /bin/bash
# Process this file with autoconf to produce a configure script.
DUNE_AC_INIT # gets module version from dune.module file
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([dune/subgrid/subgrid.hh])
AM_CONFIG_HEADER([config.h])
# check all dune-module stuff
DUNE_CHECK_ALL
# preset variable to path such that #include <dune/...> works
AC_SUBST(AM_CPPFLAGS, '$(DUNE_CPPFLAGS) -I$(top_srcdir)')
AC_SUBST(AM_LDFLAGS, '$(DUNE_LDFLAGS) $(DUNE_LIBS)')
DUNE_SUMMARY_ALL
# write output
AC_CONFIG_FILES([Makefile
dune/Makefile
dune/subgrid/Makefile
dune/subgrid/subgrid/Makefile
dune/subgrid/facetools/Makefile
dune/subgrid/test/Makefile
doc/doxygen/Makefile
doc/Makefile
doc/Makefile.dist
m4/Makefile
dune-subgrid.pc])
AC_OUTPUT
#!/usr/bin/env bash
GIT_CLEANUP=$PWD/git-cleanup.bash
GIT_CONVERT=$PWD/convert-to-git.bash
if ! [[ -f ${GIT_CONVERT} ]]; then
cat <<EOF
error: This script expects to be called convert-to-git.bash and reside in the
directory in which it is executed.
EOF
exit -1
fi
clone() {
git svn clone --prefix=origin/ --stdlayout \
https://svn.imp.fu-berlin.de/$1
}
handle_gitignore() {
git svn show-ignore > .gitignore
git add .gitignore
git commit -m 'Convert svn:ignore properties to .gitignore.'
}
filter() {
git filter-branch -f \
--msg-filter '
sed -e "/^\$/{ :l; N; s/^\n\$//; t l; p; d; }" | \
sed -e "/^git-svn-id:/s/.*@\([^ ]*\) .*$/[[Imported from SVN: r\1]]/"' \
--commit-filter ". ${GIT_CLEANUP};" \
HEAD
}
create_release_branch() {
git checkout -b releases/$1 origin/$2
}
create_git_cleanup() {
cat > ${GIT_CLEANUP} <<'EOF'
#!/usr/bin/env bash
case $GIT_AUTHOR_NAME in
akbib*|youett*)
GIT_AUTHOR_NAME="Jonathan Youett"
GIT_AUTHOR_EMAIL=youett@mi.fu-berlin.de
;;
ansgar)
GIT_AUTHOR_NAME="Ansgar Burchardt"
GIT_AUTHOR_EMAIL=burchardt@igpm.rwth-aachen.de
;;
engwer*)
GIT_AUTHOR_NAME="Christian Engwer"
GIT_AUTHOR_EMAIL="christi@dune-project.org"
;;
forster*|rforster*)
GIT_AUTHOR_NAME="Ralf Forster"
GIT_AUTHOR_EMAIL=forster@math.fu-berlin.de
;;
graeser*)
GIT_AUTHOR_NAME="Carsten Gräser"
GIT_AUTHOR_EMAIL=graeser@mi.fu-berlin.de
;;
lschmidt*|oel*)
GIT_AUTHOR_NAME="Leo Schmidt"
GIT_AUTHOR_EMAIL=lschmidt@math.fu-berlin.de
;;
klapprot*)
GIT_AUTHOR_NAME="Corinna Klapproth"
GIT_AUTHOR_EMAIL=klapproth@zib.de
;;
mawolf*)
GIT_AUTHOR_NAME="Maren-Wanda Wolf"
GIT_AUTHOR_EMAIL=mawolf@math.fu-berlin.de
;;
maxka)
GIT_AUTHOR_NAME="Max Kahnt"
GIT_AUTHOR_EMAIL=max.kahnt@fu-berlin.de
;;
pipping*)
GIT_AUTHOR_NAME="Elias Pipping"
GIT_AUTHOR_EMAIL=elias.pipping@fu-berlin.de
;;
podlesjo)
GIT_AUTHOR_NAME="Joscha Podlesny"
GIT_AUTHOR_EMAIL=joscha.py@googlemail.com
;;
sander*)
GIT_AUTHOR_NAME="Oliver Sander"
GIT_AUTHOR_EMAIL=sander@igpm.rwth-aachen.de
;;
sertel)
GIT_AUTHOR_NAME="Susanne Ertel"
GIT_AUTHOR_EMAIL=ertel@zib.de
;;
usack*)
GIT_AUTHOR_NAME="Uli Sack"
GIT_AUTHOR_EMAIL=usack@math.fu-berlin.de
;;
"(no author)") # For the single CVS-to-SVN migration commit
GIT_AUTHOR_NAME="Oliver Sander"
GIT_AUTHOR_EMAIL=sander@igpm.rwth-aachen.de
;;
esac
git commit-tree "$@"
EOF
}
save_script_and_create_tag() {
cp ${GIT_CONVERT} .
git add convert-to-git.bash
git commit -m 'Document subversion->git migration process'
git tag -a \
-m "Subversion->Git migration completed. Master rev: $@" \
'subversion->git'
}
### Check out and clean up repositories
create_git_cleanup
clone dune-subgrid
(
cd dune-subgrid
master_rev=$(git svn find-rev HEAD)
create_release_branch 2.0-1 2.0-1 ; handle_gitignore; filter;
create_release_branch 2.0-2 2.0-2 ; handle_gitignore; filter;
create_release_branch 2.1-1 2.1-1 ; handle_gitignore; filter;
create_release_branch 2.2-1 release-2.2; handle_gitignore; filter;
git checkout master ; handle_gitignore; filter;
save_script_and_create_tag ${master_rev}
)
rm -f ${GIT_CLEANUP}
## Debugging section
#
# Use the following scripts to check if the conversion went according to plan
#
# (1) To generate a list of authors
#
# !/usr/bin/env bash
#
# for i in dune-*; do
# (
# cd $i;
# git log --format=tformat:'%an <%ae>';
# );
# done | perl -e '
# use 5.018;
# my %a;
# while (<>) {
# chomp; $a{$_}++;
# };
# while (each %a) {
# printf "%d\t%s\n", $a{$_}, $_;
# }
# ' | sort -n
#
# (2) To generate a list of converted branches
#
# !/usr/bin/env bash
#
# for i in dune-*; do
# (
# cd $i;
# echo $i;
# git for-each-ref --format=' %(refname)' refs/heads;
# );
# done
# $Id: Makefile.am 780 2007-07-30 19:52:27Z mblatt $
set(SUBDIRS doxygen)
#TEXSOURCES = istl.tex istl.bib
#EPSFILES = blockstructure.eps
set(EXTRA_DIST Makefile.dist.in Makefile.dist.am)
#if BUILD_DOCS
# DOCS = istl.pdf
#endif
# setting like in dune-web
set(BASEDIR ../..)
set(CURDIR doc/subgrid)
set(docdir ${CMAKE_INSTALL_DOCDIR}/dune-subgrid)
set(doc_DATA ${DOCS})
set(CLEANFILES *.aux *.bbl *.blg *.log *.out *.toc *.dvi *.ps)
# files to clean only in svn tree but not in tarball
set(SVNCLEANFILES *.pdf)
install(FILES ${doc_DATA} DESTINATION ${docdir})
foreach(i ${SUBDIRS})
if(${i} STREQUAL "test")
set(opt EXCLUDE_FROM_ALL)
endif(${i} STREQUAL "test")
add_subdirectory(${i} ${opt})
unset(opt)
endforeach(i ${SUBDIRS})
# $Id: Makefile.am 780 2007-07-30 19:52:27Z mblatt $
SUBDIRS = doxygen
#TEXSOURCES = istl.tex istl.bib
#EPSFILES = blockstructure.eps
EXTRA_DIST = Makefile.dist.in Makefile.dist.am
#if BUILD_DOCS
# DOCS = istl.pdf
#endif
# setting like in dune-web
BASEDIR=../..
CURDIR=doc/subgrid
docdir=$(datadir)/doc/dune-subgrid
doc_DATA = $(DOCS)
CLEANFILES = *.aux *.bbl *.blg *.log *.out *.toc *.dvi *.ps
# files to clean only in svn tree but not in tarball
SVNCLEANFILES = *.pdf
clean-local:
if test -e $(top_srcdir)/doc/doxygen/Doxydep; then rm -rf $(SVNCLEANFILES); fi
dist-hook:
sed $(srcdir)/Makefile.dist.am -e 's/Makefile\.dist/Makefile/g' > $(distdir)/Makefile.am
sed $(srcdir)/Makefile.dist.in -e 's/Makefile\.dist/Makefile/g' > $(distdir)/Makefile.in
include $(top_srcdir)/am/latex
include $(top_srcdir)/am/webstuff
include $(top_srcdir)/am/global-rules
# $Id: Makefile.am 724 2007-03-01 11:30:49Z christi $
SUBDIRS = doxygen
docdir=$(datadir)/doc/dune-subgrid
#doc_DATA = istl.pdf
CONFIG_CLEAN_FILES = *.dist
include $(top_srcdir)/am/latex
include $(top_srcdir)/am/webstuff
include $(top_srcdir)/am/global-rules
set(BASEDIR ../..)
set(CURDIR doc/doxygen)
# include not needed for CMake
# include $(top_srcdir)/am/doxygen
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
# Create Doxyfile.in and Doxyfile, and doxygen documentation
add_doxygen_target()
\ No newline at end of file
This diff is collapsed.
INPUT += ../../dune/subgrid ../../KnownIssues ../../MainPage
EXCLUDE +=
EXAMPLE_PATH +=
EXAMPLE_PATTERNS +=
IMAGE_PATH +=
PREDEFINED +=
BASEDIR=../..
CURDIR=doc/doxygen
include $(top_srcdir)/am/doxygen
include $(top_srcdir)/am/global-rules
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
CXX=@CXX@
CC=@CC@
Name: @PACKAGE_NAME@
Version: @VERSION@
Description: Dune (Distributed and Unified Numerics Environment) subgrid module
URL: http://dune-project.org/
Requires: @REQUIRES@
Libs: -L${libdir} -ldunesubgrid
Cflags: -I${includedir}
Module: dune-subgrid
Maintainer: Carsten Graeser (graeser@math.fu-berlin.de)
Version: 2.4-svn
Depends: dune-common dune-geometry dune-grid
Suggests: dune-alugrid
# $Id: $
set(SUBDIRS subgrid)
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
foreach(i ${SUBDIRS})
if(${i} STREQUAL "test")
set(opt EXCLUDE_FROM_ALL)
endif(${i} STREQUAL "test")
add_subdirectory(${i} ${opt})
unset(opt)
endforeach(i ${SUBDIRS})
# $Id: $
SUBDIRS = subgrid
include $(top_srcdir)/am/global-rules
set(SUBDIRS subgrid facetools test)
# the standard debug streams are put into the libdune
#noinst_LTLIBRARIES = libcommon.la
#libcommon_la_SOURCES = stdstreams.cc configparser.cc
set(AM_CPPFLAGS ${AM_CPPFLAGS} -I${top_srcdir}/..)
set(subgridincludedir ${CMAKE_INSTALL_INCLUDEDIR}/dune/subgrid)
set(subgridinclude_HEADERS subgrid.hh)
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
install(FILES ${subgridinclude_HEADERS} DESTINATION ${subgridincludedir})
foreach(i ${SUBDIRS})
if(${i} STREQUAL "test")
set(opt EXCLUDE_FROM_ALL)
endif(${i} STREQUAL "test")
add_subdirectory(${i} ${opt})
unset(opt)
endforeach(i ${SUBDIRS})
SUBDIRS = subgrid facetools test
# the standard debug streams are put into the libdune
#noinst_LTLIBRARIES = libcommon.la
#libcommon_la_SOURCES = stdstreams.cc configparser.cc
AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/..
subgridincludedir = $(includedir)/dune/subgrid
subgridinclude_HEADERS = subgrid.hh
include $(top_srcdir)/am/global-rules
set(facetoolsincludedir ${CMAKE_INSTALL_INCLUDEDIR}/dune/subgrid/facetools)
set(facetoolsinclude_HEADERS intersectioniteratorfactory.hh)
# include not needed for CMake
# include $(top_srcdir)/am/global-rules
install(FILES ${facetoolsinclude_HEADERS} DESTINATION ${facetoolsincludedir})
\ No newline at end of file
facetoolsincludedir = $(includedir)/dune/subgrid/facetools
facetoolsinclude_HEADERS = intersectioniteratorfactory.hh
include $(top_srcdir)/am/global-rules
#ifndef DUNE_SUBGRID_FACETOOLS_INTERSECTION_ITERATOR_FACTORY_HH
#define DUNE_SUBGRID_FACETOOLS_INTERSECTION_ITERATOR_FACTORY_HH
namespace Dune {
namespace Facetools {
/**
* \brief Simple factory for IntersectionIterators on a grid
*
* \tparam GridType type of underlying grid
*
* If you need to access intersection iterators for various entities
* without you have to either create/copy the corresponding GridView
* for each entity anew or to cache all potentially needed GridViews
* beforehand. IntersectionIteratorFactory does exactly this and
* provides simple access to Leaf- and LevelIntersectionIterators
* without having to do this manually.
*/
template<class GridType>
class IntersectionIteratorFactory
{
typedef typename GridType::LeafGridView LeafGridView;
typedef typename GridType::LevelGridView LevelGridView;