aboutsummaryrefslogtreecommitdiff
path: root/Python/pywarpx/fields.py (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-12-22Feature magnetostatic solver (#3551)Gravatar S. Eric Clark 1-0/+21
* Initial working Magnetostatic solver integration into warpx. Includes hooks in Python library, and a test problem. Build files updates. New solver algorithm and inputs. * Fixed indexing to allow Magnetostatic solver to work in RZ and 3D. * Removing trailing whitespace. * Adding basic regression testing with benchmarks. * Updated Regression test ini * Augmented test scripts to compare to analytical results for uniform beam. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Updating CI tests for magnetostatic solver. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Updated magnetostatic CI tests to pass locally in regression testing framework. * Adjusting tolerance on magnetostatic_rz regression test to allow for noise in near zero fields. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Converted particle layout to Gridded instead of PsedupRandom to improve reproducibility of particle deposition for regression testing. * Dropped benchmark field comparisons with fields near zero. Dropped particle benchmark for magnetostatic_eb_rz regression test due to randomized particle theta adding noise to fields after a timestep. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Found and fixed a bug in syncronization of MultiFabs when interpolating between grids in the magnetostatic solver. Added Python output for nodal current and vector potential. Updated the CI tests to disable dynamic scheduling and enbale serialization of initial conditions. Updated benchmarks fro tests. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.cpp Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.cpp Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Adding random_theta flag to PICMI interface and updating RZ CI test and benchmark with change to disable randomized theta. * Added documentation to parameters.rst for relativistic-magnetostatic flag. Documentation corrections. Removal of commented source. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Removing need to use do_current_centering. Updated current density inverse scaling support for nodal Jr in radius. Added flag to check for m_rz_random_theta when laying down particles in RZ. * Remove dA/dt term to decouple electrostatic and magnetostatic solvers. * Remove update of auxiliary fields * Adding non-Python test case for magnetostatic solver. Updating benchmarks. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.cpp Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Python/pywarpx/_libwarpx.py Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Python/pywarpx/_libwarpx.py Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Python/pywarpx/_libwarpx.py Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Python/pywarpx/_libwarpx.py Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Source/Diagnostics/Diagnostics.cpp Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Source/Evolve/WarpXEvolve.cpp Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Update Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.H Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Refactor names of functions for magnetostatic solver implementation. Remove current_fp_nodal python interface. Drop extraneous ghost cell exchanges. * Adding radial weighting at r=0 for Jr if nodal. * Splitting off Amrex bucket and adjustments to RZ radial weighting into different branches to be merged. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update Source/FieldSolver/MagnetostaticSolver/MagnetostaticSolver.cpp Co-authored-by: Remi Lehe <remi.lehe@normalesup.org> * Switch name to labfame-electromagnetostatic * Update example scripts Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Remi Lehe <remi.lehe@normalesup.org>
2021-12-22Change _libwarpx.py functions to LibWarpX class methods (#2696)Gravatar Peter Scherpelz 1-194/+194
* Initial attempt at moving function into LibWarpX * Bugfix - undefined structs in get_particle_theta This is untested, identified by IDE/visual inspection only * Unify newlines * Delete libwarpx.clight (duplicated picmi.py) See picmi.constants.c * Change function descriptive comment to docstring Also remove extra newline in __init__ beginning. * Replace pywarpx/_libwarpx calls appropriately * Fix atexit register of finalize function * Reorder WarpX.py imports for pre-commit * Use picmi.Simulation.extension = libwarpx alias This will hopefully preempt user script changes if we restructure things to allow multiple WarpX runs to be done within a single Python script. * Fix libwarpx ref in WarpX.getProbLo/getProbHi * Update get_particle_boundary_buffer doc reference
2021-12-21pre-commit: Python imports (#2686)Gravatar Axel Huebl 1-0/+1
* 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-16Wrap shared object in a class to control its loading (#2637)Gravatar David Grote 1-5/+5
* Wrap shared object in a class to control its loading * Fix libwarpx attribute references * Updated callbacks.py for updated libwarpx * Removed the wx module plus other clean up * Further revision of how to use the pywarpx module. Now, _libwarpx should not be imported by external scripts except in special circumstances. * Updated documentation * Clean up end of line whitespace * Added more wrapping routines plus some clean up * Fixed use of pywarpx in two examples * Fix for getistep * Fixed for the EB Python interface * Silence a warning for our wrapper Co-authored-by: Axel Huebl <axel.huebl@plasma.ninja>
2021-12-13Adding EB multifabs to the Python interface (#2647)Gravatar Lorenzo Giacomel 1-0/+42
* Adding edge_lengths and face_areas to the Python interface * Added wrappers for the two new arrays of data * Adding a CI test * Fixed test name * Added customRunCmd * Added mpi in test
2021-12-08Added 1D support to fields.py (#2634)Gravatar Roelof Groenewald 1-264/+183
* added _getitem1d and _setitem1d to fields.py * refactored fields.py to reduce duplicate code for different dimensions * fixed some bugs with the refactor * changes requested during code review
2021-11-05Add Python Wrappers for F,G in PML (#2481)Gravatar Edoardo Zoni 1-0/+30
* Add Python Wrappers for F,G in PML * Add Getters for F,G Nodal Flags * Fix Bug in <F,G>FPPMLWrapper (Default Level) * Fix Bug in F,G Nodal Flags * Use GetPML Method for F,G Nodal Flags
2021-10-27More fixes for the Python fields module (#2502)Gravatar David Grote 1-60/+64
Fixed indexing for PML fields. Add all of the fixes to the setitems routines.
2021-10-25Fix Bug with Python Wrappers for F,G (#2474)Gravatar Edoardo Zoni 1-4/+4
2021-10-22Fix fields indexing (#2469)Gravatar David Grote 1-30/+31
* Fix fields indexing * Added additional documentation * Fixed comment
2021-10-21Add Python Wrappers for F,G (#2460)Gravatar Edoardo Zoni 1-0/+30
2021-09-22External Poisson solver: wrappers to copy the full domain rho and phi ↵Gravatar Roelof Groenewald 1-6/+14
between C++ and Python (#2285) * added missing parts to allow an external Poisson solver to be used instead of the MLMG solver * added rho and phi wrappers to fields.py * added an example of using an external Poisson solver * need to run PICMI test on 2 processors same as non-PICMI version in order to compare plotfiles * changes requested during PR review * pass dictionary to eval statement when calculating boundary potential
2021-07-15Typo fix in fields.py (#2095)Gravatar nruof 1-1/+1
2020-12-02Fix python wrapper (#1532)Gravatar David Grote 1-48/+49
* Fixes to the Python interface for accessing field and particle data * In Python wrapper, cleaned up how ngrow is handled
2020-03-23Updated Python interface for Python_Langmuir_rz_multimode test (#810)Gravatar David Grote 1-53/+143
* Added nodal and cell size data to the Python interface and updates the Python_Langmuir_rz_multimode regression test * Cleanup of PICMI_inputs_langmuir_rz_multimode_analyze.py
2020-03-16Added Python wrapper of charge density arrays (#783)Gravatar David Grote 1-3/+22
2020-01-27Automatically add copyright header with update_copyright.shGravatar Tools 1-0/+6
2019-12-12Added Python wrapper for the PML fieldsGravatar Dave Grote 1-0/+116
2019-12-12In Python fields wrapper, allowed multiple compoments in 3DGravatar Dave Grote 1-3/+32
2019-10-01Additional fix for single precision in Python interfaceGravatar Dave Grote 1-2/+2
2019-09-06Updated Python fields interface to work with refinementGravatar Dave Grote 1-3/+120
2019-09-04Implemented the parallel version of the Python MultiFab wrapperGravatar Dave Grote 1-2/+38
2019-06-14Updated Python interface, adding WarpInterfaceGravatar Dave Grote 1-74/+266
2017-09-20Added wrappers for multifab fields, e.g. ExWrapperGravatar Dave Grote 1-0/+250