Zoltan_MigrationFunctions.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_MigrationFunctions.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
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_MigrationFunctions.h>
00031 #include <Zoltan_MigrationContainer.h>
00032 #include <Zoltan_MigrationObject.h>
00033 
00034 int Zoltan::MigrationFunctions::Object_Size    (  void * data,
00035             int num_gid_entries,
00036             int num_lid_entries,
00037             ZOLTAN_ID_PTR global_id,
00038             ZOLTAN_ID_PTR local_id,
00039             int * ierr )
00040 {
00041   Zoltan::MigrationObject * obj_ptr =
00042   Zoltan::MigrationContainer::getMigrationObject(
00043   Zoltan::MigrationContainer::getMigrationID() );
00044 
00045   return obj_ptr->Object_Size( data, num_gid_entries, num_lid_entries,
00046     global_id, local_id, ierr );
00047 }
00048 
00049 void Zoltan::MigrationFunctions::Pre_Migrate   (  void * data,
00050             int num_gid_entries,
00051             int num_lid_entries,
00052             int num_import,
00053             ZOLTAN_ID_PTR import_global_ids,
00054             ZOLTAN_ID_PTR import_local_ids,
00055             int * import_procs,
00056             int num_export,
00057             ZOLTAN_ID_PTR export_global_ids,
00058             ZOLTAN_ID_PTR export_local_ids,
00059             int * export_procs,
00060             int * ierr )
00061 {
00062   Zoltan::MigrationObject * obj_ptr =
00063   Zoltan::MigrationContainer::getMigrationObject(
00064   Zoltan::MigrationContainer::getMigrationID() );
00065 
00066   obj_ptr->Pre_Migrate( data, num_gid_entries, num_lid_entries,
00067   num_import, import_global_ids, import_local_ids,
00068   import_procs, num_export, export_global_ids, export_local_ids,
00069   export_procs, ierr );
00070 }
00071 
00072 void Zoltan::MigrationFunctions::Mid_Migrate   (  void * data,
00073             int num_gid_entries,
00074             int num_lid_entries,
00075             int num_import,
00076             ZOLTAN_ID_PTR import_global_ids,
00077             ZOLTAN_ID_PTR import_local_ids,
00078             int * import_procs,
00079             int num_export,
00080             ZOLTAN_ID_PTR export_global_ids,
00081             ZOLTAN_ID_PTR export_local_ids,
00082             int * export_procs,
00083             int * ierr )
00084 {
00085   Zoltan::MigrationObject * obj_ptr =
00086   Zoltan::MigrationContainer::getMigrationObject(
00087   Zoltan::MigrationContainer::getMigrationID() );
00088 
00089   obj_ptr->Mid_Migrate( data, num_gid_entries, num_lid_entries,
00090   num_import, import_global_ids, import_local_ids,
00091   import_procs, num_export, export_global_ids, export_local_ids,
00092   export_procs, ierr );
00093 }
00094 
00095 void Zoltan::MigrationFunctions::Post_Migrate  (  void * data,
00096             int num_gid_entries,
00097             int num_lid_entries,
00098             int num_import,
00099             ZOLTAN_ID_PTR import_global_ids,
00100             ZOLTAN_ID_PTR import_local_ids,
00101             int * import_procs,
00102             int num_export,
00103             ZOLTAN_ID_PTR export_global_ids,
00104             ZOLTAN_ID_PTR export_local_ids,
00105             int * export_procs,
00106             int * ierr )
00107 {
00108   Zoltan::MigrationObject * obj_ptr =
00109   Zoltan::MigrationContainer::getMigrationObject(
00110   Zoltan::MigrationContainer::getMigrationID() );
00111 
00112   obj_ptr->Post_Migrate( data, num_gid_entries, num_lid_entries,
00113   num_import, import_global_ids, import_local_ids,
00114   import_procs, num_export, export_global_ids, export_local_ids,
00115   export_procs, ierr );
00116 }
00117 
00118 void Zoltan::MigrationFunctions::Pack_Object   (  void * data,
00119             int num_gid_entries,
00120             int num_lid_entries,
00121             ZOLTAN_ID_PTR global_id,
00122             ZOLTAN_ID_PTR local_id,
00123             int destination_processor,
00124             int size,
00125             char * buffer,
00126             int * ierr )
00127 {
00128   Zoltan::MigrationObject * obj_ptr =
00129   Zoltan::MigrationContainer::getMigrationObject(
00130   Zoltan::MigrationContainer::getMigrationID() );
00131 
00132   obj_ptr->Pack_Object( data, num_gid_entries, num_lid_entries,
00133   global_id, local_id, destination_processor, size, buffer, ierr );
00134 }
00135 
00136 void Zoltan::MigrationFunctions::Unpack_Object (  void * data,
00137             int num_gid_entries,
00138             ZOLTAN_ID_PTR global_id,
00139             int size,
00140             char * buffer,
00141             int * ierr )
00142 {
00143   Zoltan::MigrationObject * obj_ptr =
00144   Zoltan::MigrationContainer::getMigrationObject(
00145   Zoltan::MigrationContainer::getMigrationID() );
00146 
00147   obj_ptr->Unpack_Object( data, num_gid_entries, global_id, size,
00148   buffer, ierr );
00149 }

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