dune-pdelab  2.5-dev
p0ghost.hh
Go to the documentation of this file.
1 // -*- tab-width: 4; indent-tabs-mode: nil -*-
2 #ifndef DUNE_PDELAB_CONSTRAINTS_P0GHOST_HH
3 #define DUNE_PDELAB_CONSTRAINTS_P0GHOST_HH
4 
5 #include "../common/geometrywrapper.hh"
6 #include<dune/grid/common/gridenums.hh>
7 
8 namespace Dune {
9  namespace PDELab {
10 
14 
17  {
18  public:
19  enum{doBoundary=false};
20  enum{doProcessor=false};
21  enum{doSkeleton=false};
22  enum{doVolume=true};
23 
25 
31  template<typename P, typename EG, typename LFS, typename T>
32  void volume (const P& param, const EG& eg, const LFS& lfs, T& trafo) const
33  {
34  // nothing to do for interior entities
35  if (eg.entity().partitionType()==Dune::InteriorEntity)
36  return;
37 
38  // constrain ghost entities
39  else if (eg.entity().partitionType()==Dune::GhostEntity){
40  typename T::RowType empty;
41  typedef typename LFS::Traits::SizeType size_type;
42  for (size_type i=0; i<lfs.size(); i++){
43  trafo[lfs.dofIndex(i)] = empty;
44  }
45  }
46 
47  }
48  };
50 
51  }
52 }
53 
54 #endif // DUNE_PDELAB_CONSTRAINTS_P0GHOST_HH
void volume(const P &param, const EG &eg, const LFS &lfs, T &trafo) const
volume constraints
Definition: p0ghost.hh:32
Parallel P0 constraints for nonoverlapping grids with ghosts.
Definition: p0ghost.hh:16
For backward compatibility – Do not use this!
Definition: adaptivity.hh:27