/usr/include/trilinos/ml_op_utils.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 | /* ******************************************************************** */
/* See the file COPYRIGHT for a complete copyright notice, contact */
/* person and disclaimer. */
/* ******************************************************************** */
/* ******************************************************************** */
/* Declaration of the New stuff */
/* ******************************************************************** */
/* Author : Charles Tong (LLNL) and Raymond Tuminaro (SNL) */
/* Date : March, 1999 */
/* ******************************************************************** */
#ifndef __MLMATRIX__
#define __MLMATRIX__
#include "ml_common.h"
/************************************************************************/
/* Structures used to implement block matrices where */
/* matrix[i+j*NBlockRows] is the (i,j)th block and NULL */
/* entries are interpreted as blocks of zeros. */
/***********************************************************************/
#define ML_DESTROY_EVERYTHING 2 /* destroy everything including */
/* entries in matrix */
/* array when destructor is invoked */
#define ML_DESTROY_SHALLOW 3 /* destroy everything but entries in */
/* matrix */
#define ML_CLEAN_EVERYTHING 4 /* destroy everything but entries in */
/* matrix which are instead cleaned. */
typedef struct ML_BlkMatData_Struct ML_BlkMatData;
/* Used to record local and global ids associated with each block matrix*/
struct ML_BlkMatData_Struct {
int *GlobalId;
int *LocalId;
};
struct MLBlkMat {
int NBlockRows; /* number of block rows in matrix */
int NBlockCols; /* number of block cols in matrix */
int *RowStart; /* RowStart[i] is row # of 1st row in blk row i */
int *ColStart; /* ColStart[i] is col # of 1st col in blk col i */
int NGhost; /* total number of ghosts associated with a */
/* matvec on the entire matrix. */
int invec; /* total number of assigned columns */
int outvec; /* total number of assigned rows */
ML_Operator **matrix; /* matrix[i+j*NBlockRows] is (i,j)th block. */
ML_BlkMatData **matdata;/*matdata[i+j*NBlockRows] gives data for */
/* (i,j)th block. */
int destroy_level; /* indicates whether *matrix should be */
/* destroyed and/or matrix[k]'s should be */
/* destroyed/clean when destructor invoked. */
int final_called; /* indicates if ML_Operator_BlkMatFinalize() */
/* has been invoked or not. */
};
#ifndef ML_CPP
#ifdef __cplusplus
extern "C" {
#endif
#endif
extern int oldML_Mdfy_Prolongator_DirBdry(ML *, int , double *, double *);
extern int ML_Compute_Coarse_Bdry(ML *ml_handle, int level, int size,
int fine_size);
extern int ML_Mdfy_Prolongator_DirBdry(ML *ml_handle, int level2, int size,
int fine_size );
extern ML_Operator *ML_Operator_ExplicitlyScale(ML_Operator *matrix,
double scalar);
extern int ML_Operator_ChangeToSinglePrecision(ML_Operator *matrix);
extern int ML_Operator_ChangeToChar(ML_Operator *matrix);
extern int ML_Operator_ImplicitTranspose(ML_Operator *Rmat,
ML_Operator *Pmat,
int PostCommAlreadySet);
extern int ML_Gen_Restrictor_TransP(ML *, int, int, ML_Operator*);
extern int ML_Gen_Prolongator_Getrow(ML *, int , int , int , int ,
int (*)(void* , int , int *, int , int *, double *, int *),
int (*)(double *, void*), void *data, int);
/*
extern int ML_Operator_Transpose(ML_Operator *Amat, ML_Operator *Amat_trans );
*/
extern int ML_Operator_ColPartition2RowPartition(ML_Operator *A, ML_Operator *Atrans);
extern int eye_getrows(ML_Operator *data, int N_requested_rows, int requested_rows[],
int allocated_space, int columns[], double values[],
int row_lengths[]);
extern int eye_matvec(ML_Operator *Amat_in, int ilen, double p[], int olen, double ap[]);
extern int ML_Operator_Transpose_byrow(ML_Operator *A, ML_Operator *Atrans);
extern int ML_Operator_Getrow_Diag(ML_Operator *Amat, double **diagonal);
extern int ML_build_overlapped_pre_comm(ML_Operator *tempA, ML_CommInfoOP
*old_comm, int max_per_proc,
int *hash_list, int hash_length,
int *hash_used, int old_Nrows,
int *Nexternal, int *external[],
int *Nexternal_allocated);
extern int ML_Operator_HashGlobalRcvList(ML_CommInfoOP *pre_comm, int Nrows,
int hash_list[], int hash_length,
int *hash_used, int Gid_assigned_to_proc[],
ML_Comm *comm,
int *Nexternal, int **external,
int *Nexternal_allocated);
extern int ML_overlap(ML_Operator *oldA, ML_Operator *newA, int overlap,
ML_CommInfoOP **nonOverlapped_2_Overlapped);
extern void ML_Operator_ReportStatistics(ML_Operator *mat, char *appendlabel,
int perfAndCommStats);
extern void ML_Operator_Profile(ML_Operator *A, char *appendlabel);
extern void ML_Operator_Profile_SetIterations(int numits);
extern int ML_Operator_Profile_GetIterations();
extern int ML_Operator_Get_Nnz(ML_Operator *A);
extern char* ML_Operator_IdentifyDirichletRows(ML_Operator *A);
extern int ML_Operator_BlkMatInit(ML_Operator *BlkMat, ML_Comm *comm,
int NBlockRows, int NBlockCols, int destroy_level);
extern void ML_Operator_BlkMatDestroy(void *data);
extern int ML_Operator_BlkMatInsert(ML_Operator *BlkMat, ML_Operator *Entry,
int Row, int Col);
extern ML_Operator *ML_Operator_BlkMatExtract(ML_Operator *BlkMat,
int Row, int Col);
extern int ML_Operator_BlkMatNumBlockRows(ML_Operator * BlkMat);
extern int ML_Operator_BlkMatNumBlockCols(ML_Operator * BlkMat);
extern int ML_Operator_BlkMatFinalize(ML_Operator *BlkMat);
extern int ML_Operator_BlkMatMatvec(ML_Operator *BlkMat, int ilen,
double p[], int olen, double ap[]);
extern int ML_Operator_BlkMatGetrow(ML_Operator *Amat, int N_requested_rows,
int requested_rows[], int allocated_space, int columns[],
double values[], int row_lengths[]);
extern int ML_Blkrap(ML_Operator *Rmat, ML_Operator *Amat, ML_Operator *Pmat,
ML_Operator *Result, int matrix_type);
extern ML_Operator *ProjectMe(ML *mlptr, int BlockLocation, int FromLevel, ML_Operator *Matrix, int matrix_type);
#ifndef ML_CPP
#ifdef __cplusplus
}
#endif
#endif
#endif
|