DUNE PDELab (2.8)

patternengine.hh
1#ifndef DUNE_PDELAB_GRIDOPERATOR_ONESTEP_PATTERNENGINE_HH
2#define DUNE_PDELAB_GRIDOPERATOR_ONESTEP_PATTERNENGINE_HH
3
4#include <dune/pdelab/gridoperator/common/assemblerutilities.hh>
5#include <dune/pdelab/gridoperator/onestep/enginebase.hh>
6
7namespace Dune{
8 namespace PDELab{
9
17 template<typename OSLA>
20 typename OSLA::LocalAssemblerDT0::LocalPatternAssemblerEngine,
21 typename OSLA::LocalAssemblerDT1::LocalPatternAssemblerEngine
22 >
23 {
24
26 typename OSLA::LocalAssemblerDT0::LocalPatternAssemblerEngine,
27 typename OSLA::LocalAssemblerDT1::LocalPatternAssemblerEngine
28 > BaseT;
29
30 using BaseT::la;
31 using BaseT::lae0;
32 using BaseT::lae1;
33 using BaseT::implicit;
34 using BaseT::setLocalAssemblerEngineDT0;
35 using BaseT::setLocalAssemblerEngineDT1;
36
37 public:
39 typedef OSLA LocalAssembler;
40
41 typedef typename OSLA::LocalAssemblerDT0 LocalAssemblerDT0;
42 typedef typename OSLA::LocalAssemblerDT1 LocalAssemblerDT1;
43
45 typedef typename LocalAssembler::Traits::MatrixPattern Pattern;
47
55 : BaseT(la_)
56 , invalid_pattern(nullptr)
57 , pattern(invalid_pattern)
58 {}
59
62 void setPattern(Pattern & pattern_)
63 {
64
65 // Set pointer to global pattern
66 pattern = &pattern_;
67
68 // Initialize the engines of the two wrapped local assemblers
69 setLocalAssemblerEngineDT0(la.la0.localPatternAssemblerEngine(pattern_));
70 setLocalAssemblerEngineDT1(la.la1.localPatternAssemblerEngine(pattern_));
71 }
72
73
76 void preAssembly()
77 {
78 implicit = la.osp_method->implicit();
79
80 lae0->preAssembly();
81 lae1->preAssembly();
82 }
83
84 template<typename GFSU, typename GFSV>
85 void postAssembly(const GFSU& gfsu, const GFSV& gfsv)
86 {
87 lae0->postAssembly(gfsu,gfsv);
88 lae1->postAssembly(gfsu,gfsv);
89 }
91
92 private:
93
95 Pattern * const invalid_pattern;
96
98 Pattern * pattern;
99
100 }; // End of class OneStepLocalPatternAssemblerEngine
101
102 }
103}
104
105#endif // DUNE_PDELAB_GRIDOPERATOR_ONESTEP_PATTERNENGINE_HH
Layout description for a sparse linear operator.
Definition: assemblerutilities.hh:165
The local assembler engine for UDG sub triangulations which assembles the residual vector.
Definition: enginebase.hh:16
const LocalAssembler & la
Definition: enginebase.hh:472
The local assembler engine for OneStep sub triangulations which creates the matrix pattern.
Definition: patternengine.hh:23
LocalAssembler::Traits::MatrixPattern Pattern
The type of the matrix pattern container.
Definition: patternengine.hh:45
void setPattern(Pattern &pattern_)
Definition: patternengine.hh:62
OSLA LocalAssembler
The type of the wrapping local assembler.
Definition: patternengine.hh:39
OneStepLocalPatternAssemblerEngine(const LocalAssembler &la_)
Constructor.
Definition: patternengine.hh:54
Dune namespace.
Definition: alignedallocator.hh:11
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 22, 23:30, 2024)