dune-pdelab  2.5-dev
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_CONSTRAINTS_RAVIARTTHOMAS0_HH
3 #define DUNE_PDELAB_CONSTRAINTS_RAVIARTTHOMAS0_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  const int face = ig.indexInInside();
33  auto face_refelem = referenceElement(ig.geometry());
34  const auto ip = face_refelem.position(0,0);
35  if (p.isNeumann(ig,ip)) {
36  typename T::RowType empty; // need not interpolate
37  trafo[lfs.dofIndex(face)]=empty;
38  }
39  }
40  };
41 
42  }
43 }
44 
45 #endif // DUNE_PDELAB_CONSTRAINTS_RAVIARTTHOMAS0_HH
Definition: raviartthomas0.hh:19
Neumann Constraints construction, as needed for RT0.
Definition: raviartthomas0.hh:16
For backward compatibility – Do not use this!
Definition: adaptivity.hh:28
void boundary(const P &p, const IG &ig, const LFS &lfs, T &trafo) const
boundary constraints
Definition: raviartthomas0.hh:30
const IG & ig
Definition: constraints.hh:148
Definition: raviartthomas0.hh:18
Definition: raviartthomas0.hh:18
Definition: raviartthomas0.hh:19
const P & p
Definition: constraints.hh:147