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

gmshpy : remove swig warnings

parent d9ebcbcb
No related branches found
No related tags found
No related merge requests found
%feature("autodoc", "1"); %feature("autodoc", "1");
#pragma SWIG nowarn=312
%module gmshCommon %module gmshCommon
%include std_string.i %include std_string.i
...@@ -8,6 +9,7 @@ ...@@ -8,6 +9,7 @@
%import "gmshtypemaps.i" %import "gmshtypemaps.i"
%{ %{
#undef HAVE_DLOPEN
#include "GmshConfig.h" #include "GmshConfig.h"
#include "Context.h" #include "Context.h"
......
%feature("autodoc", "1"); %feature("autodoc", "1");
#pragma SWIG nowarn=312
%module gmshGeo %module gmshGeo
%include std_string.i %include std_string.i
...@@ -7,6 +8,7 @@ ...@@ -7,6 +8,7 @@
%import "gmshtypemaps.i" %import "gmshtypemaps.i"
%{ %{
#undef HAVE_DLOPEN
#include "GmshConfig.h" #include "GmshConfig.h"
#include "GModel.h" #include "GModel.h"
...@@ -17,7 +19,6 @@ ...@@ -17,7 +19,6 @@
#include "GFace.h" #include "GFace.h"
#include "GFaceCompound.h" #include "GFaceCompound.h"
#include "GRegion.h" #include "GRegion.h"
#include "GPoint.h"
#include "discreteFace.h" #include "discreteFace.h"
#include "discreteEdge.h" #include "discreteEdge.h"
#include "discreteRegion.h" #include "discreteRegion.h"
...@@ -64,6 +65,23 @@ namespace std { ...@@ -64,6 +65,23 @@ namespace std {
%template(SPoint3Vector) std::vector<SPoint3, std::allocator<SPoint3> >; %template(SPoint3Vector) std::vector<SPoint3, std::allocator<SPoint3> >;
} }
%rename(__add__) *::operator+;
%rename(__sub__) *::operator-;
%rename(__neg__) *::operator-();
%rename(_operator_mult) *::operator*;
%rename(_operator_assign) *::operator=;
%rename(_operator_equal) *::operator==;
%ignore operator+;
%ignore operator-;
%ignore operator*;
%ignore operator==;
%ignore operator!=;
%ignore operator double*;
%ignore *::operator[](int);
%rename(at) *::operator[];
%rename(_print) *::print;
%include "GmshConfig.h" %include "GmshConfig.h"
%include "simpleFunction.h" %include "simpleFunction.h"
%template(simpleFunctionDouble) simpleFunction<double>; %template(simpleFunctionDouble) simpleFunction<double>;
...@@ -73,31 +91,42 @@ namespace std { ...@@ -73,31 +91,42 @@ namespace std {
} }
%include "GModel.h" %include "GModel.h"
%ignore GPoint::x();
%ignore GPoint::y();
%ignore GPoint::z();
%include "GPoint.h" %include "GPoint.h"
%include "GEntity.h" %include "GEntity.h"
%include "GVertex.h" %include "GVertex.h"
%apply std::vector<double> &OUTPUT{std::vector<double> &ts} %apply std::vector<double> &OUTPUT{std::vector<double> &ts}
%apply std::vector<SPoint3> &OUTPUT{std::vector<SPoint3> &dpts} %apply std::vector<SPoint3> &OUTPUT{std::vector<SPoint3> &dpts}
%include "GEdge.h" %include "GEdge.h"
%ignore GFace::computeMeanPlane(std::vector< MVertex *>const&);
%include "GFace.h" %include "GFace.h"
%include "GFaceCompound.h" %include "GFaceCompound.h"
%include "GRegion.h" %include "GRegion.h"
%include "GPoint.h"
%include "discreteFace.h" %include "discreteFace.h"
%include "discreteEdge.h" %include "discreteEdge.h"
%include "discreteVertex.h" %include "discreteVertex.h"
%include "discreteRegion.h" %include "discreteRegion.h"
%include "SPoint3.h" %include "SPoint3.h"
%include "MElement.h" %include "MElement.h"
%ignore MVertex::x();
%ignore MVertex::y();
%ignore MVertex::z();
%include "MVertex.h" %include "MVertex.h"
%include "MTriangle.h" %include "MTriangle.h"
%include "MPrism.h" %include "MPrism.h"
%include "MHexahedron.h" %include "MHexahedron.h"
%include "MQuadrangle.h" %include "MQuadrangle.h"
%include "MLine.h" %include "MLine.h"
%warnfilter(401) Equal_Edge;
%warnfilter(401) Less_Edge;
%include "MEdge.h" %include "MEdge.h"
%warnfilter(401) Equal_Face;
%warnfilter(401) Less_Face;
%include "MFace.h" %include "MFace.h"
%include "MPoint.h" %include "MPoint.h"
%ignore SVector3::operator()(int);
%include "SVector3.h" %include "SVector3.h"
%include "SPoint2.h" %include "SPoint2.h"
%include "SBoundingBox3d.h" %include "SBoundingBox3d.h"
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
%import "gmshtypemaps.i" %import "gmshtypemaps.i"
%{ %{
#undef HAVE_DLOPEN
#include "GmshConfig.h" #include "GmshConfig.h"
#if defined(HAVE_MESH) #if defined(HAVE_MESH)
#include "Generator.h" #include "Generator.h"
...@@ -49,6 +50,7 @@ namespace std { ...@@ -49,6 +50,7 @@ namespace std {
%include "GmshConfig.h" %include "GmshConfig.h"
#if defined(HAVE_MESH) #if defined(HAVE_MESH)
%include "Generator.h" %include "Generator.h"
#pragma SWIG nowarn=314
%include "DivideAndConquer.h" %include "DivideAndConquer.h"
#if defined(HAVE_BFGS) #if defined(HAVE_BFGS)
%include "meshGFaceLloyd.h" %include "meshGFaceLloyd.h"
...@@ -65,6 +67,7 @@ namespace std { ...@@ -65,6 +67,7 @@ namespace std {
#if defined(HAVE_METIS) || defined(HAVE_CHACO) #if defined(HAVE_METIS) || defined(HAVE_CHACO)
%include "meshPartition.h" %include "meshPartition.h"
#endif #endif
%warnfilter(401) FieldManager;
%include "Field.h" %include "Field.h"
%extend FieldManager { %extend FieldManager {
int addPythonField(PyObject *callback, int id = -1) { int addPythonField(PyObject *callback, int id = -1) {
......
%feature("autodoc", "1"); %feature("autodoc", "1");
%module gmshNumeric %module gmshNumeric
#pragma SWIG nowarn=325
%include std_string.i %include std_string.i
%include std_vector.i %include std_vector.i
%import "gmshtypemaps.i" %import "gmshtypemaps.i"
%{ %{
#undef HAVE_DLOPEN
#include "GmshConfig.h" #include "GmshConfig.h"
#include "GaussIntegration.h" #include "GaussIntegration.h"
...@@ -19,10 +21,12 @@ ...@@ -19,10 +21,12 @@
#include "pyramidalBasis.h" #include "pyramidalBasis.h"
%} %}
%rename("_assign=") operator(); %rename("_operator_assign") *::operator=;
%rename("_assign_operator=") operator=; %rename("_print") *::print;
%include "GaussIntegration.h" %include "GaussIntegration.h"
%include "JacobianBasis.h" %include "JacobianBasis.h"
%ignore fullMatrix<double>::operator()(int, int);
%ignore fullVector<double>::operator()(int);
%include "fullMatrix.h" %include "fullMatrix.h"
%include "simpleFunction.h" %include "simpleFunction.h"
%template(fullMatrixDouble) fullMatrix<double>; %template(fullMatrixDouble) fullMatrix<double>;
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
%import "gmshtypemaps.i" %import "gmshtypemaps.i"
%{ %{
#undef HAVE_DLOPEN
#include "GmshConfig.h" #include "GmshConfig.h"
#include "fullMatrix.h" #include "fullMatrix.h"
#if defined(HAVE_POST) #if defined(HAVE_POST)
......
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
%import "gmshtypemaps.i" %import "gmshtypemaps.i"
%{ %{
#undef HAVE_DLOPEN
#include "GmshConfig.h" #include "GmshConfig.h"
#if defined(HAVE_SOLVER) #if defined(HAVE_SOLVER)
#include "dofManager.h" #include "dofManager.h"
...@@ -20,6 +21,8 @@ ...@@ -20,6 +21,8 @@
#endif #endif
%} %}
%rename ("_print") *::print;
%include "GmshConfig.h" %include "GmshConfig.h"
#if defined(HAVE_SOLVER) #if defined(HAVE_SOLVER)
%include "dofManager.h" %include "dofManager.h"
......
...@@ -217,4 +217,3 @@ ...@@ -217,4 +217,3 @@
} }
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment