hypre/parcsr_matrix_vector/par_vector.h

51 lines
1.8 KiB
C

/*BHEADER**********************************************************************
* (c) 1998 The Regents of the University of California
*
* See the file COPYRIGHT_and_DISCLAIMER for a complete copyright
* notice, contact person, and disclaimer.
*
* $Revision$
*********************************************************************EHEADER*/
/******************************************************************************
*
* Header info for Parallel Vector data structure
*
*****************************************************************************/
#ifndef hypre_PAR_VECTOR_HEADER
#define hypre_PAR_VECTOR_HEADER
/*--------------------------------------------------------------------------
* hypre_ParVector
*--------------------------------------------------------------------------*/
typedef struct
{
MPI_Comm comm;
int global_size;
int first_index;
int *partitioning;
hypre_Vector *local_vector;
/* Does the Vector create/destroy `data'? */
int owns_data;
int owns_partitioning;
} hypre_ParVector;
/*--------------------------------------------------------------------------
* Accessor functions for the Vector structure
*--------------------------------------------------------------------------*/
#define hypre_ParVectorComm(vector) ((vector) -> comm)
#define hypre_ParVectorGlobalSize(vector) ((vector) -> global_size)
#define hypre_ParVectorFirstIndex(vector) ((vector) -> first_index)
#define hypre_ParVectorPartitioning(vector) ((vector) -> partitioning)
#define hypre_ParVectorLocalVector(vector) ((vector) -> local_vector)
#define hypre_ParVectorOwnsData(vector) ((vector) -> owns_data)
#define hypre_ParVectorOwnsPartitioning(vector) ((vector) -> owns_partitioning)
#endif