00001 #ifndef FINDLOCALSUBDOMAIN_H 00002 #define FINDLOCALSUBDOMAIN_H 00003 00004 #include "SundanceDefs.h" 00005 00006 #include "Mesh.h" 00007 #include "Cell.h" 00008 #include "AffineLineCellFactory.h" 00009 #include "AffineTriangleCellFactory.h" 00010 #include "AffineTetCellFactory.h" 00011 #include "PointCellFactory.h" 00012 #include "CellFactory.h" 00013 00014 00015 namespace Sundance 00016 { 00017 00018 using namespace TSF; 00019 using std::string; 00020 00021 using std::ostream; 00022 00023 typedef int (*CellProcessorResolver)(const Cell& cell, const MPIComm& comm); 00024 00025 /** \relates Mesh 00026 * find the subdomain of a global mesh that is owned by the current processor 00027 */ 00028 Mesh findLocalSubdomain(const Mesh& globalMesh, 00029 const MPIComm& comm, 00030 CellProcessorResolver findOwner); 00031 00032 00033 /** \relates Mesh 00034 * find the subdomain of a global mesh that is owned by the current processor 00035 */ 00036 inline Mesh findLocalSubdomain(const Mesh& globalMesh, 00037 CellProcessorResolver findOwner) 00038 { 00039 return findLocalSubdomain(globalMesh, MPIComm::world(), findOwner); 00040 } 00041 00042 } 00043 #endif