diff options
author | 2022-05-03 14:12:31 -0700 | |
---|---|---|
committer | 2022-05-03 14:12:31 -0700 | |
commit | 5cddb8cc12d73d57689dd7c2e2d1b1425df0122f (patch) | |
tree | 42c9240a08992697fe3e4f3eb743dea7a1df9a71 /Source/WarpX.cpp | |
parent | a7cf8a4959df0e5cd5c5a97fce0bcafbeeee5655 (diff) | |
download | WarpX-5cddb8cc12d73d57689dd7c2e2d1b1425df0122f.tar.gz WarpX-5cddb8cc12d73d57689dd7c2e2d1b1425df0122f.tar.zst WarpX-5cddb8cc12d73d57689dd7c2e2d1b1425df0122f.zip |
Add velocity in pml as an input in function alpha (#3070)
* add velocity in pml as an input in function alpha
* some changes on the variables
* some changes on the variables
* some changes on the variables
* some changes on the variables, resquested changes, message error for v_particle_pml
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Diffstat (limited to 'Source/WarpX.cpp')
-rw-r--r-- | Source/WarpX.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/WarpX.cpp b/Source/WarpX.cpp index 31b3bd0a9..9da534ecb 100644 --- a/Source/WarpX.cpp +++ b/Source/WarpX.cpp @@ -853,6 +853,13 @@ WarpX::ReadParameters () pp_warpx.query("do_pml_j_damping", do_pml_j_damping); pp_warpx.query("do_pml_in_domain", do_pml_in_domain); pp_warpx.query("do_similar_dm_pml", do_similar_dm_pml); + // Read `v_particle_pml` in units of the speed of light + v_particle_pml = 1._rt; + pp_warpx.query("v_particle_pml", v_particle_pml); + WARPX_ALWAYS_ASSERT_WITH_MESSAGE(0._rt < v_particle_pml && v_particle_pml <= 1._rt, + "Input value for the velocity warpx.v_particle_pml of the macroparticle must be in (0,1] (in units of c)."); + // Scale by the speed of light + v_particle_pml = v_particle_pml * PhysConst::c; // Default values of WarpX::do_pml_dive_cleaning and WarpX::do_pml_divb_cleaning: // false for FDTD solver, true for PSATD solver. |