/usr/include/csr_block_matrix.h is in libhypre-dev 2.8.0b-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | /*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: 1.13 $
***********************************************************************EHEADER*/
/******************************************************************************
*
* Header info for CSR Block Matrix data structures
*
* Note: this matrix currently uses 0-based indexing.
* Note: everything is in terms of blocks (ie. num_rows is the number
* of block rows)
*
*****************************************************************************/
#ifndef hypre_CSR_BLOCK_MATRIX_HEADER
#define hypre_CSR_BLOCK_MATRIX_HEADER
#include "seq_mv.h"
#include "_hypre_utilities.h"
#ifdef __cplusplus
extern "C" {
#endif
/*--------------------------------------------------------------------------
* CSR Block Matrix
*--------------------------------------------------------------------------*/
typedef struct
{
double *data;
HYPRE_Int *i;
HYPRE_Int *j;
HYPRE_Int block_size;
HYPRE_Int num_rows;
HYPRE_Int num_cols;
HYPRE_Int num_nonzeros;
HYPRE_Int owns_data;
} hypre_CSRBlockMatrix;
/*--------------------------------------------------------------------------
* Accessor functions for the CSR Block Matrix structure
*--------------------------------------------------------------------------*/
#define hypre_CSRBlockMatrixData(matrix) ((matrix) -> data)
#define hypre_CSRBlockMatrixI(matrix) ((matrix) -> i)
#define hypre_CSRBlockMatrixJ(matrix) ((matrix) -> j)
#define hypre_CSRBlockMatrixBlockSize(matrix) ((matrix) -> block_size)
#define hypre_CSRBlockMatrixNumRows(matrix) ((matrix) -> num_rows)
#define hypre_CSRBlockMatrixNumCols(matrix) ((matrix) -> num_cols)
#define hypre_CSRBlockMatrixNumNonzeros(matrix) ((matrix) -> num_nonzeros)
#define hypre_CSRBlockMatrixOwnsData(matrix) ((matrix) -> owns_data)
/*--------------------------------------------------------------------------
* other functions for the CSR Block Matrix structure
*--------------------------------------------------------------------------*/
hypre_CSRBlockMatrix
*hypre_CSRBlockMatrixCreate(HYPRE_Int, HYPRE_Int, HYPRE_Int, HYPRE_Int);
HYPRE_Int hypre_CSRBlockMatrixDestroy(hypre_CSRBlockMatrix *);
HYPRE_Int hypre_CSRBlockMatrixInitialize(hypre_CSRBlockMatrix *);
HYPRE_Int hypre_CSRBlockMatrixSetDataOwner(hypre_CSRBlockMatrix *, HYPRE_Int);
hypre_CSRMatrix
*hypre_CSRBlockMatrixCompress(hypre_CSRBlockMatrix *);
hypre_CSRMatrix
*hypre_CSRBlockMatrixConvertToCSRMatrix(hypre_CSRBlockMatrix *);
hypre_CSRBlockMatrix
*hypre_CSRBlockMatrixConvertFromCSRMatrix(hypre_CSRMatrix *, HYPRE_Int);
HYPRE_Int hypre_CSRBlockMatrixBlockAdd(double *, double *, double*, HYPRE_Int);
HYPRE_Int hypre_CSRBlockMatrixBlockMultAdd(double *, double *, double, double *, HYPRE_Int);
HYPRE_Int hypre_CSRBlockMatrixBlockMultAddDiag(double *, double *, double, double *, HYPRE_Int);
HYPRE_Int
hypre_CSRBlockMatrixBlockMultAddDiag2(double* i1, double* i2, double beta,
double* o, HYPRE_Int block_size);
HYPRE_Int
hypre_CSRBlockMatrixBlockMultAddDiag3(double* i1, double* i2, double beta,
double* o, HYPRE_Int block_size);
HYPRE_Int hypre_CSRBlockMatrixBlockInvMult(double *, double *, double *, HYPRE_Int);
HYPRE_Int hypre_CSRBlockMatrixBlockInvMultDiag(double *, double *, double *, HYPRE_Int);
HYPRE_Int
hypre_CSRBlockMatrixBlockInvMultDiag2(double* i1, double* i2, double* o, HYPRE_Int block_size);
HYPRE_Int
hypre_CSRBlockMatrixBlockInvMultDiag3(double* i1, double* i2, double* o, HYPRE_Int block_size);
HYPRE_Int hypre_CSRBlockMatrixBlockMultInv(double *, double *, double *, HYPRE_Int);
HYPRE_Int hypre_CSRBlockMatrixBlockTranspose(double *, double *, HYPRE_Int);
HYPRE_Int hypre_CSRBlockMatrixTranspose(hypre_CSRBlockMatrix *A,
hypre_CSRBlockMatrix **AT, HYPRE_Int data);
HYPRE_Int hypre_CSRBlockMatrixBlockCopyData(double*, double*, double, HYPRE_Int);
HYPRE_Int hypre_CSRBlockMatrixBlockCopyDataDiag(double*, double*, double, HYPRE_Int);
HYPRE_Int hypre_CSRBlockMatrixBlockAddAccumulate(double*, double*, HYPRE_Int);
HYPRE_Int hypre_CSRBlockMatrixBlockAddAccumulateDiag(double* i1, double* o, HYPRE_Int block_size);
HYPRE_Int
hypre_CSRBlockMatrixMatvec(double alpha, hypre_CSRBlockMatrix *A,
hypre_Vector *x, double beta, hypre_Vector *y);
HYPRE_Int
hypre_CSRBlockMatrixMatvecT( double alpha, hypre_CSRBlockMatrix *A, hypre_Vector *x,
double beta, hypre_Vector *y );
HYPRE_Int
hypre_CSRBlockMatrixBlockInvMatvec(double* mat, double* v,
double* ov, HYPRE_Int block_size);
HYPRE_Int
hypre_CSRBlockMatrixBlockMatvec(double alpha, double* mat, double* v, double beta,
double* ov, HYPRE_Int block_size);
HYPRE_Int hypre_CSRBlockMatrixBlockNorm(HYPRE_Int norm_type, double* data, double* out, HYPRE_Int block_size);
HYPRE_Int hypre_CSRBlockMatrixBlockSetScalar(double* o, double beta, HYPRE_Int block_size);
HYPRE_Int hypre_CSRBlockMatrixComputeSign(double *i1, double *o, HYPRE_Int block_size);
HYPRE_Int hypre_CSRBlockMatrixBlockAddAccumulateDiagCheckSign(double* i1, double* o, HYPRE_Int block_size, double *sign);
HYPRE_Int hypre_CSRBlockMatrixBlockMultAddDiagCheckSign(double* i1, double* i2, double beta,
double* o, HYPRE_Int block_size, double *sign);
#ifdef __cplusplus
}
#endif
#endif
|