aboutsummaryrefslogtreecommitdiff
path: root/Source/Filter/NCIGodfreyFilter.cpp
diff options
context:
space:
mode:
authorGravatar Andrew Myers <atmyers2@gmail.com> 2020-01-31 10:13:04 -0800
committerGravatar Andrew Myers <atmyers2@gmail.com> 2020-01-31 10:13:04 -0800
commit58e64aafe0103b6644048d7480a3e62fe01bd5cb (patch)
tree8f0d7ed234d780b929d493d7a217fa504647fa8c /Source/Filter/NCIGodfreyFilter.cpp
parente45710b641c01970a1cc9eb2eae244899091106b (diff)
parent3f5bcb4a798862e0a5aa604e5dce162bb0e291b3 (diff)
downloadWarpX-58e64aafe0103b6644048d7480a3e62fe01bd5cb.tar.gz
WarpX-58e64aafe0103b6644048d7480a3e62fe01bd5cb.tar.zst
WarpX-58e64aafe0103b6644048d7480a3e62fe01bd5cb.zip
Merge branch 'dev' into elementary_process
Diffstat (limited to 'Source/Filter/NCIGodfreyFilter.cpp')
-rw-r--r--Source/Filter/NCIGodfreyFilter.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/Filter/NCIGodfreyFilter.cpp b/Source/Filter/NCIGodfreyFilter.cpp
index 8723322f6..1a400cb32 100644
--- a/Source/Filter/NCIGodfreyFilter.cpp
+++ b/Source/Filter/NCIGodfreyFilter.cpp
@@ -1,3 +1,9 @@
+/* Copyright 2019-2020 Luca Fedeli, Maxence Thevenet
+ *
+ * This file is part of WarpX.
+ *
+ * License: BSD-3-Clause-LBNL
+ */
#include <WarpX.H>
#include <NCIGodfreyFilter.H>
#include <NCIGodfreyTables.H>
@@ -35,7 +41,7 @@ void NCIGodfreyFilter::ComputeStencils(){
"ERROR: NCI filter requires 5 points in z");
// Interpolate coefficients from the table, and store into prestencil.
- int index = tab_length*m_cdtodz;
+ auto index = static_cast<int>(tab_length*m_cdtodz);
index = min(index, tab_length-2);
index = max(index, 0);
Real weight_right = m_cdtodz - index/tab_length;