1#ifndef DUNE_PDELAB_GRIDOPERATOR_ONESTEP_ENGINEBASE_HH
2#define DUNE_PDELAB_GRIDOPERATOR_ONESTEP_ENGINEBASE_HH
14 template<
typename OSLA,
typename LAE0,
typename LAE1>
21 typedef typename LAE0::Traits Traits;
23 template<
typename TrialConstra
intsContainer,
typename TestConstra
intsContainer>
24 bool needsConstraintsCaching(
const TrialConstraintsContainer& cu,
const TestConstraintsContainer& cv)
const
26 return (lae0->needsConstraintsCaching(cu,cv) or lae1->needsConstraintsCaching(cu,cv));
33 typedef typename OSLA::LocalAssemblerDT1 LocalAssemblerDT1;
35 typedef LAE0 LocalAssemblerEngineDT0;
36 typedef LAE1 LocalAssemblerEngineDT1;
40 typedef typename OSLA::Real
Real;
42 typedef OSLA LocalAssembler;
51 : invalid_lae0(nullptr),
52 invalid_lae1(nullptr),
54 lae0(invalid_lae0), lae1(invalid_lae1),
61 {
return implicit && (lae0->requireSkeleton() || lae1->requireSkeleton()); }
62 bool requireSkeletonTwoSided()
const
63 {
return lae0->requireSkeletonTwoSided() || lae1->requireSkeletonTwoSided(); }
64 bool requireUVVolume()
const
65 {
return lae0->requireUVVolume() || lae1->requireUVVolume(); }
66 bool requireVVolume()
const
67 {
return lae0->requireVVolume() || lae1->requireVVolume(); }
68 bool requireUVSkeleton()
const
69 {
return lae0->requireUVSkeleton() || lae1->requireUVSkeleton(); }
70 bool requireVSkeleton()
const
71 {
return lae0->requireVSkeleton() || lae1->requireVSkeleton(); }
72 bool requireUVBoundary()
const
73 {
return lae0->requireUVBoundary() || lae1->requireUVBoundary(); }
74 bool requireVBoundary()
const
75 {
return lae0->requireVBoundary() || lae1->requireVBoundary(); }
76 bool requireUVProcessor()
const
77 {
return lae0->requireUVProcessor() || lae1->requireUVProcessor(); }
78 bool requireVProcessor()
const
79 {
return lae0->requireVProcessor() || lae1->requireVProcessor(); }
80 bool requireUVEnrichedCoupling()
const
81 {
return lae0->requireUVEnrichedCoupling() || lae1->requireUVEnrichedCoupling(); }
82 bool requireVEnrichedCoupling()
const
83 {
return lae0->requireVEnrichedCoupling() || lae1->requireVEnrichedCoupling(); }
84 bool requireUVVolumePostSkeleton()
const
85 {
return lae0->requireUVVolumePostSkeleton() || lae1->requireUVVolumePostSkeleton();}
86 bool requireVVolumePostSkeleton()
const
87 {
return lae0->requireVVolumePostSkeleton() || lae1->requireVVolumePostSkeleton(); }
94 LocalAssemblerEngineDT0& localAssemblerEngineDT0()
99 const LocalAssemblerEngineDT0& localAssemblerEngineDT0()
const
104 LocalAssemblerEngineDT1& localAssemblerEngineDT1()
109 const LocalAssemblerEngineDT1& localAssemblerEngineDT1()
const
114 auto partition()
const
116 return localAssemblerEngineDT0().partition();
119 void setLocalAssemblerEngineDT0(LocalAssemblerEngineDT0& lae0_)
124 void setLocalAssemblerEngineDT1(LocalAssemblerEngineDT1& lae1_)
131 return localAssemblerEngineDT0().trialConstraints();
136 return localAssemblerEngineDT0().testConstraints();
142 template<
typename EG,
typename LFSU,
typename LFSV>
143 void onBindLFSUV(
const EG & eg,
const LFSU & lfsu,
const LFSV & lfsv)
145 lae0->onBindLFSUV(eg,lfsu,lfsv);
146 lae1->onBindLFSUV(eg,lfsu,lfsv);
149 template<
typename EG,
typename LFSV>
150 void onBindLFSV(
const EG & eg,
const LFSV & lfsv)
152 lae0->onBindLFSV(eg,lfsv);
153 lae1->onBindLFSV(eg,lfsv);
156 template<
typename IG,
typename LFSU,
typename LFSV>
157 void onBindLFSUVInside(
const IG & ig,
const LFSU & lfsu,
const LFSV & lfsv)
159 lae0->onBindLFSUVInside(ig,lfsu,lfsv);
160 lae1->onBindLFSUVInside(ig,lfsu,lfsv);
163 template<
typename IG,
164 typename LFSU_S,
typename LFSV_S,
165 typename LFSU_N,
typename LFSV_N>
166 void onBindLFSUVOutside(
const IG & ig,
167 const LFSU_S & lfsu_s,
const LFSV_S & lfsv_s,
168 const LFSU_N & lfsu_n,
const LFSV_N & lfsv_n)
170 lae0->onBindLFSUVOutside(ig,lfsu_s,lfsv_s,lfsu_n,lfsv_n);
171 lae1->onBindLFSUVOutside(ig,lfsu_s,lfsv_s,lfsu_n,lfsv_n);
174 template<
typename IG,
typename LFSV>
175 void onBindLFSVInside(
const IG & ig,
const LFSV & lfsv)
177 lae0->onBindLFSVInside(ig,lfsv);
178 lae1->onBindLFSVInside(ig,lfsv);
181 template<
typename IG,
184 void onBindLFSVOutside(
const IG & ig,
185 const LFSV_S & lfsv_s,
186 const LFSV_N & lfsv_n)
188 lae0->onBindLFSVOutside(ig,lfsv_s,lfsv_n);
189 lae1->onBindLFSVOutside(ig,lfsv_s,lfsv_n);
192 template<
typename IG,
193 typename LFSU_S,
typename LFSV_S,
194 typename LFSU_N,
typename LFSV_N,
195 typename LFSU_C,
typename LFSV_C>
196 void onBindLFSUVCoupling(
const IG & ig,
197 const LFSU_S & lfsu_s,
const LFSV_S & lfsv_s,
198 const LFSU_N & lfsu_n,
const LFSV_N & lfsv_n,
199 const LFSU_C & lfsu_c,
const LFSV_C & lfsv_c)
201 lae0->onBindLFSUVCoupling(ig,
205 lae1->onBindLFSUVCoupling(ig,
211 template<
typename IG,
215 void onBindLFSVCoupling(
const IG & ig,
216 const LFSV_S & lfsv_s,
217 const LFSV_N & lfsv_n,
218 const LFSV_C & lfsv_c)
220 lae0->onBindLFSVCoupling(ig,lfsv_s,lfsv_n,lfsv_c);
221 lae1->onBindLFSVCoupling(ig,lfsv_s,lfsv_n,lfsv_c);
229 template<
typename EG,
typename LFSU,
typename LFSV>
232 lae0->onUnbindLFSUV(eg,lfsu, lfsv);
233 lae1->onUnbindLFSUV(eg,lfsu, lfsv);
236 template<
typename EG,
typename LFSV>
237 void onUnbindLFSV(
const EG & eg,
const LFSV & lfsv)
239 lae0->onUnbindLFSV(eg,lfsv);
240 lae1->onUnbindLFSV(eg,lfsv);
243 template<
typename IG,
typename LFSU,
typename LFSV>
244 void onUnbindLFSUVInside(
const IG & ig,
const LFSU & lfsu,
const LFSV & lfsv)
246 lae0->onUnbindLFSUVInside(ig,lfsu, lfsv);
247 lae1->onUnbindLFSUVInside(ig,lfsu, lfsv);
250 template<
typename IG,
251 typename LFSU_S,
typename LFSV_S,
252 typename LFSU_N,
typename LFSV_N>
253 void onUnbindLFSUVOutside(
const IG & ig,
254 const LFSU_S & lfsu_s,
const LFSV_S & lfsv_s,
255 const LFSU_N & lfsu_n,
const LFSV_N & lfsv_n)
257 lae0->onUnbindLFSUVOutside(ig,lfsu_s,lfsv_s,lfsu_n,lfsv_n);
258 lae1->onUnbindLFSUVOutside(ig,lfsu_s,lfsv_s,lfsu_n,lfsv_n);
261 template<
typename IG,
typename LFSV>
262 void onUnbindLFSVInside(
const IG & ig,
const LFSV & lfsv)
264 lae0->onUnbindLFSVInside(ig,lfsv);
265 lae1->onUnbindLFSVInside(ig,lfsv);
268 template<
typename IG,
271 void onUnbindLFSVOutside(
const IG & ig,
272 const LFSV_S & lfsv_s,
273 const LFSV_N & lfsv_n)
275 lae0->onUnbindLFSVOutside(ig,lfsv_s,lfsv_n);
276 lae1->onUnbindLFSVOutside(ig,lfsv_s,lfsv_n);
279 template<
typename IG,
280 typename LFSU_S,
typename LFSV_S,
281 typename LFSU_N,
typename LFSV_N,
282 typename LFSU_C,
typename LFSV_C>
283 void onUnbindLFSUVCoupling(
const IG & ig,
284 const LFSU_S & lfsu_s,
const LFSV_S & lfsv_s,
285 const LFSU_N & lfsu_n,
const LFSV_N & lfsv_n,
286 const LFSU_C & lfsu_c,
const LFSV_C & lfsv_c)
288 lae0->onUnbindLFSUVCoupling(ig,
292 lae1->onUnbindLFSUVCoupling(ig,
298 template<
typename IG,
302 void onUnbindLFSVCoupling(
const IG & ig,
303 const LFSV_S & lfsv_s,
304 const LFSV_N & lfsv_n,
305 const LFSV_C & lfsv_c)
307 lae0->onUnbindLFSVCoupling(ig,lfsv_s,lfsv_n,lfsv_c);
308 lae1->onUnbindLFSVCoupling(ig,lfsv_s,lfsv_n,lfsv_c);
316 template<
typename LFSU>
319 lae0->loadCoefficientsLFSUInside(lfsu_s);
320 lae1->loadCoefficientsLFSUInside(lfsu_s);
322 template<
typename LFSU>
323 void loadCoefficientsLFSUOutside(
const LFSU & lfsu_n)
325 lae0->loadCoefficientsLFSUOutside(lfsu_n);
326 lae1->loadCoefficientsLFSUOutside(lfsu_n);
328 template<
typename LFSU>
329 void loadCoefficientsLFSUCoupling(
const LFSU & lfsu_c)
331 lae0->loadCoefficientsLFSUCoupling(lfsu_c);
332 lae1->loadCoefficientsLFSUCoupling(lfsu_c);
339 template<
typename EG>
340 bool skipEntity(
const EG & eg)
342 bool rv = lae0->skipEntity(eg);
343 if (rv != lae1->skipEntity(eg))
345 "Spatial and temporal local operators are not allowed "
346 "to have different custom cell assembly rules");
350 template<
typename IG>
351 bool skipIntersection(
const IG & ig)
353 bool rv = lae0->skipIntersection(ig);
354 if (rv != lae1->skipIntersection(ig))
356 "Spatial and temporal local operators are not allowed "
357 "to have different custom intersection assembly rules");
361 template<
typename EG,
typename LFSU,
typename LFSV>
362 void assembleUVVolume(
const EG & eg,
const LFSU & lfsu,
const LFSV & lfsv)
365 lae0->assembleUVVolume(eg,lfsu,lfsv);
366 lae1->assembleUVVolume(eg,lfsu,lfsv);
369 template<
typename EG,
typename LFSV>
370 void assembleVVolume(
const EG & eg,
const LFSV & lfsv)
373 lae0->assembleVVolume(eg,lfsv);
374 lae1->assembleVVolume(eg,lfsv);
377 template<
typename IG,
typename LFSU_S,
typename LFSV_S,
typename LFSU_N,
typename LFSV_N>
378 void assembleUVSkeleton(
const IG & ig,
const LFSU_S & lfsu_s,
const LFSV_S & lfsv_s,
379 const LFSU_N & lfsu_n,
const LFSV_N & lfsv_n)
382 lae0->assembleUVSkeleton(ig,lfsu_s,lfsv_s,lfsu_n,lfsv_n);
383 lae1->assembleUVSkeleton(ig,lfsu_s,lfsv_s,lfsu_n,lfsv_n);
386 template<
typename IG,
typename LFSV_S,
typename LFSV_N>
387 void assembleVSkeleton(
const IG & ig,
const LFSV_S & lfsv_s,
const LFSV_N & lfsv_n)
390 lae0->assembleVSkeleton(ig,lfsv_s,lfsv_n);
391 lae1->assembleVSkeleton(ig,lfsv_s,lfsv_n);
394 template<
typename IG,
typename LFSU_S,
typename LFSV_S>
395 void assembleUVBoundary(
const IG & ig,
const LFSU_S & lfsu_s,
const LFSV_S & lfsv_s)
398 lae0->assembleUVBoundary(ig,lfsu_s,lfsv_s);
399 lae1->assembleUVBoundary(ig,lfsu_s,lfsv_s);
402 template<
typename IG,
typename LFSV_S>
403 void assembleVBoundary(
const IG & ig,
const LFSV_S & lfsv_s)
406 lae0->assembleVBoundary(ig,lfsv_s);
407 lae1->assembleVBoundary(ig,lfsv_s);
410 template<
typename IG,
typename LFSU_S,
typename LFSV_S>
411 void assembleUVProcessor(
const IG & ig,
const LFSU_S & lfsu_s,
const LFSV_S & lfsv_s)
414 lae0->assembleUVProcessor(ig,lfsu_s,lfsv_s);
415 lae1->assembleUVProcessor(ig,lfsu_s,lfsv_s);
418 template<
typename IG,
typename LFSV_S>
419 void assembleVProcessor(
const IG & ig,
const LFSV_S & lfsv_s)
422 lae0->assembleVProcessor(ig,lfsv_s);
423 lae1->assembleVProcessor(ig,lfsv_s);
426 template<
typename IG,
typename LFSU_S,
typename LFSV_S,
typename LFSU_N,
typename LFSV_N,
427 typename LFSU_C,
typename LFSV_C>
428 void assembleUVEnrichedCoupling(
const IG & ig,
429 const LFSU_S & lfsu_s,
const LFSV_S & lfsv_s,
430 const LFSU_N & lfsu_n,
const LFSV_N & lfsv_n,
431 const LFSU_C & lfsu_c,
const LFSV_C & lfsv_c)
434 lae0->assembleUVEnrichedCoupling(ig,lfsu_s,lfsv_s,lfsu_n,lfsv_n,lfsu_c,lfsv_c);
435 lae1->assembleUVEnrichedCoupling(ig,lfsu_s,lfsv_s,lfsu_n,lfsv_n,lfsu_c,lfsv_c);
438 template<
typename IG,
typename LFSV_S,
typename LFSV_N,
typename LFSV_C>
439 void assembleVEnrichedCoupling(
const IG & ig,
440 const LFSV_S & lfsv_s,
441 const LFSV_N & lfsv_n,
442 const LFSV_C & lfsv_c)
445 lae0->assembleVEnrichedCoupling(ig,lfsv_s,lfsv_n,lfsv_c);
448 template<
typename EG,
typename LFSU,
typename LFSV>
449 void assembleUVVolumePostSkeleton(
const EG & eg,
const LFSU & lfsu,
const LFSV & lfsv)
452 lae0->assembleUVVolumePostSkeleton(eg,lfsu,lfsv);
455 template<
typename EG,
typename LFSV>
456 void assembleVVolumePostSkeleton(
const EG & eg,
const LFSV & lfsv)
459 lae0->assembleVVolumePostSkeleton(eg,lfsv);
465 LocalAssemblerEngineDT0 *
const invalid_lae0;
466 LocalAssemblerEngineDT1 *
const invalid_lae1;
472 const LocalAssembler &
la;
474 LocalAssemblerEngineDT0 * lae0;
475 LocalAssemblerEngineDT1 * lae1;
The local assembler engine for UDG sub triangulations which assembles the residual vector.
Definition: enginebase.hh:16
void onUnbindLFSUV(const EG &eg, const LFSU &lfsu, const LFSV &lfsv)
Definition: enginebase.hh:230
const LocalAssembler & la
Definition: enginebase.hh:472
OSLA::LocalAssemblerDT0 LocalAssemblerDT0
Definition: enginebase.hh:32
const LocalAssembler & localAssembler()
Public access to the wrapping local assembler.
Definition: enginebase.hh:92
OneStepLocalAssemblerEngineBase(const LocalAssembler &local_assembler_)
Constructor.
Definition: enginebase.hh:50
void loadCoefficientsLFSUInside(const LFSU &lfsu_s)
Definition: enginebase.hh:317
void onBindLFSUV(const EG &eg, const LFSU &lfsu, const LFSV &lfsv)
Definition: enginebase.hh:143
OSLA::Real Real
The type for real numbers.
Definition: enginebase.hh:40
bool requireSkeleton() const
Definition: enginebase.hh:60
OSLA OneStepLocalAssembler
The type of the wrapping local assembler.
Definition: enginebase.hh:19
#define DUNE_THROW(E, m)
Definition: exceptions.hh:216
Dune namespace.
Definition: alignedallocator.hh:11
GO::Traits::TrialGridFunctionSpaceConstraints TrialGridFunctionSpaceConstraints
The type of the trial grid function space constraints.
Definition: assemblerutilities.hh:61
GO::Traits::TestGridFunctionSpaceConstraints TestGridFunctionSpaceConstraints
The type of the test grid function space constraints.
Definition: assemblerutilities.hh:64