This file is indexed.

/usr/include/trilinos/fei_AztecDVBR_Matrix.hpp is in libtrilinos-dev 10.4.0.dfsg-1ubuntu2.

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
#ifndef _fei_AztecDVBR_Matrix_hpp_
#define _fei_AztecDVBR_Matrix_hpp_

/*--------------------------------------------------------------------*/
/*    Copyright 2005 Sandia Corporation.                              */
/*    Under the terms of Contract DE-AC04-94AL85000, there is a       */
/*    non-exclusive license for use of this work by or on behalf      */
/*    of the U.S. Government.  Export of this program may require     */
/*    a license from the United States Government.                    */
/*--------------------------------------------------------------------*/

#include <fei_SharedPtr.hpp>
//
// This class provides a wrapper for the Aztec DVBR matrix data structure.
//
// Some functions return an int. This will be the ESI_error_code. It
// will be 0 if there were no errors, 1 if an error occurred.
//
namespace fei_trilinos {

class Aztec_BlockMap;

class AztecDVBR_Matrix {
 
  public:
    // Constructor.
    AztecDVBR_Matrix(fei::SharedPtr<Aztec_BlockMap> map);

    //Copy constructor.
    AztecDVBR_Matrix(const AztecDVBR_Matrix& src);

    virtual ~AztecDVBR_Matrix ();

    //query functions.

    int getNumBlocksPerRow(int blkRow, int& nnzBlksPerRow) const;
    int getNumNonzerosPerRow(int blkRow, int& nnzPerRow) const;
    int getNumBlocksPerRow(int* nnzBlksPerRow) const;
    int getNumNonzerosPerRow(int* nnzPerRow) const;
    int getBlockSize(int blkRow, int blkCol, int& ptRows, int& ptCols);

    // Mathematical functions.
    void matvec(const Aztec_LSVector& x, Aztec_LSVector& y) const;

    void put(double s);

    // ... to read matrix.

    int getBlockRow(int blk_row,
                    double* vals,
                    int* blk_col_inds,
                    int num_nz_blocks) const;
    
    // ... to write matrix.

    int putBlockRow(int blk_row,
                    double* vals,
                    int* blk_col_inds,
                    int num_nz_blocks) const;

    int sumIntoBlockRow(int blk_row,
                        double* vals,
                        int* blk_col_inds,
                        int num_nz_blocks) const;
 
    // configuration function.
    void allocate(int* num_nz_blocks, int* blk_col_inds);

    void loadComplete();

    bool isLoaded() const {return(isLoaded_);};
    void setLoaded(bool flag) {isLoaded_ = flag;};
    bool isAllocated() const {return(isAllocated_);};
    void setAllocated(bool flag) {isAllocated_ = flag;};

    AZ_MATRIX* getAZ_MATRIX_Ptr() const {return(Amat_);};

    bool readFromFile(const char *filename);
    bool writeToFile(const char *fileName) const;

    //numRemoteBlocks is the number of block-column-indices on this processor
    //that correspond to block-rows that reside on another processor.
    int getNumRemoteBlocks() {return(numRemoteBlocks_);};
    int* getRemoteBlockIndices() {return(remoteInds_);};
    int* getRemoteBlockSizes() {return(remoteBlockSizes_);};

    int* getUpdate_index() {return(update_index_);};
    int* getData_org() {return(data_org_);};

  private:
    int inUpdate(int globalIndex, int& localIndex) const;

    void readAllocateInfo(FILE* infile, int*& num_nz_blocks, int*& blk_col_inds);
    void readMatrixData(FILE* infile);

    void calcRpntr();
    void calcBpntr(int* nzBlksPerRow);
    void setBindx(int nnzBlks, int* blkColInds);
    void calcIndx(int nnzBlks);

    int getBindxOffset(int blkInd, int bpntrStart, int bpntrEnd) const;

    void calcRemoteInds(int*& remoteInds, int& len);
    void getRemoteBlkSizes(int* remoteBlkSizes, int* remoteInds, int len);
    void insertList(int item, int*& list, int& len);
    void getValuesFromString(char *line, int len, double *values,
                             int lenValues);
    void messageAbort(const char* mesg) const;

    fei::SharedPtr<Aztec_BlockMap> amap_;

    AZ_MATRIX *Amat_;

    int N_update_;
    int* external_;
    int* extern_index_;
    int* update_index_;
    int* data_org_;
    int* orderingUpdate_;

    bool isLoaded_;
    bool isAllocated_;

    int localNNZ_;
    int* nnzPerRow_;

    int numRemoteBlocks_;
    int* remoteInds_;
    int* remoteBlockSizes_;
};

}//namespace fei_trilinos

#endif