Skip to content
Snippets Groups Projects
Commit dc8f0fc2 authored by Robert Klöfkorn's avatar Robert Klöfkorn
Browse files

sizes also parallel.


git-svn-id: https://dune.mathematik.uni-freiburg.de/svn/alugrid/trunk@1286 0d966ed9-3843-0410-af09-ebfb50bd7c74
parent cadf6c6f
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
......@@ -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;
}
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