Skip to content
Snippets Groups Projects
Commit 2959fc42 authored by Max Kahnt's avatar Max Kahnt
Browse files

[bugfix] Inititalize local matrix/vector correctly.

This should have been done earlier, but only became
visible when switching to the dunefunctions assemblers
where the local matrix/vector is no longer instantiated
separately for every element.
parent 3a0da698
No related branches found
No related tags found
No related merge requests found
...@@ -44,6 +44,7 @@ public: ...@@ -44,6 +44,7 @@ public:
*/ */
virtual void assemble(const Element& element, LocalVector& localVector, virtual void assemble(const Element& element, LocalVector& localVector,
const FE& tFE) const { const FE& tFE) const {
localVector = 0.0;
for (auto&& scaledAssembler : scaledAssemblers_) { for (auto&& scaledAssembler : scaledAssemblers_) {
LocalVector v(localVector.size()); LocalVector v(localVector.size());
scaledAssembler.second->assemble(element, v = 0.0, tFE); scaledAssembler.second->assemble(element, v = 0.0, tFE);
......
...@@ -63,6 +63,7 @@ public: ...@@ -63,6 +63,7 @@ public:
virtual void assemble(const Element& element, LocalMatrix& localMatrix, virtual void assemble(const Element& element, LocalMatrix& localMatrix,
const TrialLocalFE& tFE, const TrialLocalFE& tFE,
const AnsatzLocalFE& aFE) const { const AnsatzLocalFE& aFE) const {
localMatrix = 0.0;
for (auto&& scaledAssembler : scaledAssemblers_) { for (auto&& scaledAssembler : scaledAssemblers_) {
LocalMatrix m(localMatrix.N(), localMatrix.M()); LocalMatrix m(localMatrix.N(), localMatrix.M());
m = 0.0; m = 0.0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment