This file is indexed.

/usr/include/libmesh/side.h is in libmesh-dev 0.7.1-2ubuntu1.

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
// $Id: side.h 3874 2010-07-02 21:57:26Z roystgnr $

// The libMesh Finite Element Library.
// Copyright (C) 2002-2008 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
  
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
  
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
// Lesser General Public License for more details.
  
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA



#ifndef __side_h__
#define __side_h__

// C++ includes

// Local includes
#include "libmesh_common.h"
#include "elem.h"

namespace libMesh
{

// Forward declarations
class Point;
class Node;


/**
 * This defines the \p Side class.  A \p Side is basically a proxy
 * (or stand-in replacement) class for an element's side.  It acts
 * like a standard \p Elem, but allocates no additional memory for
 * storing connectivity.  Instead, its nodes are mapped directly from
 * the parent element (the element for which the side is created).
 * Similarly, you cannot access the neighbors of a side since it
 * does not store any.
 *
 * \author  Benjamin S. Kirk
 * \date    $Date: 2010-07-02 16:57:26 -0500 (Fri, 02 Jul 2010) $
 * \version $Revision: 3874 $
 */

// ------------------------------------------------------------
//Side class definition
template <class SideType, class ParentType>
class Side : public SideType
{
 public:

  /**
   * Constructor.  Creates a side from an element.
   */ 
  Side (const Elem* parent,
	const unsigned int side) :
    SideType(0,0,const_cast<Elem*>(parent)), // Allocate no storage for nodes or neighbors!
    _side_number(side)
  {
    libmesh_assert (parent != NULL);
    // may not be true when building infinite element sides
    // libmesh_assert (_side_number < this->parent()->n_sides());
    libmesh_assert ((this->dim()+1) == this->parent()->dim());
  }

  /**
   * @returns the \p Point associated with local \p Node \p i.
   */
  virtual const Point & point (const unsigned int i) const
  {
    libmesh_assert (i < this->n_nodes());    
    return this->parent()->point (ParentType::side_nodes_map[_side_number][i]);
  }
 
  /**
   * @returns the \p Point associated with local \p Node \p i
   * as a writeable reference.
   */
  virtual Point & point (const unsigned int i)
  {
    libmesh_assert (i < this->n_nodes());
    return this->parent()->point (ParentType::side_nodes_map[_side_number][i]);
  }
  
  /**
   * @returns the global id number of local \p Node \p i.
   */
  virtual unsigned int node (const unsigned int i) const
  {
    libmesh_assert (i < this->n_nodes());
    return this->parent()->node (ParentType::side_nodes_map[_side_number][i]);  
  }

  /**
   * @returns the pointer to local \p Node \p i.
   */
  virtual Node* get_node (const unsigned int i) const
  {
    libmesh_assert (i < this->n_nodes());    
    return this->parent()->get_node (ParentType::side_nodes_map[_side_number][i]);
  }

  /**
   * @returns the pointer to local \p Node \p i as a writeable reference.
   */
  virtual Node* & set_node (const unsigned int i)
  {
    libmesh_assert (i < this->n_nodes());    
    return this->parent()->set_node (ParentType::side_nodes_map[_side_number][i]);
  }

  /**
   * Sides effectively do not have sides, so don't even ask!
   */
  virtual unsigned int n_sides () const 
  { libmesh_error(); return 0; }

  virtual bool is_child_on_side(const unsigned int,
			        const unsigned int) const
  { libmesh_error(); return false; }
  
  
 private:

  
  /**
   * The side on the parent element
   */
  const unsigned int _side_number;
};



/**
 * This defines the \p SideEdge class.  Like \p Side, \p SideEdge is basically
 * a proxy (or stand-in replacement) class, this time for an element's edge.
 * It acts like a standard \p Elem, but allocates no additional memory for
 * storing connectivity.  Instead, its nodes are mapped directly from the
 * parent element (the element for which the side is created).  Similarly, you
 * cannot access the neighbors of a side since it does not store any.
 *
 * \author  Roy H. Stogner
 * \date    $Date: 2010-07-02 16:57:26 -0500 (Fri, 02 Jul 2010) $
 * \version $Revision: 3874 $
 */

// ------------------------------------------------------------
//SideEdge class definition
template <class EdgeType, class ParentType>
class SideEdge : public EdgeType
{
 public:

  /**
   * Constructor.  Creates a side from an element.
   */ 
  SideEdge (const Elem* parent,
	    const unsigned int edge) :
    EdgeType(0,0,const_cast<Elem*>(parent)), // Allocate no storage for nodes or neighbors!
    _edge_number(edge)
  {
    libmesh_assert (parent != NULL);
    libmesh_assert (_edge_number < this->parent()->n_edges());
    libmesh_assert (this->dim() == 1);
  }

  /**
   * @returns the \p Point associated with local \p Node \p i.
   */
  virtual const Point & point (const unsigned int i) const
  {
    libmesh_assert (i < this->n_nodes());    
    return this->parent()->point (ParentType::edge_nodes_map[_edge_number][i]);
  }
 
  /**
   * @returns the \p Point associated with local \p Node \p i
   * as a writeable reference.
   */
  virtual Point & point (const unsigned int i)
  {
    libmesh_assert (i < this->n_nodes());
    return this->parent()->point (ParentType::edge_nodes_map[_edge_number][i]);
  }
  
  /**
   * @returns the global id number of local \p Node \p i.
   */
  virtual unsigned int node (const unsigned int i) const
  {
    libmesh_assert (i < this->n_nodes());
    return this->parent()->node (ParentType::edge_nodes_map[_edge_number][i]);  
  }

  /**
   * @returns the pointer to local \p Node \p i.
   */
  virtual Node* get_node (const unsigned int i) const
  {
    libmesh_assert (i < this->n_nodes());    
    return this->parent()->get_node (ParentType::edge_nodes_map[_edge_number][i]);
  }

  /**
   * @returns the pointer to local \p Node \p i as a writeable reference.
   */
  virtual Node* & set_node (const unsigned int i)
  {
    libmesh_assert (i < this->n_nodes());    
    return this->parent()->set_node (ParentType::edge_nodes_map[_edge_number][i]);
  }

  /**
   * @returns 0. Sides effectively do not have sides, so
   * don't even ask!
   */
  virtual unsigned int n_sides () const { return 0; }

  
 private:

  
  /**
   * The side on the parent element
   */
  const unsigned int _edge_number;
};


} // namespace libMesh

#endif // end #ifndef __side_h__