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).
72 lines
2.7 KiB
C
72 lines
2.7 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 Parallel Vector data structure
|
|
*
|
|
*****************************************************************************/
|
|
|
|
#ifndef hypre_PAR_VECTOR_HEADER
|
|
#define hypre_PAR_VECTOR_HEADER
|
|
|
|
|
|
/*--------------------------------------------------------------------------
|
|
* hypre_ParVector
|
|
*--------------------------------------------------------------------------*/
|
|
|
|
typedef struct
|
|
{
|
|
MPI_Comm comm;
|
|
|
|
HYPRE_Int global_size;
|
|
HYPRE_Int first_index;
|
|
HYPRE_Int last_index;
|
|
HYPRE_Int *partitioning;
|
|
hypre_Vector *local_vector;
|
|
|
|
/* Does the Vector create/destroy `data'? */
|
|
HYPRE_Int owns_data;
|
|
HYPRE_Int owns_partitioning;
|
|
|
|
hypre_IJAssumedPart *assumed_partition; /* only populated if no_global_partition option
|
|
is used (compile-time option) AND this partition
|
|
needed
|
|
(for setting off-proc elements, for example)*/
|
|
|
|
|
|
} 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_ParVectorLastIndex(vector) ((vector) -> last_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)
|
|
#define hypre_ParVectorNumVectors(vector)\
|
|
(hypre_VectorNumVectors( hypre_ParVectorLocalVector(vector) ))
|
|
|
|
#define hypre_ParVectorAssumedPartition(vector) ((vector) -> assumed_partition)
|
|
|
|
|
|
#endif
|