diff --git a/misc/examples/Makefile.am b/misc/examples/Makefile.am index c4677acd81d9501c888cb6227931464227ba672c..2ec837559129968697b8f7344c310eacd461ad0f 100644 --- a/misc/examples/Makefile.am +++ b/misc/examples/Makefile.am @@ -10,11 +10,12 @@ CXX=mpiCC # work arround for automake versions < 1.8 SOURCE_DIR=../../src AM_CPPFLAGS = $(ALL_PKG_CPPFLAGS) $(MPI_CPPFLAGS) -I$(SOURCE_DIR) -I$(SOURCE_DIR)/serial -I$(SOURCE_DIR)/parallel -I$(SOURCE_DIR)/duneinterface +LDADD = $(PARTY_LDFLAGS) $(PARTY_LIBS) $(PARMETIS_LDFLAGS) $(PARMETIS_LIBS) $(METIS_LDFLAGS) $(METIS_LIBS) # headers to install noinst_PROGRAMS = loadlb sizes # example sizes # adapt #example_SOURCES = example.cc $(SOURCE_DIR)/alugrid_serial.cc -sizes_SOURCES = sizes.cc $(SOURCE_DIR)/alugrid_serial.cc +sizes_SOURCES = sizes.cc $(SOURCE_DIR)/alugrid_serial.cc $(SOURCE_DIR)/alugrid_parallel.cc #adapt_SOURCES = adapt.cc $(SOURCE_DIR)/alugrid_2d.cc $(SOURCE_DIR)/alugrid_serial.cc loadlb_SOURCES = loadlb.cc $(SOURCE_DIR)/alugrid_serial.cc $(SOURCE_DIR)/alugrid_parallel.cc loadlb_LDADD = $(PARTY_LDFLAGS) $(PARTY_LIBS) $(PARMETIS_LDFLAGS) $(PARMETIS_LIBS) $(METIS_LDFLAGS) $(METIS_LIBS) diff --git a/misc/examples/sizes.cc b/misc/examples/sizes.cc index 9a6c0565a49d123799a95bfa48cac6114c52bc38..a2b36ea795ce02cae617c4c77ef67afce71e7cb7 100644 --- a/misc/examples/sizes.cc +++ b/misc/examples/sizes.cc @@ -8,17 +8,20 @@ // //*********************************************************************** #include <iostream> +#include <mpi.h> + using namespace std; //#define DONT_USE_ALUGRID_ALLOC // include serial part of ALUGrid -#include <alugrid_serial.h> -//#include <alugrid_parallel.h> +//#include <alugrid_serial.h> +#include <alugrid_parallel.h> using namespace ALUGridSpace; // refine grid globally, i.e. mark all elements and then call adapt -void globalRefine(GitterBasisImpl* grid, int refcount) { +template <class GitterType> +void globalRefine(GitterType* grid, int refcount) { for (int count=refcount ; count > 0; count--) { cout << "Refine global: run " << refcount-count << endl; @@ -84,7 +87,7 @@ void levelwalk(GitterBasisImpl* grid, int level) { // exmaple on read grid, refine global and print again int main (int argc, char ** argv, const char ** envp) { - //MPI_Init(&argc,&argv); + MPI_Init(&argc,&argv); int mxl = 0; if (argc < 2) @@ -105,9 +108,9 @@ int main (int argc, char ** argv, const char ** envp) cout << "-----------------------------------------------\n"; { - //MpAccessMPI a (MPI_COMM_WORLD); - //GitterDunePll grid(macroname.c_str(),a); - GitterDuneImpl grid(macroname.c_str()); + MpAccessMPI a (MPI_COMM_WORLD); + GitterDunePll grid(macroname.c_str(),a); + //GitterDuneImpl grid(macroname.c_str()); cout << "Grid generated! \n"; grid.printsize(); @@ -122,7 +125,7 @@ int main (int argc, char ** argv, const char ** envp) cin.get(); } - //MPI_Finalize(); + MPI_Finalize(); return 0; }