Latest Release Rather Than Working on the Develop Branch
Total Page:16
File Type:pdf, Size:1020Kb
WarpX Documentation Release 21.09 WarpX collaboration Sep 28, 2021 CONTENTS 1 Contact us 3 1.1 Code of Conduct.............................................3 1.2 Acknowledge WarpX...........................................4 2 Installation 7 2.1 Users...................................................7 2.2 Developers................................................9 2.3 HPC................................................... 18 3 Usage 47 3.1 Run WarpX................................................ 47 3.2 Input Parameters............................................. 48 3.3 Python (PICMI)............................................. 84 3.4 Examples................................................. 85 3.5 In-Depth: PWFA............................................. 87 3.6 Workflows................................................ 91 4 Data Analysis 103 4.1 Output formats.............................................. 103 4.2 yt-project................................................. 120 4.3 openPMD-viewer............................................. 126 4.4 openPMD-api.............................................. 127 4.5 3D Visualization: ParaView....................................... 127 4.6 3D Visualization: VisIt.......................................... 127 4.7 VisualPIC................................................. 129 4.8 PICViewer................................................ 129 4.9 Back-Transformed Diagnostics...................................... 131 4.10 Reduced diagnostics........................................... 132 5 Theory 135 5.1 Introduction............................................... 135 5.2 Particle-in-Cell Method......................................... 138 5.3 Filtering................................................. 146 5.4 Mesh refinement............................................. 148 5.5 Boundary conditions........................................... 153 5.6 Moving window and optimal Lorentz boosted frame.......................... 156 5.7 Inputs and Outputs............................................ 163 6 Development 167 6.1 Contribute to WarpX........................................... 167 6.2 Workflows................................................ 170 i 6.3 Implementation Details......................................... 176 6.4 C++ Objects & Functions........................................ 191 6.5 GNUmake Build System (Legacy).................................... 192 7 Maintenance 201 7.1 Dependencies & Releases........................................ 201 7.2 Automated performance tests...................................... 202 8 Epilogue 205 8.1 Glossary................................................. 205 8.2 Funding and Acknowledgements..................................... 207 Index 209 ii WarpX Documentation, Release 21.09 WarpX is an advanced electromagnetic Particle-In-Cell code. It supports many features including: • Perfectly-Matched Layers (PML) • Boosted-frame simulations • Mesh refinement For details on the algorithms that WarpX implements, see the theory section. WarpX is a highly-parallel and highly-optimized code, which can run on GPUs and multi-core CPUs, and includes load balancing capabilities. In addition, WarpX is also a multi-platform code and runs on Linux, macOS and Windows. CONTENTS 1 WarpX Documentation, Release 21.09 2 CONTENTS CHAPTER ONE CONTACT US If you are starting using WarpX, or if you have a user question, please pop in our Gitter chat room and get in touch with the community. The WarpX GitHub repo is the main communication platform. Have a look at the action icons on the top right of the web page: feel free to watch the repo if you want to receive updates, or to star the repo to support the project. For bug reports or to request new features, you can also open a new issue. We also have a discussion page on which you can find already answered questions, add new questions, get help with installation procedures, discuss ideas or share comments. 1.1 Code of Conduct 1.1.1 Our Pledge In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation. 1.1.2 Our Standards Examples of behavior that contributes to creating a positive environment include: • Using welcoming and inclusive language • Being respectful of differing viewpoints and experiences • Gracefully accepting constructive criticism • Focusing on what is best for the community • Showing empathy towards other community members Examples of unacceptable behavior by participants include: • The use of sexualized language or imagery and unwelcome sexual attention or advances • Trolling, insulting/derogatory comments, and personal or political attacks • Public or private harassment • Publishing others’ private information, such as a physical or electronic address, without explicit permission • Other conduct which could reasonably be considered inappropriate in a professional setting 3 WarpX Documentation, Release 21.09 1.1.3 Our Responsibilities Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appro- priate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 1.1.4 Scope This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online oroffline event. Representation of a project may be further defined and clarified by project maintainers. 1.1.5 Enforcement Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project’s leadership. 1.1.6 Attribution This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at https://www. contributor-covenant.org/version/1/4/code-of-conduct.html For answers to common questions about this code of conduct, see https://www.contributor-covenant.org/faq 1.2 Acknowledge WarpX Please acknowledge the role that WarpX played in your research. 1.2.1 In presentations For your presentations, you can find WarpX slides here. Several flavors are available: • full slide • half-slide (portrait or landscape format) • small inset. Feel free to use the one that fits into your presentation and adequately acknowledges the part that WarpX played inyour research. 4 Chapter 1. Contact us WarpX Documentation, Release 21.09 1.2.2 In publications Please add the following sentence to your publications, it helps contributors keep in touch with the community and promote the project. Plain text: This research used the open-source particle-in-cell code WarpX https://github.com/ECP-WarpX/WarpX, primarily funded by the US DOE Exascale Computing Project. We acknowledge all WarpX contributors. Latex: \usepackage{hyperref} This research used the open-source particle-in-cell code WarpX \url{https://github.com/ ,!ECP-WarpX/WarpX}, primarily funded by the US DOE Exascale Computing Project. We ,!acknowledge all WarpX contributors. 1.2.3 Main WarpX reference Vay JL, Huebl A, Almgren A, Amorim LD, Bell J, Fedeli L, Ge L, Gott K, Grote DP, Hogan M, Jambunathan R. Modeling of a chain of three plasma accelerator stages with the WarpX electromagnetic PIC code on GPUs. Physics of Plasmas. 2021 Feb 9;28(2):023105. https://doi.org/10.1063/5.0028512 1.2. Acknowledge WarpX 5 WarpX Documentation, Release 21.09 6 Chapter 1. Contact us CHAPTER TWO INSTALLATION 2.1 Users Our community is here to help. Please report installation problems in case you should get stuck. Choose one of the installation methods below to get started: 2.1.1 HPC Systems If want to use WarpX on a specific high-performance computing (HPC) systems, jump directly toour HPC system- specific documentation. 2.1.2 Using the Conda Package A package for WarpX is available via the Conda package manager. conda create -n warpx -c conda-forge warpx conda activate warpx Note: the warpx conda package does not yet provide GPU support. 2.1.3 Using the Spack Package Packages for WarpX are available via the Spack package manager. The package warpx installs executables and the package py-warpx includes Python bindings, i.e. PICMI. # optional: -mpi ^warpx dims=2 compute=cuda spack install py-warpx spack load -r py-warpx See