aboutsummaryrefslogtreecommitdiff
path: root/Examples/Tests/PythonWrappers/PICMI_inputs_2d.py (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-12-02Clean up examples folders (#3545)Gravatar Edoardo Zoni 1-295/+0
* Clean up examples folders * Use `snake_case` names * Rename `nci_corrector` as `nci_fdtd_stability`
2022-08-11`isort`: AMReX, WarpX, etc. as First Party (#3307)Gravatar Axel Huebl 1-0/+1
* `isort`: AMReX, WarpX, etc. as First Party Mark the `amrex` and `pywarpx`, `picmistandard`, ... imports as first party, so that they do not change if run locally or remotely pre/post install.
2022-06-07Merge `FillBoundary` and `NodalSync` (`OneStep_nosub`, `OneStep_sub1`) (#3013)Gravatar Remi Lehe 1-1/+1
* Add argument for synchronizing nodal points * Add the option to overridesync in FillBoundaryE / FillBoundaryB * Remove explicit synchronization * Cleanup calls to nodal synchronization * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Improve const Correctness * Cleaning * Merge NodalSync and FillBoundary First Restarting the implementation from scratch. To-do: remove redundant FillBoundary calls. * Merge Only for OneStep_nosub and OneStep_sub1 * Fix Checksums of Python_wrappers * Define sync_nodal_points as WarpX Private Member Variable * Keep Calls to NodalSync for B * Keep Calls to NodalSync for F * Reset Benchmark of reduced_diags_single_precision * OneStep_sub1: Remove All Calls to NodalSync * OneStep_nosub: Remove All Calls to NodalSync * Reset Benchmark of divb_cleaning_3d Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
2022-01-11More efficient PML BoxArray (#2631)Gravatar Weiqun Zhang 1-8/+8
* More efficient PML BoxArray If the union of the grids is a single rectangular domain, we can simplify the process and generate more efficient PML BoxArray. * Update Source/BoundaryConditions/PML.cpp Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> * Apply suggestions from code review * reset Python_wrappers benchmark * fix the computation of sigmas for the new BoxArray * Revert "reset Python_wrappers benchmark" This reverts commit 2999304571d525076ba6c1f7cbbcef6e9acafabb. * fix warning * fix 1d * initialize to quiet NaN * Reset Benchmark: pml_x_psatd - maximum relative error: 2.50e-06 - new implementation: 10 PML grids - old implementation: 24 PML grids * Reset Benchmark: LaserAccelerationMR - maximum relative error: 2.73e-04 - new implementation: (18,8,8) PML grids - old implementation: (48,18,18) PML grids * Reset Benchmark: LaserOnFine - maximum relative error: 6.44e-05 - new implementation: (2,6,6) PML grids - old implementation: (2,12,12) PML grids * Reset Benchmark: PlasmaAccelerationMR - maximum relative error: 6.84e-04 - new implementation: (10,6,6) PML grids - old implementation: (24,12,12) PML grids * Reset Benchmark: RefinedInjection - maximum relative error: 2.55e-04 - new implementation: (18,8,8) PML grids - old implementation: (48,18,18) PML grids * Reset Benchmark: momentum-conserving-gather - maximum relative error: 7.43e-04 - new implementation: (10,6,6) PML grids - old implementation: (24,12,12) PML grids * Reset Benchmark: subcyclingMR - maximum relative error: 2.41e-05 - new implementation: (6,6,6) PML grids - old implementation: (12,12,12) PML grids * Reset Benchmark: Langmuir_multi_2d_MR - maximum relative error: 1.32e-01 (B numerical artifact) - new implementation: (0,20,20) PML grids - old implementation: (0,52,40) PML grids * Reset Benchmark: Langmuir_multi_2d_MR_psatd - maximum relative error: 1.05e-01 (B numerical artifact) - new implementation: (0,20,20) PML grids - old implementation: (0,52,40) PML grids * Reset Benchmark: Python_LaserAccelerationMR - maximum relative error: 2.73e-04 - new implementation: (18,8,8) PML grids - old implementation: (48,18,18) PML grids * Reset Benchmark: Python_wrappers - maximum relative error: 1.07e-08 - new implementation: 8 PML grids - old implementation: 16 PML grids * Reset Benchmark: pml_psatd_dive_divb_cleaning - maximum relative error: 4.91e-03 - new implementation: 24 PML grids - old implementation: 98 PML grids * Remove an assertion. We will fix it later * Reset Benchmark: Langmuir_multi_2d_MR_anisotropic - maximum relative error: 1.07e-01 (B numerical artifact) - new implementation: (0,16,16) PML grids - old implementation: (0,40,34) PML grids * Reset Benchmark: PEC_field_mr - maximum relative error: 3.98e-02 - new implementation: (0,2,2) PML grids - old implementation: (0,2,2) PML grids (different number of ghost cells on coarse PML patch) Co-authored-by: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Co-authored-by: Edoardo Zoni <ezoni@lbl.gov>
2021-12-21Add runtime option to use DM that is 'similar' to the mother grids in the ↵Gravatar Andrew Myers 1-1/+1
PML. (#2665) * add runtime option to use DM that is 'similar' to the mother grids in the PML. * update amrex * toggle similar dm * add runtime option to use DM that is 'similar' to the mother grids in the PML. * toggle similar dm * bump tolerance * document option * Change default PML behavior for psatd_dive_test Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2021-12-21pre-commit: Python imports (#2686)Gravatar Axel Huebl 1-1/+2
* pre-commit: Python imports Add two new Python rules to: - remove unused imports - sort imports according to PEP8 * pre-commit: Python imports Add two new Python rules to: - remove unused imports - sort imports according to PEP8 `.editorconfig`: isort options https://github.com/PyCQA/isort/wiki/isort-Settings * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * move import os (mpl) * move import yt (mpl) * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Cleanup around matplotlib.use * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Cleaning: double np and lib Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2021-12-15Examples: Python ShellBang & Executable (#2673)Gravatar Axel Huebl 1-0/+2
* Examples: Python ShellBang & Executable Make sure that all PICMI scripts and all analysis Python scripts in `Examples/` are: - executable (`chmod a+x`) - start with a shell-bang to `python3` Now, all scripts can be run directly without a `python3 ...` prefix and also default to the only right executable of Python on older systems. (New systems always have a `python3` alias, too.) * Revert a moved numpy
2021-12-07Add CI Test for Python Wrappers w/ PML (#2576)Gravatar Edoardo Zoni 1-0/+291
* Add CI Test for Python Wrappers w/ PML * Remove Unused Import * Clean up, Add Link in Docs * Remove get_data(), Avoid global * Move Extent and Slicing to plot_data * Fix Bug * Set Input Before Importing pywarpx.fields * Call initialize_inputs() and initialize_warpx(), not step(1) * Cleaning * Remove Slicing, Add F,G, Add Annotations * Better Smoothing of Initial Fields * Add Values Check, Cleaning * Improve Comment * Fix lgtm-com Alerts * Improve Comment * Cleaning * Cleaning