This file is indexed.

/usr/include/trilinos/fei_LinProbMgr_EpetraBasic.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
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
/*--------------------------------------------------------------------*/
/*    Copyright 2006 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.                    */
/*--------------------------------------------------------------------*/

#ifndef _fei_LinProbMgr_EpetraBasic_hpp_
#define _fei_LinProbMgr_EpetraBasic_hpp_

#include <fei_LinearProblemManager.hpp>

#include <fei_Include_Trilinos.hpp>
#include <fei_SharedPtr.hpp>

#include <vector>

class LinProbMgr_EpetraBasic : public fei::LinearProblemManager {
 public:
  LinProbMgr_EpetraBasic(MPI_Comm comm);
  virtual ~LinProbMgr_EpetraBasic();

  /** Set the linear-system's global row distribution.

    @param ownedGlobalRows List of row-numbers to be owned by local processor.
  */
  void setRowDistribution(const std::vector<int>& ownedGlobalRows);

  /** Set the matrix-graph structure. This is the nonzero structure for
      locally-owned matrix rows.
  */
  void setMatrixGraph(fei::SharedPtr<fei::SparseRowGraph> matrixGraph);

  /** Set a specified scalar value throughout the matrix.
   */
  void setMatrixValues(double scalar);

  /** Set a specified scalar value throughout the vector.

      @param scalar Value to be used.

      @param soln_vector If true, scalar should be set in solution vector,
                         otherwise set rhs vector.
  */
  void setVectorValues(double scalar, bool soln_vector);

  /** Query the number of local rows. This is expected to be the number of
      point-entry rows on the local processor.
  */
  int getLocalNumRows();

  /** Given a locally-owned global row number, query the length (number of
      nonzeros) of that row.
   */
  int getRowLength(int row);

  /** Given a locally-owned global row number, pass out a copy of the
      contents of that row.
      @param row Global row number
      @param len Length of the user-allocated arrays coefs and indices.
      @param coefs User-allocated array which will hold matrix coefficients
      on output.
      @param indices User-allocated array which will hold column-indices on
      output.

      @return error-code 0 if successful. Non-zero return-value may indicate
      that the specified row is not locally owned.
  */
  int copyOutMatrixRow(int row, int len,
                       double* coefs, int* indices);

  /** Put a C-style table (array of pointers) of coefficient data into the
      matrix.  This is a rectangular array of coefficients for
      rows/columns defined by the 'rows' and 'cols' lists.
      If the sum_into argument is true, values should be added to any that
      already exist at the specified locations. Otherwise (if sum_into is
      false) incoming values should overwrite already-existing values.
   */
  int insertMatrixValues(int numRows, const int* rows,
                         int numCols, const int* cols,
                         const double* const* values,
                         bool sum_into);

  /** Put coefficient data into a vector at the specified global indices.
    If any specified indices are out of range (negative or too large), the
     corresponding positions in the values array will not be referenced and
     a positive warning code will be returned.

    @param numValues Number of coefficient values being input.

    @param globalIndices List of global-indices specifying the locations in
              the vector for incoming values to be placed.

    @param sum_into If true, incoming values should be added to values that
               may already be in the specified locations. If sum_into is
               false, then incoming values should overwrite existing values.

    @param soln_vector If true, incoming values should be placed in the
                 solution vector. Otherwise, they should be placed in the
                 rhs vector.

    @param vectorIndex If the linear system has multiple rhs/soln vectors,
                     then this parameter specifies which vector the incoming
                     values should be put into.
  */
  int insertVectorValues(int numValues,
                         const int* globalIndices,
                         const double* values,
                         bool sum_into,
                         bool soln_vector,
                         int vectorIndex=0);

  /** Copy values for the specified vector indices into the caller-allocated
    'values' array.
  */
  int copyOutVectorValues(int numValues,
                           const int* globalIndices,
                           double* values,
                           bool soln_vector,
                           int vectorIndex=0);

  /** Dangerous, high-performance vector access. Return a pointer to
    local vector values. Implementations that can't support this may
    return NULL, in which case the caller will revert to using the
    copyOutVectorValues method.
  */
  double* getLocalVectorValuesPtr(bool soln_vector,
                                  int vectorIndex=0);

  /** Perform any necessary internal communications/synchronizations or other
      operations appropriate at the end of data input. For some
      implementations this may be a no-op.  (Trilinos/Epetra implementations
      would call 'FillComplete' on the matrix at this point.)
  */
  int globalAssemble();

  /** Return the Epetra matrix.
  */
  fei::SharedPtr<Epetra_CrsMatrix> get_A_matrix();

  /** Return the rhs Epetra vector.
  */
  fei::SharedPtr<Epetra_MultiVector> get_rhs_vector();

  /** Return the solution Epetra vector.
  */
  fei::SharedPtr<Epetra_MultiVector> get_solution_vector();

 private:
  MPI_Comm comm_;
  std::vector<int> ownedRows_;
  fei::SharedPtr<Epetra_Comm> epetra_comm_;
  fei::SharedPtr<Epetra_Map> epetra_rowmap_;
  fei::SharedPtr<fei::SparseRowGraph> fei_srgraph_;
  fei::SharedPtr<Epetra_CrsGraph> crsgraph_;
  fei::SharedPtr<Epetra_CrsMatrix> A_;
  int numVectors_;
  fei::SharedPtr<Epetra_MultiVector> x_;
  fei::SharedPtr<Epetra_MultiVector> b_;
};

#endif // _LinProbMgr_EpetraBasic_hpp_