Skip to content
Snippets Groups Projects
Commit d7ed8434 authored by Oliver Sander's avatar Oliver Sander
Browse files

compile UGGrid<2,2> and UGGrid<3,3> into libdune

[[Imported from SVN: r2056]]
parent 5a819682
No related branches found
No related tags found
No related merge requests found
......@@ -287,6 +287,7 @@ namespace Dune {
// End of Interface Methods
// **********************************************************
#ifdef UGGRID_WITH_INDEX_SETS
const HierarchicIndexSetType& hierarchicIndexSet() const {
return hierarchicIndexSet_;
}
......@@ -296,6 +297,7 @@ namespace Dune {
levelIndexSet_ = new LevelIndexSetType(*this);
return *levelIndexSet_;
}
#endif
void createbegin();
......@@ -449,6 +451,6 @@ namespace Dune {
} // namespace Dune
// Include the method definitions
#include "uggrid/uggrid.cc"
//#include "uggrid/uggrid.cc"
#endif
Makefile
Makefile.in
.deps
.libs
*.lo
libuggrid2.la
libuggrid3.la
semantic.cache
\ No newline at end of file
# $Id$
if UG
noinst_LTLIBRARIES = libuggrid2.la libuggrid3.la
# The two libs are compiled from the same source, but with different options
libuggrid2_la_SOURCES = uggrid.cc
libuggrid2_la_CXXFLAGS = $(AM_CPPFLAGS) -I$(UG_INCLUDE_PATH) -D_2
libuggrid2_la_LIBADD = $(UG_LDFLAGS) $(UG_LIBS2)
libuggrid3_la_SOURCES = uggrid.cc
libuggrid3_la_CXXFLAGS = $(AM_CPPFLAGS) -I$(UG_INCLUDE_PATH) -D_3
libuggrid3_la_LIBADD = $(UG_LDFLAGS) $(UG_LIBS3)
endif
uggriddir = $(includedir)/dune/grid/uggrid/
uggrid_HEADERS = uggrid.cc uggridentity.cc uggridgeometry.cc \
uggrid_HEADERS = uggridentity.cc uggridgeometry.cc \
uggridentitypointer.hh uggridhieriterator.cc ugintersectionit.cc \
ugfunctions.hh uggridboundent.hh uggridentity.hh uggridgeometry.hh \
uggridhieriterator.hh uggridleveliterator.hh ugincludes.hh \
......
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
//************************************************************************
//
// Implementation von UGGrid
//
// namespace Dune
//
//************************************************************************
#include "config.h"
#include <dune/grid/uggrid.hh>
#include <dune/common/tuples.hh>
#include <dune/common/sllist.hh>
#ifdef _2
template class Dune::UGGrid<2,2>;
#else
template class Dune::UGGrid<3,3>;
#endif
// *********************************************************************
//
// -- UGGridLevelIteratorFactory
......@@ -117,6 +118,8 @@ namespace Dune {
} // end namespace Dune
using namespace Dune;
//***********************************************************************
//
// --UGGrid
......@@ -133,10 +136,10 @@ template<> bool Dune::UGGrid < 3, 3 >::useExistingDefaultsFile = false;
template < int dim, int dimworld >
inline Dune::UGGrid < dim, dimworld >::UGGrid() : multigrid_(NULL),
refinementType_(COPY),
omitGreenClosure_(false),
hierarchicIndexSet_(*this),
levelIndexSet_(NULL)
levelIndexSet_(NULL),
refinementType_(COPY),
omitGreenClosure_(false)
{
init(500, 10);
}
......@@ -144,10 +147,10 @@ inline Dune::UGGrid < dim, dimworld >::UGGrid() : multigrid_(NULL),
template < int dim, int dimworld >
inline Dune::UGGrid < dim, dimworld >::UGGrid(unsigned int heapSize, unsigned envHeapSize)
: multigrid_(NULL),
refinementType_(COPY),
omitGreenClosure_(false),
hierarchicIndexSet_(*this) ,
levelIndexSet_(NULL)
levelIndexSet_(NULL),
refinementType_(COPY),
omitGreenClosure_(false)
{
init(heapSize, envHeapSize);
}
......@@ -627,6 +630,10 @@ void Dune::UGGrid<dim,dimworld>::getChildrenOfSubface(typename Traits::template
elementSide = renumbering[elementSide];
break;
}
default :
DUNE_THROW(NotImplemented, "Unknown element type '"
<< e->geometry().type() << "'found!");
}
// ///////////////
......@@ -721,6 +728,10 @@ void Dune::UGGrid<dim,dimworld>::getChildrenOfSubface(typename Traits::template
side = renumbering[side];
break;
}
default :
DUNE_THROW(NotImplemented, "Unknown element type '"
<< e->geometry().type() << "'found!");
}
children[i][0] = UG_NS<dim>::index(Element<0>::get(*f));
......
......@@ -153,7 +153,15 @@ AC_DEFUN([DUNE_PATH_UG],[
if test x$HAVE_UG = x1 ; then
AC_SUBST(UG_LDFLAGS, $UG_LDFLAGS)
AC_SUBST(UG_LIBS, $UG_LIBS)
# The libs necessary to instantiate UGGrid<2,2>
AC_SUBST(UG_LIBS2, "-lug2 -ldomS2 -lgg2 -ldevS")
# The libs necessary to instantiate UGGrid<3,3>
# TODO: We tacitly assume that we can link to 3d-UG, even though we've
# only checked for the existence of the 2d-libs.
# TODO: Not working for the parallel UG
AC_SUBST(UG_LIBS3, "-lug3 -ldomS3 -lgg3 -ldevS")
AC_SUBST(UG_CPPFLAGS, $UG_CPPFLAGS)
AC_SUBST(UG_INCLUDE_PATH, $UG_INCLUDE_PATH)
AC_DEFINE(HAVE_UG, 1, [Define to 1 if UG is found])
# add to global list
......
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