| 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 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 | /******************************************************************************
|
|---|
| 16 | *
|
|---|
| 17 | * Header file for HYPRE_parcsr_mv library
|
|---|
| 18 | *
|
|---|
| 19 | *****************************************************************************/
|
|---|
| 20 |
|
|---|
| 21 | #ifndef HYPRE_PARCSR_MV_HEADER
|
|---|
| 22 | #define HYPRE_PARCSR_MV_HEADER
|
|---|
| 23 |
|
|---|
| 24 | #include "HYPRE_utilities.h"
|
|---|
| 25 | #include "HYPRE_seq_mv.h"
|
|---|
| 26 |
|
|---|
| 27 | #ifdef __cplusplus
|
|---|
| 28 | extern "C" {
|
|---|
| 29 | #endif
|
|---|
| 30 |
|
|---|
| 31 | /*--------------------------------------------------------------------------
|
|---|
| 32 | * Structures
|
|---|
| 33 | *--------------------------------------------------------------------------*/
|
|---|
| 34 |
|
|---|
| 35 | struct hypre_ParCSRMatrix_struct;
|
|---|
| 36 | typedef struct hypre_ParCSRMatrix_struct *HYPRE_ParCSRMatrix;
|
|---|
| 37 | struct hypre_ParVector_struct;
|
|---|
| 38 | typedef struct hypre_ParVector_struct *HYPRE_ParVector;
|
|---|
| 39 |
|
|---|
| 40 | /*--------------------------------------------------------------------------
|
|---|
| 41 | * Prototypes
|
|---|
| 42 | *--------------------------------------------------------------------------*/
|
|---|
| 43 |
|
|---|
| 44 | /* HYPRE_parcsr_matrix.c */
|
|---|
| 45 | int 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 );
|
|---|
| 46 | int HYPRE_ParCSRMatrixDestroy( HYPRE_ParCSRMatrix matrix );
|
|---|
| 47 | int HYPRE_ParCSRMatrixInitialize( HYPRE_ParCSRMatrix matrix );
|
|---|
| 48 | int HYPRE_ParCSRMatrixRead( MPI_Comm comm , const char *file_name , HYPRE_ParCSRMatrix *matrix );
|
|---|
| 49 | int HYPRE_ParCSRMatrixPrint( HYPRE_ParCSRMatrix matrix , const char *file_name );
|
|---|
| 50 | int HYPRE_ParCSRMatrixPrintIJ( HYPRE_ParCSRMatrix matrix , int base_i, int bse_j, const char *file_name );
|
|---|
| 51 | int HYPRE_ParCSRMatrixGetComm( HYPRE_ParCSRMatrix matrix , MPI_Comm *comm );
|
|---|
| 52 | int HYPRE_ParCSRMatrixGetDims( HYPRE_ParCSRMatrix matrix , HYPRE_BigInt *M , HYPRE_BigInt *N );
|
|---|
| 53 | int HYPRE_ParCSRMatrixGetRowPartitioning( HYPRE_ParCSRMatrix matrix , HYPRE_BigInt **row_partitioning_ptr );
|
|---|
| 54 | int HYPRE_ParCSRMatrixGetColPartitioning( HYPRE_ParCSRMatrix matrix , HYPRE_BigInt **col_partitioning_ptr );
|
|---|
| 55 | int HYPRE_ParCSRMatrixGetLocalRange( HYPRE_ParCSRMatrix matrix , HYPRE_BigInt *row_start , HYPRE_BigInt *row_end , HYPRE_BigInt *col_start , HYPRE_BigInt *col_end );
|
|---|
| 56 | int HYPRE_ParCSRMatrixGetRow( HYPRE_ParCSRMatrix matrix , HYPRE_BigInt row , int *size , HYPRE_BigInt **col_ind , double **values );
|
|---|
| 57 | int HYPRE_ParCSRMatrixRestoreRow( HYPRE_ParCSRMatrix matrix , HYPRE_BigInt row , int *size , HYPRE_BigInt **col_ind , double **values );
|
|---|
| 58 | int HYPRE_CSRMatrixToParCSRMatrix( MPI_Comm comm , HYPRE_CSRMatrix A_CSR , HYPRE_BigInt *row_partitioning , HYPRE_BigInt *col_partitioning , HYPRE_ParCSRMatrix *matrix );
|
|---|
| 59 | int HYPRE_ParCSRMatrixMatvec( double alpha , HYPRE_ParCSRMatrix A , HYPRE_ParVector x , double beta , HYPRE_ParVector y );
|
|---|
| 60 | int HYPRE_ParCSRMatrixMatvecT( double alpha , HYPRE_ParCSRMatrix A , HYPRE_ParVector x , double beta , HYPRE_ParVector y );
|
|---|
| 61 |
|
|---|
| 62 | /* HYPRE_parcsr_vector.c */
|
|---|
| 63 | int HYPRE_ParVectorCreate( MPI_Comm comm , HYPRE_BigInt global_size , HYPRE_BigInt *partitioning , HYPRE_ParVector *vector );
|
|---|
| 64 | int HYPRE_ParVectorDestroy( HYPRE_ParVector vector );
|
|---|
| 65 | int HYPRE_ParVectorInitialize( HYPRE_ParVector vector );
|
|---|
| 66 | int HYPRE_ParVectorRead( MPI_Comm comm , const char *file_name , HYPRE_ParVector *vector );
|
|---|
| 67 | int HYPRE_ParVectorPrint( HYPRE_ParVector vector , const char *file_name );
|
|---|
| 68 | int HYPRE_ParVectorPrintIJ( HYPRE_ParVector vector , int base_i, const char *file_name );
|
|---|
| 69 | int HYPRE_ParVectorSetConstantValues( HYPRE_ParVector vector , double value );
|
|---|
| 70 | int HYPRE_ParVectorSetRandomValues( HYPRE_ParVector vector , int seed );
|
|---|
| 71 | int HYPRE_ParVectorCopy( HYPRE_ParVector x , HYPRE_ParVector y );
|
|---|
| 72 | int HYPRE_ParVectorScale( double value , HYPRE_ParVector x );
|
|---|
| 73 | int HYPRE_ParVectorInnerProd( HYPRE_ParVector x , HYPRE_ParVector y , double *prod );
|
|---|
| 74 | int HYPRE_VectorToParVector( MPI_Comm comm , HYPRE_Vector b , HYPRE_BigInt *partitioning , HYPRE_ParVector *vector );
|
|---|
| 75 |
|
|---|
| 76 | #ifdef __cplusplus
|
|---|
| 77 | }
|
|---|
| 78 | #endif
|
|---|
| 79 |
|
|---|
| 80 | #endif
|
|---|
| 81 |
|
|---|