This is a bug. See: https://bitbucket.org/fenics-project/dolfin/issue/205
It does not work with SWIG 2.0.10 either. I think it is a petsc4py related bug. The easiest fix is to add the attached patch. If no one complains I will push this "fix" later today. Johan On Tue, Jan 21, 2014 at 10:49 AM, Marco Morandini <[email protected] > wrote: > As of yesterday I'm having this error on master: > > make[2]: Entering directory `/home/marco/Programmi/ > Dolphin/src_from_dorsal/dolfin/dorsal_build_dir' > [ 98%] Building CXX object dolfin/swig/modules/io/CMakeFiles/_io.dir/ > modulePYTHON_wrap.cxx.o > /home/marco/Programmi/Dolphin/src_from_dorsal/dolfin/dorsal_ > build_dir/dolfin/swig/modules/la/modulePYTHON_wrap.cxx: In function > ‘PyObject* SWIG_From_MatNullSpace(MatNullSpace)’: > /home/marco/Programmi/Dolphin/src_from_dorsal/dolfin/dorsal_ > build_dir/dolfin/swig/modules/la/modulePYTHON_wrap.cxx:4986:32: error: > ‘PyPetscNullSpace_New’ was not declared in this scope > return PyPetscNullSpace_New(v); > ^ > I have petsc4py intalled . > Switching from swig 2.08 to 2.0.11 changed nothing. > > Any hint? > > Thanks, > > Marco > > _______________________________________________ > fenics-support mailing list > [email protected] > http://fenicsproject.org/mailman/listinfo/fenics-support >
diff --git a/dolfin/swig/la/pre.i b/dolfin/swig/la/pre.i index 5f28e20..e7999de 100644 --- a/dolfin/swig/la/pre.i +++ b/dolfin/swig/la/pre.i @@ -192,6 +192,9 @@ // PETSc/SLEPc backend //----------------------------------------------------------------------------- #ifdef HAS_PETSC +// Ignore MatNullSpace not properly wrapped by SWIG +%ignore dolfin::PETScPreconditioner::near_nullspace() const; + // Only ignore C++ accessors if petsc4py is enabled #ifdef HAS_PETSC4PY %ignore dolfin::PETScVector::vec() const;
_______________________________________________ fenics-support mailing list [email protected] http://fenicsproject.org/mailman/listinfo/fenics-support
