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: Tue, 21 Nov 2017 02:42:54 -0500 (EST)

branch: master
commit 3836fcb8a8798a619905619e4fe35147c5645565
Author: Konstantinos Poulios <address@hidden>
Date:   Tue Nov 21 08:42:11 2017 +0100

    fix a bug in the derivative of the Normalized operator
---
 src/getfem_plasticity.cc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/getfem_plasticity.cc b/src/getfem_plasticity.cc
index 3446e73..820ed62 100644
--- a/src/getfem_plasticity.cc
+++ b/src/getfem_plasticity.cc
@@ -298,6 +298,7 @@ namespace getfem {
       scalar_type no = 
::sqrt(gmm::vect_norm2_sqr(t.as_vector())+gmm::sqr(eps));
       scalar_type no3 = no*no*no;
 
+      gmm::clear(result.as_vector());
       for (size_type i = 0; i < N; ++i) {
         result[i*N+i] += scalar_type(1)/no;
         for (size_type j = 0; j < N; ++j)
@@ -427,6 +428,7 @@ namespace getfem {
 
       switch (nder) {
       case 1:
+        gmm::clear(result.as_vector());
         for (size_type i = 0; i < N; ++i) {
           result[i*N+i] += scalar_type(1)/no;
           for (size_type j = 0; j < N; ++j)



reply via email to

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