| 1 | /*BHEADER**********************************************************************
|
|---|
| 2 | * Copyright (c) 2008, Lawrence Livermore National Security, LLC.
|
|---|
| 3 | * Produced at the Lawrence Livermore National Laboratory.
|
|---|
| 4 | * This file is part of HYPRE. See file COPYRIGHT for details.
|
|---|
| 5 | *
|
|---|
| 6 | * HYPRE is free software; you can redistribute it and/or modify it under the
|
|---|
| 7 | * terms of the GNU Lesser General Public License (as published by the Free
|
|---|
| 8 | * Software Foundation) version 2.1 dated February 1999.
|
|---|
| 9 | *
|
|---|
| 10 | * $Revision: 2.4 $
|
|---|
| 11 | ***********************************************************************EHEADER*/
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 | /******************************************************************************
|
|---|
| 15 | *
|
|---|
| 16 | * Header info for hypre_StructStencil data structures
|
|---|
| 17 | *
|
|---|
| 18 | *****************************************************************************/
|
|---|
| 19 |
|
|---|
| 20 | #ifndef hypre_STRUCT_STENCIL_HEADER
|
|---|
| 21 | #define hypre_STRUCT_STENCIL_HEADER
|
|---|
| 22 |
|
|---|
| 23 | /*--------------------------------------------------------------------------
|
|---|
| 24 | * hypre_StructStencil
|
|---|
| 25 | *--------------------------------------------------------------------------*/
|
|---|
| 26 |
|
|---|
| 27 | typedef struct hypre_StructStencil_struct
|
|---|
| 28 | {
|
|---|
| 29 | hypre_Index *shape; /* Description of a stencil's shape */
|
|---|
| 30 | int size; /* Number of stencil coefficients */
|
|---|
| 31 | int max_offset;
|
|---|
| 32 |
|
|---|
| 33 | int dim; /* Number of dimensions */
|
|---|
| 34 |
|
|---|
| 35 | int ref_count;
|
|---|
| 36 |
|
|---|
| 37 | } hypre_StructStencil;
|
|---|
| 38 |
|
|---|
| 39 | /*--------------------------------------------------------------------------
|
|---|
| 40 | * Accessor functions for the hypre_StructStencil structure
|
|---|
| 41 | *--------------------------------------------------------------------------*/
|
|---|
| 42 |
|
|---|
| 43 | #define hypre_StructStencilShape(stencil) ((stencil) -> shape)
|
|---|
| 44 | #define hypre_StructStencilSize(stencil) ((stencil) -> size)
|
|---|
| 45 | #define hypre_StructStencilMaxOffset(stencil) ((stencil) -> max_offset)
|
|---|
| 46 | #define hypre_StructStencilDim(stencil) ((stencil) -> dim)
|
|---|
| 47 | #define hypre_StructStencilRefCount(stencil) ((stencil) -> ref_count)
|
|---|
| 48 |
|
|---|
| 49 | #define hypre_StructStencilElement(stencil, i) \
|
|---|
| 50 | hypre_StructStencilShape(stencil)[i]
|
|---|
| 51 |
|
|---|
| 52 | #endif
|
|---|