-dnl -------------------------------------------------------------
-dnl IBM xlC 5.0 from the VisualAge C++ pack has a bug with the following
-dnl code. We can work around it if we insert code like "using namespace std;"
-dnl in the right place, but we'd like to do so only if absolutely necessary.
-dnl Check whether the compiler which we are using has this bug.
-dnl
-dnl Usage: DEAL_II_CHECK_IBM_XLC_ERROR
-dnl
-dnl -------------------------------------------------------------
-AC_DEFUN(DEAL_II_CHECK_IBM_XLC_ERROR, dnl
-[
- AC_MSG_CHECKING(for std::vector bug)
- AC_LANG(C++)
- CXXFLAGS="$CXXFLAGSG"
- AC_TRY_COMPILE(
- [
- namespace std {
- template <class _Ty> class allocator {};
- template<class _Ty, class _Ax = allocator<_Ty> > class vector{};
- }
-
- struct X {};
- template <int dim> void g (const std::vector<X> &x);
-
- void f () {
- std::vector<X> x;
- g<1> (x);
- };
- ],
- [],
- [
- AC_MSG_RESULT(no)
- ],
- [
- AC_MSG_RESULT(yes. using workaround)
- AC_DEFINE(XLC_WORK_AROUND_STD_BUG, 1,
- [Define if we have to work around a bug in IBM's xlC compiler.
- See the aclocal.m4 file in the top-level directory for a
- description of this bug.])
- ])
-])
-
-
-
dnl -------------------------------------------------------------
dnl Sun's Forte compiler (at least up to the Version 7 Early Access
dnl release) has a problem with the following code, when compiling
// $Id$
// Version: $Name$
//
-// Copyright (C) 2001, 2002, 2003 by the deal.II authors
+// Copyright (C) 2001, 2002 by the deal.II authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
applications. If so, then it is set to one, otherwise to zero. */
#undef DEAL_II_USE_MT
-/* Defined if multi-threading is to be achieved by using the ACE library */
-#undef DEAL_II_USE_MT_ACE
-
/* Defined if multi-threading is to be achieved by using the POSIX functions
*/
#undef DEAL_II_USE_MT_POSIX
/* Define to the version of this package. */
#undef PACKAGE_VERSION
-/* Define if we have to work around a bug in IBM's xlC compiler. See the
- aclocal.m4 file in the top-level directory for a description of this bug.
- */
-#undef XLC_WORK_AROUND_STD_BUG
-
/* If already available, do not define at all. Otherwise, define to __func__
if that is available. In all other cases, indicate that no information
about the present function is available for this compiler. */
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002 by the deal authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
}
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
- using namespace std;
-#endif
template <typename T>
unsigned int memory_consumption (const std::vector<T> &v)
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002 by the deal authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
#include <cmath>
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
template <int dim>
AutoDerivativeFunction<dim>::AutoDerivativeFunction (const double hh,
const unsigned int n_components,
#include <set>
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
-
template <int dim, int spacedim>
const unsigned int DataOutBase::Patch<dim,spacedim>::no_neighbor;
}
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
template <int dim>
void Function<dim>::value_list (const std::vector<Point<dim> > &points,
std::vector<double> &values,
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002 by the deal authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
-
template <int dim>
void
FunctionDerivative<dim>::value_list (const std::vector<Point<dim> > &points,
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002 by the deal authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
}
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
- using namespace std;
-#endif
-
template<int dim>
void
SquareFunction<dim>::value_list (const std::vector<Point<dim> > &points,
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
template <int dim>
Quadrature<dim>::Quadrature (const std::vector<Point<dim> > &points,
const std::vector<double> &weights)
// $Id$
// Version: $Name$
//
-// Copyright (C) 1998, 1999, 2000, 2001, 2002 by the deal authors
+// Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003 by the deal authors
//
// This file is subject to QPL and may not be distributed
// without copyright and license information. Please refer
}
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
template <int rank, int dim>
void
TensorFunction<rank, dim>::value_list (const std::vector<Point<dim> > &points,
#! /bin/sh
-# From configure.in Revision: 1.137 .
+# From configure.in Revision: 1.138 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.57.
#
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--with-multithreading=name If name==posix, or no name given, then use
- POSIX threads, otherwise assume use of ACE
- and use given argument as path to ACE
+ POSIX threads
--with-kdoc=DIR use kdoc installed in DIR
--with-docxx=PATH use the doc++ executable pointed to by PATH
_ACEOF
else
- echo "$as_me:$LINENO: checking for ACE" >&5
-echo $ECHO_N "checking for ACE... $ECHO_C" >&6
- if test -d "$withmultithreading" ; then
- echo "$as_me:$LINENO: result: found" >&5
-echo "${ECHO_T}found" >&6
- else
- echo "$as_me:$LINENO: result: not found" >&5
-echo "${ECHO_T}not found" >&6
- { { echo "$as_me:$LINENO: error: Invalid ACE path" >&5
-echo "$as_me: error: Invalid ACE path" >&2;}
+ { { echo "$as_me:$LINENO: error: Invalid flag for --with-multithreading" >&5
+echo "$as_me: error: Invalid flag for --with-multithreading" >&2;}
{ (exit 1); exit 1; }; }
- fi
-
-cat >>confdefs.h <<\_ACEOF
-#define DEAL_II_USE_MT_ACE 1
-_ACEOF
-
-
- if test "$enablemultithreading" = yes ; then
- if test "$GXX" = yes ; then
-
- echo "$as_me:$LINENO: checking whether compilation with ACE disallows flags" >&5
-echo $ECHO_N "checking whether compilation with ACE disallows flags... $ECHO_C" >&6
- ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
- CXXFLAGS="-pedantic -Werror -I$withmultithreading"
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-# include <ace/Thread_Manager.h>
-# include <ace/Synch.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-
- deal_II_ace_remove_pedantic="no"
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
- deal_II_ace_remove_pedantic="yes"
-
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
- if test $deal_II_ace_remove_pedantic = "no" ; then
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
- else
- echo "$as_me:$LINENO: result: -pedantic" >&5
-echo "${ECHO_T}-pedantic" >&6
- fi
-
- if test "x$deal_II_ace_remove_pedantic" = "xyes" ; then
- CXXFLAGSG="`echo $CXXFLAGSG | perl -pi -e 's/-pedantic//g;'`"
- CXXFLAGSO="`echo $CXXFLAGSO | perl -pi -e 's/-pedantic//g;'`"
- fi
- fi
- fi
-
fi
DEAL_II_USE_MT_VAL=1
echo "${ECHO_T}no" >&6
CXXFLAGSO="-DDISABLE_ASSERT_THROW $CXXFLAGSO"
-fi
-rm -f conftest.$ac_objext conftest.$ac_ext
-
-
- echo "$as_me:$LINENO: checking for std::vector bug" >&5
-echo $ECHO_N "checking for std::vector bug... $ECHO_C" >&6
- ac_ext=cc
-ac_cpp='$CXXCPP $CPPFLAGS'
-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
-
- CXXFLAGS="$CXXFLAGSG"
- cat >conftest.$ac_ext <<_ACEOF
-#line $LINENO "configure"
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
- namespace std {
- template <class _Ty> class allocator {};
- template<class _Ty, class _Ax = allocator<_Ty> > class vector{};
- }
-
- struct X {};
- template <int dim> void g (const std::vector<X> &x);
-
- void f () {
- std::vector<X> x;
- g<1> (x);
- };
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -s conftest.$ac_objext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
-
- echo "$as_me:$LINENO: result: no" >&5
-echo "${ECHO_T}no" >&6
-
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
- echo "$as_me:$LINENO: result: yes. using workaround" >&5
-echo "${ECHO_T}yes. using workaround" >&6
-
-cat >>confdefs.h <<\_ACEOF
-#define XLC_WORK_AROUND_STD_BUG 1
-_ACEOF
-
-
fi
rm -f conftest.$ac_objext conftest.$ac_ext
[CXXFLAGSG="-DDISABLE_ASSERT_THROW $CXXFLAGSG"])
DEAL_II_CHECK_ASSERT_THROW(optimized, $CXXFLAGSO,
[CXXFLAGSO="-DDISABLE_ASSERT_THROW $CXXFLAGSO"])
-DEAL_II_CHECK_IBM_XLC_ERROR
DEAL_II_CHECK_LOCAL_TYPEDEF_COMP
DEAL_II_CHECK_TEMPLATE_SPEC_ACCESS
DEAL_II_CHECK_MEMBER_OP_TEMPLATE_INST
}
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
template <int dim>
inline
#include <algorithm>
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
-
template <int dim>
const unsigned int DoFHandler<dim>::invalid_dof_index;
#include <algorithm>
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
// for whatever reason, the random_shuffle function used below needs
// lrand48 to be declared when using -ansi as compiler flag (rather
// than do so itself). however, inclusion of <cstdlib> or <stdlib.h>
#include <algorithm>
#include <numeric>
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
template <int dim, class SparsityPattern>
void
//TODO[GK]: It is relatively confusing with all these update_each, update_once, and in particular update_current flags. there also does not seem to be much documentation at a higher level, except for the documentation of some member variables on this. It would be nice, if we could at least get rid of update_current, to make things a little bit more clear
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
/*------------------------------- FiniteElementBase ----------------------*/
#include <fe/fe_values.h>
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
/* ----------------------- FESystem::InternalData ------------------- */
#include <dofs/dof_handler.h>
#include <dofs/dof_accessor.h>
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
template <int dim, typename number>
void FETools::get_interpolation_matrix(const FiniteElement<dim> &fe1,
#include <iomanip>
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
template <int dim>
void
#include <algorithm>
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
-
-
template <int dim>
GridIn<dim>::GridIn () :
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
template <int dim, typename number>
void
GridRefinement::refine_and_coarsen_optimize (Triangulation<dim> &tria,
#include <grid/grid_reordering.h>
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
// static variables
#if deal_II_dimension == 2
#include <iostream>
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
template <int dim>
PersistentTriangulation<dim>::
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
template <int dim>
void Triangulation<dim>::save_refine_flags (std::vector<bool> &v) const
{
#include <lac/sparse_matrix.h>
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
/* ------------------------ MGDoFLineAccessor --------------------------- */
#endif
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
template <int dof_handler_dim, int patch_dim, int patch_space_dim>
DataOut_DoFData<dof_handler_dim,patch_dim,patch_space_dim>::DataEntry::
#include <cmath>
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
template <int dim>
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
template <int dim>
unsigned int
#include <cmath>
#include <vector>
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
static
#include <cmath>
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
-
template <int dim>
inline
//TODO: the storage of data in the indices_on_cell array is rather inefficient, both in terms of memory as well as in terms of computing time, since we allocate a large array of small vectors. It would be more efficient to use a Table<2> for that, but since we let user pointers point into this data, this is not exactly a 5-minuter to change. should be done, however, sometimes.
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
template<int dim, typename number>
SolutionTransfer<dim, number>::SolutionTransfer(const DoFHandler<dim> &dof):
//TODO:[GK] Move templates containing vector arguments to vectors.templates.h
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
-using namespace std;
-#endif
-
-
template <int dim>
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
- using namespace std;
-#endif
-
template <typename Number>
BlockVector<Number>::BlockVector (const std::vector<unsigned int> &n)
{
#include <map>
-// if necessary try to work around a bug in the IBM xlC compiler
-#ifdef XLC_WORK_AROUND_STD_BUG
- using namespace std;
-#endif
-
-
template<typename number>
SparseVanka<number>::SparseVanka(const SparseMatrix<number> &M,
const std::vector<bool> &selected,