Skip to content
Snippets Groups Projects
Commit 9722f16c authored by Oliver Sander's avatar Oliver Sander Committed by sander@PCPOOL.MI.FU-BERLIN.DE
Browse files

a new module for a general solver framework

[[Imported from SVN: r2333]]
parents
No related branches found
No related tags found
No related merge requests found
# $Id: duneproject 5500 2009-04-03 13:45:04Z sander $
# we need the module file to be able to build via dunecontrol
EXTRA_DIST=dune.module
DIST_SUBDIRS = doc src m4
SUBDIRS = src m4
if BUILD_DOCS
# TODO: set up documentation tree automatically
#SUBDIRS += doc
endif
# don't follow the full GNU-standard
# we need automake 1.5
AUTOMAKE_OPTIONS = foreign 1.5
# pass most important options when "make distcheck" is used
DISTCHECK_CONFIGURE_FLAGS = --with-dune-common=$(DUNE_COMMON_ROOT) --with-dune-grid=$(DUNE_GRID_ROOT) --with-dune-istl=$(DUNE_ISTL_ROOT) CXX="$(CXX)" CC="$(CC)"
include $(top_srcdir)/am/top-rules
include $(top_srcdir)/am/global-rules
README 0 → 100644
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 (SVN version) or under share/doc/dune-common/buildsystem if you installed DUNE!
$Id: duneproject 5500 2009-04-03 13:45:04Z sander $
# -*- 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
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([src/dune_solvers.cc])
AM_CONFIG_HEADER([config.h])
# we need no more than the standard DE-stuff
# this module depends on dune-common dune-grid dune-istl
# this implies checking for [dune-common], [dune-grid], [dune-istl]
DUNE_CHECK_ALL
# Create a symlink dune --> . in the main module directory
DUNE_SYMLINK
# implicitly set the Dune-flags everywhere
AC_SUBST(AM_CPPFLAGS, $DUNE_CPPFLAGS)
AC_SUBST(AM_LDFLAGS, $DUNE_LDFLAGS)
LIBS="$DUNE_LIBS"
AC_CONFIG_FILES([
Makefile
src/Makefile
doc/Makefile
doc/doxygen/Makefile
m4/Makefile
dune-solvers.pc
])
AC_OUTPUT
# finally print the summary information
DUNE_SUMMARY_ALL
SUBDIRS = doxygen
CURDIR = doc
BASEDIR = ..
docdir=$(datadir)/doc/dune-solvers
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
This diff is collapsed.
BASEDIR=../..
CURDIR=doc/doxygen
WHAT=
doxygendir = $(datadir)/doc/dune-solvers/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
prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
includedir=@includedir@
CXX=@CXX@
CC=@CC@
DEPENDENCIES=@REQUIRES@
Name: @PACKAGE_NAME@
Version: @VERSION@
Description: dune-solvers module
URL: http://dune-project.org/
Requires: dune-common dune-grid dune-istl
Libs: -L
Cflags: -I
################################
# Dune module information file #
################################
#Name of the module
Module: dune-solvers
Version: 0.9
Maintainer: sander@mi.fu-berlin.de
#depending on
Depends: dune-common dune-grid dune-istl
M4FILES = dune-solvers.m4
aclocaldir = $(datadir)/aclocal
aclocal_DATA = $(M4FILES)
EXTRA_DIST = $(M4FILES)
include $(top_srcdir)/am/global-rules
# Additional checks needed to build the module
AC_DEFUN([DUNE_SOLVERS_CHECKS])
# Additional checks needed to find the module
AC_DEFUN([DUNE_SOLVERS_CHECK_MODULE])
SUBDIRS =
noinst_PROGRAMS = dune_solvers
dune_solvers_SOURCES = dune_solvers.cc
dune_solvers_CXXFLAGS = $(MPI_CPPFLAGS) $(UG_CPPFLAGS) $(AMIRAMESH_CPPFLAGS) $(ALBERTA_CPPFLAGS) $(ALU_CPPFLAGS)
dune_solvers_LDADD = $(MPI_LDFLAGS) $(ALBERTA_LDFLAGS) $(ALBERTA_LIBS) $(ALU_LIBS) $(AMIRAMESH_LDFLAGS) $(AMIRAMESH_LIBS) $(UG_LDFLAGS) $(UG_LIBS) $(MPI_LDFLAGS) $(DUNE_LDFLAGS) $(DUNE_LIBS)
# don't follow the full GNU-standard
# we need automake 1.5
AUTOMAKE_OPTIONS = foreign 1.5
# pass most important options when "make distcheck" is used
DISTCHECK_CONFIGURE_FLAGS = --with-dune-common=$(DUNE_COMMON_ROOT) --with-dune-grid=$(DUNE_GRID_ROOT) --with-dune-istl=$(DUNE_ISTL_ROOT) CXX="$(CXX)" CC="$(CC)"
include $(top_srcdir)/am/global-rules
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <iostream>
#include"dune/common/mpihelper.hh" // An initializer of MPI
#include"dune/common/exceptions.hh" // We use exceptions
int main(int argc, char** argv)
{
try{
//Maybe initialize Mpi
Dune::MPIHelper& helper = Dune::MPIHelper::instance(argc, argv);
std::cout << "Hello World! This is dune-solvers." << std::endl;
if(Dune::MPIHelper::isFake)
std::cout<< "This is a sequential program." << std::endl;
else
std::cout<<"I am rank "<<helper.rank()<<" of "<<helper.size()
<<" processes!"<<std::endl;
return 0;
}
catch (Dune::Exception &e){
std::cerr << "Dune reported error: " << e << std::endl;
}
catch (...){
std::cerr << "Unknown exception thrown!" << std::endl;
}
}
A stamp file to signify that this directory comes from a version control system, not an unpacked tarball
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment