aboutsummaryrefslogtreecommitdiff
path: root/Source/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Python')
-rw-r--r--Source/Python/Make.package10
-rw-r--r--Source/Python/WarpX_py.H23
-rw-r--r--Source/Python/WarpX_py.cpp19
3 files changed, 52 insertions, 0 deletions
diff --git a/Source/Python/Make.package b/Source/Python/Make.package
new file mode 100644
index 000000000..c79049f02
--- /dev/null
+++ b/Source/Python/Make.package
@@ -0,0 +1,10 @@
+ifeq ($(USE_PYTHON_MAIN),TRUE)
+ CEXE_sources += WarpXWrappers.cpp
+ CEXE_headers += WarpXWrappers.h
+endif
+
+CEXE_sources += WarpX_py.cpp
+CEXE_headers += WarpX_py.H
+
+INCLUDE_LOCATIONS += $(WARPX_HOME)/Source/Python
+VPATH_LOCATIONS += $(WARPX_HOME)/Source/Python
diff --git a/Source/Python/WarpX_py.H b/Source/Python/WarpX_py.H
new file mode 100644
index 000000000..d8cf22155
--- /dev/null
+++ b/Source/Python/WarpX_py.H
@@ -0,0 +1,23 @@
+#ifndef WARPX_PY_H_
+#define WARPX_PY_H_
+
+#include <WarpXWrappers.h>
+
+extern "C" {
+
+ extern WARPX_CALLBACK_PY_FUNC_0 warpx_py_afterinit;
+ extern WARPX_CALLBACK_PY_FUNC_0 warpx_py_beforeEsolve;
+ extern WARPX_CALLBACK_PY_FUNC_0 warpx_py_afterEsolve;
+ extern WARPX_CALLBACK_PY_FUNC_0 warpx_py_beforedeposition;
+ extern WARPX_CALLBACK_PY_FUNC_0 warpx_py_afterdeposition;
+ extern WARPX_CALLBACK_PY_FUNC_0 warpx_py_particlescraper;
+ extern WARPX_CALLBACK_PY_FUNC_0 warpx_py_particleloader;
+ extern WARPX_CALLBACK_PY_FUNC_0 warpx_py_beforestep;
+ extern WARPX_CALLBACK_PY_FUNC_0 warpx_py_afterstep;
+ extern WARPX_CALLBACK_PY_FUNC_0 warpx_py_afterrestart;
+ extern WARPX_CALLBACK_PY_FUNC_0 warpx_py_particleinjection;
+ extern WARPX_CALLBACK_PY_FUNC_0 warpx_py_appliedfields;
+
+}
+
+#endif
diff --git a/Source/Python/WarpX_py.cpp b/Source/Python/WarpX_py.cpp
new file mode 100644
index 000000000..276d637d7
--- /dev/null
+++ b/Source/Python/WarpX_py.cpp
@@ -0,0 +1,19 @@
+#include <WarpX_py.H>
+
+extern "C" {
+
+ WARPX_CALLBACK_PY_FUNC_0 warpx_py_afterinit = nullptr;
+ WARPX_CALLBACK_PY_FUNC_0 warpx_py_beforeEsolve = nullptr;
+ WARPX_CALLBACK_PY_FUNC_0 warpx_py_afterEsolve = nullptr;
+ WARPX_CALLBACK_PY_FUNC_0 warpx_py_beforedeposition = nullptr;
+ WARPX_CALLBACK_PY_FUNC_0 warpx_py_afterdeposition = nullptr;
+ WARPX_CALLBACK_PY_FUNC_0 warpx_py_particlescraper = nullptr;
+ WARPX_CALLBACK_PY_FUNC_0 warpx_py_particleloader = nullptr;
+ WARPX_CALLBACK_PY_FUNC_0 warpx_py_beforestep = nullptr;
+ WARPX_CALLBACK_PY_FUNC_0 warpx_py_afterstep = nullptr;
+ WARPX_CALLBACK_PY_FUNC_0 warpx_py_afterrestart = nullptr;
+ WARPX_CALLBACK_PY_FUNC_0 warpx_py_particleinjection = nullptr;
+ WARPX_CALLBACK_PY_FUNC_0 warpx_py_appliedfields = nullptr;
+
+}
+