hypre/seq_mv/mapped_matrix.h
2008-07-18 01:34:48 +00:00

50 lines
1.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 Mapped Matrix data structures
*
*****************************************************************************/
#ifndef hypre_MAPPED_MATRIX_HEADER
#define hypre_MAPPED_MATRIX_HEADER
/*--------------------------------------------------------------------------
* Mapped Matrix
*--------------------------------------------------------------------------*/
typedef struct
{
void *matrix;
int (*ColMap)(int, void *);
void *MapData;
} hypre_MappedMatrix;
/*--------------------------------------------------------------------------
* Accessor functions for the Mapped Matrix structure
*--------------------------------------------------------------------------*/
#define hypre_MappedMatrixMatrix(matrix) ((matrix) -> matrix)
#define hypre_MappedMatrixColMap(matrix) ((matrix) -> ColMap)
#define hypre_MappedMatrixMapData(matrix) ((matrix) -> MapData)
#define hypre_MappedMatrixColIndex(matrix,j) \
(hypre_MappedMatrixColMap(matrix)(j,hypre_MappedMatrixMapData(matrix)))
#endif