- Home
- About DUNE
- Download
- Documentation
- Community
- Development
00001 // -*- tab-width: 4; indent-tabs-mode: nil -*- 00002 #ifndef DUNE_P0LOCALBASIS_HH 00003 #define DUNE_P0LOCALBASIS_HH 00004 00005 #include <dune/common/fmatrix.hh> 00006 00007 #include <dune/localfunctions/common/localbasis.hh> 00008 00009 namespace Dune 00010 { 00023 template<class D, class R, int d> 00024 class P0LocalBasis 00025 { 00026 public: 00028 typedef LocalBasisTraits<D,d,Dune::FieldVector<D,d>,R,1,Dune::FieldVector<R,1>, 00029 Dune::FieldMatrix<R,1,d>, 0> Traits; 00030 00032 unsigned int size () const 00033 { 00034 return 1; 00035 } 00036 00038 inline void evaluateFunction (const typename Traits::DomainType& in, 00039 std::vector<typename Traits::RangeType>& out) const 00040 { 00041 out.resize(1); 00042 out[0] = 1; 00043 } 00044 00046 inline void 00047 evaluateJacobian (const typename Traits::DomainType& in, // position 00048 std::vector<typename Traits::JacobianType>& out) const // return value 00049 { 00050 out.resize(1); 00051 for (int i=0; i<d; i++) 00052 out[0][0][i] = 0; 00053 } 00054 00056 unsigned int order () const 00057 { 00058 return 0; 00059 } 00060 }; 00061 00062 } 00063 00064 #endif
Generated on Fri Apr 29 2011 with Doxygen (ver 1.7.1) [doxygen-log,error-log].