/[escript]/branches/split/escriptcore/src/WorldSplitter.h
ViewVC logotype

Contents of /branches/split/escriptcore/src/WorldSplitter.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4730 - (show annotations)
Mon Mar 10 00:24:45 2014 UTC (4 years, 11 months ago) by jfenwick
File MIME type: text/plain
File size: 1757 byte(s)
Some missing files
1
2 /*****************************************************************************
3 *
4 * Copyright (c) 2014 by University of Queensland
5 * http://www.uq.edu.au
6 *
7 * Primary Business: Queensland, Australia
8 * Licensed under the Open Software License version 3.0
9 * http://www.opensource.org/licenses/osl-3.0.php
10 *
11 * Development until 2012 by Earth Systems Science Computational Center (ESSCC)
12 * Development 2012-2013 by School of Earth Sciences
13 * Development from 2014 by Centre for Geoscience Computing (GeoComp)
14 *
15 *****************************************************************************/
16
17 #ifndef escript_WorldSplitter_H
18 #define escript_WorldSplitter_H
19 #include <boost/python.hpp>
20 #include <boost/smart_ptr.hpp>
21 #include "esysUtils/Esys_MPI.h"
22 #include "SubWorld.h"
23 namespace escript
24 {
25
26 /** class to hold a collection of MPI ranks and a communicator linking them
27 */
28 class WorldSplitter
29 {
30 public:
31 WorldSplitter(unsigned int numgroups, MPI_Comm global=MPI_COMM_WORLD);
32 ~WorldSplitter();
33 boost::python::object buildDomains(boost::python::tuple t, boost::python::dict kwargs);
34 // first param will be the factory method / constructor
35 // return value will always be None (it would be void but apparently boost doesn't like that
36 // this method will be def("set....", raw_function(WorldSplitter::setDomainParams, 1)
37 private:
38 MPI_Comm globalcom; // don't free this because we don't own it
39 MPI_Comm subcom;
40 escript::SubWorld_ptr localworld; // subworld which this process belongs to
41 unsigned int groupcount;
42 };
43
44
45 /**
46 used to invoke the WorldSplitter version from python (in lieu of a method based equivalent to raw_function)
47 */
48 boost::python::object raw_buildDomains(boost::python::tuple t, boost::python::dict kwargs);
49
50
51 }
52 #endif

  ViewVC Help
Powered by ViewVC 1.1.26