dune-pdelab  2.0.0
raviartthomas0.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 #ifndef DUNE_PDELAB_RT0CONSTRAINTS_HH
3 #define DUNE_PDELAB_RT0CONSTRAINTS_HH
4 
5 #include<dune/typetree/typetree.hh>
6 
7 #include<dune/common/exceptions.hh>
8 #include<dune/geometry/referenceelements.hh>
9 #include<dune/geometry/type.hh>
11 
12 namespace Dune {
13  namespace PDELab {
14 
17  public:
18  enum{doBoundary=true};enum{doProcessor=false};
19  enum{doSkeleton=false};enum{doVolume=false};
20 
21 
23 
29  template<typename P, typename IG, typename LFS, typename T>
30  void boundary (const P& p, const IG& ig, const LFS& lfs, T& trafo) const
31  {
32  typedef typename IG::ctype DT;
33  const int dim = IG::dimension;
34  const int face = ig.indexInInside();
35  const Dune::ReferenceElement<DT,dim-1> &
36  face_refelem = Dune::ReferenceElements<DT,dim-1>::general(ig.geometry().type());
37  const FieldVector<DT, dim-1> ip = face_refelem.position(0,0);
38  if (p.isNeumann(ig,ip)) {
39  typename T::RowType empty; // need not interpolate
40  trafo[lfs.dofIndex(face)]=empty;
41  }
42  }
43  };
44 
45  }
46 }
47 
48 #endif
Definition: raviartthomas0.hh:19
void boundary(const P &p, const IG &ig, const LFS &lfs, T &trafo) const
boundary constraints
Definition: raviartthomas0.hh:30
Definition: raviartthomas0.hh:19
static const int dim
Definition: adaptivity.hh:82
const IG & ig
Definition: common/constraints.hh:146
Neumann Constraints construction, as needed for RT0.
Definition: raviartthomas0.hh:16
Definition: raviartthomas0.hh:18
R p(int i, D x)
Definition: qkdg.hh:62
Definition: raviartthomas0.hh:18