dune-pdelab  2.0.0
mfd.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil -*-
2 #ifndef DUNE_PDELAB_MFDCONSTRAINTS_HH
3 #define DUNE_PDELAB_MFDCONSTRAINTS_HH
4 
5 #include<dune/geometry/referenceelements.hh>
6 #include<dune/geometry/type.hh>
7 
8 namespace Dune {
9  namespace PDELab {
10 
14 
17  {
18  public:
19  enum{doVolume=false};
20  enum{doSkeleton=false};
21  enum{doBoundary=true};
22  enum{doProcessor=false};
23 
25 
31  template<typename B, typename IG, typename LFS, typename T>
32  void boundary(const B& b, const IG& ig, const LFS& lfs, T& trafo) const
33  {
34  static const unsigned int dimIntersection = IG::dimension - 1;
35  typedef typename IG::ctype ctype;
36 
37  GeometryType gt = ig.intersection().type();
38 
39  Dune::FieldVector<ctype,dimIntersection> center
40  = ReferenceElements<ctype,dimIntersection>::general(gt).position(0,0);
41  if(b.isDirichlet(ig, center) )
42  {
43  typename T::RowType empty;
44  trafo[ig.intersectionIndex()] = empty;
45  }
46  }
47  };
49 
50  }
51 }
52 
53 #endif
Mimetic Constraints.
Definition: mfd.hh:16
const IG & ig
Definition: common/constraints.hh:146
void boundary(const B &b, const IG &ig, const LFS &lfs, T &trafo) const
boundary constraints
Definition: mfd.hh:32