hypre/struct_matrix_vector/struct_stencil.h

48 lines
1.8 KiB
C

/*BHEADER**********************************************************************
* (c) 1997 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 hypre_StructStencil data structures
*
*****************************************************************************/
#ifndef hypre_STRUCT_STENCIL_HEADER
#define hypre_STRUCT_STENCIL_HEADER
/*--------------------------------------------------------------------------
* hypre_StructStencil
*--------------------------------------------------------------------------*/
typedef struct hypre_StructStencil_struct
{
hypre_Index *shape; /* Description of a stencil's shape */
int size; /* Number of stencil coefficients */
int max_offset;
int dim; /* Number of dimensions */
int ref_count;
} hypre_StructStencil;
/*--------------------------------------------------------------------------
* Accessor functions for the hypre_StructStencil structure
*--------------------------------------------------------------------------*/
#define hypre_StructStencilShape(stencil) ((stencil) -> shape)
#define hypre_StructStencilSize(stencil) ((stencil) -> size)
#define hypre_StructStencilMaxOffset(stencil) ((stencil) -> max_offset)
#define hypre_StructStencilDim(stencil) ((stencil) -> dim)
#define hypre_StructStencilRefCount(stencil) ((stencil) -> ref_count)
#define hypre_StructStencilElement(stencil, i) \
hypre_StructStencilShape(stencil)[i]
#endif