Skip to content
Snippets Groups Projects
Commit 10220c62 authored by Jorrit Fahlke's avatar Jorrit Fahlke
Browse files

merge revisions 5782 to 5803 from trunk

[[Imported from SVN: r5804]]
parent 66e95c75
No related branches found
No related tags found
No related merge requests found
Showing
with 255 additions and 146 deletions
# $Id$
EXTRA_DIST = inkscape.am webstuff global-rules sourcescheck \
no-check-without-lib latex checklog doxygen top-rules \
headercheck
no-check-without-lib latex checklog doxygen top-rules \
headercheck documentation
amdir = $(datadir)/dune-common/am
am_DATA = $(EXTRA_DIST)
......
# -*- Makefile -*-
# $Id: global-rules 5267 2008-09-10 10:45:42Z christi $
maintainer-clean-local: doc-clean
###
# build doc / web-install recursively
doc-am:
web-install-am: web-install-local
doc-local:
web-install-local:
doc-clean:
rm -f $(DOCFILES)
web-install: web-install-recursive
doc: doc-recursive
web-install-recursive \
doc-recursive:
@set fnord $$MAKEFLAGS; amf=$$2; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $(subdir)/$$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
(cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
# -*-makefile-automake-*-
if BUILD_DOCS
DOXYGENTAG = doxygen-tag
DOXYGEN_HTML = html
# EXTRAINSTALL in the html subdirectory
DOXYGENHTMLFILES = *.html *.css *.png *.gif
DOXYGENDISTFILES = doxygen-tag
DOXYGENINSTALL = $(DOXYGENHTMLFILES) ../doxygen.log ../doxyerr.log
endif # BUILD_DOCS
DISTCLEANFILES = doxygen.log doxygen-tag
doxygendir = $(docdir)/doxygen
####
# doxygen style files
if DUNEWEB
if WML
DUNEWEBDOXY = @DUNEWEBDIR@/doc/doxygen
# themeing doxygen
DOXYGENHEADER = doxy-header.html
DOXYGENFOOTER = doxy-footer.html
DUNEWEBDOXY = @DUNEWEBDIR@/doc/doxygen
# themeing doxygen
DOXYGENHEADER = doxy-header.html
DOXYGENFOOTER = doxy-footer.html
doxy-header.html: BASEDIR=../../..
doxy-footer.html: BASEDIR=../../..
......@@ -32,38 +26,28 @@ doxy-footer.html: @DUNEWEBDIR@/doc/doxygen/doxy-footer.wml
endif # WML
endif # DUNEWEB
if DOXYGEN
DOXYGENFILES = $(DOXYGEN_HTML) $(DOXYGENHEADER) $(DOXYGENFOOTER)
endif # DOXYGEN
#we need this in the distribution
####
# how to build doxygen documentation
if BUILD_DOCS
install-doxygen-data: $(DOXYGEN_HTML)
$(mkinstalldirs) $(DESTDIR)/$(doxygendir); \
dir=$(srcdir); \
if test -d ./html; then dir=.; fi; echo "dir=$$dir"; \
list='$(DOXYGENHTMLFILES)'; \
for p in $$list; do \
$(install_sh_DATA) $$dir/html/$$p $(DESTDIR)/$(doxygendir); \
done
uninstall-doxygen-data:
list='$(DOXYGENHTMLFILES)'; \
for p in $$list; do \
rm -f $(DESTDIR)/$(doxygendir)/$$p; \
done
install-data-local: install-doxygen-data
uninstall-local: uninstall-doxygen-data
DOXYGENTAG = doxygen-tag
DOXYGEN_HTML = html
# EXTRAINSTALL in the html subdirectory
DOXYGENHTMLFILES = *.html *.css *.png *.gif
DOXYGENDISTFILES = doxygen-tag
DOXYGENINSTALL = $(DOXYGENHTMLFILES) ../doxygen.log ../doxyerr.log
endif # BUILD_DOCS
if DOXYGEN
DUNEDOXYNIZE=@DUNE_COMMON_ROOT@/bin/dunedoxynize
$(srcdir)/Doxyfile.in: FORCE
if test -f $(srcdir)/Doxylocal && test $(srcdir)/Doxylocal -nt $(srcdir)/Doxyfile.in; then \
cd $(top_srcdir) && $(DUNEDOXYNIZE); \
fi
# build doxygen when 'make doc' is called
# what files does the doxygen-generated stuff depend on (find-syntax)
DOXYGEN_DEPENDON = -name \*.cc -o -name \*.hh -o -name \*.png -o -name Doxyfile -o -name modules
# check dependency ourself to be robust
doxygen-tag: FORCE Doxyfile $(DOXYGENHEADER) $(DOXYGENFOOTER)
set -e; \
......@@ -76,7 +60,15 @@ doxygen-tag: FORCE Doxyfile $(DOXYGENHEADER) $(DOXYGENFOOTER)
if test -x "$(DUNEWEBDOXY)/update-doxygen.css"; \
then $(DUNEWEBDOXY)/update-doxygen.css $(abs_builddir)/html; fi; \
fi
doc-doxygen: $(DOXYGEN_HTML) $(DOXYGENHEADER) $(DOXYGENFOOTER)
else
doc-doxygen:
endif # DOXYGEN
doc-am: doc-doxygen
####
# how to store doxygen in the tarball
if DOXYGEN
doxygen-dist-install: doxygen-tag
set -e;\
mkdir $(distdir)/html; \
......@@ -91,17 +83,37 @@ dist-hook: doxygen-dist-install
html: doxygen-tag
DUNEDOXYNIZE=@DUNE_COMMON_ROOT@/bin/dunedoxynize
endif # DOXYGEN
$(srcdir)/Doxyfile.in: FORCE
if test -f $(srcdir)/Doxylocal && test $(srcdir)/Doxylocal -nt $(srcdir)/Doxyfile.in; then \
cd $(top_srcdir) && $(DUNEDOXYNIZE); \
fi
####
# how to install doxygen
if BUILD_DOCS
include $(top_srcdir)/am/webstuff
install-doxygen-data: $(DOXYGEN_HTML)
$(mkinstalldirs) $(DESTDIR)/$(doxygendir); \
dir=$(srcdir); \
if test -d ./html; then dir=.; fi; echo "dir=$$dir"; \
list='$(DOXYGENHTMLFILES)'; \
for p in $$list; do \
$(install_sh_DATA) $$dir/html/$$p $(DESTDIR)/$(doxygendir); \
done
if WML
# how to install the doxygen documentation
uninstall-doxygen-data:
list='$(DOXYGENHTMLFILES)'; \
for p in $$list; do \
rm -f $(DESTDIR)/$(doxygendir)/$$p; \
done
install-data-local: install-doxygen-data
uninstall-local: uninstall-doxygen-data
endif # BUILD_DOCS
####
# howto install doxygen in the web page
include $(top_srcdir)/am/webstuff
if DUNEWEB
# how to install the doxygen documentation for the web site
web-install-doxygen:
if test -d $(DUNEWEBDIR) && test -r $(DUNEWEBDIR)/Make.global ; then \
pushd html; \
......@@ -109,15 +121,23 @@ web-install-doxygen:
EXTRAINSTALL="$(DOXYGENINSTALL)" CURDIR="$(CURDIR)/@DUNE_MOD_NAME@-html" install ; \
popd; \
fi
endif # WML
else
web-install-doxygen:
endif # DUNEWEB
web-install-am: web-install-doxygen
web-install: web-install-doxygen web-install-default
endif # DOXYGEN
####
# how to clean the doxygen stuff
maintainer-clean-local: doxygen-maintainer-clean
dist-clean-local: doxygen-dist-clean
clean-local: clean-doxygen
doxygen-dist-clean:
rm -f doxygen.log doxygen-tag
clean-doxygen:
rm -rf $(DOXYGENTAG) $(DOXYGENFILES) *~
doxygen-maintainer-clean:
rm -rf $(DOXYGENTAG) $(DOXYGEN_HTML) $(DOXYGENHEADER) $(DOXYGENFOOTER) *~
rm -f doxyerr.log doxygen.log
test -f Doxylocal && rm -f Doxygen.in
# nice trick from the GNU make infopage to force a rule to run
FORCE:
......@@ -14,3 +14,6 @@ include $(top_srcdir)/am/headercheck
# add "check-log"-target to create automated build logs
include $(top_srcdir)/am/checklog
# add "doc"-target to create and clean documentation
include $(top_srcdir)/am/documentation
# -*- makefile -*-
# $Id$
# Rules for latex stuff
# rerun TEX if log-file suggests that
......
......@@ -15,3 +15,8 @@ module_DATA = dune.module
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = @DUNE_MOD_NAME@.pc
maintainer-clean-local: top-clean
top-clean:
rm -f dependencies.m4
\ No newline at end of file
......@@ -9,19 +9,25 @@
# CURDIR should be defined in the same way as in dune-web
####
# how to run wml
if DUNEWEB
WMLCMD = cd $(DUNEWEBDIR) && @WML@ --nocd -DROOT=$(BASEDIR)
else
WMLCMD = cd $(DUNE_COMMON_ROOT)/doc && @WML@ --nocd
endif
####
# how to build html files
if WML
.wml.html:
$(WMLCMD) -I $(abs_srcdir) $(abs_builddir)/$< -o $(abs_builddir)/$@
endif
####
# howto install into the webpage
if DUNEWEB
web-install-default: all
web-install-default: doc
if test -d $(DUNEWEBDIR) && test -r $(DUNEWEBDIR)/Make.global ; then \
for DIR in $(SUBDIRS) ; do \
$(MAKE) -C $$DIR web-install || exit 1; \
......@@ -29,6 +35,14 @@ web-install-default: all
$(MAKE) -f $(DUNEWEBDIR)/Make.global \
EXTRAINSTALL="$(EXTRAINSTALL)" CURDIR="$(CURDIR)" install ; \
fi
else
web-install-default:
endif
web-install: web-install-default
web-build: $(PAGES)
web-clean:
rm -f $(PAGES)
maintainer-clean-local: web-clean
web-install-am: web-install-default
doc-am: web-build
......@@ -314,6 +314,9 @@ run_default_configure () {
fi
PARAMS="$PARAMS \"--with-$name=$path\""
done
if test "x$HAVE_duneweb" == "xyes"; then
PARAMS="$PARAMS \"--with-duneweb=$PATH_duneweb\""
fi
PARAMS="$PARAMS ACLOCAL_AMFLAGS=\"$ACLOCAL_FLAGS\""
echo ./configure "$PARAMS"
eval ./configure "$PARAMS" || exit 1
......@@ -638,6 +641,7 @@ while test $# -gt 0; do
cat > $fname <<EOF
m4_define([DUNE_AC_INIT],[
AC_INIT([$name], [$version], [$maintainer])
AM_INIT_AUTOMAKE([foreign 1.5 tar-pax])
AC_SUBST([DUNE_MOD_VERSION], [$version])
AC_SUBST([DUNE_MOD_NAME], [$name])
AC_SUBST([DUNE_MAINTAINER_NAME], [$maintainer])
......
......@@ -615,23 +615,15 @@ echo "- $PROJECT/doc/Makefile.am"
cat> "$PROJECT/doc/Makefile.am" << CC_DELIM
SUBDIRS = doxygen
CURDIR = doc
BASEDIR = ..
# add list of html files to generate from wml
PAGES=
docdir=\$(datadir)/doc/${PROJECT}
include \$(top_srcdir)/am/webstuff
CLEANFILES = \$(PAGES)
if ! BUILD_DOCS
# add tag to notify that dist has been build without documentation
dist-hook:
echo "# No documentation included in distribution! " > \$(distdir)/\$(DOCUMENTATION_TAG_FILE)
endif
include \$(top_srcdir)/am/global-rules
CC_DELIM
......@@ -690,29 +682,10 @@ cat> "$PROJECT/doc/doxygen/Makefile.am" << CC_DELIM
BASEDIR=../..
CURDIR=doc/doxygen
WHAT=
doxygendir = \$(datadir)/doc/$PROJECT/doxygen
doxygen_DATA = \$(WHAT)
#we need this in the distribution
EXTRA_DIST = \$(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
CC_DELIM
## done
......
......@@ -11,9 +11,6 @@ if WML
endif
endif
# automatically create these web pages
all: $(PAGES)
# setting like in dune-web
CURDIR=doc
# position of the web base directory,
......@@ -27,20 +24,8 @@ doc_DATA = $(PAGES) example.opts
EXTRA_DIST = $(PAGES) example.opts
if ! BUILD_DOCS
# add tag to notify that dist has been build without documentation
dist-hook:
echo "# No documentation included in distribution! " > $(distdir)/$(DOCUMENTATION_TAG_FILE)
endif
# include rules for wml -> html transformation
include $(top_srcdir)/am/webstuff
# remove html pages on ``make clean''
SVNCLEANFILES = $(PAGES)
clean-local:
if test -e $(top_srcdir)/doc/doxygen/Doxydep; then rm -rf $(SVNCLEANFILES); fi
# include further rules needed by Dune
include $(top_srcdir)/am/global-rules
......@@ -4,8 +4,6 @@ if BUILD_DOCS
DOCS=buildsystem.pdf buildsystem.ps
endif
all: $(DOCS)
# setting like in dune-web
CURDIR=doc/buildsystem
# position of the web base directory,
......
......@@ -865,6 +865,12 @@ setion ``Developing Dune'' on
\texttt{\url{http://www.dune-project.org/}} for details). \em After
running \duneproject the basic setup is already done\em.
You should only have one \texttt{doxygen} directory and the files are
automatically installed into\\
\texttt{\$prefix/share/doc/\$modulename/doxygen/}. If for any reason
you really have to change the installation path you can set the
variable \texttt{doxygendir} \em after \em including \texttt{am/doxygen}.
The file \texttt{doc/doxygen/Doxylocal}\xspace contains the basic
information where header and source files are located in your
project. Usually you will not have to adjust this file, it is already
......@@ -883,6 +889,9 @@ Webpages are created from wml sources, using the program \texttt{wml}
(\texttt{\url{http://thewml.org/}}).\\
\texttt{\$(top\_srcdir)/am/webstuff} contains the necessary rules.
Add all \texttt{html} files to the \texttt{PAGES} variable to build
and install them.
\hspace*{-2ex}\begin{minipage}{\textwidth}
\begin{lst}[File Makefile.am] \mbox{}
\lstinputlisting[language=make]{../Makefile.am}
......
......@@ -8,8 +8,6 @@ PAGES = codingstyle.html portability.html \
endif
endif
all: $(PAGES)
# place in website
BASEDIR=../..
CURDIR=doc/devel
......
......@@ -3,31 +3,20 @@
# setting like in dune-web
BASEDIR=../..
CURDIR=doc/doxygen
WHAT =
PAGES =
if BUILD_DOCS
if WML
WHAT += bestpractice.html
PAGES += bestpractice.html
endif
endif
doxygendir = $(datadir)/doc/dune-common/doxygen
doxygen_DATA = $(WHAT)
#we need this in the distribution
EXTRA_DIST = $(WHAT) $(DOXYGENDISTFILES)
all: $(WHAT) $(DOXYGENFILES)
# add some more stuff to install and tarball
doxygen_DATA = $(PAGES)
EXTRA_DIST = $(PAGES)
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
foo:
echo $(PAGES)
......@@ -186,6 +186,8 @@ namespace Dune {
object it references
*/
void operator & ();
friend class BitSetVectorReference<block_size, Alloc>;
};
/**
......@@ -234,7 +236,6 @@ namespace Dune {
{
for(int i=0; i<block_size; ++i)
getBit(i) = b;
return (*this);
}
......@@ -242,8 +243,7 @@ namespace Dune {
BitSetVectorReference& operator=(const bitset & b)
{
for(int i=0; i<block_size; ++i)
getBit(i) = b[i];
getBit(i) = b.test(i);
return (*this);
}
......@@ -251,8 +251,7 @@ namespace Dune {
BitSetVectorReference& operator=(const BitSetVectorConstReference & b)
{
for(int i=0; i<block_size; ++i)
getBit(i) = b[i];
getBit(i) = b.test(i);
return (*this);
}
......@@ -260,32 +259,55 @@ namespace Dune {
BitSetVectorReference& operator=(const BitSetVectorReference & b)
{
for(int i=0; i<block_size; ++i)
getBit(i) = b.getBit(i);
getBit(i) = b.test(i);
return (*this);
}
//! Bitwise and.
//! Bitwise and (for bitset).
BitSetVectorReference& operator&=(const bitset& x)
{
for (size_type i=0; i<block_size; i++)
getBit(i) = (test(i) & x.test(i));
return *this;
}
//! Bitwise and (for BitSetVectorConstReference and BitSetVectorReference)
BitSetVectorReference& operator&=(const BitSetVectorConstReference& x)
{
for (size_type i=0; i<block_size; i++)
set(i, getBit(i) & x.getBit(i));
getBit(i) = (test(i) & x.test(i));
return *this;
}
//! Bitwise inclusive or.
//! Bitwise inclusive or (for bitset)
BitSetVectorReference& operator|=(const bitset& x)
{
for (size_type i=0; i<block_size; i++)
getBit(i) = (test(i) | x.test(i));
return *this;
}
//! Bitwise inclusive or (for BitSetVectorConstReference and BitSetVectorReference)
BitSetVectorReference& operator|=(const BitSetVectorConstReference& x)
{
for (size_type i=0; i<block_size; i++)
set(i, getBit(i) | x.getBit(i));
getBit(i) = (test(i) | x.test(i));
return *this;
}
//! Bitwise exclusive or (for bitset).
BitSetVectorReference& operator^=(const bitset& x)
{
for (size_type i=0; i<block_size; i++)
getBit(i) = (test(i) ^ x.test(i));
return *this;
}
//! Bitwise exclusive or.
//! Bitwise exclusive or (for BitSetVectorConstReference and BitSetVectorReference)
BitSetVectorReference& operator^=(const BitSetVectorConstReference& x)
{
for (size_type i=0; i<block_size; i++)
set(i, getBit(i) ^ x.getBit(i));
getBit(i) = (test(i) ^ x.test(i));
return *this;
}
......@@ -293,7 +315,7 @@ namespace Dune {
BitSetVectorReference& operator<<=(size_type n)
{
for (size_type i=0; i<block_size-n; i++)
set(i, getBit(i+n));
getBit(i) = test(i+n);
return *this;
}
......@@ -301,7 +323,7 @@ namespace Dune {
BitSetVectorReference& operator>>=(size_type n)
{
for (size_type i=0; i<block_size-n; i++)
set(i+n, getBit(i));
getBit(i+n) = test(i);
return *this;
}
......@@ -346,6 +368,7 @@ namespace Dune {
return *this;
}
using BitSetVectorConstReference::test;
using BitSetVectorConstReference::operator[];
reference operator[](size_type i)
......
......@@ -26,13 +26,23 @@ namespace Dune {
template <class Domain, class Range>
class Function
{
typedef typename ConstantVolatileTraits<typename TypeTraits< Domain >::ReferredType >::UnqualifiedType RawDomainType;
typedef typename ConstantVolatileTraits<typename TypeTraits< Range >::ReferredType >::UnqualifiedType RawRangeType;
public:
//! Raw type of input variable with removed reference and constness
typedef typename ConstantVolatileTraits<typename TypeTraits< Domain >::ReferredType >::UnqualifiedType DomainType;
typedef RawRangeType RangeType;
//! Raw type of output variable with removed reference and constness
typedef typename ConstantVolatileTraits<typename TypeTraits< Range >::ReferredType >::UnqualifiedType RangeType;
typedef RawDomainType DomainType;
//! Traits class containing raw types
struct Traits
{
typedef RawDomainType DomainType;
typedef RawRangeType RangeType;
};
/**
* \brief Function evaluation.
......
......@@ -27,7 +27,8 @@ namespace Dune {
simplex, //!< Simplicial element in any nonnegative dimension
cube, //!< Cube element in any nonnegative dimension
pyramid, //!< Four sided pyramid in three dimensions
prism //!< Prism element in three dimensions
prism, //!< Prism element in three dimensions
none //!< Generic element in any nonnegative dimension
};
private:
......@@ -88,6 +89,9 @@ namespace Dune {
/** \brief Make a hypercube of given dimension */
void makeCube(unsigned int dim) {basicType_ = cube; dim_ = dim;}
/** \brief Make a singular of given dimension */
void makeNone(unsigned int dim) {basicType_ = none; dim_ = dim;}
/*@}*/
......@@ -123,6 +127,9 @@ namespace Dune {
/** \brief Return true if entity is a cube of any dimension */
bool isCube() const {return basicType_==cube || dim_ < 2;}
/** \brief Return true if entity is a singular of any dimension */
bool isNone() const {return basicType_==none;}
/** \brief Return dimension of the entity */
unsigned int dim() const {return dim_;}
......@@ -171,6 +178,9 @@ namespace Dune {
case prism :
s << "prism";
break;
case none :
s << "(none, " << a.dim_ << ")";
break;
default :
s << "invalid geometry type";
}
......@@ -188,6 +198,7 @@ namespace Dune {
case GeometryType::cube : s << "cube"; break;
case GeometryType::pyramid : s << "pyramid"; break;
case GeometryType::prism : s << "prism"; break;
case GeometryType::none : s << "none"; break;
default : s << "[unknown GeometryType::BasicType: " << int(type) << "]";
}
return s;
......
......@@ -6,7 +6,6 @@ semantic.cache
fvectortest
mpicollcomm
lrutest
parsetest
test-stack
arraylisttest
shared_ptrtest
......
# -*- tab-width: 4; indent-tabs-mode: nil -*-
# $Id$
TESTPROGS = parsetest test-stack arraylisttest shared_ptrtest \
TESTPROGS = test-stack arraylisttest shared_ptrtest \
iteratorfacadetest iteratorfacadetest2 tuplestest fvectortest fmatrixtest \
poolallocatortest settest gcdlcmtest streamtest \
bigunsignedinttest mpihelpertest singletontest mpicollcomm \
......@@ -57,8 +57,6 @@ fassigntest_SOURCES = fassigntest.cc
bigunsignedinttest_SOURCES=bigunsignedinttest.cc
parsetest_SOURCES = parsetest.cc
lrutest_SOURCES = lrutest.cc
sllisttest_SOURCES = sllisttest.cc
......
......@@ -95,6 +95,34 @@ void testContainer(BBF & bbf)
z != y;
y != z;
// &=
y &= cbbf[2];
y &= bbf[3];
y &= x;
x &= y;
x &= z;
y &= z;
// |=
y |= cbbf[2];
y |= bbf[3];
y |= x;
x |= y;
x |= z;
y |= z;
// ^=
y ^= cbbf[2];
y ^= bbf[3];
y ^= x;
x ^= y;
x ^= z;
y ^= z;
// shift operator
y <<= 1;
y >>= 1;
// flip
y.flip();
y.flip(2);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment