From 378b24ba22db2c383c5b6de863588fe657d202de Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Fri, 10 Jun 2016 10:25:12 +0100 Subject: [PATCH] Bugfix: Initialise sumMagToDiag result to zero. Henrik Rusche --- src/foam/primitives/VectorN/expandContract/ExpandTensorNI.H | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/foam/primitives/VectorN/expandContract/ExpandTensorNI.H b/src/foam/primitives/VectorN/expandContract/ExpandTensorNI.H index 9f9fec5ad..9d89795cc 100644 --- a/src/foam/primitives/VectorN/expandContract/ExpandTensorNI.H +++ b/src/foam/primitives/VectorN/expandContract/ExpandTensorNI.H @@ -358,6 +358,8 @@ inline void sumMagToDiag const TensorN& t ) { + result = VectorN::zero; + for (register int i = 0; i < TensorN::rowLength; i++) { for (register int j = 0; j < TensorN::rowLength; j++)