|
EpetraExt Development
|
00001 //@HEADER 00002 // *********************************************************************** 00003 // 00004 // EpetraExt: Epetra Extended - Linear Algebra Services Package 00005 // Copyright (2001) Sandia Corporation 00006 // 00007 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive 00008 // license for use of this work by or on behalf of the U.S. Government. 00009 // 00010 // This library is free software; you can redistribute it and/or modify 00011 // it under the terms of the GNU Lesser General Public License as 00012 // published by the Free Software Foundation; either version 2.1 of the 00013 // License, or (at your option) any later version. 00014 // 00015 // This library is distributed in the hope that it will be useful, but 00016 // WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00018 // Lesser General Public License for more details. 00019 // 00020 // You should have received a copy of the GNU Lesser General Public 00021 // License along with this library; if not, write to the Free Software 00022 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 00023 // USA 00024 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 00025 // 00026 // *********************************************************************** 00027 //@HEADER 00028 00029 #ifndef EPETRAEXT_ZOLTANQUERY_H 00030 #define EPETRAEXT_ZOLTANQUERY_H 00031 00032 #include "EpetraExt_ConfigDefs.h" 00033 00034 #include <Zoltan_QueryObject.h> 00035 00036 #include <vector> 00037 00038 class Epetra_CrsGraph; 00039 00040 namespace EpetraExt { 00041 00043 00047 class ZoltanQuery : public Zoltan::QueryObject 00048 { 00049 00050 const Epetra_CrsGraph & graph_; 00051 const Epetra_CrsGraph * tgraph_; 00052 00053 std::vector< std::vector<int> > LBProc_; 00054 std::vector< std::vector<int> > LBProc_Trans_; 00055 00056 const bool localEdgesOnly_; 00057 00058 public: 00059 00061 00063 ZoltanQuery( const Epetra_CrsGraph & graph, 00064 const Epetra_CrsGraph * tgraph = 0, 00065 bool localEdgesOnly = false ); 00066 00067 //General Functions 00068 int Number_Objects ( void * data, 00069 int * ierr ); 00070 00071 void Object_List ( void * data, 00072 int num_gid_entries, 00073 int num_lid_entries, 00074 ZOLTAN_ID_PTR global_ids, 00075 ZOLTAN_ID_PTR local_ids, 00076 int weight_dim, 00077 float * object_weights, 00078 int * ierr ); 00079 00080 //Graph Based Functions 00081 int Number_Edges ( void * data, 00082 int num_gid_entries, 00083 int num_lid_entries, 00084 ZOLTAN_ID_PTR global_id, 00085 ZOLTAN_ID_PTR local_id, 00086 int * ierr ); 00087 00088 void Edge_List ( void * data, 00089 int num_gid_entries, 00090 int num_lid_entries, 00091 ZOLTAN_ID_PTR global_id, 00092 ZOLTAN_ID_PTR local_id, 00093 ZOLTAN_ID_PTR neighbor_global_ids, 00094 int * neighbor_procs, 00095 int weight_dim, 00096 float * edge_weights, 00097 int * ierr ); 00098 00099 //HyperGraph Functions 00100 int Number_HG_Edges ( void * data, 00101 int * ierr ); 00102 00103 int Number_HG_Pins ( void * data, 00104 int * ierr ); 00105 00106 int HG_Edge_List ( void * data, 00107 int num_gid_entries, 00108 int ewgt_dim, 00109 int nedge, 00110 int maxsize, 00111 int * edge_sizes, 00112 ZOLTAN_ID_PTR edge_verts, 00113 int * edge_procs, 00114 float * edge_weights ); 00115 00116 }; 00117 00118 } //namespace EpetraExt 00119 00120 #endif //EPETRAEXT_ZOLTANQUERY_H 00121
1.7.4