From 25d38dcd91561d189914c09b861c15bfc7635346 Mon Sep 17 00:00:00 2001
From: Van Dung NGUYEN <vdg.nguyen@gmail.com>
Date: Thu, 2 Feb 2023 16:26:31 +0100
Subject: [PATCH] make vector<int> == vectorInt, vector<double> ==
 vectorDouble, vector<string> == vectorString in python

---
 NonLinearSolver/nlmechsolpy.i | 8 ++++++++
 dG3D/src/dG3Dpy.i             | 4 +---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/NonLinearSolver/nlmechsolpy.i b/NonLinearSolver/nlmechsolpy.i
index 5afc90c09..f030bdaa3 100644
--- a/NonLinearSolver/nlmechsolpy.i
+++ b/NonLinearSolver/nlmechsolpy.i
@@ -1,3 +1,11 @@
+%include std_string.i
+%include std_vector.i
+%include std_map.i
+
+%template(vectorInt) std::vector<int>;
+%template(vectorDouble) std::vector<double>;
+%template(vectorString) std::vector<std::string>;
+
 %{
   #undef HAVE_DLOPEN
   #include "NonLinearSolverConfig.h"
diff --git a/dG3D/src/dG3Dpy.i b/dG3D/src/dG3Dpy.i
index 9a44dcec1..8efa466c1 100644
--- a/dG3D/src/dG3Dpy.i
+++ b/dG3D/src/dG3Dpy.i
@@ -4,9 +4,7 @@
 #else
   %module dG3Dpy
 #endif
-%include std_string.i
-%include std_vector.i
-%include std_map.i
+
 
 %include nlmechsolpy.i
 
-- 
GitLab