hypre/struct_mv/struct_stencil.h
falgout b7580c7c81 Adding new high dimension code to Struct and SStruct.
Added two 4D examples, one for Struct and one for SStruct.
Use configure --enable-maxdim=MAXDIM to set.
2013-10-03 18:35:31 +00:00

52 lines
1.9 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 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 */
HYPRE_Int size; /* Number of stencil coefficients */
HYPRE_Int ndim; /* Number of dimensions */
HYPRE_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_StructStencilNDim(stencil) ((stencil) -> ndim)
#define hypre_StructStencilRefCount(stencil) ((stencil) -> ref_count)
#define hypre_StructStencilElement(stencil, i) \
hypre_StructStencilShape(stencil)[i]
#endif