00001 /*@HEADER 00002 // *********************************************************************** 00003 // 00004 // Ifpack: Object-Oriented Algebraic Preconditioner Package 00005 // Copyright (2002) 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 // Redistribution and use in source and binary forms, with or without 00011 // modification, are permitted provided that the following conditions are 00012 // met: 00013 // 00014 // 1. Redistributions of source code must retain the above copyright 00015 // notice, this list of conditions and the following disclaimer. 00016 // 00017 // 2. Redistributions in binary form must reproduce the above copyright 00018 // notice, this list of conditions and the following disclaimer in the 00019 // documentation and/or other materials provided with the distribution. 00020 // 00021 // 3. Neither the name of the Corporation nor the names of the 00022 // contributors may be used to endorse or promote products derived from 00023 // this software without specific prior written permission. 00024 // 00025 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY 00026 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00027 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 00028 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE 00029 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00030 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00031 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00032 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00033 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00034 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00035 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00036 // 00037 // Questions? Contact Michael A. Heroux (maherou@sandia.gov) 00038 // 00039 // *********************************************************************** 00040 //@HEADER 00041 */ 00042 00043 #ifndef EXTERNAL_ROWS_DH_H 00044 #define EXTERNAL_ROWS_DH_H 00045 00046 #include "euclid_common.h" 00047 #ifdef __cplusplus 00048 extern "C" 00049 { 00050 #endif 00051 00052 extern void ExternalRows_dhCreate (ExternalRows_dh * er); 00053 extern void ExternalRows_dhDestroy (ExternalRows_dh er); 00054 extern void ExternalRows_dhInit (ExternalRows_dh er, Euclid_dh ctx); 00055 extern void ExternalRows_dhRecvRows (ExternalRows_dh extRows); 00056 extern void ExternalRows_dhSendRows (ExternalRows_dh extRows); 00057 extern void ExternalRows_dhGetRow (ExternalRows_dh er, int globalRow, 00058 int *len, int **cval, int **fill, 00059 REAL_DH ** aval); 00060 00061 struct _extrows_dh 00062 { 00063 SubdomainGraph_dh sg; /* not owned! */ 00064 Factor_dh F; /* not owned! */ 00065 00066 MPI_Status status[MAX_MPI_TASKS]; 00067 MPI_Request req1[MAX_MPI_TASKS]; 00068 MPI_Request req2[MAX_MPI_TASKS]; 00069 MPI_Request req3[MAX_MPI_TASKS]; 00070 MPI_Request req4[MAX_MPI_TASKS]; 00071 MPI_Request cval_req[MAX_MPI_TASKS]; 00072 MPI_Request fill_req[MAX_MPI_TASKS]; 00073 MPI_Request aval_req[MAX_MPI_TASKS]; 00074 00075 /*------------------------------------------------------------------------ 00076 * data structures for receiving, storing, and accessing external rows 00077 * from lower-ordered nabors 00078 *------------------------------------------------------------------------*/ 00079 /* for reception of row counts, row numbers, and row lengths: */ 00080 int rcv_row_counts[MAX_MPI_TASKS]; /* P_i will send rcv_row_counts[i] rows */ 00081 int rcv_nz_counts[MAX_MPI_TASKS]; /* P_i's rows contain rcv_nz_counts[i] nonzeros */ 00082 int *rcv_row_lengths[MAX_MPI_TASKS]; /* rcv_row_lengths[i][] lists the length of each row */ 00083 int *rcv_row_numbers[MAX_MPI_TASKS]; /* rcv_row_lengths[i][] lists the length of each row */ 00084 00085 /* for reception of the actual rows: */ 00086 int *cvalExt; 00087 int *fillExt; 00088 REAL_DH *avalExt; 00089 00090 /* table for accessing the rows */ 00091 Hash_dh rowLookup; 00092 00093 /*-------------------------------------------------------------------------- 00094 * data structures for sending boundary rows to higher-ordered nabors 00095 *--------------------------------------------------------------------------*/ 00096 /* for sending row counts, numbers, and lengths: */ 00097 int *my_row_counts; /* my_row_counts[i] = nzcount in upper tri portion o */ 00098 int *my_row_numbers; /* my_row_numbers[i] = global row number of local ro */ 00099 00100 /* for sending the actual rows: */ 00101 int nzSend; /* total entries in upper tri portions of bdry rows */ 00102 int *cvalSend; 00103 int *fillSend; 00104 REAL_DH *avalSend; 00105 00106 bool debug; 00107 }; 00108 #ifdef __cplusplus 00109 } 00110 #endif 00111 00112 #endif
1.7.6.1