Julien Pommier wrote:
Hi ShunTim,

Well, you found a bug. I have commited a fix in the svn repository

http://svn.gna.org/viewcvs/getfem/trunk/getfem%2B%2B/interface/src/gf_mdbrick_set.cc?r2=2729&rev=2729&r1=2722&dir_pagestart=50

but of course, you can also cast the 1D array into a 2D array with one row, and
then the interface will be happy.

--
Julien

Hello Julien,

Thanks very much. It worked after the change.

BTW, I found that the python interface does not build if you don't have numarray in the usual place. (I had to compile my own numarray because the debian numarray package does seem to work with getfem.) I attached a patch to "setup.py.in" to allow configure to pick up the PYTHON_CPPFLAGS env variable so as to locate the custom installed python include directory. Feel free to do whatever you like with it. Just a hack to make things work for myself. :-)

Regards,
ST
--

--- setup.py.in.orig	2007-12-22 12:35:13.000000000 +0800
+++ setup.py.in	2007-12-22 13:49:08.000000000 +0800
@@ -6,6 +6,11 @@
 from distutils.core import setup, Extension
 import os
 
+### 20071222 - Strip leadin -I from @PYTHON_CPPFLAGS@
+include_python_cppflags = ["@PYTHON_CPPFLAGS@"]
+include_python_cppflags_dirs = [l[2:] for l in include_python_cppflags if l.startswith("-I")]
+###
+
 cclibopts = "../../../src/.libs/libgetfem.a".split()
 cclibopts += '@LIBS@'.split()
 
@@ -31,8 +36,17 @@
 #print "cclibopts=", cclibopts
 #print "libnames = ", libnames
 #print "libdirs = ", libdirs
+
+### 20071222 - Append include dir list from @PYTHON_CPPFLPAG@
+include_dirs_names = ['@srcdir@/..','@srcdir@']
+include_dirs_names = include_dirs_names + include_python_cppflags_dirs
+###
+
 getfemmod = Extension('_getfem',
-                      include_dirs = ['@srcdir@/..','@srcdir@'],
+                      ### 20071222 - Append include dir list from @PYTHON_CPPFLPAG@
+                      include_dirs = include_dirs_names,
+                      ###
+                      
                       libraries = libnames, #['getfemint','getfem','stdc++','m'],
                       library_dirs = libdirs, #['../src/.libs',
 #                                      '@GETFEM_STATICLIBS@'],
_______________________________________________
Getfem-users mailing list
[email protected]
https://mail.gna.org/listinfo/getfem-users

Reply via email to