aboutsummaryrefslogtreecommitdiff
path: root/Source/Python
diff options
context:
space:
mode:
authorGravatar Tools <warpx@lbl.gov> 2019-09-11 10:06:14 -0700
committerGravatar Axel Huebl <axel.huebl@plasma.ninja> 2019-09-11 10:12:00 -0700
commitfd848331f2fd6af8c56a0027cc5f088286e347c4 (patch)
tree9f81ea5e8475ab5bd1e769d7865fc7fd492d06eb /Source/Python
parentf182366aaf66a770715b144ac0a760a998f59ed4 (diff)
downloadWarpX-fd848331f2fd6af8c56a0027cc5f088286e347c4.tar.gz
WarpX-fd848331f2fd6af8c56a0027cc5f088286e347c4.tar.zst
WarpX-fd848331f2fd6af8c56a0027cc5f088286e347c4.zip
Source & Tools: No EOL Whitespaces
End-of-line (EOL) whitespaces are verbose and increase diffs and merge conflicts over time. Cleaned them up for the `Source/`, `Examples/` and `Tools/` directory with the following bash one-liner: ```bash find . -type f -not -path './.git*' \ -exec sed -i 's/[[:blank:]]*$//' {} \; ``` Committed as generic user so git does not credit the many lines to me: ```bash GIT_AUTHOR_NAME="Tools" GIT_AUTHOR_EMAIL="warpx@lbl.gov" \ git commit ```
Diffstat (limited to 'Source/Python')
-rw-r--r--Source/Python/WarpXWrappers.cpp14
-rw-r--r--Source/Python/WarpXWrappers.h40
2 files changed, 27 insertions, 27 deletions
diff --git a/Source/Python/WarpXWrappers.cpp b/Source/Python/WarpXWrappers.cpp
index 2fb7200bb..b59f80495 100644
--- a/Source/Python/WarpXWrappers.cpp
+++ b/Source/Python/WarpXWrappers.cpp
@@ -8,7 +8,7 @@
#include <WarpXUtil.H>
#include <WarpX_py.H>
-namespace
+namespace
{
double** getMultiFabPointers(const amrex::MultiFab& mf, int *num_boxes, int *ncomps, int *ngrow, int **shapes)
{
@@ -19,7 +19,7 @@ namespace
if (mf.nComp() > 1) shapesize += 1;
*shapes = (int*) malloc(shapesize * (*num_boxes) * sizeof(int));
double** data = (double**) malloc((*num_boxes) * sizeof(double*));
-
+
#ifdef _OPENMP
#pragma omp parallel
#endif
@@ -27,7 +27,7 @@ namespace
int i = mfi.LocalIndex();
data[i] = (double*) mf[mfi].dataPtr();
for (int j = 0; j < AMREX_SPACEDIM; ++j) {
- (*shapes)[shapesize*i+j] = mf[mfi].box().length(j);
+ (*shapes)[shapesize*i+j] = mf[mfi].box().length(j);
}
if (mf.nComp() > 1) (*shapes)[shapesize*i+AMREX_SPACEDIM] = mf.nComp();
}
@@ -69,12 +69,12 @@ extern "C"
return WarpX::l_lower_order_in_v;
}
- int warpx_nComps()
+ int warpx_nComps()
{
- return PIdx::nattribs;
+ return PIdx::nattribs;
}
- int warpx_SpaceDim()
+ int warpx_SpaceDim()
{
return AMREX_SPACEDIM;
}
@@ -87,7 +87,7 @@ extern "C"
#ifdef BL_USE_MPI
void amrex_init_with_inited_mpi (int argc, char* argv[], MPI_Comm mpicomm)
{
- amrex::Initialize(argc,argv,true,mpicomm);
+ amrex::Initialize(argc,argv,true,mpicomm);
}
#endif
diff --git a/Source/Python/WarpXWrappers.h b/Source/Python/WarpXWrappers.h
index 0a476b5fc..233a0b930 100644
--- a/Source/Python/WarpXWrappers.h
+++ b/Source/Python/WarpXWrappers.h
@@ -26,9 +26,9 @@ extern "C" {
#endif
void amrex_finalize (int finalize_mpi);
-
+
void warpx_init ();
-
+
void warpx_finalize ();
typedef void(*WARPX_CALLBACK_PY_FUNC_0)();
@@ -47,41 +47,41 @@ extern "C" {
void warpx_set_callback_py_appliedfields (WARPX_CALLBACK_PY_FUNC_0);
void warpx_evolve (int numsteps); // -1 means the inputs parameter will be used.
-
+
void warpx_addNParticles(int speciesnumber, int lenx,
double* x, double* y, double* z,
double* vx, double* vy, double* vz,
int nattr, double* attr, int uniqueparticles);
void warpx_ConvertLabParamsToBoost();
-
+
double warpx_getProbLo(int dir);
-
+
double warpx_getProbHi(int dir);
-
+
long warpx_getNumParticles(int speciesnumber);
-
- double** warpx_getEfield(int lev, int direction,
+
+ double** warpx_getEfield(int lev, int direction,
int *return_size, int* ncomps, int* ngrow, int **shapes);
-
- int* warpx_getEfieldLoVects(int lev, int direction,
+
+ int* warpx_getEfieldLoVects(int lev, int direction,
int *return_size, int* ngrow);
-
- double** warpx_getBfield(int lev, int direction,
+
+ double** warpx_getBfield(int lev, int direction,
int *return_size, int* ncomps, int* ngrow, int **shapes);
-
- int* warpx_getBfieldLoVects(int lev, int direction,
+
+ int* warpx_getBfieldLoVects(int lev, int direction,
int *return_size, int* ngrow);
-
- double** warpx_getCurrentDensity(int lev, int direction,
+
+ double** warpx_getCurrentDensity(int lev, int direction,
int *return_size, int* ncomps, int* ngrow, int **shapes);
-
- int* warpx_getCurrentDensityLoVects(int lev, int direction,
+
+ int* warpx_getCurrentDensityLoVects(int lev, int direction,
int *return_size, int* ngrow);
-
+
double** warpx_getParticleStructs(int speciesnumber, int lev,
int* num_tiles, int** particles_per_tile);
-
+
double** warpx_getParticleArrays(int speciesnumber, int comp, int lev,
int* num_tiles, int** particles_per_tile);