getfem-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-commits] (no subject)


From: Konstantinos Poulios
Subject: [Getfem-commits] (no subject)
Date: Thu, 14 Sep 2017 03:07:51 -0400 (EDT)

branch: fix-valgrind-issues
commit 76c1f5cda3b5bfec2737bfc86b8f9d5cda1873cb
Author: Konstantinos Poulios <address@hidden>
Date:   Thu Sep 14 09:06:52 2017 +0200

    fix valgrind warning about unitialized variable
---
 src/getfem_generic_assembly.cc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/getfem_generic_assembly.cc b/src/getfem_generic_assembly.cc
index 1f51175..d1ef613 100644
--- a/src/getfem_generic_assembly.cc
+++ b/src/getfem_generic_assembly.cc
@@ -366,7 +366,7 @@ namespace getfem {
   struct assembly_tensor {
     bool is_copied;
     int sparsity_; // 0: plain, 1: vectorized base, 2: vectorised grad, ...
-    size_type qdim_; // Dimension of the vectorization for sparsityy tensors
+    size_type qdim_; // Dimension of the vectorization for sparsity tensors
     base_tensor t;
     assembly_tensor *tensor_copied;
 
@@ -439,7 +439,8 @@ namespace getfem {
 
     const bgeot::multi_index &sizes() const { return t.sizes(); }
 
-    assembly_tensor() : is_copied(false), sparsity_(0), tensor_copied(0) {}
+    assembly_tensor()
+    : is_copied(false), sparsity_(0), qdim_(0), tensor_copied(0) {}
   };
 
   struct ga_tree_node;
@@ -480,7 +481,7 @@ namespace getfem {
 
     inline size_type nb_test_functions() const {
       if (test_function_type == size_type(-1)) return 0;
-      return test_function_type  - (test_function_type >= 2 ? 1 : 0);
+      return test_function_type - (test_function_type >= 2 ? 1 : 0);
     }
 
     inline size_type tensor_order() const



reply via email to

[Prev in Thread] Current Thread [Next in Thread]