Zoltan_QueryFunctions.cpp

Go to the documentation of this file.
00001 //-------------------------------------------------------------------------
00002 // Copyright Notice
00003 //
00004 // Copyright (c) 2000, Sandia Corporation, Albuquerque, NM.
00005 //-------------------------------------------------------------------------
00006 
00007 //-------------------------------------------------------------------------
00008 // Filename       : $Zoltan_QueryFunctions.C$
00009 //
00010 // Purpose        : Static methods which are directly registered with
00011 //                  Zoltan.  They us the static container to access
00012 //                  the dynamic object methods.
00013 //
00014 // Special Notes  :
00015 //
00016 // Creator        : Robert J. Hoekstra, Parallel Computational Sciences
00017 //
00018 // Creation Date  : 08/04/2000
00019 //
00020 // Revision Information:
00021 // ---------------------
00022 //
00023 // Revision Number: $Revision$
00024 //
00025 // Revision Date  : $Date$
00026 //
00027 // Current Owner  : $Author$
00028 //-------------------------------------------------------------------------
00029 
00030 #include <Zoltan_QueryFunctions.h>
00031 #include <Zoltan_QueryContainer.h>
00032 #include <Zoltan_QueryObject.h>
00033 
00034   //General Functions
00035 int Zoltan::QueryFunctions::Number_Objects     (  void * data,
00036             int * ierr )
00037 {
00038   Zoltan::QueryObject * obj_ptr = Zoltan::QueryContainer::getQueryObject(
00039   Zoltan::QueryContainer::getQueryID() );
00040 
00041   return obj_ptr->Number_Objects( data, ierr );
00042 }
00043 
00044 void Zoltan::QueryFunctions::Object_List       (  void * data,
00045             int num_gid_entries,
00046             int num_lid_entries,
00047             ZOLTAN_ID_PTR global_ids,
00048             ZOLTAN_ID_PTR local_ids, 
00049             int weight_dim,
00050             float * object_weights,
00051             int * ierr )
00052 {
00053   Zoltan::QueryObject * obj_ptr = Zoltan::QueryContainer::getQueryObject(
00054   Zoltan::QueryContainer::getQueryID() );
00055 
00056   obj_ptr->Object_List( data, num_gid_entries, num_lid_entries, global_ids,
00057   local_ids, weight_dim, object_weights, ierr );
00058 }
00059 
00060 int Zoltan::QueryFunctions::First_Object       (  void * data,
00061             int num_gid_entries,
00062             int num_lid_entries,
00063             ZOLTAN_ID_PTR first_global_id,
00064             ZOLTAN_ID_PTR first_local_id, 
00065             int weight_dim,
00066             float * first_weight,
00067             int * ierr )
00068 {
00069   Zoltan::QueryObject * obj_ptr = Zoltan::QueryContainer::getQueryObject(
00070   Zoltan::QueryContainer::getQueryID() );
00071 
00072   return obj_ptr->First_Object( data, num_gid_entries, num_lid_entries,
00073   first_global_id, first_local_id, weight_dim, first_weight, ierr );
00074 }
00075 
00076 int Zoltan::QueryFunctions::Next_Object        (  void * data,
00077             int num_gid_entries,
00078             int num_lid_entries,
00079             ZOLTAN_ID_PTR global_id,
00080             ZOLTAN_ID_PTR local_id, 
00081             ZOLTAN_ID_PTR next_global_id,
00082             ZOLTAN_ID_PTR next_local_id, 
00083             int weight_dim,
00084             float * next_weight,
00085             int * ierr )
00086 {
00087   Zoltan::QueryObject * obj_ptr = Zoltan::QueryContainer::getQueryObject(
00088   Zoltan::QueryContainer::getQueryID() );
00089 
00090   return obj_ptr->Next_Object( data, num_gid_entries, num_lid_entries,
00091   global_id, local_id, next_global_id, next_local_id,
00092   weight_dim, next_weight, ierr );
00093 }
00094 
00095 int Zoltan::QueryFunctions::Number_Border_Objects    ( void * data,
00096                   int number_neighbor_procs,
00097                   int * ierr )
00098 {
00099   Zoltan::QueryObject * obj_ptr = Zoltan::QueryContainer::getQueryObject(
00100   Zoltan::QueryContainer::getQueryID() );
00101 
00102   return obj_ptr->Number_Border_Objects( data, number_neighbor_procs, ierr );
00103 }
00104 
00105 void Zoltan::QueryFunctions::Border_Object_List     ( void * data,
00106                  int num_gid_entries,
00107                  int num_lid_entries,
00108                  int number_neighbor_procs, 
00109                  ZOLTAN_ID_PTR global_ids,
00110                  ZOLTAN_ID_PTR local_ids,
00111                  int weight_dim, 
00112                  float * object_weights,
00113                  int * ierr )
00114 {
00115   Zoltan::QueryObject * obj_ptr = Zoltan::QueryContainer::getQueryObject(
00116   Zoltan::QueryContainer::getQueryID() );
00117 
00118   obj_ptr->Border_Object_List( data, num_gid_entries, num_lid_entries,
00119   number_neighbor_procs, global_ids, local_ids, weight_dim,
00120   object_weights, ierr );
00121 }
00122 
00123 
00124 int Zoltan::QueryFunctions::First_Border_Object     ( void * data,
00125                  int num_gid_entries,
00126                  int num_lid_entries,
00127                  int number_neighbor_procs, 
00128                  ZOLTAN_ID_PTR first_global_id,
00129                  ZOLTAN_ID_PTR first_local_id,
00130                  int weight_dim,
00131                  float * first_weight,
00132                  int * ierr )
00133 {
00134   Zoltan::QueryObject * obj_ptr = Zoltan::QueryContainer::getQueryObject(
00135   Zoltan::QueryContainer::getQueryID() );
00136 
00137   return obj_ptr->First_Border_Object( data, num_gid_entries, num_lid_entries,
00138   number_neighbor_procs, first_global_id, first_local_id, weight_dim,
00139   first_weight, ierr );
00140 }
00141 
00142 int Zoltan::QueryFunctions::Next_Border_Object      ( void * data,
00143                  int num_gid_entries,
00144                  int num_lid_entries,
00145                  ZOLTAN_ID_PTR global_id,
00146                  ZOLTAN_ID_PTR local_id,
00147                  int number_neighbor_procs,
00148                  ZOLTAN_ID_PTR next_global_id,
00149                  ZOLTAN_ID_PTR next_local_id,
00150                  int weight_dim,
00151                  float * next_weight,
00152                  int * ierr )
00153 {
00154   Zoltan::QueryObject * obj_ptr = Zoltan::QueryContainer::getQueryObject(
00155   Zoltan::QueryContainer::getQueryID() );
00156 
00157   return obj_ptr->Next_Border_Object( data, num_gid_entries, num_lid_entries,
00158   global_id, local_id, number_neighbor_procs, next_global_id,
00159   next_local_id, weight_dim, next_weight, ierr );
00160 }
00161 
00162   //Geometry Based Functions
00163 int Zoltan::QueryFunctions::Number_Geometry_Objects    (  void * data,
00164               int * ierr )
00165 {
00166   Zoltan::QueryObject * obj_ptr = Zoltan::QueryContainer::getQueryObject(
00167   Zoltan::QueryContainer::getQueryID() );
00168 
00169   return obj_ptr->Number_Geometry_Objects( data, ierr );
00170 }
00171 
00172 void Zoltan::QueryFunctions::Geometry_Values   (  void * data,
00173             int num_gid_entries,
00174             int num_lid_entries,
00175             ZOLTAN_ID_PTR global_id,
00176             ZOLTAN_ID_PTR local_id,
00177             double * geometry_vector,
00178             int * ierr )
00179 {
00180   Zoltan::QueryObject * obj_ptr = Zoltan::QueryContainer::getQueryObject(
00181   Zoltan::QueryContainer::getQueryID() );
00182 
00183   obj_ptr->Geometry_Values( data, num_gid_entries, num_lid_entries, global_id,
00184   local_id, geometry_vector, ierr );
00185 }
00186 
00187   //Graph Based Functions
00188 int Zoltan::QueryFunctions::Number_Edges       (  void * data,
00189             int num_gid_entries,
00190             int num_lid_entries,
00191             ZOLTAN_ID_PTR global_id,
00192             ZOLTAN_ID_PTR local_id,
00193             int * ierr )
00194 {
00195   Zoltan::QueryObject * obj_ptr = Zoltan::QueryContainer::getQueryObject(
00196   Zoltan::QueryContainer::getQueryID() );
00197 
00198   return obj_ptr->Number_Edges( data, num_gid_entries, num_lid_entries,
00199   global_id, local_id, ierr );
00200 }
00201 
00202 void Zoltan::QueryFunctions::Edge_List (  void * data,
00203           int num_gid_entries,
00204           int num_lid_entries,
00205           ZOLTAN_ID_PTR global_id,
00206           ZOLTAN_ID_PTR local_id,
00207           ZOLTAN_ID_PTR neighbor_global_ids,
00208           int * neighbor_procs,
00209           int weight_dim,
00210           float * edge_weights,
00211           int * ierr )
00212 {
00213   Zoltan::QueryObject * obj_ptr = Zoltan::QueryContainer::getQueryObject(
00214   Zoltan::QueryContainer::getQueryID() );
00215 
00216   obj_ptr->Edge_List( data, num_gid_entries, num_lid_entries, global_id,
00217   local_id, neighbor_global_ids, neighbor_procs, weight_dim,
00218   edge_weights, ierr );
00219 }
00220 
00221   //Tree Based Functions
00222 int Zoltan::QueryFunctions::Number_Coarse_Objects      (  void * data,
00223               int * ierr )
00224 {
00225   Zoltan::QueryObject * obj_ptr = Zoltan::QueryContainer::getQueryObject(
00226   Zoltan::QueryContainer::getQueryID() );
00227 
00228   return obj_ptr->Number_Coarse_Objects( data, ierr );
00229 }
00230 
00231 void Zoltan::QueryFunctions::Coarse_Object_List        (  void * data,
00232               int num_gid_entries,
00233               int num_lid_entries,
00234               ZOLTAN_ID_PTR global_ids,
00235               ZOLTAN_ID_PTR local_ids,
00236               int * assigned,
00237               int * number_vertices,
00238               ZOLTAN_ID_PTR vertices,
00239               int * in_order,
00240               ZOLTAN_ID_PTR in_vertex,
00241               ZOLTAN_ID_PTR out_vertex,
00242               int * ierr )
00243 {
00244   Zoltan::QueryObject * obj_ptr = Zoltan::QueryContainer::getQueryObject(
00245   Zoltan::QueryContainer::getQueryID() );
00246 
00247   obj_ptr->Coarse_Object_List( data, num_gid_entries, num_lid_entries,
00248   global_ids, local_ids, assigned, number_vertices, vertices,
00249   in_order, in_vertex, out_vertex, ierr );
00250 }
00251 
00252 int Zoltan::QueryFunctions::First_Coarse_Object      ( void * data,
00253                   int num_gid_entries,
00254                   int num_lid_entries,
00255                   ZOLTAN_ID_PTR first_global_id,
00256                   ZOLTAN_ID_PTR first_local_id,
00257                   int * assigned,
00258                   int * number_vertices,
00259                   ZOLTAN_ID_PTR vertices,
00260                   int * in_order,
00261                   ZOLTAN_ID_PTR in_vertex,
00262                   ZOLTAN_ID_PTR out_vertex,
00263                   int * ierr )
00264 {
00265   Zoltan::QueryObject * obj_ptr = Zoltan::QueryContainer::getQueryObject(
00266   Zoltan::QueryContainer::getQueryID() );
00267 
00268   return obj_ptr->First_Coarse_Object( data, num_gid_entries, num_lid_entries,
00269   first_global_id, first_local_id, assigned, number_vertices, vertices,
00270   in_order, in_vertex, out_vertex, ierr );
00271 }
00272 
00273 int Zoltan::QueryFunctions::Next_Coarse_Object       ( void * data,
00274                   int num_gid_entries,
00275                   int num_lid_entries,
00276                   ZOLTAN_ID_PTR global_id,
00277                   ZOLTAN_ID_PTR local_id,
00278                   ZOLTAN_ID_PTR next_global_id,
00279                   ZOLTAN_ID_PTR next_local_id,
00280                   int * assigned,
00281                   int * number_vertices,
00282                   ZOLTAN_ID_PTR vertices,
00283                   ZOLTAN_ID_PTR in_vertex,
00284                   ZOLTAN_ID_PTR out_vertex,
00285                   int * ierr )
00286 {
00287   Zoltan::QueryObject * obj_ptr = Zoltan::QueryContainer::getQueryObject(
00288   Zoltan::QueryContainer::getQueryID() );
00289 
00290   return obj_ptr->Next_Coarse_Object( data, num_gid_entries, num_lid_entries,
00291   global_id, local_id, next_global_id, next_local_id,
00292   assigned, number_vertices, vertices, in_vertex, out_vertex,
00293   ierr );
00294 }
00295 
00296 int Zoltan::QueryFunctions::Number_Children    (  void * data,
00297             int num_gid_entries,
00298             int num_lid_entries,
00299             ZOLTAN_ID_PTR global_id,
00300             ZOLTAN_ID_PTR local_id,
00301             int * ierr)
00302 {
00303   Zoltan::QueryObject * obj_ptr = Zoltan::QueryContainer::getQueryObject(
00304   Zoltan::QueryContainer::getQueryID() );
00305 
00306   return obj_ptr->Number_Children( data, num_gid_entries, num_lid_entries,
00307   global_id, local_id, ierr );
00308 }
00309 
00310 void Zoltan::QueryFunctions::Child_List        (  void * data,
00311             int num_gid_entries,
00312             int num_lid_entries,
00313             ZOLTAN_ID_PTR parent_global_id,
00314             ZOLTAN_ID_PTR parent_local_id,
00315             ZOLTAN_ID_PTR child_global_ids,
00316             ZOLTAN_ID_PTR child_local_ids,
00317             int * assigned,
00318             int * number_vertices,
00319             ZOLTAN_ID_PTR vertices,
00320             ZOLTAN_REF_TYPE * reference_type,
00321             ZOLTAN_ID_PTR in_vertex,
00322             ZOLTAN_ID_PTR out_vertex,
00323             int * ierr )
00324 {
00325   Zoltan::QueryObject * obj_ptr = Zoltan::QueryContainer::getQueryObject(
00326   Zoltan::QueryContainer::getQueryID() );
00327 
00328   obj_ptr->Child_List( data, num_gid_entries, num_lid_entries,
00329   parent_global_id, parent_local_id,
00330   child_global_ids, child_local_ids, assigned, number_vertices,
00331   vertices, reference_type, in_vertex, out_vertex, ierr );
00332 }
00333 
00334 void Zoltan::QueryFunctions::Child_Weight      (  void * data,
00335             int num_gid_entries,
00336             int num_lid_entries,
00337             ZOLTAN_ID_PTR global_id,
00338             ZOLTAN_ID_PTR local_id,
00339             int weight_dim,
00340             float * object_weight,
00341             int * ierr )
00342 {
00343   Zoltan::QueryObject * obj_ptr = Zoltan::QueryContainer::getQueryObject(
00344   Zoltan::QueryContainer::getQueryID() );
00345 
00346   obj_ptr->Child_Weight( data, num_gid_entries, num_lid_entries,
00347   global_id, local_id, weight_dim, object_weight, ierr );
00348 }
00349 

Generated on Wed May 12 21:24:46 2010 for EpetraExt by  doxygen 1.4.7