Changed MPI routines to hypre_MPI routines. Added hypre_printf, etc. routines. Added AUTOTEST tests to look for 'int' and 'MPI_' calls. Added a new approach for the Fortran interface (not implemented everywhere yet).
92 lines
3.5 KiB
C
92 lines
3.5 KiB
C
/*BHEADER**********************************************************************
|
|
* Copyright (c) 2008, Lawrence Livermore National Security, LLC.
|
|
* Produced at the Lawrence Livermore National Laboratory.
|
|
* This file is part of HYPRE. See file COPYRIGHT for details.
|
|
*
|
|
* HYPRE is free software; you can redistribute it and/or modify it under the
|
|
* terms of the GNU Lesser General Public License (as published by the Free
|
|
* Software Foundation) version 2.1 dated February 1999.
|
|
*
|
|
* $Revision$
|
|
***********************************************************************EHEADER*/
|
|
|
|
|
|
|
|
|
|
/******************************************************************************
|
|
*
|
|
* Header info for the hypre_IJMatrix structures
|
|
*
|
|
*****************************************************************************/
|
|
|
|
#ifndef hypre_IJ_MATRIX_HEADER
|
|
#define hypre_IJ_MATRIX_HEADER
|
|
|
|
/*--------------------------------------------------------------------------
|
|
* hypre_IJMatrix:
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
typedef struct hypre_IJMatrix_struct
|
|
{
|
|
MPI_Comm comm;
|
|
|
|
HYPRE_Int *row_partitioning; /* distribution of rows across processors */
|
|
HYPRE_Int *col_partitioning; /* distribution of columns */
|
|
|
|
HYPRE_Int object_type; /* Indicates the type of "object" */
|
|
void *object; /* Structure for storing local portion */
|
|
void *translator; /* optional storage_type specfic structure
|
|
for holding additional local info */
|
|
HYPRE_Int assemble_flag; /* indicates whether matrix has been
|
|
assembled */
|
|
|
|
HYPRE_Int global_first_row; /* these for data items are necessary */
|
|
HYPRE_Int global_first_col; /* to be able to avoind using the global */
|
|
HYPRE_Int global_num_rows; /* global partition */
|
|
HYPRE_Int global_num_cols;
|
|
HYPRE_Int print_level;
|
|
|
|
|
|
|
|
} hypre_IJMatrix;
|
|
|
|
/*--------------------------------------------------------------------------
|
|
* Accessor macros: hypre_IJMatrix
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
#define hypre_IJMatrixComm(matrix) ((matrix) -> comm)
|
|
|
|
#define hypre_IJMatrixRowPartitioning(matrix) ((matrix) -> row_partitioning)
|
|
#define hypre_IJMatrixColPartitioning(matrix) ((matrix) -> col_partitioning)
|
|
|
|
#define hypre_IJMatrixObjectType(matrix) ((matrix) -> object_type)
|
|
#define hypre_IJMatrixObject(matrix) ((matrix) -> object)
|
|
#define hypre_IJMatrixTranslator(matrix) ((matrix) -> translator)
|
|
|
|
#define hypre_IJMatrixAssembleFlag(matrix) ((matrix) -> assemble_flag)
|
|
|
|
|
|
#define hypre_IJMatrixGlobalFirstRow(matrix) ((matrix) -> global_first_row)
|
|
#define hypre_IJMatrixGlobalFirstCol(matrix) ((matrix) -> global_first_col)
|
|
#define hypre_IJMatrixGlobalNumRows(matrix) ((matrix) -> global_num_rows)
|
|
#define hypre_IJMatrixGlobalNumCols(matrix) ((matrix) -> global_num_cols)
|
|
#define hypre_IJMatrixPrintLevel(matrix) ((matrix) -> print_level)
|
|
|
|
/*--------------------------------------------------------------------------
|
|
* prototypes for operations on local objects
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
#ifdef PETSC_AVAILABLE
|
|
/* IJMatrix_petsc.c */
|
|
HYPRE_Int
|
|
hypre_GetIJMatrixParCSRMatrix( HYPRE_IJMatrix IJmatrix, Mat *reference )
|
|
#endif
|
|
|
|
#ifdef ISIS_AVAILABLE
|
|
/* IJMatrix_isis.c */
|
|
HYPRE_Int
|
|
hypre_GetIJMatrixISISMatrix( HYPRE_IJMatrix IJmatrix, RowMatrix *reference )
|
|
#endif
|
|
|
|
#endif
|