diff options
author | 2021-10-27 22:50:42 -0700 | |
---|---|---|
committer | 2021-10-27 22:50:42 -0700 | |
commit | d2340a2f2b52aef91230383cf210d8280e41f12c (patch) | |
tree | 12a7960b782a9913d2b6b44fe1718cbb5b296a13 /Source/Initialization/GetVelocity.cpp | |
parent | 2ed3f418ce358e4b7331f2239139a4157ae9382c (diff) | |
download | WarpX-d2340a2f2b52aef91230383cf210d8280e41f12c.tar.gz WarpX-d2340a2f2b52aef91230383cf210d8280e41f12c.tar.zst WarpX-d2340a2f2b52aef91230383cf210d8280e41f12c.zip |
Spatially vary velocity (#2491)
* initial add of GetVelocity and VelocityProperties
* bug fixes and first test implementation
* add documentation to parameters.rst
* Add error if |beta|>=1
* Check for |beta|>=1 in Juttner as well
* update comment on initial_distribution python script
* Doxygenization and floats in python
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
* Address comments in review
- Add units to analysis_distribution.py constants
- Move a comment on VelocityProperties constructor from implementation to header file
Co-authored-by: Hannah Klion <hannah.klion@gmail.com>
Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
Diffstat (limited to 'Source/Initialization/GetVelocity.cpp')
-rw-r--r-- | Source/Initialization/GetVelocity.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/Initialization/GetVelocity.cpp b/Source/Initialization/GetVelocity.cpp new file mode 100644 index 000000000..2d2a342a7 --- /dev/null +++ b/Source/Initialization/GetVelocity.cpp @@ -0,0 +1,20 @@ +/* Copyright 2021 Hannah Klion + * + * This file is part of WarpX. + * + * License: BSD-3-Clause-LBNL + */ + +#include "GetVelocity.H" + +GetVelocity::GetVelocity (VelocityProperties const& vel) noexcept { + m_type = vel.m_type; + m_dir = vel.m_dir; + m_sign_dir = vel.m_sign_dir; + if (m_type == VelConstantValue) { + m_velocity = vel.m_velocity; + } + else if (m_type == VelParserFunction) { + m_velocity_parser = vel.m_ptr_velocity_parser->compile<3>(); + } +} |