Skip to content
Snippets Groups Projects
Commit 46156a2b authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

initial test with swig

parent 4fa192ea
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,7 @@ option(ENABLE_QT "Build QT GUI" OFF)
option(ENABLE_READLINE "Enable Readline in Lua prompt" ON)
option(ENABLE_SLEPC "Enable SLEPc eigensolvers" ON)
option(ENABLE_SOLVER "Enable solver components" ON)
option(ENABLE_SWIG_EXPERIMENTAL "Enable swig (in developement, totally unusable)" OFF)
option(ENABLE_TAUCS "Enable Taucs linear algebra solver" ON)
option(ENABLE_TETGEN "Enable Tetgen mesh generator" ON)
option(ENABLE_TETGEN_NEW "Enable experimental version of Tetgen" OFF)
......@@ -1119,3 +1120,14 @@ message("")
mark_as_advanced(BISON FLEX GMP_LIB GMSH_EXTRA_VERSION HDF5_LIB MAKEINFO
MED_LIB OCC_INC SZ_LIB TAUCS_LIB LUA_LIB ACIS_LIB TEXI2PDF
READLINE_LIB)
if(ENABLE_SWIG_EXPERIMENTAL)
FIND_PACKAGE(SWIG REQUIRED)
INCLUDE(${SWIG_USE_FILE})
FIND_PACKAGE(PythonLibs)
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR};${PYTHON_INCLUDE_DIR};../Common;${CMAKE_CURRENT_BINARY_DIR}/../Common)
SET_SOURCE_FILES_PROPERTIES(Geo/GModel.i PROPERTIES CPLUSPLUS ON)
#SET_SOURCE_FILES_PROPERTIES(Geo/GModel.i SWIG_FLAGS "-includeall -importall")
SWIG_ADD_MODULE(gmshPython python Geo/GModel.i ${GMSH_SRC})
SWIG_LINK_LIBRARIES(gmshPython ${PYTHON_LIBRARIES} ${EXTERNAL_LIBRARIES})
endif(ENABLE_SWIG_EXPERIMENTAL)
......@@ -481,9 +481,9 @@ class GModel
int writePartitionedMSH(const std::string &baseName, bool binary=false,
bool saveAll=false, bool saveParametric=false,
double scalingFactor=1.0);
int writeDistanceMSH(const std::string &name, double version=2.2, bool binary=false,
/*int writeDistanceMSH(const std::string &name, double version=2.2, bool binary=false,
bool saveAll=false, bool saveParametric=false,
double scalingFactor=1.0);
double scalingFactor=1.0);*/
// Iridium file format
int writeIR3(const std::string &name, int elementTagType,
......
%module gmshPython
%include std_string.i
%{
#include "GModel.h"
void GmshInitialize(int argc=0, char **argv=NULL);
%}
void GmshInitialize(int argc=0, char **argv=NULL);
%include "GModel.h"
......@@ -142,6 +142,12 @@ void GModel::_deleteFMInternals()
{
}
int GModel::readFourier()
{
Msg::Error("Gmsh must be compiled with Fourier Model support toad fourier Model");
return 0;
}
int GModel::readFourier(const std::string &fn)
{
Msg::Error("Gmsh must be compiled with Fourier Model support to load '%s'",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment