source: CIVL/examples/mpi-omp/AMG2013/parcsr_mv/parcsr_mv.h

main
Last change on this file was ea777aa, checked in by Alex Wilton <awilton@…>, 3 years ago

Moved examples, include, build_default.properties, common.xml, and README out from dev.civl.com into the root of the repo.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5704 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 25.4 KB
Line 
1/*BHEADER**********************************************************************
2 * Copyright (c) 2008, Lawrence Livermore National Security, LLC.
3 * Produced at the Lawrence Livermore National Laboratory.
4 * This file is part of HYPRE. See file COPYRIGHT for details.
5 *
6 * HYPRE is free software; you can redistribute it and/or modify it under the
7 * terms of the GNU Lesser General Public License (as published by the Free
8 * Software Foundation) version 2.1 dated February 1999.
9 *
10 * $Revision: 2.4 $
11 ***********************************************************************EHEADER*/
12/*BHEADER**********************************************************************
13 * Copyright (c) 2008, Lawrence Livermore National Security, LLC.
14 * Produced at the Lawrence Livermore National Laboratory.
15 * This file is part of HYPRE. See file COPYRIGHT for details.
16 *
17 * HYPRE is free software; you can redistribute it and/or modify it under the
18 * terms of the GNU Lesser General Public License (as published by the Free
19 * Software Foundation) version 2.1 dated February 1999.
20 *
21 * $Revision: 2.4 $
22 ***********************************************************************EHEADER*/
23/*BHEADER**********************************************************************
24 * Copyright (c) 2008, Lawrence Livermore National Security, LLC.
25 * Produced at the Lawrence Livermore National Laboratory.
26 * This file is part of HYPRE. See file COPYRIGHT for details.
27 *
28 * HYPRE is free software; you can redistribute it and/or modify it under the
29 * terms of the GNU Lesser General Public License (as published by the Free
30 * Software Foundation) version 2.1 dated February 1999.
31 *
32 * $Revision: 2.4 $
33 ***********************************************************************EHEADER*/
34/*BHEADER**********************************************************************
35 * Copyright (c) 2008, Lawrence Livermore National Security, LLC.
36 * Produced at the Lawrence Livermore National Laboratory.
37 * This file is part of HYPRE. See file COPYRIGHT for details.
38 *
39 * HYPRE is free software; you can redistribute it and/or modify it under the
40 * terms of the GNU Lesser General Public License (as published by the Free
41 * Software Foundation) version 2.1 dated February 1999.
42 *
43 * $Revision: 2.4 $
44 ***********************************************************************EHEADER*/
45
46#include "HYPRE_parcsr_mv.h"
47
48#ifndef hypre_PARCSR_MV_HEADER
49#define hypre_PARCSR_MV_HEADER
50
51#include "utilities.h"
52#include "seq_mv.h"
53
54#ifdef __cplusplus
55extern "C" {
56#endif
57
58
59
60
61#ifndef HYPRE_PAR_CSR_COMMUNICATION_HEADER
62#define HYPRE_PAR_CSR_COMMUNICATION_HEADER
63
64/*--------------------------------------------------------------------------
65 * hypre_ParCSRCommPkg:
66 * Structure containing information for doing communications
67 *--------------------------------------------------------------------------*/
68
69typedef struct
70{
71 MPI_Comm comm;
72
73 int num_sends;
74 int *send_procs;
75 int *send_map_starts;
76 int *send_map_elmts;
77
78 int num_recvs;
79 int *recv_procs;
80 int *recv_vec_starts;
81
82 /* remote communication information */
83 MPI_Datatype *send_mpi_types;
84 MPI_Datatype *recv_mpi_types;
85
86} hypre_ParCSRCommPkg;
87
88/*--------------------------------------------------------------------------
89 * hypre_ParCSRCommHandle:
90 *--------------------------------------------------------------------------*/
91
92typedef struct
93{
94 hypre_ParCSRCommPkg *comm_pkg;
95 void *send_data;
96 void *recv_data;
97
98 int num_requests;
99 MPI_Request *requests;
100
101} hypre_ParCSRCommHandle;
102
103/*--------------------------------------------------------------------------
104 * Accessor macros: hypre_ParCSRCommPkg
105 *--------------------------------------------------------------------------*/
106
107#define hypre_ParCSRCommPkgComm(comm_pkg) (comm_pkg -> comm)
108
109#define hypre_ParCSRCommPkgNumSends(comm_pkg) (comm_pkg -> num_sends)
110#define hypre_ParCSRCommPkgSendProcs(comm_pkg) (comm_pkg -> send_procs)
111#define hypre_ParCSRCommPkgSendProc(comm_pkg, i) (comm_pkg -> send_procs[i])
112#define hypre_ParCSRCommPkgSendMapStarts(comm_pkg) (comm_pkg -> send_map_starts)
113#define hypre_ParCSRCommPkgSendMapStart(comm_pkg,i)(comm_pkg -> send_map_starts[i])
114#define hypre_ParCSRCommPkgSendMapElmts(comm_pkg) (comm_pkg -> send_map_elmts)
115#define hypre_ParCSRCommPkgSendMapElmt(comm_pkg,i) (comm_pkg -> send_map_elmts[i])
116
117#define hypre_ParCSRCommPkgNumRecvs(comm_pkg) (comm_pkg -> num_recvs)
118#define hypre_ParCSRCommPkgRecvProcs(comm_pkg) (comm_pkg -> recv_procs)
119#define hypre_ParCSRCommPkgRecvProc(comm_pkg, i) (comm_pkg -> recv_procs[i])
120#define hypre_ParCSRCommPkgRecvVecStarts(comm_pkg) (comm_pkg -> recv_vec_starts)
121#define hypre_ParCSRCommPkgRecvVecStart(comm_pkg,i)(comm_pkg -> recv_vec_starts[i])
122
123#define hypre_ParCSRCommPkgSendMPITypes(comm_pkg) (comm_pkg -> send_mpi_types)
124#define hypre_ParCSRCommPkgSendMPIType(comm_pkg,i) (comm_pkg -> send_mpi_types[i])
125
126#define hypre_ParCSRCommPkgRecvMPITypes(comm_pkg) (comm_pkg -> recv_mpi_types)
127#define hypre_ParCSRCommPkgRecvMPIType(comm_pkg,i) (comm_pkg -> recv_mpi_types[i])
128
129/*--------------------------------------------------------------------------
130 * Accessor macros: hypre_ParCSRCommHandle
131 *--------------------------------------------------------------------------*/
132
133#define hypre_ParCSRCommHandleCommPkg(comm_handle) (comm_handle -> comm_pkg)
134#define hypre_ParCSRCommHandleSendData(comm_handle) (comm_handle -> send_data)
135#define hypre_ParCSRCommHandleRecvData(comm_handle) (comm_handle -> recv_data)
136#define hypre_ParCSRCommHandleNumRequests(comm_handle) (comm_handle -> num_requests)
137#define hypre_ParCSRCommHandleRequests(comm_handle) (comm_handle -> requests)
138#define hypre_ParCSRCommHandleRequest(comm_handle, i) (comm_handle -> requests[i])
139
140#endif /* HYPRE_PAR_CSR_COMMUNICATION_HEADER */
141
142#ifndef hypre_PARCSR_ASSUMED_PART
143#define hypre_PARCSR_ASSUMED_PART
144
145typedef struct
146{
147 int length;
148 HYPRE_BigInt row_start;
149 HYPRE_BigInt row_end;
150 int storage_length;
151 int *proc_list;
152 HYPRE_BigInt *row_start_list;
153 HYPRE_BigInt *row_end_list;
154 int *sort_index;
155} hypre_IJAssumedPart;
156
157
158
159
160#endif /* hypre_PARCSR_ASSUMED_PART */
161
162
163
164
165#ifndef hypre_NEW_COMMPKG
166#define hypre_NEW_COMMPKG
167
168
169typedef struct
170{
171 int length;
172 int storage_length;
173 int *id;
174 int *vec_starts;
175 int element_storage_length;
176 HYPRE_BigInt *elements;
177 double *d_elements;
178 void *v_elements;
179} hypre_ProcListElements;
180
181
182
183
184#endif /* hypre_NEW_COMMPKG */
185
186
187
188
189
190/******************************************************************************
191 *
192 * Header info for Parallel Vector data structure
193 *
194 *****************************************************************************/
195
196#ifndef hypre_PAR_VECTOR_HEADER
197#define hypre_PAR_VECTOR_HEADER
198
199
200/*--------------------------------------------------------------------------
201 * hypre_ParVector
202 *--------------------------------------------------------------------------*/
203
204typedef struct
205{
206 MPI_Comm comm;
207
208 HYPRE_BigInt global_size;
209 HYPRE_BigInt first_index;
210 HYPRE_BigInt last_index;
211 HYPRE_BigInt *partitioning;
212 hypre_Vector *local_vector;
213
214 /* Does the Vector create/destroy `data'? */
215 int owns_data;
216 int owns_partitioning;
217
218 hypre_IJAssumedPart *assumed_partition; /* only populated if no_global_partition option
219 is used (compile-time option) AND this partition
220 needed
221 (for setting off-proc elements, for example)*/
222
223
224} hypre_ParVector;
225
226/*--------------------------------------------------------------------------
227 * Accessor functions for the Vector structure
228 *--------------------------------------------------------------------------*/
229
230#define hypre_ParVectorComm(vector) ((vector) -> comm)
231#define hypre_ParVectorGlobalSize(vector) ((vector) -> global_size)
232#define hypre_ParVectorFirstIndex(vector) ((vector) -> first_index)
233#define hypre_ParVectorLastIndex(vector) ((vector) -> last_index)
234#define hypre_ParVectorPartitioning(vector) ((vector) -> partitioning)
235#define hypre_ParVectorLocalVector(vector) ((vector) -> local_vector)
236#define hypre_ParVectorOwnsData(vector) ((vector) -> owns_data)
237#define hypre_ParVectorOwnsPartitioning(vector) ((vector) -> owns_partitioning)
238#define hypre_ParVectorNumVectors(vector)\
239 (hypre_VectorNumVectors( hypre_ParVectorLocalVector(vector) ))
240
241#define hypre_ParVectorAssumedPartition(vector) ((vector) -> assumed_partition)
242
243
244#endif
245
246
247
248
249/******************************************************************************
250 *
251 * Header info for Parallel CSR Matrix data structures
252 *
253 * Note: this matrix currently uses 0-based indexing.
254 *
255 *****************************************************************************/
256
257#ifndef hypre_PAR_CSR_MATRIX_HEADER
258#define hypre_PAR_CSR_MATRIX_HEADER
259
260/*--------------------------------------------------------------------------
261 * Parallel CSR Matrix
262 *--------------------------------------------------------------------------*/
263
264typedef struct
265{
266 MPI_Comm comm;
267
268 HYPRE_BigInt global_num_rows;
269 HYPRE_BigInt global_num_cols;
270 HYPRE_BigInt first_row_index;
271 HYPRE_BigInt first_col_diag;
272 /* need to know entire local range in case row_starts and col_starts
273 are null (i.e., bgl) AHB 6/05*/
274 HYPRE_BigInt last_row_index;
275 HYPRE_BigInt last_col_diag;
276
277 hypre_CSRMatrix *diag;
278 hypre_CSRMatrix *offd;
279 HYPRE_BigInt *col_map_offd;
280 /* maps columns of offd to global columns */
281 HYPRE_BigInt *row_starts;
282 /* array of length num_procs+1, row_starts[i] contains the
283 global number of the first row on proc i,
284 first_row_index = row_starts[my_id],
285 row_starts[num_procs] = global_num_rows */
286 HYPRE_BigInt *col_starts;
287 /* array of length num_procs+1, col_starts[i] contains the
288 global number of the first column of diag on proc i,
289 first_col_diag = col_starts[my_id],
290 col_starts[num_procs] = global_num_cols */
291
292 hypre_ParCSRCommPkg *comm_pkg;
293 hypre_ParCSRCommPkg *comm_pkgT;
294
295 /* Does the ParCSRMatrix create/destroy `diag', `offd', `col_map_offd'? */
296 int owns_data;
297 /* Does the ParCSRMatrix create/destroy `row_starts', `col_starts'? */
298 int owns_row_starts;
299 int owns_col_starts;
300
301 HYPRE_BigInt num_nonzeros;
302 double d_num_nonzeros;
303
304 /* Buffers used by GetRow to hold row currently being accessed. AJC, 4/99 */
305 HYPRE_BigInt *rowindices;
306 double *rowvalues;
307 int getrowactive;
308
309 hypre_IJAssumedPart *assumed_partition; /* only populated if no_global_partition option
310 is used (compile-time option)*/
311
312
313} hypre_ParCSRMatrix;
314
315/*--------------------------------------------------------------------------
316 * Accessor functions for the Parallel CSR Matrix structure
317 *--------------------------------------------------------------------------*/
318
319#define hypre_ParCSRMatrixComm(matrix) ((matrix) -> comm)
320#define hypre_ParCSRMatrixGlobalNumRows(matrix) ((matrix) -> global_num_rows)
321#define hypre_ParCSRMatrixGlobalNumCols(matrix) ((matrix) -> global_num_cols)
322#define hypre_ParCSRMatrixFirstRowIndex(matrix) ((matrix) -> first_row_index)
323#define hypre_ParCSRMatrixFirstColDiag(matrix) ((matrix) -> first_col_diag)
324#define hypre_ParCSRMatrixLastRowIndex(matrix) ((matrix) -> last_row_index)
325#define hypre_ParCSRMatrixLastColDiag(matrix) ((matrix) -> last_col_diag)
326#define hypre_ParCSRMatrixDiag(matrix) ((matrix) -> diag)
327#define hypre_ParCSRMatrixOffd(matrix) ((matrix) -> offd)
328#define hypre_ParCSRMatrixColMapOffd(matrix) ((matrix) -> col_map_offd)
329#define hypre_ParCSRMatrixRowStarts(matrix) ((matrix) -> row_starts)
330#define hypre_ParCSRMatrixColStarts(matrix) ((matrix) -> col_starts)
331#define hypre_ParCSRMatrixCommPkg(matrix) ((matrix) -> comm_pkg)
332#define hypre_ParCSRMatrixCommPkgT(matrix) ((matrix) -> comm_pkgT)
333#define hypre_ParCSRMatrixOwnsData(matrix) ((matrix) -> owns_data)
334#define hypre_ParCSRMatrixOwnsRowStarts(matrix) ((matrix) -> owns_row_starts)
335#define hypre_ParCSRMatrixOwnsColStarts(matrix) ((matrix) -> owns_col_starts)
336#define hypre_ParCSRMatrixNumRows(matrix) \
337hypre_CSRMatrixNumRows(hypre_ParCSRMatrixDiag(matrix))
338#define hypre_ParCSRMatrixNumCols(matrix) \
339hypre_CSRMatrixNumCols(hypre_ParCSRMatrixDiag(matrix))
340#define hypre_ParCSRMatrixNumNonzeros(matrix) ((matrix) -> num_nonzeros)
341#define hypre_ParCSRMatrixDNumNonzeros(matrix) ((matrix) -> d_num_nonzeros)
342#define hypre_ParCSRMatrixRowindices(matrix) ((matrix) -> rowindices)
343#define hypre_ParCSRMatrixRowvalues(matrix) ((matrix) -> rowvalues)
344#define hypre_ParCSRMatrixGetrowactive(matrix) ((matrix) -> getrowactive)
345#define hypre_ParCSRMatrixAssumedPartition(matrix) ((matrix) -> assumed_partition)
346
347#endif
348
349/* HYPRE_parcsr_matrix.c */
350int HYPRE_ParCSRMatrixCreate ( MPI_Comm comm , HYPRE_BigInt global_num_rows , HYPRE_BigInt global_num_cols , HYPRE_BigInt *row_starts , HYPRE_BigInt *col_starts , int num_cols_offd , int num_nonzeros_diag , int num_nonzeros_offd , HYPRE_ParCSRMatrix *matrix );
351int HYPRE_ParCSRMatrixDestroy ( HYPRE_ParCSRMatrix matrix );
352int HYPRE_ParCSRMatrixInitialize ( HYPRE_ParCSRMatrix matrix );
353int HYPRE_ParCSRMatrixRead ( MPI_Comm comm , const char *file_name , HYPRE_ParCSRMatrix *matrix );
354int HYPRE_ParCSRMatrixPrint ( HYPRE_ParCSRMatrix matrix , const char *file_name );
355int HYPRE_ParCSRMatrixPrintIJ ( HYPRE_ParCSRMatrix matrix , int base_i , int base_j , const char *file_name );
356int HYPRE_ParCSRMatrixGetComm ( HYPRE_ParCSRMatrix matrix , MPI_Comm *comm );
357int HYPRE_ParCSRMatrixGetDims ( HYPRE_ParCSRMatrix matrix , HYPRE_BigInt *M , HYPRE_BigInt *N );
358int HYPRE_ParCSRMatrixGetRowPartitioning ( HYPRE_ParCSRMatrix matrix , HYPRE_BigInt **row_partitioning_ptr );
359int HYPRE_ParCSRMatrixGetColPartitioning ( HYPRE_ParCSRMatrix matrix , HYPRE_BigInt **col_partitioning_ptr );
360int HYPRE_ParCSRMatrixGetLocalRange ( HYPRE_ParCSRMatrix matrix , HYPRE_BigInt *row_start , HYPRE_BigInt *row_end , HYPRE_BigInt *col_start , HYPRE_BigInt *col_end );
361int HYPRE_ParCSRMatrixGetRow ( HYPRE_ParCSRMatrix matrix , HYPRE_BigInt row , int *size , HYPRE_BigInt **col_ind , double **values );
362int HYPRE_ParCSRMatrixRestoreRow ( HYPRE_ParCSRMatrix matrix , HYPRE_BigInt row , int *size , HYPRE_BigInt **col_ind , double **values );
363int HYPRE_CSRMatrixToParCSRMatrix ( MPI_Comm comm , HYPRE_CSRMatrix A_CSR , HYPRE_BigInt *row_partitioning , HYPRE_BigInt *col_partitioning , HYPRE_ParCSRMatrix *matrix );
364int HYPRE_ParCSRMatrixMatvec ( double alpha , HYPRE_ParCSRMatrix A , HYPRE_ParVector x , double beta , HYPRE_ParVector y );
365int HYPRE_ParCSRMatrixMatvecT ( double alpha , HYPRE_ParCSRMatrix A , HYPRE_ParVector x , double beta , HYPRE_ParVector y );
366
367/* HYPRE_parcsr_vector.c */
368int HYPRE_ParVectorCreate ( MPI_Comm comm , HYPRE_BigInt global_size , HYPRE_BigInt *partitioning , HYPRE_ParVector *vector );
369int HYPRE_ParVectorDestroy ( HYPRE_ParVector vector );
370int HYPRE_ParVectorInitialize ( HYPRE_ParVector vector );
371int HYPRE_ParVectorRead ( MPI_Comm comm , const char *file_name , HYPRE_ParVector *vector );
372int HYPRE_ParVectorPrint ( HYPRE_ParVector vector , const char *file_name );
373int HYPRE_ParVectorPrintIJ ( HYPRE_ParVector vector , int base_i , const char *file_name );
374int HYPRE_ParVectorSetConstantValues ( HYPRE_ParVector vector , double value );
375int HYPRE_ParVectorSetRandomValues ( HYPRE_ParVector vector , int seed );
376int HYPRE_ParVectorCopy ( HYPRE_ParVector x , HYPRE_ParVector y );
377HYPRE_ParVector HYPRE_ParVectorCloneShallow ( HYPRE_ParVector x );
378int HYPRE_ParVectorScale ( double value , HYPRE_ParVector x );
379int HYPRE_ParVectorAxpy ( double alpha , HYPRE_ParVector x , HYPRE_ParVector y );
380int HYPRE_ParVectorInnerProd ( HYPRE_ParVector x , HYPRE_ParVector y , double *prod );
381
382/* new_commpkg.c */
383int PrintCommpkg ( hypre_ParCSRMatrix *A , const char *file_name );
384int hypre_NewCommPkgCreate_core ( MPI_Comm comm , HYPRE_BigInt *col_map_off_d , HYPRE_BigInt first_col_diag , HYPRE_BigInt col_start , HYPRE_BigInt col_end , int num_cols_off_d , HYPRE_BigInt global_num_cols , int *p_num_recvs , int **p_recv_procs , int **p_recv_vec_starts , int *p_num_sends , int **p_send_procs , int **p_send_map_starts , int **p_send_map_elements , hypre_IJAssumedPart *apart );
385int hypre_NewCommPkgCreate ( hypre_ParCSRMatrix *parcsr_A );
386int hypre_NewCommPkgDestroy ( hypre_ParCSRMatrix *parcsr_A );
387int hypre_RangeFillResponseIJDetermineRecvProcs ( void *p_recv_contact_buf , int contact_size , int contact_proc , void *ro , MPI_Comm comm , void **p_send_response_buf , int *response_message_size );
388int hypre_FillResponseIJDetermineSendProcs ( void *p_recv_contact_buf , int contact_size , int contact_proc , void *ro , MPI_Comm comm , void **p_send_response_buf , int *response_message_size );
389
390/* par_csr_assumed_part.c */
391int hypre_LocateAssummedPartition ( MPI_Comm comm , HYPRE_BigInt row_start , HYPRE_BigInt row_end , HYPRE_BigInt global_num_rows , hypre_IJAssumedPart *part , int myid );
392int hypre_ParCSRMatrixCreateAssumedPartition ( hypre_ParCSRMatrix *matrix );
393int hypre_ParCSRMatrixDestroyAssumedPartition ( hypre_ParCSRMatrix *matrix );
394int hypre_GetAssumedPartitionProcFromRow ( MPI_Comm comm , HYPRE_BigInt row , HYPRE_BigInt global_num_rows , int *proc_id );
395int hypre_GetAssumedPartitionRowRange ( MPI_Comm comm , int proc_id , HYPRE_BigInt global_num_rows , HYPRE_BigInt *row_start , HYPRE_BigInt *row_end );
396int hypre_ParVectorCreateAssumedPartition ( hypre_ParVector *vector );
397int hypre_ParVectorDestroyAssumedPartition ( hypre_ParVector *vector );
398
399/* par_csr_communication.c */
400hypre_ParCSRCommHandle *hypre_ParCSRCommHandleCreate ( int job , hypre_ParCSRCommPkg *comm_pkg , void *send_data , void *recv_data );
401int hypre_ParCSRCommHandleDestroy ( hypre_ParCSRCommHandle *comm_handle );
402void hypre_MatvecCommPkgCreate_core ( MPI_Comm comm , HYPRE_BigInt *col_map_offd , HYPRE_BigInt first_col_diag , HYPRE_BigInt *col_starts , int num_cols_diag , int num_cols_offd , HYPRE_BigInt firstColDiag , HYPRE_BigInt *colMapOffd , int data , int *p_num_recvs , int **p_recv_procs , int **p_recv_vec_starts , int *p_num_sends , int **p_send_procs , int **p_send_map_starts , int **p_send_map_elmts );
403int hypre_MatvecCommPkgCreate ( hypre_ParCSRMatrix *A );
404int hypre_MatvecCommPkgDestroy ( hypre_ParCSRCommPkg *comm_pkg );
405int hypre_BuildCSRMatrixMPIDataType ( int num_nonzeros , int num_rows , double *a_data , int *a_i , int *a_j , MPI_Datatype *csr_matrix_datatype );
406int hypre_BuildCSRJDataType ( int num_nonzeros , double *a_data , int *a_j , MPI_Datatype *csr_jdata_datatype );
407
408/* par_csr_matop.c */
409void hypre_ParMatmul_RowSizes ( int **C_diag_i , int **C_offd_i , int **B_marker , int *A_diag_i , int *A_diag_j , int *A_offd_i , int *A_offd_j , int *B_diag_i , int *B_diag_j , int *B_offd_i , int *B_offd_j , int *B_ext_diag_i , int *B_ext_diag_j , int *B_ext_offd_i , int *B_ext_offd_j , int *map_B_to_C , int *C_diag_size , int *C_offd_size , int num_rows_diag_A , int num_cols_offd_A , int allsquare , int num_cols_diag_B , int num_cols_offd_B , int num_cols_offd_C );
410hypre_ParCSRMatrix *hypre_ParMatmul ( hypre_ParCSRMatrix *A , hypre_ParCSRMatrix *B );
411hypre_CSRMatrix *hypre_ParCSRMatrixExtractConvBExt ( hypre_ParCSRMatrix *B , hypre_ParCSRMatrix *A , int data );
412hypre_BigCSRMatrix *hypre_ParCSRMatrixExtractBigExt ( hypre_ParCSRMatrix *B , hypre_ParCSRMatrix *A , int data );
413int hypre_ParCSRMatrixTranspose ( hypre_ParCSRMatrix *A, hypre_ParCSRMatrix **AT_ptr, int data);
414
415/* par_csr_matop_marked.c */
416void hypre_ParMatmul_RowSizes_Marked ( int **C_diag_i , int **C_offd_i , int **B_marker , int *A_diag_i , int *A_diag_j , int *A_offd_i , int *A_offd_j , int *B_diag_i , int *B_diag_j , int *B_offd_i , int *B_offd_j , int *B_ext_diag_i , int *B_ext_diag_j , int *B_ext_offd_i , int *B_ext_offd_j , int *map_B_to_C , int *C_diag_size , int *C_offd_size , int num_rows_diag_A , int num_cols_offd_A , int allsquare , int num_cols_diag_B , int num_cols_offd_B , int num_cols_offd_C , int *CF_marker , int *dof_func , int *dof_func_offd );
417hypre_ParCSRMatrix *hypre_ParMatmul_FC ( hypre_ParCSRMatrix *A , hypre_ParCSRMatrix *P , int *CF_marker , int *dof_func , int *dof_func_offd );
418void hypre_ParMatScaleDiagInv_F ( hypre_ParCSRMatrix *C , hypre_ParCSRMatrix *A , double weight , int *CF_marker );
419hypre_ParCSRMatrix *hypre_ParMatMinus_F ( hypre_ParCSRMatrix *P , hypre_ParCSRMatrix *C , int *CF_marker );
420void hypre_ParCSRMatrixZero_F ( hypre_ParCSRMatrix *P , int *CF_marker );
421void hypre_ParCSRMatrixCopy_C ( hypre_ParCSRMatrix *P , hypre_ParCSRMatrix *C , int *CF_marker );
422void hypre_ParCSRMatrixDropEntries ( hypre_ParCSRMatrix *C , hypre_ParCSRMatrix *P , int *CF_marker );
423
424/* par_csr_matrix.c */
425hypre_ParCSRMatrix *hypre_ParCSRMatrixCreate ( MPI_Comm comm , HYPRE_BigInt global_num_rows , HYPRE_BigInt global_num_cols , HYPRE_BigInt *row_starts , HYPRE_BigInt *col_starts , int num_cols_offd , int num_nonzeros_diag , int num_nonzeros_offd );
426int hypre_ParCSRMatrixDestroy ( hypre_ParCSRMatrix *matrix );
427int hypre_ParCSRMatrixInitialize ( hypre_ParCSRMatrix *matrix );
428int hypre_ParCSRMatrixSetNumNonzeros ( hypre_ParCSRMatrix *matrix );
429int hypre_ParCSRMatrixSetDNumNonzeros ( hypre_ParCSRMatrix *matrix );
430int hypre_ParCSRMatrixSetDataOwner ( hypre_ParCSRMatrix *matrix , int owns_data );
431int hypre_ParCSRMatrixSetRowStartsOwner ( hypre_ParCSRMatrix *matrix , int owns_row_starts );
432int hypre_ParCSRMatrixSetColStartsOwner ( hypre_ParCSRMatrix *matrix , int owns_col_starts );
433hypre_ParCSRMatrix *hypre_ParCSRMatrixRead ( MPI_Comm comm , const char *file_name );
434int hypre_ParCSRMatrixPrint ( hypre_ParCSRMatrix *matrix , const char *file_name );
435int hypre_ParCSRMatrixPrintIJ ( const hypre_ParCSRMatrix *matrix , const int base_i , const int base_j , const char *filename );
436int hypre_ParCSRMatrixGetLocalRange ( hypre_ParCSRMatrix *matrix , HYPRE_BigInt *row_start , HYPRE_BigInt *row_end , HYPRE_BigInt *col_start , HYPRE_BigInt *col_end );
437int hypre_ParCSRMatrixGetRow ( hypre_ParCSRMatrix *mat , HYPRE_BigInt row , int *size , HYPRE_BigInt **col_ind , double **values );
438int hypre_ParCSRMatrixRestoreRow ( hypre_ParCSRMatrix *matrix , HYPRE_BigInt row , int *size , HYPRE_BigInt **col_ind , double **values );
439hypre_ParCSRMatrix *hypre_CSRMatrixToParCSRMatrix ( MPI_Comm comm , hypre_CSRMatrix *A , HYPRE_BigInt *row_starts , HYPRE_BigInt *col_starts );
440int GenerateDiagAndOffd ( hypre_CSRMatrix *A , hypre_ParCSRMatrix *matrix , HYPRE_BigInt first_col_diag , HYPRE_BigInt last_col_diag );
441hypre_CSRMatrix *hypre_MergeDiagAndOffd ( hypre_ParCSRMatrix *par_matrix );
442hypre_CSRMatrix *hypre_ParCSRMatrixToCSRMatrixAll ( hypre_ParCSRMatrix *par_matrix );
443int hypre_ParCSRMatrixCopy ( hypre_ParCSRMatrix *A , hypre_ParCSRMatrix *B , int copy_data );
444int hypre_FillResponseParToCSRMatrix ( void *p_recv_contact_buf , int contact_size , int contact_proc , void *ro , MPI_Comm comm , void **p_send_response_buf , int *response_message_size );
445hypre_ParCSRMatrix *hypre_ParCSRMatrixCompleteClone ( hypre_ParCSRMatrix *A );
446hypre_ParCSRMatrix *hypre_ParCSRMatrixUnion ( hypre_ParCSRMatrix *A , hypre_ParCSRMatrix *B );
447
448/* par_csr_matvec.c */
449int hypre_ParCSRMatrixMatvec ( double alpha , hypre_ParCSRMatrix *A , hypre_ParVector *x , double beta , hypre_ParVector *y );
450int hypre_ParCSRMatrixMatvecT ( double alpha , hypre_ParCSRMatrix *A , hypre_ParVector *x , double beta , hypre_ParVector *y );
451int hypre_ParCSRMatrixMatvec_FF ( double alpha , hypre_ParCSRMatrix *A , hypre_ParVector *x , double beta , hypre_ParVector *y , int *CF_marker , int fpt );
452
453/* par_vector.c */
454hypre_ParVector *hypre_ParVectorCreate ( MPI_Comm comm , HYPRE_BigInt global_size , HYPRE_BigInt *partitioning );
455int hypre_ParVectorDestroy ( hypre_ParVector *vector );
456int hypre_ParVectorInitialize ( hypre_ParVector *vector );
457int hypre_ParVectorSetDataOwner ( hypre_ParVector *vector , int owns_data );
458int hypre_ParVectorSetPartitioningOwner ( hypre_ParVector *vector , int owns_partitioning );
459int hypre_ParVectorSetNumVectors ( hypre_ParVector *vector , int num_vectors );
460hypre_ParVector *hypre_ParVectorRead ( MPI_Comm comm , const char *file_name );
461int hypre_ParVectorPrint ( hypre_ParVector *vector , const char *file_name );
462int hypre_ParVectorSetConstantValues ( hypre_ParVector *v , double value );
463int hypre_ParVectorSetRandomValues ( hypre_ParVector *v , int seed );
464int hypre_ParVectorCopy ( hypre_ParVector *x , hypre_ParVector *y );
465hypre_ParVector *hypre_ParVectorCloneShallow ( hypre_ParVector *x );
466int hypre_ParVectorScale ( double alpha , hypre_ParVector *y );
467int hypre_ParVectorAxpy ( double alpha , hypre_ParVector *x , hypre_ParVector *y );
468double hypre_ParVectorInnerProd ( hypre_ParVector *x , hypre_ParVector *y );
469hypre_Vector *hypre_ParVectorToVectorAll ( hypre_ParVector *par_v );
470int hypre_ParVectorPrintIJ ( hypre_ParVector *vector , int base_j , const char *filename );
471int hypre_ParVectorReadIJ ( MPI_Comm comm , const char *filename , int *base_j_ptr , hypre_ParVector **vector_ptr );
472int hypre_FillResponseParToVectorAll ( void *p_recv_contact_buf , int contact_size , int contact_proc , void *ro , MPI_Comm comm , void **p_send_response_buf , int *response_message_size );
473double hypre_ParVectorLocalSumElts ( hypre_ParVector *vector );
474
475#ifdef __cplusplus
476}
477#endif
478
479#endif
480
Note: See TracBrowser for help on using the repository browser.