DUNE PDELab (git)

raviartthomas0.hh
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
8#include<dune/geometry/referenceelements.hh>
10#include<dune/pdelab/common/geometrywrapper.hh>
11
12#include <dune/typetree/typetree.hh>
13
14namespace Dune {
15 namespace PDELab {
16
19 : public TypeTree::LeafNode
20 {
21 public:
22 enum{doBoundary=true};
23 enum{doProcessor=false};
24 enum{doSkeleton=false};
25 enum{doVolume=false};
26
27
29
35 template<typename P, typename IG, typename LFS, typename T>
36 void boundary (const P& p, const IG& ig, const LFS& lfs, T& trafo) const
37 {
38 const int face = ig.indexInInside();
39 auto face_refelem = referenceElement(ig.geometry());
40 const auto ip = face_refelem.position(0,0);
41 if (p.isNeumann(ig,ip)) {
42 typename T::RowType empty; // need not interpolate
43 trafo[lfs.dofIndex(face)]=empty;
44 }
45 }
46 };
47
48 }
49}
50
51#endif // DUNE_PDELAB_CONSTRAINTS_RAVIARTTHOMAS0_HH
Neumann Constraints construction, as needed for RT0.
Definition: raviartthomas0.hh:20
void boundary(const P &p, const IG &ig, const LFS &lfs, T &trafo) const
boundary constraints
Definition: raviartthomas0.hh:36
Base class for leaf nodes in a dune-typetree.
Definition: leafnode.hh:28
A few common exception classes.
unspecified value type referenceElement(T &&... t)
Returns a reference element for the objects t....
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
A unique label for each type of element that can occur in a grid.
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Jul 15, 22:36, 2024)