diff options
author | 2023-06-15 10:31:17 -0700 | |
---|---|---|
committer | 2023-06-15 10:31:17 -0700 | |
commit | d9ac64ff9b0e1ac364dc5117bab6eabf178936d2 (patch) | |
tree | 51ed91d176b0d6d1f50bc6bb2d4e0f09aaddb95b /Python/pywarpx/picmi.py | |
parent | e512bb2b169f938ec005da285a7fbd76ef2532d1 (diff) | |
download | WarpX-d9ac64ff9b0e1ac364dc5117bab6eabf178936d2.tar.gz WarpX-d9ac64ff9b0e1ac364dc5117bab6eabf178936d2.tar.zst WarpX-d9ac64ff9b0e1ac364dc5117bab6eabf178936d2.zip |
Added external field loading from file to picmi.py (#3945)
* Added external field loading from file to picmi.py
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Update Python/pywarpx/picmi.py
Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com>
* Added documentation
* Removed init, documentation
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Updated picmi version in requirements.txt
* Updated picmi version in setup.py
* Updated picmi version in requirements.txt
* Updated name of call to picmi class
* Adapted CI test for PICMI field loading from file
* Added PICMI input script
* Added .json file with new file name
* fixed small errors
* Fixed error in input script
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Removed old comments from code
* fixed import, spacing in input script
* fixed spacing
* cleaned up input script
* fixed typo
* removed blocking factor
* fixed name of test
* correct ion species name
* Added initial field to sim object
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Roelof Groenewald <40245517+roelof-groenewald@users.noreply.github.com>
Diffstat (limited to 'Python/pywarpx/picmi.py')
-rw-r--r-- | Python/pywarpx/picmi.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Python/pywarpx/picmi.py b/Python/pywarpx/picmi.py index 621757132..0f0426ca6 100644 --- a/Python/pywarpx/picmi.py +++ b/Python/pywarpx/picmi.py @@ -1175,6 +1175,15 @@ class LaserAntenna(picmistandard.PICMI_LaserAntenna): ) / constants.c +class LoadInitialField(picmistandard.PICMI_LoadGriddedField): + def initialize_inputs(self): + pywarpx.warpx.read_fields_from_path = self.read_fields_from_path + if self.load_E: + pywarpx.warpx.E_ext_grid_init_style = 'read_from_file' + if self.load_B: + pywarpx.warpx.B_ext_grid_init_style = 'read_from_file' + + class AnalyticInitialField(picmistandard.PICMI_AnalyticAppliedField): def init(self, kw): self.mangle_dict = None |