This file is indexed.

/usr/include/trilinos/fei_NodeCommMgr.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
#ifndef _NodeCommMgr_hpp_
#define _NodeCommMgr_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_fwd.hpp>

#include <fei_CommUtils.hpp>

/**
  NodeCommMgr (Node communication manager) is responsible for
  keeping track of nodes that require communication (shared nodes).
  
  All shared nodes are put into this class through the addSharedNodes function.
  When they've all been put in, initComplete() is called, which
  allocates a list of pointer-to-NodeDescriptors.

  Before initComplete is called, all nodes that appear in local element-
  connectivities should be passed to NodeCommMgr using the informLocal
  function.
  
  The communication that must then happen is this:
  
    For all nodes that we own, we must send their field-IDs and (global)
    equation numbers to the remote processors that share the node.
  
    For all nodes that we don't own, we need to receive the field-IDs
    and equation numbers.
*/

class NodeCommMgr : public fei::MessageHandler<int> {
 public:
   enum { STRICTLY_LOW_PROC, PROC_WITH_LOCAL_ELEM };

   NodeCommMgr(MPI_Comm comm, int sharedNodeOwnership=STRICTLY_LOW_PROC);
   virtual ~NodeCommMgr();

   size_t getNumSharedNodes() {return(sharedNodeIDs.size());}
   std::vector<GlobalID>& getLocalNodeIDs() {return(localNodeIDs);}
   std::vector<GlobalID>& getSharedNodeIDs() {return(sharedNodeIDs);}
   std::vector<int>& getSharedNodeNumbers() {return(sharedNodeNumbers);}

   int getSharedNodeIndex_num(int nodeNumber);

   int addSharedNodes(const GlobalID* nodeIDs, int numNodes,
		      const int* const* procs, const int* numProcs);

   int initComplete(NodeDatabase& nodeDB, bool safetyCheck);

   int informLocal(const NodeDescriptor& node);

   int exchangeEqnInfo();

   int getSharedNodeIndex(GlobalID nodeID);

   int getSharedNodeNumSubdomains(GlobalID nodeID);
   std::vector<int>* getSharedNodeSubdomainList(GlobalID nodeID);

   NodeDescriptor& getSharedNodeAtIndex(int index)
     {return(*(sharedNodes_[index]));}

   std::vector<int>& getSharedNodeProcs(int index) 
     {return(*(sharingProcs_[index]));};

   void setSharedOwnershipRule(int ownershipRule)
     { sharedNodeOwnership_ = ownershipRule; }

   std::vector<int>& getSendProcs();
   std::vector<int>& getRecvProcs();

   int getSendMessageLength(int destProc, int& messageLength);
   int getSendMessage(int destProc, std::vector<int>& message);
   int processRecvMessage(int srcProc, std::vector<int>& message);

 private:
   NodeCommMgr(const NodeCommMgr& src);
   NodeCommMgr& operator=(const NodeCommMgr& src);

   int allocateNodeDescriptorPtrs(NodeDatabase& nodeDB);

   int storeNodeProcs(int index, std::vector<std::vector<int>*>& procTable,
		      const int* procs, int numProcs);

   int checkSharedNodeInfo();

   int checkCommArrays(const char* whichCheck,
		       std::vector<int>& globalRemoteProcs,
		       std::vector<int>& globalNodesPerRemoteProc,
		       std::vector<int>& globalRemoteProcLengths,
		       std::vector<int>& nodesPerRemoteProc,
		       std::vector<int>& remoteProcs);

   void setNodeNumbersArray();

   void packLocalNodesAndData(int* data, int proc,
                             int numNodes, int len);
   void packRemoteNodesAndData(GlobalID* data, int proc,
                             int numNodes, int len);

   int adjustSharedOwnership();

   int createProcLists();

   int createProcList(std::vector<int>& itemsPerProc,
		       std::vector<int>& procs);

   int exchangeSharedRemoteFieldsBlks();

   int getGlobalMaxFieldsBlocks(int& maxFields, int& maxBlocks);

   int getGlobalMaxFieldsBlocksSubdomains();

   NodeDescriptor** sharedNodes_;
   bool sharedNodesAllocated_;

   int sharedNodeOwnership_;

   std::vector<GlobalID> localNodeIDs;
   std::vector<GlobalID> remoteNodeIDs;

   std::vector<GlobalID> sharedNodeIDs; //global node identifiers

   std::vector<std::vector<int> > sharedNodeSubdomains;
                                          //subdomains each shared node
                                          //appears in.
   std::vector<int> trivialSubdomainList;

   std::vector<std::vector<int>*> sharingProcs_;//table, i-th row is a list of procs
                                          //associated with i-th shared node

   std::vector<int> sharedNodeNumbers;

   std::vector<int> remoteOwnerProcs_, remoteSharingProcs_;
   std::vector<int> nodesPerOwnerProc_, nodesPerSharingProc_;

   MPI_Comm comm_;
   int numProcs_, localProc_;

   int maxFields_;
   int maxBlocks_;
   int maxSubdomains_;

   bool initCompleteCalled_;
};

#endif