dune-localfunctions  2.2.1
p0localbasis.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil -*-
2 #ifndef DUNE_P0LOCALBASIS_HH
3 #define DUNE_P0LOCALBASIS_HH
4 
5 #include <dune/common/fmatrix.hh>
6 
8 
9 namespace Dune
10 {
23  template<class D, class R, int d>
25  {
26  public:
28  typedef LocalBasisTraits<D,d,Dune::FieldVector<D,d>,R,1,Dune::FieldVector<R,1>,
29  Dune::FieldMatrix<R,1,d>, 0> Traits;
30 
32  unsigned int size () const
33  {
34  return 1;
35  }
36 
38  inline void evaluateFunction (const typename Traits::DomainType& in,
39  std::vector<typename Traits::RangeType>& out) const
40  {
41  out.resize(1);
42  out[0] = 1;
43  }
44 
46  inline void
47  evaluateJacobian (const typename Traits::DomainType& in, // position
48  std::vector<typename Traits::JacobianType>& out) const // return value
49  {
50  out.resize(1);
51  for (int i=0; i<d; i++)
52  out[0][0][i] = 0;
53  }
54 
56  unsigned int order () const
57  {
58  return 0;
59  }
60  };
61 
62 }
63 
64 #endif