Skip to content

Commit

Permalink
Merge branch 'release' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
Sherwood Richers committed Apr 2, 2023
2 parents 85ff792 + d25f5bb commit ae7719c
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ Scripts/symbolic_hermitians/__pycache__
.settings
.vscode
Source/generated_files
*~
*~
4 changes: 4 additions & 0 deletions .gitpod.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM gitpod/workspace-full

RUN sudo apt-get update && sudo apt-get install -y gfortran libopenmpi3 libopenmpi-dev && sudo rm -rf /var/lib/apt/lists/*

98 changes: 98 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
image:
file: .gitpod.dockerfile

tasks:
- init: |-
sudo apt -y install gfortran libopenmpi3 libopenmpi-dev
mkdir /workspace/python
python -m venv /workspace/python/emu --system-site-packages
source /workspace/python/emu/bin/activate
pip install sympy numpy matplotlib
pushd Scripts/visualization
python setup.py install
popd
cd Exec
make generate NUM_FLAVORS=2
make -j NUM_FLAVORS=2
mkdir 2-Flavors
mv *.ex 2-Flavors/.
pushd 2-Flavors
mkdir bipolar
pushd bipolar
cp ../*.ex .
cp ../../../sample_inputs/inputs_bipolar_test .
cp ../../../Scripts/visualization/plot_first_particle.py .
popd
mkdir msw
pushd msw
cp ../*.ex .
cp ../../../sample_inputs/inputs_msw_test .
cp ../../../Scripts/visualization/plot_first_particle.py .
popd
mkdir FFI_zero_wavenumber
pushd FFI_zero_wavenumber
cp ../*.ex .
cp ../../../sample_inputs/inputs_fast_flavor .
popd
mkdir FFI
pushd FFI
cp ../*.ex .
cp ../../../sample_inputs/inputs_fast_flavor_nonzerok .
popd
popd
make realclean
make generate NUM_FLAVORS=3
make -j NUM_FLAVORS=3
mkdir 3-Flavors
mv *.ex 3-Flavors/.
pushd 3-Flavors
mkdir FFI
pushd FFI
cp ../*.ex .
cp ../../../sample_inputs/inputs_1d_fiducial .
popd
popd
make realclean
mkdir Examples
mv 2-Flavors Examples/.
mv 3-Flavors Examples/.
mv Examples ../.
clear
- command: |-
source /workspace/python/emu/bin/activate
clear
github:
prebuilds:
# enable for the master/default branch (defaults to true)
master: true
# enable for all branches in this repo (defaults to false)
branches: false
# enable for pull requests coming from this repo (defaults to true)
pullRequests: false
# enable for pull requests coming from forks (defaults to false)
pullRequestsFromForks: false
# add a check to pull requests (defaults to true)
addCheck: true
# add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
addComment: true
# add a "Review in Gitpod" button to the pull request's description (defaults to false)
addBadge: true
# add a label once the prebuild is ready to pull requests (defaults to false)
addLabel: false

23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[![DOI](https://zenodo.org/badge/228717670.svg)](https://zenodo.org/badge/latestdoi/228717670)
[![AMReX](https://amrex-codes.github.io/badges/powered%20by-AMReX-red.svg)](https://amrex-codes.github.io)

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/AMReX-Astro/Emu)

![Emu](https://github.com/AMReX-Astro/Emu/blob/development/Docs/Emu_logo_transparent.png)

# Emu
Expand All @@ -23,9 +25,26 @@ Emu is implemented in C++ and is based on the AMReX library for
high-performance, block-structured adaptive mesh refinement. Emu is
parallelized with MPI + OpenMP for CPUs and MPI + CUDA for GPUs.

# Getting Started
# Try Emu in Your Browser!

To quickly try Emu out using your browser, you can
[open an interactive Emu workspace in Gitpod!](https://gitpod.io/#https://github.com/AMReX-Astro/Emu)

Emu's prebuilt Gitpod workspace tracks the current release branch, and you can find pre-compiled examples in the `Examples` directory.

For example, to run and visualize the MSW setup:

```
cd Examples/2-Flavors/msw
./main3d.gnu.TPROF.MPI.ex inputs_msw_test
python plot_first_particle.py
```

And then open the plot through the file browser on the left of the screen.

# Getting Started From Scratch

If you would like to run Emu, first clone Emu with the AMReX submodule:
If you would like to run Emu on your own machine, first clone Emu with the AMReX submodule:

```
git clone --recurse-submodules https://github.com/AMReX-Astro/Emu.git
Expand Down
10 changes: 10 additions & 0 deletions Scripts/visualization/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from setuptools import setup

setup(
name='AMReX particle plot tools',
version='1.0',
py_modules=['amrex_plot_tools'],
install_requires=[],
entry_points='''''',
)

0 comments on commit ae7719c

Please sign in to comment.