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

IPOpt solver moved from ag-common to dune-solvers

[[Imported from SVN: r2429]]
parent 62e628c8
Branches
Tags
No related merge requests found
......@@ -3,13 +3,10 @@
# we need the module file to be able to build via dunecontrol
EXTRA_DIST=dune.module
DIST_SUBDIRS = doc src m4
SUBDIRS = src m4
SUBDIRS = src m4 dune-solvers
if BUILD_DOCS
# TODO: set up documentation tree automatically
#SUBDIRS += doc
SUBDIRS += doc
endif
# don't follow the full GNU-standard
......
......@@ -7,9 +7,7 @@ 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]
# Run all checks
DUNE_CHECK_ALL
# Create a symlink dune --> . in the main module directory
......@@ -23,6 +21,11 @@ LIBS="$DUNE_LIBS"
AC_CONFIG_FILES([
Makefile
src/Makefile
dune-solvers/Makefile
dune-solvers/iterationsteps/Makefile
dune-solvers/norms/Makefile
dune-solvers/solvers/Makefile
dune-solvers/transferoperators/Makefile
doc/Makefile
doc/doxygen/Makefile
m4/Makefile
......
SUBDIRS = iterationsteps norms solvers transferoperators
dune_solversdir = $(includedir)/dune/dune-solvers
dune_solvers_HEADERS = boxconstraint.hh numproc.hh
include $(top_srcdir)/am/global-rules
SUBDIRS =
iterationstepsdir = $(includedir)/dune/dune-solvers/iterationsteps
iterationsteps_HEADERS = amgstep.hh blockgsstep.hh blockgsstep.cc iterationstep.hh \
lineariterationstep.hh mmgstep.hh mmgstep.cc multigridstep.hh multigridstep.cc \
projectedblockgsstep.hh projectedblockgsstep.cc truncatedblockgsstep.hh \
truncatedsaddlepointgsstep.hh trustregiongsstep.cc trustregiongsstep.hh
include $(top_srcdir)/am/global-rules
\ No newline at end of file
SUBDIRS =
normsdir = $(includedir)/dune/dune-solvers/norms
norms_HEADERS = blocknorm.hh diagnorm.hh energynorm.hh fullnorm.hh h1seminorm.hh \
norm.hh pnorm.hh sumnorm.hh
include $(top_srcdir)/am/global-rules
\ No newline at end of file
SUBDIRS =
solversdir = $(includedir)/dune/dune-solvers/solvers
solvers_HEADERS = cgsolver.cc cgsolver.hh iterativesolver.cc iterativesolver.hh \
loopsolver.cc loopsolver.hh solver.hh tcgsolver.cc tcgsolver.hh
include $(top_srcdir)/am/global-rules
\ No newline at end of file
This diff is collapsed.
SUBDIRS =
transferoperatorsdir = $(includedir)/dune/dune-solvers/transferoperators
transferoperators_HEADERS = compressedmultigridtransfer.hh multigridtransfer.hh \
truncatedcompressedmgtransfer.hh truncatedmgtransfer.hh densemultigridtransfer.hh \
mandelobsrestrictor.cc obstaclerestrictor.hh truncateddensemgtransfer.cc \
genericmultigridtransfer.hh mandelobsrestrictor.hh truncatedcompressedmgtransfer.cc \
truncateddensemgtransfer.hh
include $(top_srcdir)/am/global-rules
\ No newline at end of file
# searches for ipopt headers and libs
AC_DEFUN([DUNE_IPOPT],[
AC_REQUIRE([AC_PROG_CXX])
AC_ARG_WITH(ipopt,
AC_HELP_STRING([--with-ipopt=PATH],[directory with IPOpt inside]))
# store values
ac_save_LDFLAGS="$LDFLAGS"
ac_save_CPPFLAGS="$CPPFLAGS"
ac_save_LIBS="$LIBS"
## do nothing if --without-amiramesh is used
if test x$with_ipopt != xno ; then
# is --with-ipopt=bla used?
if test "x$with_ipopt" != x ; then
if ! test -d $with_ipopt; then
AC_MSG_WARN([IPOpt directory $with_ipopt does not exist])
else
# expand tilde / other stuff
IPOPTROOT=`cd $with_ipopt && pwd`
fi
fi
if test "x$IPOPTROOT" = x; then
# use some default value...
IPOPTROOT="/usr/local/ipopt"
fi
IPOPT_LIB_PATH="$IPOPTROOT/lib"
IPOPT_INCLUDE_PATH="$IPOPTROOT/include"
LDFLAGS="$LDFLAGS -L$IPOPT_LIB_PATH"
CPPFLAGS="$CPPFLAGS -I$IPOPT_INCLUDE_PATH"
AC_LANG_PUSH([C++])
# check for header
AC_CHECK_HEADER([coin/IpIpoptApplication.hpp],
[IPOPT_CPPFLAGS="-I$IPOPT_INCLUDE_PATH"
HAVE_IPOPT="1"],
AC_MSG_WARN([IpIpoptApplication.hpp not found in $IPOPT_INCLUDE_PATH/coin]))
CPPFLAGS="$IPOPT_CPPFLAGS"
# if header is found...
if test x$HAVE_IPOPT = x1 ; then
LIBS="$LIBS -lipopt -llapack -lblas -lgfortran"
AC_LINK_IFELSE(AC_LANG_PROGRAM(
[#include "coin/IpIpoptApplication.hpp"],
[Ipopt::SmartPtr<Ipopt::IpoptApplication> app = new Ipopt::IpoptApplication();]),
[IPOPT_LIBS="-lipopt -llapack -lblas -lgfortran"
IPOPT_LDFLAGS="-L$IPOPT_LIB_PATH"
LIBS="$LIBS $IPOPT_LIBS"],
[HAVE_IPOPT="0"
AC_MSG_WARN(IPOpt not found!)])
fi
AC_LANG_POP([C++])
## end of ipopt check (--without wasn't set)
fi
with_ipopt="no"
# survived all tests?
if test x$HAVE_IPOPT = x1 ; then
AC_SUBST(IPOPT_LIBS, $IPOPT_LIBS)
AC_SUBST(IPOPT_LDFLAGS, $IPOPT_LDFLAGS)
AC_SUBST(IPOPT_CPPFLAGS, $IPOPT_CPPFLAGS)
AC_DEFINE(HAVE_IPOPT, 1, [Define to 1 if IPOpt library is found])
# add to global list
DUNE_PKG_LDFLAGS="$DUNE_PKG_LDFLAGS $IPOPT_LDFLAGS"
DUNE_PKG_LIBS="$DUNE_PKG_LIBS $IPOPT_LIBS"
DUNE_PKG_CPPFLAGS="$DUNE_PKG_CPPFLAGS $IPOPT_CPPFLAGS"
# set variable for summary
with_ipopt="yes"
else
AC_SUBST(IPOPT_LIBS, "")
AC_SUBST(IPOPT_LDFLAGS, "")
AC_SUBST(IPOPT_CPPFLAGS, "")
fi
# also tell automake
AM_CONDITIONAL(IPOPT, test x$HAVE_IPOPT = x1)
# reset old values
LIBS="$ac_save_LIBS"
CPPFLAGS="$ac_save_CPPFLAGS"
LDFLAGS="$ac_save_LDFLAGS"
DUNE_ADD_SUMMARY_ENTRY([IPOpt],[$with_ipopt])
])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment