/usr/include/trilinos/ml_mat_formats.h is in libtrilinos-ml-dev 12.12.1-5.
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 158 159 160 161 162 | /* ******************************************************************** */
/* See the file COPYRIGHT for a complete copyright notice, contact */
/* person and disclaimer. */
/* ******************************************************************** */
/* ******************************************************************** */
/* Declaration of matrix-format specific stuff */
/* ******************************************************************** */
/* Author : Charles Tong (LLNL) and Ray Tuminaro (SNL) */
/* Date : April, 1999 */
/* ******************************************************************** */
#ifndef _MLMATFORMATS_
#define _MLMATFORMATS_
/* ******************************************************************** */
/* Structure used for ML_MSR_getrows and ML_CSR_getrows */
/* */
/* For CSR matrices, we have */
/* A(i,j) where 0 <= i < N | j = columns[k] , A(i,j) = values[k] */
/* and 0 <= j < N | where rowptr[i] <= k <rowptr[i+1] */
/* */
/* For MSR matrices, we have */
/* A(i,j) where 0 <= i < N,| j = columns[k] , A(i,j) = values[k] */
/* i != j , | where columns[i] <= k < columns[i+1]*/
/* and 0 <= j < N | */
/* A(i,i) where 0 <= i < N,| A(i,j) = values[i] */
/* -------------------------------------------------------------------- */
struct ML_CSR_MSRdata
{
int *columns, *rowptr;
double *values;
/*************************************/
int Nnz, Nrows, Ncols; /* Haim's addition. Convenient for GGB */
/* implementation of prolongator. */
/* These fields are not normally filled */
/* in the rest of ml. */
};
struct ML_vbrdata
{
int *bindx, *bpntr, *cpntr, *rpntr, *indx;
double *val;
};
#include "ml_common.h"
#include "ml_comminfoop.h"
typedef struct ML_Matrix_DCSR_Struct
{
int ML_id;
int mat_n;
int *mat_ia;
int *mat_ja;
double *mat_a;
ML_Comm *comm;
ML_CommInfoOP *comminfo;
} ML_Matrix_DCSR;
#include "ml_operator.h"
#ifndef ML_CPP
#ifdef __cplusplus
extern "C" {
#endif
#endif
extern void ML_RECUR_CSR_MSRdata_Destroy(ML_Operator *matrix);
extern void ML_OnlyFreeTopLevelDataPtr(void *data);
extern void ML_CSR_MSRdata_Destroy(void *data);
extern void ML_CSR_MSRdata_Destroy_StructOnly(void *data);
extern void ML_RECUR_VBRdata_Destroy(void *data);
extern void ML_VBRdata_Destroy(void *data);
extern void ML_restricted_MSR_mult(ML_Operator *matrix, int Nrows,
double b[], double c[], int Nsend);
extern void ML_Scale_CSR(ML_Operator *input_matrix,
double scale_factors[], int mult_or_divide);
extern int CSR_getrows(void *data,int N_requested_rows,int requested_rows[],
int allocated_space, int columns[], double values[],
int row_lengths[]);
extern int CSR_getrow(ML_Operator *data,int N_requested_rows,int requested_rows[],
int allocated_space, int columns[], double values[],
int row_lengths[]);
extern int sCSR_getrows(ML_Operator *data,int N_requested_rows,int requested_rows[],
int allocated_space, int columns[], double values[],
int row_lengths[]);
extern int cCSR_getrows(ML_Operator *data, int N_requested_rows, int requested_rows[],
int allocated_space, int columns[], double values[],
int row_lengths[]);
extern int CSR_get_one_row(ML_Operator *data, int N_requested_rows, int
requested_rows[], int allocated_space, int
columns[], double values[], int row_lengths[]);
extern int cCSR_trans_matvec(ML_Operator *Amat_in, int ilen, double p[], int olen,
double ap[]);
extern int cCSR_matvec(ML_Operator *Amat_in, int ilen, double p[], int olen,
double ap[]);
extern int CSR_trans_matvec(ML_Operator *Amat_in, int ilen, double p[], int olen, double ap[]);
extern int MSR_get_ones_rows(ML_Operator *data, int N_requested_rows, int requested_rows[],
int allocated_space, int columns[], double values[],
int row_lengths[]);
extern int MSR_getrows(ML_Operator *data, int N_requested_rows, int requested_rows[],
int allocated_space, int columns[], double values[],
int row_lengths[]);
extern int MSR_matvec(ML_Operator *Amat, int, double p[], int, double ap[]);
extern int VBR_getrows(ML_Operator *data, int N_requested_rows, int requested_rows[],
int allocated_space, int columns[], double values[],
int row_lengths[]);
extern int VBR_block_getrow(ML_Operator *Amat, int requested_row, int *int_space, int *values_space, int *blocks, int **bindx, int **indx, double **values, int *row_length, int index, int index2);
#ifdef WKC
/* WKC -- double * happen to be Epetra_MultiVectors in cognito */
extern int MSR_matvec_WKC(ML_Operator *Amat, int, double *p, int, double *ap);
#endif
extern int CSR_densematvec(ML_Operator *Amat_in, int ilen, double p[], int olen, double ap[]);
extern int CSR_matvec(ML_Operator *Amat, int, double p[], int, double ap[]);
extern int sCSR_trans_matvec(ML_Operator *Amat, int, double p[], int, double ap[]);
extern int CSR_trans_ones_matvec(ML_Operator *Amat, int, double p[], int, double ap[]);
extern int sCSR_matvec(ML_Operator *Amat, int, double p[], int, double ap[]);
extern int CSR_ones_matvec(ML_Operator *Amat, int, double p[], int, double ap[]);
extern int sCSR_ones_matvec(ML_Operator *Amat, int, double p[], int, double ap[]);
extern int localCSR_matvec(void *Amat_in, int ilen, double p[], int olen,
double ap[]);
extern int VBR_cnst_blk_getrows(ML_Operator *data, int N_requested_rows,
int requested_rows[], int allocated_space,
int columns[], double values[],
int row_lengths[]);
extern int VECTOR_getrows(ML_Operator *mat,int N_requested_rows,int requested_rows[],
int allocated_space, int columns[], double values[],
int row_lengths[]);
extern int ML_MSR2CSR(struct ML_CSR_MSRdata *csr_data, int Nrows,
int *Ncolumns);
extern int ML_Matrix_DCSR_Create( ML_Matrix_DCSR ** );
extern void ML_Matrix_DCSR_Destroy( ML_Matrix_DCSR * );
extern int ML_Matrix_DCSR_Set( ML_Matrix_DCSR *,int,int*,int*,double*);
extern int ML_Matrix_DCSR_Set_Comm(ML_Matrix_DCSR*,ML_CommInfoOP*,ML_Comm*);
extern int ML_Matrix_DCSR_Getrow(ML_Operator*,int,int*,int,int*,double*,int*);
extern int ML_Matrix_DCSR_Matvec(ML_Operator *,int,double*,int,double*);
#ifndef ML_CPP
#ifdef __cplusplus
}
#endif
#endif
#endif
|