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