DUNE PDELab (git)

p0ghost.hh
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#include <dune/typetree/typetree.hh>
9
10namespace Dune {
11 namespace PDELab {
12
16
19 : public TypeTree::LeafNode
20 {
21 public:
22 enum{doBoundary=false};
23 enum{doProcessor=false};
24 enum{doSkeleton=false};
25 enum{doVolume=true};
26
28
34 template<typename P, typename EG, typename LFS, typename T>
35 void volume (const P& param, const EG& eg, const LFS& lfs, T& trafo) const
36 {
37 // nothing to do for interior entities
38 if (eg.entity().partitionType()==Dune::InteriorEntity)
39 return;
40
41 // constrain ghost entities
42 else if (eg.entity().partitionType()==Dune::GhostEntity){
43 typename T::RowType empty;
44 typedef typename LFS::Traits::SizeType size_type;
45 for (size_type i=0; i<lfs.size(); i++){
46 trafo[lfs.dofIndex(i)] = empty;
47 }
48 }
49
50 }
51 };
53
54 }
55}
56
57#endif // DUNE_PDELAB_CONSTRAINTS_P0GHOST_HH
Parallel P0 constraints for nonoverlapping grids with ghosts.
Definition: p0ghost.hh:20
void volume(const P &param, const EG &eg, const LFS &lfs, T &trafo) const
volume constraints
Definition: p0ghost.hh:35
Base class for leaf nodes in a dune-typetree.
Definition: leafnode.hh:28
@ InteriorEntity
all interior entities
Definition: gridenums.hh:31
@ GhostEntity
ghost entities
Definition: gridenums.hh:35
Dune namespace.
Definition: alignedallocator.hh:13
constexpr std::bool_constant<(sizeof...(II)==0)> empty(std::integer_sequence< T, II... >)
Checks whether the sequence is empty.
Definition: integersequence.hh:80
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)