This file is indexed.

/usr/include/rheolef/basis_on_pointset.h is in librheolef-dev 6.7-6.

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
#ifndef _RHEO_BASIS_ON_POINTSET_H
#define _RHEO_BASIS_ON_POINTSET_H
///
/// This file is part of Rheolef.
///
/// Copyright (C) 2000-2009 Pierre Saramito <Pierre.Saramito@imag.fr>
///
/// Rheolef is free software; you can redistribute it and/or modify
/// it under the terms of the GNU General Public License as published by
/// the Free Software Foundation; either version 2 of the License, or
/// (at your option) any later version.
///
/// Rheolef 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 General Public License for more details.
///
/// You should have received a copy of the GNU General Public License
/// along with Rheolef; if not, write to the Free Software
/// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
/// 
/// =========================================================================

//! Pre-compute a piola transformation polynomial basis
//! on a lattice definied on the reference element.
//! The computation is performed one time for all
//! the first time the reference element appears.
//! Thus, when looping on the mesh for the Lagrange interpolation
//! on a Lagrange nodal basis : the lattice is the set of nodes
//! the evaluation of the fem polynomial basis.
//! The evaluation is performed only one time.

#include "rheolef/basis.h"
#include "rheolef/quadrature.h"
namespace rheolef {

// -----------------------------------------------------------------------
// basis evaluated on lattice of quadrature formulae
// -----------------------------------------------------------------------
template<class T>
class basis_on_pointset {
public:

    typedef typename std::vector<T>::size_type                     size_type;
    typedef typename std::vector<T>::const_iterator                const_iterator;
    typedef typename std::vector<point_basic<T> >::const_iterator  const_iterator_grad;

// allocators:

    basis_on_pointset ();
    basis_on_pointset (const basis_on_pointset<T>&);
    basis_on_pointset (const quadrature<T>& quad, const basis_basic<T>& b);
    basis_on_pointset (const basis_basic<T>& nb,  const basis_basic<T>& b);

// modifiers:

    void set (const quadrature<T>& quad, const basis_basic<T>& b);
    void set (const basis_basic<T>& nb,  const basis_basic<T>& b);

// accessors:

    const basis_basic<T>& get_basis() const { return _b; }
    size_type size (reference_element hat_K) const;
    void restrict_on_side (reference_element tilde_L, const side_information_type& sid);

    void evaluate      (reference_element hat_K, size_type q) const;
    void evaluate_grad (reference_element hat_K, size_type q) const;
    void evaluate      (reference_element hat_K, const point_basic<T>& hat_xq) const;
    void evaluate_grad (reference_element hat_K, const point_basic<T>& hat_xq) const;

    const_iterator      begin() const;
    const_iterator      end() const;
    const_iterator_grad begin_grad() const;
    const_iterator_grad end_grad() const;

    // new interface: random accessors
    const T& value (size_type loc_idof) const;
    const point_basic<T>& grad_value (size_type loc_idof) const;

// data:
    typedef enum {
      quad_mode     = 0,
      nodal_mode    = 1,
      max_mode      = 2
    } mode_type;
protected:
    basis_basic<T>                                      _b;
    mutable mode_type                                   _mode; 
    mutable bool                                        _specific_value;
    const quadrature<T>*                                _p_quad; // when mode: on quadrature pointset
    basis_basic<T>                                      _nb;     // when mode: on nodal basis pointset
    mutable std::array<size_type, reference_element::max_variant>                   _basis_size;
    mutable std::array<std::vector<T>,reference_element::max_variant>               _val;
    mutable std::array<std::vector<point_basic<T> >,reference_element::max_variant> _grad_val;
    mutable std::vector<bool>                           _initialized;
    mutable std::vector<bool>                           _grad_initialized;
    mutable size_type                                   _curr_K_variant;
    mutable size_type                                   _curr_q;
    void _initialize          (reference_element hat_K) const;
    void _grad_initialize     (reference_element hat_K) const;
};

}// namespace rheolef
#endif // _RHEO_BASIS_ON_POINTSET_H