1#ifndef DUNE_PDELAB_BACKEND_ISTL_GENEO_LOCALOPERATOR_OVLP_REGION_HH
2#define DUNE_PDELAB_BACKEND_ISTL_GENEO_LOCALOPERATOR_OVLP_REGION_HH
4#include <dune/pdelab/backend/interface.hh>
5#include <dune/pdelab/gridfunctionspace/lfsindexcache.hh>
17 template<
typename LocalOperatorBase,
typename GFS>
20 typedef Dune::PDELab::Backend::Vector<GFS,int> V;
24 : baseop(base_), subdomain_sum(gfs, 1) {
26 Dune::PDELab::AddDataHandle<GFS,V> addh(gfs,subdomain_sum);
31 enum { doSkipEntity = LocalOperatorBase::doSkipEntity };
32 enum { doSkipIntersection = LocalOperatorBase::doSkipIntersection };
35 enum { doPatternVolume = LocalOperatorBase::doPatternVolume };
36 enum { doPatternSkeleton = LocalOperatorBase::doPatternSkeleton };
37 enum { doPatternVolumePostSkeleton = LocalOperatorBase::doPatternVolumePostSkeleton };
38 enum { doPatternBoundary = LocalOperatorBase::doPatternBoundary };
41 enum { doAlphaVolume =
true };
42 enum { doAlphaVolumePostSkeleton = LocalOperatorBase::doAlphaVolumePostSkeleton };
44 enum { doAlphaBoundary =
true };
46 enum { doAlphaSkeleton = LocalOperatorBase::doAlphaSkeleton };
47 enum { doLambdaVolume = LocalOperatorBase::doLambdaVolume };
48 enum { doLambdaBoundary = LocalOperatorBase::doLambdaBoundary };
49 enum { doLambdaSkeleton = LocalOperatorBase::doLambdaSkeleton };
51 enum { doSkeletonTwoSided = LocalOperatorBase::doSkeletonTwoSided };
52 enum { isLinear = LocalOperatorBase::isLinear };
55 bool skip_entity (
const EG& eg)
const
57 return baseop.skip_entity(eg);
61 bool skip_intersection (
const IG& ig)
const
63 return baseop.skip_intersection(ig);
66 template<
typename LFSU,
typename LFSV,
typename LocalPattern>
67 void pattern_volume (
const LFSU& lfsu,
const LFSV& lfsv, LocalPattern& pattern)
const
69 if (entity_is_interior(lfsu))
71 baseop.pattern_volume(lfsu, lfsv, pattern);
74 template<
typename LFSU,
typename LFSV,
typename LocalPattern>
75 void pattern_skeleton (
const LFSU& lfsu_s,
const LFSV& lfsv_s,
const LFSU& lfsu_n,
const LFSV& lfsv_n, LocalPattern& pattern_sn, LocalPattern& pattern_ns)
const
77 if (entity_is_interior(lfsu_s))
79 baseop.pattern_skeleton(lfsu_s, lfsv_s, lfsu_n, lfsv_n, pattern_sn, pattern_ns);
82 template<
typename LFSU,
typename LFSV,
typename LocalPattern>
83 void pattern_volume_post_skeleton (
const LFSU& lfsu,
const LFSV& lfsv, LocalPattern& pattern)
const
85 if (entity_is_interior(lfsu))
87 baseop.pattern_volume(lfsu, lfsv, pattern);
90 template<
typename LFSU,
typename LFSV,
typename LocalPattern>
91 void pattern_boundary (
const LFSU& lfsu_s,
const LFSV& lfsv_s, LocalPattern& pattern_ss)
const
93 if (entity_is_interior(lfsu_s))
95 baseop.pattern_boundary (lfsu_s, lfsv_s, pattern_ss);
98 template<
typename EG,
typename LFSU,
typename X,
typename LFSV,
typename R>
99 void alpha_volume (
const EG& eg,
const LFSU& lfsu,
const X& x,
const LFSV& lfsv, R& r)
const
101 if (entity_is_interior(lfsu))
103 baseop.alpha_volume(eg, lfsu, x, lfsv, r);
107 template<
typename EG,
typename LFSU,
typename X,
typename LFSV,
typename M>
108 void jacobian_volume (
const EG& eg,
const LFSU& lfsu,
const X& x,
const LFSV& lfsv, M& mat)
const
110 if (entity_is_interior(lfsu))
112 baseop.jacobian_volume (eg, lfsu, x, lfsv, mat);
116 template<
typename EG,
typename LFSV,
typename R>
117 void lambda_volume (
const EG& eg,
const LFSV& lfsv, R& r)
const
119 if (entity_is_interior(lfsv))
121 baseop.lambda_volume (eg, lfsv, r);
125 template<
typename EG,
typename LFSU,
typename X,
typename LFSV,
typename R>
126 void alpha_volume_post_skeleton(
const EG& eg,
const LFSU& lfsu,
const X& x,
127 const LFSV& lfsv, R& r)
const
129 if (entity_is_interior(lfsu))
131 baseop.alpha_volume_post_skeleton (eg, lfsu, x, lfsv, r);
135 template<
typename IG,
typename LFSU,
typename X,
typename LFSV,
typename R>
136 void alpha_boundary (
const IG& ig,
137 const LFSU& lfsu_s,
const X& x_s,
const LFSV& lfsv_s,
140 if (entity_is_interior(lfsu_s))
142 baseop.alpha_boundary (ig, lfsu_s, x_s, lfsv_s, r_s);
146 template<
typename IG,
typename LFSU,
typename X,
typename LFSV,
typename M>
147 void jacobian_boundary (
const IG& ig,
148 const LFSU& lfsu_s,
const X& x_s,
const LFSV& lfsv_s,
151 if (entity_is_interior(lfsu_s))
153 baseop.jacobian_boundary (ig, lfsu_s, x_s, lfsv_s, mat_s);
156 template<
typename IG,
typename LFSU,
typename X,
typename LFSV,
typename R>
157 void alpha_skeleton (
const IG& ig,
158 const LFSU& lfsu_s,
const X& x_s,
const LFSV& lfsv_s,
159 const LFSU& lfsu_n,
const X& x_n,
const LFSV& lfsv_n,
160 R& r_s, R& r_n)
const
162 if (entity_is_interior(lfsu_s))
164 baseop.alpha_skeleton (ig, lfsu_s, x_s, lfsv_s, lfsu_n, x_n, lfsv_n, r_s, r_n);
167 template<
typename IG,
typename LFSU,
typename X,
typename LFSV,
typename M>
168 void jacobian_skeleton (
const IG& ig,
169 const LFSU& lfsu_s,
const X& x_s,
const LFSV& lfsv_s,
170 const LFSU& lfsu_n,
const X& x_n,
const LFSV& lfsv_n,
171 M& mat_ss, M& mat_sn,
172 M& mat_ns, M& mat_nn)
const
174 if (entity_is_interior(lfsu_s))
176 baseop.jacobian_skeleton (ig, lfsu_s, x_s, lfsv_s, lfsu_n, x_n, lfsv_n, mat_ss, mat_sn, mat_ns, mat_nn);
180 void setTime (
double t)
187 template <
typename LFS>
188 bool entity_is_interior (
const LFS& lfs)
const {
189 LFSIndexCache<LFS> cache(lfs);
191 for (std::size_t i = 0; i < cache.size(); i++)
193 if (subdomain_sum[cache.containerIndex(i)] < 2)
199 LocalOperatorBase& baseop;
Wrapper for LocalOperators restricting their action to areas overlapping with other subdomains Any en...
Definition: localoperator_ovlp_region.hh:18
Dune namespace.
Definition: alignedallocator.hh:11