.. _usage_examples: Examples ======== .. _usage_run: When to Use pyAMReX? -------------------- pyAMReX is usually used for these kinds of workflows: 1. To enhance an existing AMReX application with Python, Data-Science and AI/ML capabilities, 2. To write a standalone application or test on AMReX, rapidly prototyped in Python. Enhance an Application ---------------------- pyAMReX is used in large, production-quality high-performance applications. See the following examples: ImpactX """"""" `ImpactX `__ is an s-based beam dynamics code including space charge effects. * `Python examples `__ * `Python implementation `__ * Highlight example: `Fully GPU-accelerated PyTorch+ImpactX simulation `__ WarpX """"" `WarpX `__ is an advanced, time-based electromagnetic & electrostatic Particle-In-Cell code. * `Python (PICMI) examples `__ * `Python implementation `__ * Detailed workflow: `Extend a WarpX Simulation with Python `__ Standalone ---------- Please see the `AMReX Tutorials `__ for Python-written, GPU-accelerated AMReX examples: * `MultiFab example `__ * `Heat Equation example `__ Unit Tests ---------- We ensure the correctness of pyAMReX with `unit tests `__. Our tests are small, plentiful and can be found in the source code, see: * `tests/ `__ The following sections on :ref:`compute workflows ` go in detail through selected unit tests, too.