This file is indexed.

/usr/include/trilinos/ml_seg_precond.h is in libtrilinos-ml-dev 12.4.2-2.

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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
/* ******************************************************************** */
/* See the file COPYRIGHT for a complete copyright notice, contact      */
/* person and disclaimer.                                               */
/* ******************************************************************** */
/* ******************************************************************** */
/* Declaration of the segregated structure                              */
/* ******************************************************************** */
/* Author        : Charles Tong (LLNL) and Raymond Tuminaro (SNL)       */
/* Date          : March, 1999                                          */
/* ******************************************************************** */

#ifndef __SEGSTRUCT__
#define __SEGSTRUCT__

/* ******************************************************************** */
/* local include files                                                  */
/* ******************************************************************** */

#include "ml_common.h"
#include "ml_defs.h"
#include "ml_bdrypts.h"
#include "ml_mapper.h"
#include "ml_grid.h"
#include "ml_smoother.h"
#include "ml_comminfoop.h"
#include "ml_1level.h"
#include "ml_operator.h"
#include "ml_csolve.h"
#include "ml_operatoragx.h"
#include "ml_comm.h"
#include "ml_gridfunc.h"
#include "ml_vec.h"
#include "ml_rap.h"
#include "ml_utils.h"
#include "ml_mat_formats.h"
#include "ml_solver.h"
#include "az_aztec.h"
#include "az_aztec_defs.h"
#include <string.h>

#define ML_SEG_DIAGONAL 0
#define ML_SEG_UPPER_TRIANGULAR 1
#define ML_SEG_LOWER_TRIANGULAR 2
#define ML_SEG_DIAG_ELT 0
#define ML_SEG_OFFDIAG_ELT 1

/* ******************************************************************** */
/* ******************************************************************** */
/* data definition for the ML_SEG Class                                 */
/* ******************************************************************** */
/* -------------------------------------------------------------------- */
/* This is the primary data structure which users interact directly     */
/* with via the provided functions.                                     */
/* -------------------------------------------------------------------- */

struct ML_SEG_MATRIX_Struct
{
   AZ_MATRIX  *Amat;
   AZ_PRECOND *precond;
   int        *AZ_options;     /* Aztec's options array for preconditioning */
   double     *AZ_params;
   struct AZ_SCALING *AZ_scale;
   int        Amat_changed;
   int        precond_changed;
};

struct SEG_Struct
{
   int    SEG_nblocks;        /* number of block rows/cols in the matrix */
   int    SEG_noffdiags;      /* number of off-diagonal blocks */
   int    SEG_format;         /* SEG_DIAG, SEG_UPPER, or SEG_LOWER */
   int    **SEG_rowlists;     /* lists of rows in each block */
   int    *SEG_rowlist_lengs; /* lengths of each block row */
   int    SEG_total_nrows;    /* total number of rows in the matrix */
   struct ML_SEG_MATRIX_Struct **SEG_diag_list; /* matrices on the diagonal */
   struct ML_SEG_MATRIX_Struct **SEG_offdiag_list; /* matrices off the diagonal */
};

typedef   struct ML_SEG_Stuct           ML_SEG;
typedef   struct ML_SEG_MATRIX_Struct   ML_SEG_MATRIX;

/* ******************************************************************** */
/* ******************************************************************** */
/*      User Interface Proto-types                                      */
/* ******************************************************************** */
/* ******************************************************************** */

#ifndef ML_CPP
#ifdef __cplusplus
extern "C" {
#endif
#endif
extern int  ML_SEG_Create(struct ML_SEG_Struct **seg, AZ_MATRIX *Amat,
                          int nblocks, int **rowlist, int *rowlengs,
                          int format, int proc_config[]);
extern void ML_SEG_Destroy(struct ML_SEG_Struct **seg);
extern struct ML_SEG_MATRIX_Struct *ML_SEG_Matrix_Create(AZ_MATRIX *Amat,
                          int nrows, int *rowlist, int ncols, int *collist,
                          int format, int proc_config[]);
extern void ML_SEG_Matrix_Destroy(struct SEG_MATRIX_Struct **Smat);
extern void ML_SEG_Precondition(double ff[], int options[], int proc_config[],
                          double params[], AZ_MATRIX *mat, AZ_PRECOND *prec);
extern void AZ_Set_SEG_Preconditioner(AZ_PRECOND *Precond, struct SEG_Struct *seg,
                          int options[]);
extern void ML_SEG_Set_ML_Precond(struct ML_SEG_Struct *seg, ML *ml, int block_row,
                          double params[], int options[], int proc_config[]);
extern void ML_SEG_ML_Set_Amat(struct ML_SEG_Struct *seg, ML *ml, int level,
                          int block_row, int proc_config[]);
extern void ML_SEG_Replace_Submat(struct ML_SEG_Struct *seg, int block_row,
                          int block_col, AZ_MATRIX *newMat, int proc_config[]);
extern void ML_SEG_Set_AZ_Precond(struct ML_SEG_Struct *seg, int block_row,
                          double *params, int *options, int proc_config[]);

/*
extern int ML_Set_ResidualOutputFrequency(ML *ml, int output_freq);
extern int ML_Set_Tolerance(ML *ml, double tolerance);

extern int ML_Destroy(ML **ml);

extern int ML_Init_Comm(ML *ml);
extern int ML_Set_Comm_MyRank(ML *ml, int myrank);
extern int ML_Set_Comm_Nprocs(ML *ml, int nprocs);
extern int ML_Set_Comm_Communicator(ML *ml, USR_COMM com);
extern int ML_Set_Comm_Send(ML *ml, int (*send)());
extern int ML_Set_Comm_Recv(ML *ml, int (*recv)());
extern int ML_Set_Comm_Wait(ML *ml, int (*wait)());

extern int ML_Set_Comm(ML *ml, ML_Comm *comm);

extern int ML_Init_Grid(ML *, int nl, void *grid);
extern int ML_Set_Grid_GridFunc(ML *, int nl, ML_GridFunc *);
extern int ML_Set_Grid_MaxVertPerElmnt(ML *, int, int nvert);
extern int ML_Set_Grid_GetDimension(ML *, int nl, int (*func)());
extern int ML_Set_Grid_GetNVert(ML *, int nl, int (*func)());
extern int ML_Set_Grid_GetNElmnt(ML *, int nl, int (*func)());
extern int ML_Set_Grid_GetElmntNVert(ML *, int nl, int (*func)());
extern int ML_Set_Grid_GetElmntVertList(ML *, int nl, int (*func)());
extern int ML_Set_Grid_GetVertGlobalNum(ML *, int nl, int (*func)());
extern int ML_Set_Grid_GetElmntGlobalNum(ML *, int nl, ml_big_int (*func)());
extern int ML_Set_Grid_GetVertCoordinate(ML *, int nl, int (*func)());
extern int ML_Set_Grid_ComputeBasisCoef(ML *, int nl, int (*func)());
extern int ML_Set_Grid_GetElmntVolume(ML *, int nl, int (*func)());
extern int ML_Set_Grid_GetElmntMatrix(ML *, int nl, int (*func)());
extern int ML_Set_Grid_GetElmntNullSpace(ML *, int, int (*func)());

extern int ML_Gen_GridXsferUsingFEBasis(ML *, int L1, int L2, int stride);
extern int ML_Gen_MGHierarchyVanek(ML *, int start, int increment_or_decrement);

extern int ML_Set_Grid(ML *, int nl, void *grid, ML_GridFunc *);

extern int ML_Init_Amatrix(ML *,int level,int ilen,int olen,void *data);
extern int ML_Set_Amatrix_Matvec(ML*,int,
                int (*func)(void*,int,double*,int,double*));
		extern int ML_Set_Amatrix_Diag(ML*,int,int, double *);
		extern int ML_Set_Amatrix_Getrow(ML *ml, int level,
		int (*getrow)(void*,int,int*,int,int*,double*,int*),
		int (*comm  )(double *vec, void *data), int comm_vec_leng);

extern int ML_Set_Amatrix_GetrowNeighbors(ML*,int,int N_neigh,int *nlist);
extern int ML_Set_Amatrix_GetrowCommInfo(ML *, int level, int neighbor,
		int N_rcv, int *rcv_list, int N_send, int *send_list);
extern int ML_Set_Amatrix_NormalizationFactors(ML*,int,int n,double *fact);
extern int ML_Set_Amatrix_NullSpace(ML *, int, int, int, double *);

extern void ML_setup_grid_xsfer_op( void *f_grid, ML_GridFunc *fgrid_fcns,
		void *c_grid, ML_GridFunc *cgrid_fcns, void **xsfer,
		ML_Comm *comm );

extern int ML_Init_Restrictor(ML*,int L1,int L2,int,int,void *data);
extern int ML_Set_Restrictor_Matvec(ML*,int,
                int (*func)(void*,int,double*,int,double*));
		extern int ML_Set_Restrictor_Getrow(ML *ml, int level,
		int (*getrow)(void*,int,int*,int,int*,double*,int*),
		int (*comm  )(double *vec, void *data), int comm_vec_leng);
extern int ML_Set_Restrictor_GetrowNeighbors(ML *ml,int level,int N_neigh,
		int *neigh_list);
extern int ML_Set_Restrictor_GetrowCommInfo(ML *ml,int level,int neighbor,
		int N_rcv, int *rcv_list, int N_send, int *send_list);

extern int ML_Init_Prolongator(ML*,int L1,int L2,int,int,void *data);
extern int ML_Set_Prolongator_Matvec(ML *ml, int level,
		int (*func) (void *, int, double *, int, double *));
extern int ML_Set_Prolongator_Getrow(ML *ml, int level,
		int (*getrow)(void*,int,int*,int,int*,double*,int*),
		int (*comm  )(double *vec, void *data), int comm_vec_leng);
extern int ML_Set_Prolongator_GetrowNeighbors(ML *ml,int level,int N_neigh,
		int *neigh_list);
extern int ML_Set_Prolongator_GetrowCommInfo(ML *ml,int level,int neighbor,
		int N_rcv, int *rcv_list, int N_send, int *send_list);

extern int ML_Gen_CoarseSolverSuperLU(ML *ml_handle, int level);
extern int ML_Gen_SmootherJacobi( ML *, int nl, int pre_or_post,
		int ntimes, double omega );
extern int ML_Gen_SmootherGaussSeidel(ML*,int nl,int pre_post,int ntimes);
extern int ML_Gen_SmootherSymGaussSeidel(ML*,int nl,int pre_post,int ntimes,
		double omega);
extern int ML_Gen_BGSInverses(ML *ml,int nl,int blocksize,ML_Sm_BGS_Data **data);
extern int ML_Gen_SmootherBlockGaussSeidel(ML*,int nl,int pre_post,int ntimes,
		double omega, int blocksize);
extern int ML_Set_Smoother(ML *, int nl , int pre_post, void *obj,
		int (*func)(void *, int, double *, int, double *));
extern int ML_Set_CoarseSolver(ML *ml, int level, int leng, void *sol_obj,
                void (*solve)());

extern int ML_Gen_AmatrixRAP(ML *ml, int to_level, int from_level);

extern int ML_Set_EqnToridMapFunc(ML *ml, int level,int fleng,int tleng,
		void (*func)() );
extern int ML_Set_GridToqnMapFunc(ML *ml, int level,int fleng,int tleng,
		void (*func)() );
extern int ML_Set_BoundaryTypes(ML*,int level,int type,int n,int *data);

extern int ML_Gen_Solver(ML *ml, int method, int finest_level, int);
extern int ML_Iterate(ML *ml, double *sol, double *rhs);
extern int ML_Solve_MGV( ML *ml , double *din, double *dout);
extern double ML_Cycle_MGV(ML_1Level *curr, double *sol, double *rhs,
                int approx_all_zeros, ML_Comm *comm);
*/
#ifndef ML_CPP
#ifdef __cplusplus
}
#endif
#endif
#endif