This file is indexed.

/usr/include/deal.II/hp/fe_collection.h is in libdeal.ii-dev 6.3.1-1.1.

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
//----------------------------  fe_collection.h  ---------------------------
//    $Id: fe_collection.h 18724 2009-04-23 23:06:37Z bangerth $
//    Version: $Name$
//
//    Copyright (C) 2003, 2004, 2006 by the deal.II authors
//
//    This file is subject to QPL and may not be  distributed
//    without copyright and license information. Please refer
//    to the file deal.II/doc/license.html for the  text  and
//    further information on this license.
//
//----------------------------  fe_collection.h  ---------------------------
#ifndef __deal2__fe_collection_h
#define __deal2__fe_collection_h

#include <base/config.h>
#include <base/std_cxx1x/shared_ptr.h>
#include <fe/fe.h>

DEAL_II_NAMESPACE_OPEN

namespace hp
{
  
/**
 * This class acts as a collection of finite element objects used in the
 * hp::DoFHandler. It is thus to a hp::DoFHandler what a
 * FiniteElement is to a ::DoFHandler.
 *
 * It implements the concepts stated in the @ref hpcollection module described
 * in the doxygen documentation.
 *
 * In addition to offering access to the elements of the collection, this
 * class provides access to the maximal number of degrees of freedom per
 * vertex, line, etc, to allow allocation of as much memory as is necessary in
 * the worst case when using the finite elements associated with the cells of
 * a triangulation.
 *
 * This class has not yet been implemented for the use in the codimension
 * one case (<tt>spacedim != dim </tt>).
 * 
 * @ingroup hp hpcollection
 * 
 * @author Wolfgang Bangerth, 2003
 */
  template <int dim, int spacedim=dim>
  class FECollection : public Subscriptor
  {
    public:
                                       /**
                                        * Default constructor. Leads
                                        * to an empty collection that
                                        * can later be filled using
                                        * push_back().
                                        */
      FECollection ();

                                       /**
                                        * Conversion constructor. This
                                        * constructor creates a
                                        * FECollection from a single
                                        * finite element. More finite
                                        * element objects can be added
                                        * with push_back(), if
                                        * desired, though it would
                                        * probably be clearer to add
                                        * all mappings the same way.
                                        */
      explicit FECollection (const FiniteElement<dim,spacedim> &fe);

                                       /**
                                        * Copy constructor.
                                        */
      FECollection (const FECollection<dim,spacedim> &fe_collection);

                                       /**
                                        * Add a finite element. This
                                        * function generates a copy of
                                        * the given element, i.e. you
                                        * can do things like
                                        * <tt>push_back(FE_Q<dim>(1));</tt>. The
                                        * internal copy is later
                                        * destroyed by this object
                                        * upon destruction of the
                                        * entire collection.
                                        *
                                        * When a new element is added,
                                        * it needs to have the same
                                        * number of vector components
                                        * as all other elements
                                        * already in the collection.
                                        */
      void push_back (const FiniteElement<dim,spacedim> &new_fe);

                                       /**
                                        * Get a reference to the given
                                        * element in this collection.
                                        *
                                        * @pre @p index must be
                                        * between zero and the number
                                        * of elements of the
                                        * collection.
                                        */
      const FiniteElement<dim,spacedim> &
      operator[] (const unsigned int index) const;

                                       /**
                                        * Return the number of finite
                                        * element objects stored in
                                        * this collection.
                                        */
      unsigned int size () const;

                                       /**
                                        * Return the number of vector
                                        * components of the finite elements in
                                        * this collection.  This number must
                                        * be the same for all elements in the
                                        * collection.
                                        */
      unsigned int n_components () const;

                                       /**
                                        * Return the maximal number of degrees
                                        * of freedom per vertex over all
                                        * elements of this collection.
                                        */
      unsigned int max_dofs_per_vertex () const;

                                       /**
                                        * Return the maximal number of degrees
                                        * of freedom per line over all elements
                                        * of this collection.
                                        */
      unsigned int max_dofs_per_line () const;

                                       /**
                                        * Return the maximal number of degrees
                                        * of freedom per quad over all elements
                                        * of this collection.
                                        */
      unsigned int max_dofs_per_quad () const;

                                       /**
                                        * Return the maximal number of degrees
                                        * of freedom per hex over all elements
                                        * of this collection.
                                        */
      unsigned int max_dofs_per_hex () const;

                                       /**
                                        * Return the maximal number of degrees
                                        * of freedom per face over all elements
                                        * of this collection.
                                        */
      unsigned int max_dofs_per_face () const;

                                       /**
                                        * Return the maximal number of degrees
                                        * of freedom per cell over all elements
                                        * of this collection.
                                        */
      unsigned int max_dofs_per_cell () const;

                                       /**
                                        * Return an estimate for the memory
                                        * allocated for this object.
                                        */
      unsigned int memory_consumption () const;


                                       /**
					* Return whether all elements
					* in this collection
					* implement the hanging node
					* constraints in the new way,
					* which has to be used to make
					* elements "hp compatible".
					* If this is not the case,
					* the function returns false,
					* which implies, that at least
					* one element in the FECollection
					* does not support the new face
					* interface constraints.
					* On the other hand, if this
					* method does return
					* true, this does not imply
					* that the hp method will work!
					*
					* This behaviour is related to
					* the fact, that FiniteElement
					* classes, which provide the
					* new style hanging node constraints
					* might still not provide
					* them for all possible cases.
					* If FE_Q and FE_RaviartThomas
					* elements are included in the
					* FECollection and both properly implement
					* the get_face_interpolation_matrix
					* method, this method will return
					* true. But the get_face_interpolation_matrix
					* might still fail to find an interpolation
					* matrix between these two elements.
                                        */
      bool hp_constraints_are_implemented () const;


                                       /**
                                        * Exception
                                        */
      DeclException0 (ExcNoFiniteElements);    
    
    private:
                                       /**
                                        * Array of pointers to the finite
                                        * elements stored by this collection.
                                        */
      std::vector<std_cxx1x::shared_ptr<const FiniteElement<dim,spacedim> > > finite_elements;
  };



/* --------------- inline functions ------------------- */

  template <int dim, int spacedim>
  inline
  unsigned int
  FECollection<dim,spacedim>::size () const 
  {
    return finite_elements.size();
  }


  template <int dim, int spacedim>
  inline
  unsigned int
  FECollection<dim,spacedim>::n_components () const
  {
    Assert (finite_elements.size () > 0, ExcNoFiniteElements());
    return finite_elements[0]->n_components ();
  }


  template <int dim, int spacedim>
  inline
  const FiniteElement<dim,spacedim> &
  FECollection<dim,spacedim>::operator[] (const unsigned int index) const 
  {
    Assert (index < finite_elements.size(),
            ExcIndexRange (index, 0, finite_elements.size()));
    return *finite_elements[index];
  }



  template <int dim, int spacedim>
  unsigned int
  FECollection<dim,spacedim>::max_dofs_per_vertex () const 
  {
    Assert (finite_elements.size() > 0, ExcNoFiniteElements());
  
    unsigned int max = 0;
    for (unsigned int i=0; i<finite_elements.size(); ++i)
      if (finite_elements[i]->dofs_per_vertex > max)
        max = finite_elements[i]->dofs_per_vertex;

    return max;
  }



  template <int dim, int spacedim>
  unsigned int
  FECollection<dim,spacedim>::max_dofs_per_line () const 
  {
    Assert (finite_elements.size() > 0, ExcNoFiniteElements());
  
    unsigned int max = 0;
    for (unsigned int i=0; i<finite_elements.size(); ++i)
      if (finite_elements[i]->dofs_per_line > max)
        max = finite_elements[i]->dofs_per_line;

    return max;
  }



  template <int dim, int spacedim>
  unsigned int
  FECollection<dim,spacedim>::max_dofs_per_quad () const 
  {
    Assert (finite_elements.size() > 0, ExcNoFiniteElements());
  
    unsigned int max = 0;
    for (unsigned int i=0; i<finite_elements.size(); ++i)
      if (finite_elements[i]->dofs_per_quad > max)
        max = finite_elements[i]->dofs_per_quad;

    return max;
  }



  template <int dim, int spacedim>
  unsigned int
  FECollection<dim,spacedim>::max_dofs_per_hex () const 
  {
    Assert (finite_elements.size() > 0, ExcNoFiniteElements());
  
    unsigned int max = 0;
    for (unsigned int i=0; i<finite_elements.size(); ++i)
      if (finite_elements[i]->dofs_per_hex > max)
        max = finite_elements[i]->dofs_per_hex;

    return max;
  }



  template <int dim, int spacedim>
  unsigned int
  FECollection<dim,spacedim>::max_dofs_per_face () const 
  {
    Assert (finite_elements.size() > 0, ExcNoFiniteElements());
  
    unsigned int max = 0;
    for (unsigned int i=0; i<finite_elements.size(); ++i)
      if (finite_elements[i]->dofs_per_face > max)
        max = finite_elements[i]->dofs_per_face;

    return max;
  }



  template <int dim, int spacedim>
  unsigned int
  FECollection<dim,spacedim>::max_dofs_per_cell () const 
  {
    Assert (finite_elements.size() > 0, ExcNoFiniteElements());
  
    unsigned int max = 0;
    for (unsigned int i=0; i<finite_elements.size(); ++i)
      if (finite_elements[i]->dofs_per_cell > max)
        max = finite_elements[i]->dofs_per_cell;

    return max;
  }
  

  template <int dim, int spacedim>
  bool
  FECollection<dim,spacedim>::hp_constraints_are_implemented () const 
  {
    Assert (finite_elements.size() > 0, ExcNoFiniteElements());
  
    bool hp_constraints = true;
    for (unsigned int i=0; i<finite_elements.size(); ++i)
      hp_constraints = hp_constraints &&
		       finite_elements[i]->hp_constraints_are_implemented();
    
    return hp_constraints;
  }
  

} // namespace hp

DEAL_II_NAMESPACE_CLOSE
  
#endif