This file is indexed.

/usr/include/trilinos/fei_Pattern.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
/*--------------------------------------------------------------------*/
/*    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.                    */
/*--------------------------------------------------------------------*/

#ifndef _fei_Pattern_hpp_
#define _fei_Pattern_hpp_

#include "fei_macros.hpp"

#include <vector>

namespace fei {

  /** Stencil-like pattern definition/description.
      Describes the layout of a set of field-identifiers associated with a
      set of identifiers and identifier-types.

      Example: Can be used to describe the layout of nodes with associated
      fields on an element ('element' as in finite-elements).
   */
  class Pattern {
  public:
    /** enumeration of different pattern-types */
    enum PatternType { NO_FIELD, SIMPLE, SINGLE_IDTYPE, GENERAL };

    /** Constructor, Pattern::PatternType == NO_FIELD */
    Pattern(int numIDs, int idType);

    /** Constructor, Pattern::PatternType == SIMPLE
	There is only one id-type, and only one field.
     */
    Pattern(int numIDs, int idType,
	    int fieldID, int fieldSize);

    /** Constructor, Pattern::PatternType == SINGLE_IDTYPE
	There is only one id-type, but there may be multiple fields per id.
     */
    Pattern(int numIDs, int idType,
	    const int* numFieldsPerID,
	    const int* fieldIDs, const int* fieldSizes);

    /** Constructor, Pattern::PatternType == GENERAL
      There may be multiple id-types as well as multiple fields-per-id.
     */
    Pattern(int numIDs, const int* idTypes,
	    const int* numFieldsPerID,
	    const int* fieldIDs, const int* fieldSizes);

    virtual ~Pattern();

    /** Return pattern-type-identifying enum
     */
    PatternType getPatternType() const { return( type_ ); }

    /** Return the number of identifiers described by this pattern. */
    int getNumIDs() const { return( numIDs_ ); }

    /** Return pointer to list of length getNumIDs() */
    const int* getIDTypes() const { return( idTypes_ ); }

    /** Return list of length getNumIDs() */
    const int* getNumFieldsPerID() const { return( numFieldsPerID_ ); }

    /** Return list of length getTotalNumFields() */
    const int* getFieldIDs() const { return( fieldIDs_ ); }

    /** Return list of length getNumIDs() */
    const int* getNumIndicesPerID() const
    {
      return( numIndicesPerID_ );
    }

    /** total-num-fields = sum(numFieldsPerID) */
    int getTotalNumFields() const { return( totalNumFields_ ); }

    /** Return the total number of scalar indices represented by this pattern.
     This is the number of identifiers if no fields are associated with them,
     otherwise it is the sum of the field-sizes of the fields associated with
     the identifiers.
    */
    int getNumIndices() const { return( numIndices_ ); }

    /** return true if the 'rhs' pattern is the same as 'this' pattern.
     */
    bool operator==(const Pattern& rhs) const;

    /** return true if the 'rhs' pattern is different than 'this' pattern.
     */
    bool operator!=(const Pattern& rhs) const;

  private:
    PatternType type_;
    int numIDs_;
    int totalNumFields_;
    int numIndices_;
    std::vector<int> data_;

    const int* idTypes_;
    const int* numFieldsPerID_;
    const int* fieldIDs_;
    const int* numIndicesPerID_;
  };

} //namespace fei

#endif // _fei_Pattern_hpp_