This file is indexed.

/usr/include/dolfin/adaptivity/Extrapolation.h is in libdolfin-dev 1.4.0+dfsg-4.

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
// Copyright (C) 2009 Anders Logg
//
// This file is part of DOLFIN.
//
// DOLFIN 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 3 of the License, or
// (at your option) any later version.
//
// DOLFIN 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 DOLFIN. If not, see <http://www.gnu.org/licenses/>.
//
// Modified by Marie E. Rognes 2010.
// Modified by Garth N. Wells 2010.
//
// First added:  2009-12-08
// Last changed: 2010-12-28

#ifndef __EXTRAPOLATION_H
#define __EXTRAPOLATION_H

#include <map>
#include <set>
#include <vector>
#include <Eigen/Dense>

#include <dolfin/common/types.h>

namespace ufc
{
  class cell;
}

namespace dolfin
{

  class Cell;
  class DirichletBC;
  class Function;
  class FunctionSpace;

  /// This class implements an algorithm for extrapolating a function
  /// on a given function space from an approximation of that function
  /// on a possibly lower-order function space.
  ///
  /// This can be used to obtain a higher-order approximation of a
  /// computed dual solution, which is necessary when the computed
  /// dual approximation is in the test space of the primal problem,
  /// thereby being orthogonal to the residual.
  ///
  /// It is assumed that the extrapolation is computed on the same
  /// mesh as the original function.

  class Extrapolation
  {
  public:

    /// Compute extrapolation w from v
    static void extrapolate(Function& w, const Function& v);

  private:

    // Build data structures for unique dofs on patch of given cell
    static void build_unique_dofs(std::set<std::size_t>& unique_dofs,
                        std::map<std::size_t, std::map<std::size_t, std::size_t> >& cell2dof2row,
                                  const Cell& cell0,
                                  const FunctionSpace& V);

    // Compute unique dofs in given cell
    static std::map<std::size_t, std::size_t>
      compute_unique_dofs(const Cell& cell, const FunctionSpace& V,
                          std::size_t& row, std::set<std::size_t>& unique_dofs);

    // Compute coefficients on given cell
    static void
      compute_coefficients(std::vector<std::vector<double> >& coefficients,
                           const Function&v, const FunctionSpace& V,
                           const FunctionSpace& W, const Cell& cell0,
                           const std::vector<double>& vertex_coordinates0,
                           const ufc::cell& c0,
                           const std::vector<dolfin::la_index>& dofs,
                           std::size_t& offset);

    // Add equations for current cell
    static void add_cell_equations(Eigen::MatrixXd& A,
                                 Eigen::VectorXd& b,
                                 const Cell& cell0,
                                 const Cell& cell1,
                                 const std::vector<double>& vertex_coordinates0,
                                 const std::vector<double>& vertex_coordinates1,
                                 const ufc::cell& c0,
                                 const ufc::cell& c1,
                                 const FunctionSpace& V,
                                 const FunctionSpace& W,
                                 const Function& v,
                                 std::map<std::size_t, std::size_t>& dof2row);

    // Average coefficients
    static void
      average_coefficients(Function& w,
                           std::vector<std::vector<double> >& coefficients);

  };

}

#endif