This file is indexed.

/usr/share/pyshared/PyTrilinos/TriUtils.py is in python-pytrilinos 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
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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.4
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.


"""

PyTrilinos.TriUtils is the python interface to the Trilinos utilities
package TriUtils:

    http://trilinos.sandia.gov/packages/triutils

The purpose of TriUtils is to provide some utilities typically needed
when testing Trilinos software.

TriUtils provides the following user-level classes:

    * CrsMatrixGallery  - Provide example CrsMatrix objects
    * VbrMatrixGallery  - Provide example VbrMatrix objects

and function:

    * ReadHB            - Obtain a problem from an HB file

For an examples of usage, please consult the following script in the
example subdirectory of the PyTrilinos package:

    * exIFPACK.py

"""


from sys import version_info
if version_info >= (2,6,0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_TriUtils', [dirname(__file__)])
        except ImportError:
            import _TriUtils
            return _TriUtils
        if fp is not None:
            try:
                _mod = imp.load_module('_TriUtils', fp, pathname, description)
            finally:
                fp.close()
            return _mod
    _TriUtils = swig_import_helper()
    del swig_import_helper
else:
    import _TriUtils
del version_info
try:
    _swig_property = property
except NameError:
    pass # Python < 2.2 doesn't have 'property'.
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
    if (name == "thisown"): return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name,None)
    if method: return method(self,value)
    if (not static):
        self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)

def _swig_setattr(self,class_type,name,value):
    return _swig_setattr_nondynamic(self,class_type,name,value,0)

def _swig_getattr(self,class_type,name):
    if (name == "thisown"): return self.this.own()
    method = class_type.__swig_getmethods__.get(name,None)
    if method: return method(self)
    raise AttributeError(name)

def _swig_repr(self):
    try: strthis = "proxy of " + self.this.__repr__()
    except: strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)

try:
    _object = object
    _newclass = 1
except AttributeError:
    class _object : pass
    _newclass = 0


try:
    import weakref
    weakref_proxy = weakref.proxy
except:
    weakref_proxy = lambda x: x


import Epetra

def TriUtils_Version(*args):
  """
    TriUtils_Version() -> string

    string Triutils_Version() 
    """
  return _TriUtils.TriUtils_Version(*args)
__version__ = TriUtils_Version().split()[3]


def ReadHB(*args):
  """
    ReadHB(char data_file, Comm comm)

    void
    Trilinos_Util_ReadHb2Epetra(char *data_file, const Epetra_Comm &comm,
    Epetra_Map *&map, Epetra_CrsMatrix *&A, Epetra_Vector *&x,
    Epetra_Vector *&b, Epetra_Vector *&xexact) 
    """
  return _TriUtils.ReadHB(*args)
class CrsMatrixGallery(_object):
    """Proxy of C++ Trilinos_Util::CrsMatrixGallery class"""
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, CrsMatrixGallery, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, CrsMatrixGallery, name)
    __repr__ = _swig_repr
    def __init__(self, *args): 
        """
        __init__(self, string name, Comm comm) -> CrsMatrixGallery
        __init__(self, string name, Map map) -> CrsMatrixGallery

        Trilinos_Util::CrsMatrixGallery::CrsMatrixGallery(const string name,
        const Epetra_Map &map)

        Creates an Triutils_Gallery object using a given map.

        Create a Triutils_Gallery object using an Epetra_Map. Problem size
        must match the elements in map.

        Parameters:
        -----------

        In:  name - definition of the problem to be created.

        In:  map - Epetra_Map 
        """
        this = _TriUtils.new_CrsMatrixGallery(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _TriUtils.delete_CrsMatrixGallery
    __del__ = lambda self : None;
    def Set(self, *args):
        """
        Set(self, string parameter, int value) -> int
        Set(self, string parameter, string value) -> int
        Set(self, string parameter, double value) -> int
        Set(self, string parameter, Epetra_Vector value) -> int
        Set(self, Trilinos_Util::CommandLineParser CLP) -> int

        int
        Trilinos_Util::CrsMatrixGallery::Set(Trilinos_Util::CommandLineParser
        &CLP)

        Sets gallery options using values passed from the shell. 
        """
        return _TriUtils.CrsMatrixGallery_Set(self, *args)

    def GetMatrix(self, *args):
        """
        GetMatrix(self) -> CrsMatrix

        Epetra_CrsMatrix * Trilinos_Util::CrsMatrixGallery::GetMatrix()

        Returns a pointer to the CrsMatrix. 
        """
        return _TriUtils.CrsMatrixGallery_GetMatrix(self, *args)

    def GetMatrixRef(self, *args):
        """
        GetMatrixRef(self) -> CrsMatrix

        Epetra_CrsMatrix & Trilinos_Util::CrsMatrixGallery::GetMatrixRef() 
        """
        return _TriUtils.CrsMatrixGallery_GetMatrixRef(self, *args)

    def GetExactSolution(self, *args):
        """
        GetExactSolution(self) -> Epetra_MultiVector

        Epetra_MultiVector
        * Trilinos_Util::CrsMatrixGallery::GetExactSolution()

        Returns a pointer to the exact solution.

        Returns a pointer to the exact solution.

        Some choices are available to define the exact solution, using
        Set("exact solution", value). value can be: constant: the exact
        solution vector is made up of 1's.

        random: a random solution vector

        linear: value at node i is defined as alpha*i. The double value alpha
        can be set via Set("alpha",DoubleVal). 
        """
        return _TriUtils.CrsMatrixGallery_GetExactSolution(self, *args)

    def GetStartingSolution(self, *args):
        """
        GetStartingSolution(self) -> Epetra_MultiVector

        Epetra_MultiVector *
        Trilinos_Util::CrsMatrixGallery::GetStartingSolution()

        Returns a pointer to the starting solution (typically, for HB
        problems).

        Returns a pointer to the starting solution. This is typically used
        while reading a HB problem. However, the user can set a starting
        solution using Set("starting solution", "value"). Value can be
        zero

        random 
        """
        return _TriUtils.CrsMatrixGallery_GetStartingSolution(self, *args)

    def GetRHS(self, *args):
        """
        GetRHS(self) -> Epetra_MultiVector

        Epetra_MultiVector * Trilinos_Util::CrsMatrixGallery::GetRHS()

        Returns a pointer to the rhs corresponding to the selected exact
        solution. 
        """
        return _TriUtils.CrsMatrixGallery_GetRHS(self, *args)

    def GetMap(self, *args):
        """
        GetMap(self) -> Map

        const
        Epetra_Map * Trilinos_Util::CrsMatrixGallery::GetMap()

        Returns a pointer the internally stored Map. 
        """
        return _TriUtils.CrsMatrixGallery_GetMap(self, *args)

    def GetMapRef(self, *args):
        """
        GetMapRef(self) -> Map

        const Epetra_Map & Trilinos_Util::CrsMatrixGallery::GetMapRef() 
        """
        return _TriUtils.CrsMatrixGallery_GetMapRef(self, *args)

    def GetLinearProblem(self, *args):
        """
        GetLinearProblem(self) -> LinearProblem

        Epetra_LinearProblem *
        Trilinos_Util::CrsMatrixGallery::GetLinearProblem()

        Returns a pointer to Epetra_LinearProblem. 
        """
        return _TriUtils.CrsMatrixGallery_GetLinearProblem(self, *args)

    def ComputeResidual(self, *args):
        """
        ComputeResidual(self, double residual)

        void
        Trilinos_Util::CrsMatrixGallery::ComputeResidual(double *residual)

        Computes the 2-norm of the residual. 
        """
        return _TriUtils.CrsMatrixGallery_ComputeResidual(self, *args)

    def ComputeDiffBetweenStartingAndExactSolutions(self, *args):
        """
        ComputeDiffBetweenStartingAndExactSolutions(self, double residual)

        void
        Trilinos_Util::CrsMatrixGallery::ComputeDiffBetweenStartingAndExactSolutions(double
        *residual)

        Computes the 2-norm of the difference between the starting solution
        and the exact solution. 
        """
        return _TriUtils.CrsMatrixGallery_ComputeDiffBetweenStartingAndExactSolutions(self, *args)

    def PrintMatrixAndVectors(self, *args):
        """
        PrintMatrixAndVectors(self,  os)
        PrintMatrixAndVectors(self)

        void
        Trilinos_Util::CrsMatrixGallery::PrintMatrixAndVectors() 
        """
        return _TriUtils.CrsMatrixGallery_PrintMatrixAndVectors(self, *args)

    def GetCartesianCoordinates(self, *args):
        """
        GetCartesianCoordinates(self, double x, double y, double z)

        void
        Trilinos_Util::CrsMatrixGallery::GetCartesianCoordinates(double *&x,
        double *&y, double *&z)

        Get pointers to double vectors containing coordinates of points. 
        """
        return _TriUtils.CrsMatrixGallery_GetCartesianCoordinates(self, *args)

    def WriteMatrix(self, *args):
        """
        WriteMatrix(self, string FileName, bool UseSparse = True) -> int

        int Trilinos_Util::CrsMatrixGallery::WriteMatrix(const string
        &FileName, const bool UseSparse=true)

        Print matrix on file in MATLAB format. 
        """
        return _TriUtils.CrsMatrixGallery_WriteMatrix(self, *args)

CrsMatrixGallery_swigregister = _TriUtils.CrsMatrixGallery_swigregister
CrsMatrixGallery_swigregister(CrsMatrixGallery)

class VbrMatrixGallery(CrsMatrixGallery):
    """Proxy of C++ Trilinos_Util::VbrMatrixGallery class"""
    __swig_setmethods__ = {}
    for _s in [CrsMatrixGallery]: __swig_setmethods__.update(getattr(_s,'__swig_setmethods__',{}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, VbrMatrixGallery, name, value)
    __swig_getmethods__ = {}
    for _s in [CrsMatrixGallery]: __swig_getmethods__.update(getattr(_s,'__swig_getmethods__',{}))
    __getattr__ = lambda self, name: _swig_getattr(self, VbrMatrixGallery, name)
    __repr__ = _swig_repr
    def __init__(self, *args): 
        """
        __init__(self, string name, Map map) -> VbrMatrixGallery
        __init__(self, string name, Comm Comm) -> VbrMatrixGallery

        Trilinos_Util::VbrMatrixGallery::VbrMatrixGallery(const string name,
        const Epetra_Comm &Comm) 
        """
        this = _TriUtils.new_VbrMatrixGallery(*args)
        try: self.this.append(this)
        except: self.this = this
    __swig_destroy__ = _TriUtils.delete_VbrMatrixGallery
    __del__ = lambda self : None;
    def GetBlockMap(self, *args):
        """
        GetBlockMap(self) -> BlockMap

        const Epetra_BlockMap * Trilinos_Util::VbrMatrixGallery::GetBlockMap()

        Returns a pointer the internally stored BlockMap. 
        """
        return _TriUtils.VbrMatrixGallery_GetBlockMap(self, *args)

    def GetBlockMapRef(self, *args):
        """
        GetBlockMapRef(self) -> BlockMap

        const Epetra_BlockMap &
        Trilinos_Util::VbrMatrixGallery::GetBlockMapRef() 
        """
        return _TriUtils.VbrMatrixGallery_GetBlockMapRef(self, *args)

    def GetVbrMatrix(self, *args):
        """
        GetVbrMatrix(self, int NumPDEEqns) -> VbrMatrix
        GetVbrMatrix(self) -> VbrMatrix

        Epetra_VbrMatrix * Trilinos_Util::VbrMatrixGallery::GetVbrMatrix()

        Returns a VbrMatrix, starting from the CsrMatrix. 
        """
        return _TriUtils.VbrMatrixGallery_GetVbrMatrix(self, *args)

    def GetVbrMatrixRef(self, *args):
        """
        GetVbrMatrixRef(self) -> VbrMatrix

        Epetra_VbrMatrix &
        Trilinos_Util::VbrMatrixGallery::GetVbrMatrixRef() 
        """
        return _TriUtils.VbrMatrixGallery_GetVbrMatrixRef(self, *args)

    def GetVbrRHS(self, *args):
        """
        GetVbrRHS(self) -> Epetra_MultiVector

        Epetra_MultiVector * Trilinos_Util::VbrMatrixGallery::GetVbrRHS()

        Returns a pointer to the RHS for the selected Vbr exact solution.

        Returns a pointer to the RHS corresponding to the selected exact
        solution to the linear systems defined by the Epetra_VbrMatrix. 
        """
        return _TriUtils.VbrMatrixGallery_GetVbrRHS(self, *args)

    def GetVbrExactSolution(self, *args):
        """
        GetVbrExactSolution(self) -> Epetra_MultiVector

        Epetra_MultiVector *
        Trilinos_Util::VbrMatrixGallery::GetVbrExactSolution()

        Returns a pointer to the selected Vbr exact solution. 
        """
        return _TriUtils.VbrMatrixGallery_GetVbrExactSolution(self, *args)

    def GetVbrStartingSolution(self, *args):
        """
        GetVbrStartingSolution(self) -> Epetra_MultiVector

        Epetra_MultiVector *
        Trilinos_Util::VbrMatrixGallery::GetVbrStartingSolution()

        Returns a pointer to the starting solution for Vbr problems. 
        """
        return _TriUtils.VbrMatrixGallery_GetVbrStartingSolution(self, *args)

    def CreateVbrMatrix(self, *args):
        """
        CreateVbrMatrix(self)

        void
        Trilinos_Util::VbrMatrixGallery::CreateVbrMatrix(void) 
        """
        return _TriUtils.VbrMatrixGallery_CreateVbrMatrix(self, *args)

    def GetVbrLinearProblem(self, *args):
        """
        GetVbrLinearProblem(self) -> LinearProblem

        Epetra_LinearProblem *
        Trilinos_Util::VbrMatrixGallery::GetVbrLinearProblem()

        Returns a pointer to Epetra_LinearProblem for VBR. 
        """
        return _TriUtils.VbrMatrixGallery_GetVbrLinearProblem(self, *args)

    def ComputeResidualVbr(self, *args):
        """
        ComputeResidualVbr(self, double residual)

        void
        Trilinos_Util::VbrMatrixGallery::ComputeResidualVbr(double *residual)

        Computes the 2-norm of the residual for the VBR problem. 
        """
        return _TriUtils.VbrMatrixGallery_ComputeResidualVbr(self, *args)

    def ComputeDiffBetweenStartingAndExactSolutionsVbr(self, *args):
        """
        ComputeDiffBetweenStartingAndExactSolutionsVbr(self, double residual)

        void
        Trilinos_Util::VbrMatrixGallery::ComputeDiffBetweenStartingAndExactSolutionsVbr(double
        *residual)

        Computes the 2-norm of the difference between the starting solution
        and the exact solution for the VBR problem. 
        """
        return _TriUtils.VbrMatrixGallery_ComputeDiffBetweenStartingAndExactSolutionsVbr(self, *args)

    def PrintVbrMatrixAndVectors(self, *args):
        """
        PrintVbrMatrixAndVectors(self,  os)
        PrintVbrMatrixAndVectors(self)

        void
        Trilinos_Util::VbrMatrixGallery::PrintVbrMatrixAndVectors() 
        """
        return _TriUtils.VbrMatrixGallery_PrintVbrMatrixAndVectors(self, *args)

VbrMatrixGallery_swigregister = _TriUtils.VbrMatrixGallery_swigregister
VbrMatrixGallery_swigregister(VbrMatrixGallery)

# This file is compatible with both classic and new-style classes.