-
- Downloads
[cleanup] Don't zero-initialize matrix in local assemblers
Zero-initilization already happens in the global assembler. Hence you don't need to and in fact should not do this in the local one, too. This has the advantage, that you can chain local assembler. E.g. you can get a local assembler for the H^1 norm using ```cpp auto massAssembler = Dune::Fufem::MassAssembler(); auto laplaceAssembler = Dune::Fufem::LaplaceAssembler(); auto h1Assembler = [=](auto&&... args) { massAssembler(args...); laplaceAssembler(args...); }; ``` or by implementing an abstract utility ```cpp auto sumLocalAssembler = [](auto... localAssemblers) { return [=] (auto&&... args) { std::initializer_list<int> { (localAssemblers(args...), 0)...}; }; }; auto h1Assembler = sumLocalAssembler(Dune::Fufem::MassAssembler(), Dune::Fufem::LaplaceAssembler()); ```
parent
79ec00b6
Branches
No related tags found
Showing
- CHANGELOG.md 4 additions, 1 deletionCHANGELOG.md
- dune/fufem/assemblers/localassemblers/laplaceassembler.hh 0 additions, 3 deletionsdune/fufem/assemblers/localassemblers/laplaceassembler.hh
- dune/fufem/assemblers/localassemblers/massassembler.hh 0 additions, 3 deletionsdune/fufem/assemblers/localassemblers/massassembler.hh
Loading
Please register or sign in to comment