/usr/include/dune/pdelab/finiteelementmap/powerfem.hh is in libdune-pdelab-dev 2.0.0-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 | // -*- tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=8 sw=2 sts=2:
#ifndef DUNE_PDELAB_FINITEELEMENTMAP_POWERFEM_HH
#define DUNE_PDELAB_FINITEELEMENTMAP_POWERFEM_HH
#include <cstddef>
#include <dune/localfunctions/meta/power.hh>
#include <dune/pdelab/finiteelementmap/finiteelementmap.hh>
namespace Dune {
namespace PDELab {
//! FiniteElementMap for PowerFiniteElements
/**
* \tparam BackendFEM Map for finite elements that should be raised to a
* power.
* \tparam dimR Power to raise the backend FiniteElements to.
*/
template<class BackendFEM, std::size_t dimR>
class PowerFiniteElementMap
{
typedef typename BackendFEM::Traits::FiniteElementType BackendFE;
typedef PowerFiniteElementFactory<BackendFE, dimR> Factory;
const BackendFEM &backend;
static const Factory factory;
public:
//! export Traits
typedef FiniteElementMapTraits<typename Factory::FiniteElement> Traits;
//! construct PowerFiniteElementMap
/**
* \param backend_ Reference to a finite element map for the underlying
* finite elements.
*
* \note The constructed finite element map object stores a reference to
* to backend object. The finite element map object becomes
* invalid as soon the reference to the backend becomes invalid.
* The only allowed operation on an invalid finite element map is
* calling the destructor, all other operations result in
* undefined behaviour.
*/
PowerFiniteElementMap(const BackendFEM& backend_) : backend(backend_) { }
//! Return finite element for the given entity.
/**
* \param e Grid element to create a finite element for.
*
* The returned value is valid for as long as both this finite element
* map as well as the reference to the grid element are valid.
*/
template<class Element>
typename Traits::FiniteElementType find(const Element& e) const
{ return factory.make(backend.find(e)); }
bool fixedSize() const
{
return backend.fixedSize();
}
std::size_t size(GeometryType gt) const
{
return dimR * backend.size(gt);
}
std::size_t maxLocalSize() const
{
return dimR * backend.maxLocalSize();
}
};
template<class BackendFEM, std::size_t dimR>
const typename PowerFiniteElementMap<BackendFEM, dimR>::Factory
PowerFiniteElementMap<BackendFEM, dimR>::factory = Factory();
} // namespace PDELab
} // namespace Dune
#endif // DUNE_PDELAB_FINITEELEMENTMAP_POWERFEM_HH
|