From f44c8e7dee5f20c0e112361b3d6fa1b8071a326e Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <github@naumov.de>
Date: Tue, 13 Feb 2018 23:35:22 +0100
Subject: [PATCH] [MaL] KelvinVector; Resize the result vector.

---
 MathLib/KelvinVector.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/MathLib/KelvinVector.h b/MathLib/KelvinVector.h
index 499843e13c3..bf77b34534b 100644
--- a/MathLib/KelvinVector.h
+++ b/MathLib/KelvinVector.h
@@ -178,10 +178,12 @@ symmetricTensorToKelvinVector(Eigen::MatrixBase<Derived> const& v)
         result;
     if (v.rows() == 4)
     {
+        result.resize(4, 1);
         result << v[0], v[1], v[2], v[3] * std::sqrt(2.);
     }
     else if (v.rows() == 6)
     {
+        result.resize(6, 1);
         result << v[0], v[1], v[2], v[3] * std::sqrt(2.), v[4] * std::sqrt(2.),
             v[5] * std::sqrt(2.);
     }
-- 
GitLab