hypre/struct_mv/computation.h

95 lines
3.6 KiB
C

/*BHEADER**********************************************************************
* Copyright (c) 2007, Lawrence Livermore National Security, LLC.
* Produced at the Lawrence Livermore National Laboratory.
* Written by the HYPRE team. UCRL-CODE-222953.
* All rights reserved.
*
* This file is part of HYPRE (see http://www.llnl.gov/CASC/hypre/).
* Please see the COPYRIGHT_and_LICENSE file for the copyright notice,
* disclaimer, contact information and the GNU Lesser General Public License.
*
* HYPRE is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License (as published by the Free Software
* Foundation) version 2.1 dated February 1999.
*
* HYPRE is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the IMPLIED WARRANTY OF MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the terms and conditions of the GNU General
* Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* $Revision$
***********************************************************************EHEADER*/
/******************************************************************************
*
* Header info for computation
*
*****************************************************************************/
#ifndef hypre_COMPUTATION_HEADER
#define hypre_COMPUTATION_HEADER
/*--------------------------------------------------------------------------
* hypre_ComputeInfo:
*--------------------------------------------------------------------------*/
typedef struct hypre_ComputeInfo_struct
{
hypre_CommInfo *comm_info;
hypre_BoxArrayArray *indt_boxes;
hypre_BoxArrayArray *dept_boxes;
hypre_Index stride;
} hypre_ComputeInfo;
/*--------------------------------------------------------------------------
* hypre_ComputePkg:
* Structure containing information for doing computations.
*--------------------------------------------------------------------------*/
typedef struct hypre_ComputePkg_struct
{
hypre_CommPkg *comm_pkg;
hypre_BoxArrayArray *indt_boxes;
hypre_BoxArrayArray *dept_boxes;
hypre_Index stride;
hypre_StructGrid *grid;
hypre_BoxArray *data_space;
int num_values;
} hypre_ComputePkg;
/*--------------------------------------------------------------------------
* Accessor macros: hypre_ComputeInfo
*--------------------------------------------------------------------------*/
#define hypre_ComputeInfoCommInfo(info) (info -> comm_info)
#define hypre_ComputeInfoIndtBoxes(info) (info -> indt_boxes)
#define hypre_ComputeInfoDeptBoxes(info) (info -> dept_boxes)
#define hypre_ComputeInfoStride(info) (info -> stride)
/*--------------------------------------------------------------------------
* Accessor macros: hypre_ComputePkg
*--------------------------------------------------------------------------*/
#define hypre_ComputePkgCommPkg(compute_pkg) (compute_pkg -> comm_pkg)
#define hypre_ComputePkgIndtBoxes(compute_pkg) (compute_pkg -> indt_boxes)
#define hypre_ComputePkgDeptBoxes(compute_pkg) (compute_pkg -> dept_boxes)
#define hypre_ComputePkgStride(compute_pkg) (compute_pkg -> stride)
#define hypre_ComputePkgGrid(compute_pkg) (compute_pkg -> grid)
#define hypre_ComputePkgDataSpace(compute_pkg) (compute_pkg -> data_space)
#define hypre_ComputePkgNumValues(compute_pkg) (compute_pkg -> num_values)
#endif