From 3f200187b89c727ef534cb9ca515b75222a586a1 Mon Sep 17 00:00:00 2001 From: Oliver Sander <sander@igpm.rwth-aachen.de> Date: Fri, 29 Aug 2014 10:51:49 +0000 Subject: [PATCH] Do not use the StructuredGridFactory for a YaspGrid [[Imported from SVN: r9870]] --- test/Makefile.am | 30 ++++++++++++++++++++++++++---- test/adolctest.cc | 10 +++------- 2 files changed, 29 insertions(+), 11 deletions(-) diff --git a/test/Makefile.am b/test/Makefile.am index b164e211..adf1c5c5 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1,8 +1,16 @@ # $Id: Makefile.am 1867 2007-12-31 15:45:00Z sander@PCPOOL.MI.FU-BERLIN.DE $ +# ADOL-C while it doesn't support pkg-config yet +# ADOLC_CPPFLAGS = -I/usr/include +# ADOLC_LDFLAGS = -L/usr/lib +ADOLC_CPPFLAGS = -I/home/sander/adolc-inst/include +ADOLC_LDFLAGS = -L/home/sander/adolc-inst/lib64 +ADOLC_LIBS = -ladolc + + # possible options -LDADD = $(UG_LDFLAGS) $(AMIRAMESH_LDFLAGS) $(UG_LIBS) $(AMIRAMESH_LIBS) -AM_CPPFLAGS += $(UG_CPPFLAGS) $(AMIRAMESH_CPPFLAGS) -Wall +LDADD = $(UG_LDFLAGS) $(AMIRAMESH_LDFLAGS) $(UG_LIBS) $(AMIRAMESH_LIBS) $(IPOPT_LDFLAGS) $(IPOPT_LIBS) +AM_CPPFLAGS += $(ADOLC_CPPFLAGS) $(UG_CPPFLAGS) $(AMIRAMESH_CPPFLAGS) -Wall $(IPOPT_CPPFLAGS) $(PYTHON_CPPFLAGS) check_PROGRAMS = adolctest \ averagedistanceassemblertest \ @@ -15,14 +23,22 @@ check_PROGRAMS = adolctest \ localgeodesicfestiffnesstest \ localgfetestfunctiontest \ nestednesstest \ + nonconvexitytest \ + nonconvexitytest_simple \ orthogonalmatrixtest \ rodassemblertest \ rotationtest \ svdtest \ - targetspacetest + targetspacetest \ + true-adolctest adolctest_SOURCES = adolctest.cc -adolctest_LDADD = -ladolc +adolctest_LDFLAGS = $(ADOLC_LDFLAGS) $(PYTHON_LDFLAGS) $(IPOPT_LDFLAGS) +adolctest_LDADD = $(ADOLC_LIBS) $(PYTHON_LIBS) $(IPOPT_LIBS) + +true_adolctest_SOURCES = true-adolctest.cc +true_adolctest_LDFLAGS = $(ADOLC_LDFLAGS) $(PYTHON_LDFLAGS) $(IPOPT_LDFLAGS) +true_adolctest_LDADD = $(ADOLC_LIBS) $(PYTHON_LIBS) $(IPOPT_LIBS) frameinvariancetest_SOURCES = frameinvariancetest.cc @@ -36,6 +52,12 @@ localgfetestfunctiontest_SOURCES = localgfetestfunctiontest.cc nestednesstest_SOURCES = nestednesstest.cc +nonconvexitytest_SOURCES = nonconvexitytest.cc +nonconvexitytest_LDADD = -ladolc + +nonconvexitytest_simple_SOURCES = nonconvexitytest_simple.cc +nonconvexitytest_simple_LDADD = -ladolc + globalgfetestfunctionbasistest_SOURCES = globalgfetestfunctionbasistest.cc harmonicenergytest_SOURCES = harmonicenergytest.cc diff --git a/test/adolctest.cc b/test/adolctest.cc index 2e7ed44e..af198c93 100644 --- a/test/adolctest.cc +++ b/test/adolctest.cc @@ -16,7 +16,6 @@ #include <dune/geometry/quadraturerules.hh> #include <dune/grid/yaspgrid.hh> -#include <dune/grid/utility/structuredgridfactory.hh> #include <dune/istl/io.hh> @@ -465,16 +464,13 @@ int main (int argc, char *argv[]) try // /////////////////////////////////////// typedef YaspGrid<dim> GridType; - shared_ptr<GridType> grid; - - FieldVector<double,dim> lower = {{0, 0}}; FieldVector<double,dim> upper = {{0.38, 0.128}}; - array<unsigned int,dim> elements = {{15, 5}}; - grid = StructuredGridFactory<GridType>::createCubeGrid(lower, upper, elements); + array<int,dim> elements = {{15, 5}}; + GridType grid(upper, elements); typedef GridType::LeafGridView GridView; - GridView gridView = grid->leafGridView(); + GridView gridView = grid.leafGridView(); typedef P2NodalBasis<GridView,double> FEBasis; FEBasis feBasis(gridView); -- GitLab