Nektar++
Macros
NekPyConfig.hpp File Reference
#include <boost/version.hpp>
#include <boost/python.hpp>
#include <boost/numpy.hpp>

Go to the source code of this file.

Macros

#define SIZENAME(s)   SIZE_##s
 
#define NEKPY_WRAP_ENUM(ENUMNAME, MAPNAME)
 
#define NEKPY_WRAP_ENUM_STRING(ENUMNAME, MAPNAME)
 
#define NEKPY_WRAP_ENUM_STRING_DOCS(ENUMNAME, MAPNAME, DOCSTRING)
 
#define NEKPY_SHPTR_FIX(SOURCE, TARGET)
 

Macro Definition Documentation

◆ NEKPY_SHPTR_FIX

#define NEKPY_SHPTR_FIX (   SOURCE,
  TARGET 
)
Value:
py::implicitly_convertible<std::shared_ptr<SOURCE>, \
std::shared_ptr<TARGET>>();

Definition at line 106 of file NekPyConfig.hpp.

Referenced by export_ContField(), export_DisContField_Helper(), export_ExpList2D(), export_Geom(), export_GeomElements(), export_LocalElements(), export_QuadExp(), export_SegExp(), export_StdElements(), and export_TriExp().

◆ NEKPY_WRAP_ENUM

#define NEKPY_WRAP_ENUM (   ENUMNAME,
  MAPNAME 
)
Value:
{ \
py::enum_<ENUMNAME> tmp(#ENUMNAME); \
for (int a = 0; a < (int)SIZENAME(ENUMNAME); ++a) \
{ \
tmp.value(MAPNAME[a], (ENUMNAME)a); \
} \
tmp.export_values(); \
}
#define SIZENAME(s)
Definition: NekPyConfig.hpp:55

Definition at line 56 of file NekPyConfig.hpp.

Referenced by export_Basis(), export_Comm(), export_ShapeType(), and export_StdMatrixKey().

◆ NEKPY_WRAP_ENUM_STRING

#define NEKPY_WRAP_ENUM_STRING (   ENUMNAME,
  MAPNAME 
)
Value:
{ \
py::enum_<ENUMNAME> tmp(#ENUMNAME); \
for (int a = 0; a < (int)SIZENAME(ENUMNAME); ++a) \
{ \
tmp.value(MAPNAME[a].c_str(), (ENUMNAME)a); \
} \
tmp.export_values(); \
}
#define SIZENAME(s)
Definition: NekPyConfig.hpp:55

Definition at line 65 of file NekPyConfig.hpp.

◆ NEKPY_WRAP_ENUM_STRING_DOCS

#define NEKPY_WRAP_ENUM_STRING_DOCS (   ENUMNAME,
  MAPNAME,
  DOCSTRING 
)
Value:
{ \
py::enum_<ENUMNAME> tmp(#ENUMNAME); \
for (int a = 0; a < (int)SIZENAME(ENUMNAME); ++a) \
{ \
tmp.value(MAPNAME[a].c_str(), (ENUMNAME)a); \
} \
tmp.export_values(); \
PyTypeObject * pto = \
reinterpret_cast<PyTypeObject*>(tmp.ptr()); \
PyDict_SetItemString(pto->tp_dict, "__doc__", \
PyUnicode_FromString(DOCSTRING)); \
}
#define SIZENAME(s)
Definition: NekPyConfig.hpp:55

Definition at line 89 of file NekPyConfig.hpp.

Referenced by export_Points().

◆ SIZENAME

#define SIZENAME (   s)    SIZE_##s

Definition at line 55 of file NekPyConfig.hpp.