From 1aaee69e03a1358939fcafcd636f41942c6d42c5 Mon Sep 17 00:00:00 2001
From: Dmitri Naumov <github@naumov.de>
Date: Thu, 28 Dec 2023 14:16:11 +0100
Subject: [PATCH] [PL] Use vectorized tensor size

---
 ProcessLib/Deformation/GMatrixPolicy.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/ProcessLib/Deformation/GMatrixPolicy.h b/ProcessLib/Deformation/GMatrixPolicy.h
index b53772eeaef..5d650a48c6c 100644
--- a/ProcessLib/Deformation/GMatrixPolicy.h
+++ b/ProcessLib/Deformation/GMatrixPolicy.h
@@ -10,6 +10,7 @@
 
 #pragma once
 
+#include "MathLib/VectorizedTensor.h"
 #include "NumLib/Fem/ShapeMatrixPolicy.h"
 
 namespace ProcessLib
@@ -37,11 +38,10 @@ private:
 public:
     // For the 2D case the 33-component is needed (and the four entries
     // of the non-symmetric matrix); In 3d there are nine entries.
-    using GradientMatrixType = MatrixType<DisplacementDim * DisplacementDim +
-                                              (DisplacementDim == 2 ? 1 : 0),
-                                          _number_of_dof>;
+    using GradientMatrixType =
+        MatrixType<MathLib::VectorizedTensor::size(DisplacementDim),
+                   _number_of_dof>;
     using GradientVectorType =
-        VectorTypeFixedSize<DisplacementDim * DisplacementDim +
-                            (DisplacementDim == 2 ? 1 : 0)>;
+        VectorTypeFixedSize<MathLib::VectorizedTensor::size(DisplacementDim)>;
 };
 }  // namespace ProcessLib
-- 
GitLab