00001 /*@HEADER 00002 // *********************************************************************** 00003 // 00004 // Ifpack: Object-Oriented Algebraic Preconditioner Package 00005 // Copyright (2009) 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 00030 #ifndef EXTERNAL_ROWS_DH_H 00031 #define EXTERNAL_ROWS_DH_H 00032 00033 #include "euclid_common.h" 00034 #ifdef __cplusplus 00035 extern "C" 00036 { 00037 #endif 00038 00039 extern void ExternalRows_dhCreate (ExternalRows_dh * er); 00040 extern void ExternalRows_dhDestroy (ExternalRows_dh er); 00041 extern void ExternalRows_dhInit (ExternalRows_dh er, Euclid_dh ctx); 00042 extern void ExternalRows_dhRecvRows (ExternalRows_dh extRows); 00043 extern void ExternalRows_dhSendRows (ExternalRows_dh extRows); 00044 extern void ExternalRows_dhGetRow (ExternalRows_dh er, int globalRow, 00045 int *len, int **cval, int **fill, 00046 REAL_DH ** aval); 00047 00048 struct _extrows_dh 00049 { 00050 SubdomainGraph_dh sg; /* not owned! */ 00051 Factor_dh F; /* not owned! */ 00052 00053 MPI_Status status[MAX_MPI_TASKS]; 00054 MPI_Request req1[MAX_MPI_TASKS]; 00055 MPI_Request req2[MAX_MPI_TASKS]; 00056 MPI_Request req3[MAX_MPI_TASKS]; 00057 MPI_Request req4[MAX_MPI_TASKS]; 00058 MPI_Request cval_req[MAX_MPI_TASKS]; 00059 MPI_Request fill_req[MAX_MPI_TASKS]; 00060 MPI_Request aval_req[MAX_MPI_TASKS]; 00061 00062 /*------------------------------------------------------------------------ 00063 * data structures for receiving, storing, and accessing external rows 00064 * from lower-ordered nabors 00065 *------------------------------------------------------------------------*/ 00066 /* for reception of row counts, row numbers, and row lengths: */ 00067 int rcv_row_counts[MAX_MPI_TASKS]; /* P_i will send rcv_row_counts[i] rows */ 00068 int rcv_nz_counts[MAX_MPI_TASKS]; /* P_i's rows contain rcv_nz_counts[i] nonzeros */ 00069 int *rcv_row_lengths[MAX_MPI_TASKS]; /* rcv_row_lengths[i][] lists the length of each row */ 00070 int *rcv_row_numbers[MAX_MPI_TASKS]; /* rcv_row_lengths[i][] lists the length of each row */ 00071 00072 /* for reception of the actual rows: */ 00073 int *cvalExt; 00074 int *fillExt; 00075 REAL_DH *avalExt; 00076 00077 /* table for accessing the rows */ 00078 Hash_dh rowLookup; 00079 00080 /*-------------------------------------------------------------------------- 00081 * data structures for sending boundary rows to higher-ordered nabors 00082 *--------------------------------------------------------------------------*/ 00083 /* for sending row counts, numbers, and lengths: */ 00084 int *my_row_counts; /* my_row_counts[i] = nzcount in upper tri portion o */ 00085 int *my_row_numbers; /* my_row_numbers[i] = global row number of local ro */ 00086 00087 /* for sending the actual rows: */ 00088 int nzSend; /* total entries in upper tri portions of bdry rows */ 00089 int *cvalSend; 00090 int *fillSend; 00091 REAL_DH *avalSend; 00092 00093 bool debug; 00094 }; 00095 #ifdef __cplusplus 00096 } 00097 #endif 00098 00099 #endif
1.7.6.1