aboutsummaryrefslogtreecommitdiff
path: root/Source/Python
diff options
context:
space:
mode:
authorGravatar Axel Huebl <axel.huebl@plasma.ninja> 2019-10-01 14:00:45 -0700
committerGravatar Axel Huebl <axel.huebl@plasma.ninja> 2020-02-10 23:17:17 -0800
commit4f1557d3ba9f6f56f47dbd57b0d050ab43ce8685 (patch)
tree9c8d58a224f2181bcd2d10f34fcbb681b8c6b3d9 /Source/Python
parentd55c8a3d5f5be2c6085ebe337c9ec5ac41eb3c5f (diff)
downloadWarpX-4f1557d3ba9f6f56f47dbd57b0d050ab43ce8685.tar.gz
WarpX-4f1557d3ba9f6f56f47dbd57b0d050ab43ce8685.tar.zst
WarpX-4f1557d3ba9f6f56f47dbd57b0d050ab43ce8685.zip
Python Compile in Single Precision
Diffstat (limited to '')
-rw-r--r--Source/Python/Make.package4
-rw-r--r--Source/Python/WarpXWrappers.cpp10
-rw-r--r--Source/Python/WarpXWrappers.h20
3 files changed, 21 insertions, 13 deletions
diff --git a/Source/Python/Make.package b/Source/Python/Make.package
index 746257abf..651e092d3 100644
--- a/Source/Python/Make.package
+++ b/Source/Python/Make.package
@@ -1,7 +1,3 @@
-#ifeq ($(USE_PYTHON_MAIN),TRUE)
-# CEXE_sources += WarpXWrappers.cpp
-# CEXE_headers += WarpXWrappers.h
-#endif
CEXE_sources += WarpXWrappers.cpp
CEXE_sources += WarpX_py.cpp
CEXE_headers += WarpXWrappers.h
diff --git a/Source/Python/WarpXWrappers.cpp b/Source/Python/WarpXWrappers.cpp
index bf5377dae..2bddd3b31 100644
--- a/Source/Python/WarpXWrappers.cpp
+++ b/Source/Python/WarpXWrappers.cpp
@@ -6,13 +6,15 @@
*
* License: BSD-3-Clause-LBNL
*/
-
#include <WarpXWrappers.h>
#include <WarpXParticleContainer.H>
#include <WarpX.H>
#include <WarpXUtil.H>
#include <WarpX_py.H>
+#include <AMReX.H>
+#include <AMReX_BLProfiler.H>
+
namespace
{
amrex::Real** getMultiFabPointers(const amrex::MultiFab& mf, int *num_boxes, int *ncomps, int *ngrow, int **shapes)
@@ -181,9 +183,9 @@ extern "C"
}
void warpx_addNParticles(int speciesnumber, int lenx,
- amrex::ParticleReal* x, amrex::ParticleReal* y, amrex::ParticleReal* z,
- amrex::ParticleReal* vx, amrex::ParticleReal* vy, amrex::ParticleReal* vz,
- int nattr, amrex::ParticleReal* attr, int uniqueparticles)
+ amrex::ParticleReal const * x, amrex::ParticleReal const * y, amrex::ParticleReal const * z,
+ amrex::ParticleReal const * vx, amrex::ParticleReal const * vy, amrex::ParticleReal const * vz,
+ int nattr, amrex::ParticleReal const * attr, int uniqueparticles)
{
auto & mypc = WarpX::GetInstance().GetPartContainer();
auto & myspc = mypc.GetParticleContainer(speciesnumber);
diff --git a/Source/Python/WarpXWrappers.h b/Source/Python/WarpXWrappers.h
index 53309ad93..3fc2ecc93 100644
--- a/Source/Python/WarpXWrappers.h
+++ b/Source/Python/WarpXWrappers.h
@@ -12,9 +12,12 @@
#include <AMReX_BLProfiler.H>
#ifdef BL_USE_MPI
-#include <mpi.h>
+# include <mpi.h>
#endif
+#include <AMReX_REAL.H>
+
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -61,10 +64,17 @@ extern "C" {
void warpx_evolve (int numsteps); // -1 means the inputs parameter will be used.
- void warpx_addNParticles(int speciesnumber, int lenx,
- amrex::ParticleReal* x, amrex::ParticleReal* y, amrex::ParticleReal* z,
- amrex::ParticleReal* vx, amrex::ParticleReal* vy, amrex::ParticleReal* vz,
- int nattr, amrex::ParticleReal* attr, int uniqueparticles);
+ void warpx_addNParticles(int speciesnumber,
+ int lenx,
+ amrex::ParticleReal const * x,
+ amrex::ParticleReal const * y,
+ amrex::ParticleReal const * z,
+ amrex::ParticleReal const * vx,
+ amrex::ParticleReal const * vy,
+ amrex::ParticleReal const * vz,
+ int nattr,
+ amrex::ParticleReal const * attr,
+ int uniqueparticles);
void warpx_ConvertLabParamsToBoost();