00001 //************************************************************************************// 00002 // Module : gpartmapper.hpp 00003 // Date : 6/9/05 (DLR) 00004 // Copyright : 2005-2006 Copyright University Corporation for Atmospheric 00005 // Research 00006 // Description : Encapsulates the access methods and data associated with 00007 // generating an element/proc mapping for grid partitioning. 00008 // This class is meant to be an interface base clase to all 00009 // other map generator classes. 00010 // Derived From : none. 00011 // Modifications: 00012 //************************************************************************************// 00013 #if !defined(GPARTMAPPER_HPP) 00014 #define GPARTMAPPER_HPP 00015 00016 #include "gtypes.h" 00017 #include "gelemlist.hpp" 00018 #include "gcomm.hpp" 00019 00020 #if !defined(PMDEFAULT_KEY) 00021 # define PMDEFAULT_KEY -1 00022 #endif 00023 #if !defined(PMDEFAULT_PROC) 00024 # define PMDEFAULT_PROC -1 00025 #endif 00026 00027 class GPartMapper 00028 { 00029 public: 00030 GPartMapper(GElemList *gelemsv); 00031 ~GPartMapper(); 00032 00033 virtual GBOOL GenerateMap(stGPartitionMap *&pm, GINT &nmax)=0; // Generate partition map data 00034 GDOUBLE *GetCurve(GINT &npoints); // Get SFCurve and number points 00035 void SetCoarsenables(GKEYBuffer *kcoarsen); // Set keys that will be coarsened 00036 void SetDoCurve(GBOOL bset); // Set flag to compute SFCurve 00037 00038 protected: 00039 00040 GSHORT nprocs_; 00041 GSHORT this_rank_; 00042 GBOOL bDoCurve_; 00043 GINT gnelems_; 00044 GKEYBuffer *kcoarsen_; 00045 GElemList *gelems_; 00046 GDOUBLE *curve_; 00047 GC_DATATYPE pm_type_; 00048 00049 00050 }; 00051 00052 #endif