Skip to content

Commit 4d63b86

Browse files
authored
Merge pull request #386 from Warwick-Plasma/4.18-devel
Updating to EPOCH 4.18
2 parents 3088d84 + e85c3f1 commit 4d63b86

File tree

408 files changed

+10324
-9535
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

408 files changed

+10324
-9535
lines changed

.github/workflows/auto_pr.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: auto-pr
2+
3+
on:
4+
push:
5+
branches:
6+
- 4.*-devel
7+
8+
jobs:
9+
pull-request:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Set branch variables
18+
run: BASE_REF=$(echo $GITHUB_REF | cut -f3- -d\/);
19+
major=$(echo $BASE_REF | cut -f1 -d\.);
20+
minor=$(echo $BASE_REF | cut -f2 -d\. | cut -f1 -d\-);
21+
DEST_BRANCH=$major.$((minor+1))-devel;
22+
git branch -a | grep "origin/$DEST_BRANCH" || {
23+
DEST_BRANCH=$((major+1)).0-devel;
24+
git branch -a | grep "origin/$DEST_BRANCH" || exit 1;
25+
};
26+
echo "BASE_REF=$BASE_REF" >> $GITHUB_ENV;
27+
echo "DEST_BRANCH=$DEST_BRANCH" >> $GITHUB_ENV;
28+
29+
- name: Create Pull Request
30+
id: open-pr
31+
uses: repo-sync/pull-request@v2
32+
with:
33+
destination_branch: ${{ env.DEST_BRANCH }}
34+
github_token: ${{ secrets.GITHUB_TOKEN }}
35+
pr_title: "Pull $BASE_REF into $DEST_BRANCH"
36+
pr_label: "auto-pr"
37+
38+
- name: Auto approve
39+
uses: hmarr/auto-approve-action@v2
40+
with:
41+
github-token: ${{ secrets.GH_APPROVE }}
42+
pull-request-number: ${{ steps.open-pr.outputs.pr_number }}

.github/workflows/automerge.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: automerge
2+
3+
# Controls when the action will run.
4+
on:
5+
pull_request_review:
6+
branches:
7+
- main
8+
- '*-devel'
9+
10+
jobs:
11+
automerge:
12+
if: contains(github.event.pull_request.labels.*.name, 'auto-pr')
13+
runs-on: ubuntu-20.04
14+
steps:
15+
- name: Auto merge
16+
uses: alexwilson/enable-github-automerge-action@1.0.0
17+
with:
18+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/build_test.yml

Lines changed: 38 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,22 @@ name: CI
22

33
# Controls when the action will run.
44
on:
5-
push:
6-
branches: [ main, '*-devel' ]
75
pull_request:
8-
branches: [ main, '*-devel' ]
6+
branches:
7+
- main
8+
- '*-devel'
9+
pull_request_review:
10+
branches:
11+
- main
12+
- '*-devel'
913

1014
# Allows you to run this workflow manually from the Actions tab
1115
workflow_dispatch:
1216

1317
jobs:
1418
build_and_test:
19+
if: github.event_name != 'pull_request_review' ||
20+
contains(github.event.pull_request.labels.*.name, 'auto-pr')
1521
# The type of runner that the job will run on
1622
runs-on: ubuntu-20.04
1723
strategy:
@@ -37,36 +43,38 @@ jobs:
3743
MPIPROCS: 2
3844
MODE: ${{ matrix.mode }}
3945
DEFINE: ${{ matrix.define }}
46+
GH_BASE: ${{ github.event.pull_request.base.ref }}
47+
GH_HEAD: ${{ github.event.pull_request.head.ref }}
48+
GH_SHA: ${{ github.event.pull_request.head.sha }}
4049

4150
steps:
42-
- name: Install dependencies
43-
run: sudo apt update &&
44-
sudo apt install -y
45-
python3-dev
46-
python3-numpy
47-
python3-nose
48-
python3-matplotlib
49-
libpython3-dev
50-
mpich
51+
- name: Install dependencies
52+
run: sudo apt update &&
53+
sudo apt install -y
54+
python3-dev
55+
python3-numpy
56+
python3-nose
57+
python3-matplotlib
58+
libpython3-dev
59+
mpich
5160

52-
- name: Checkout code
53-
uses: actions/checkout@v2
54-
with:
55-
submodules: recursive
56-
fetch-depth: 0
61+
- name: Checkout code
62+
uses: actions/checkout@v2
63+
with:
64+
submodules: recursive
65+
fetch-depth: 0
5766

58-
- name: Merge branch
59-
if: github.event_name == 'pull_request'
60-
run: git config user.email "test@example.com" &&
61-
git config user.name "test" &&
62-
git checkout -b $GITHUB_HEAD_REF $GITHUB_SHA &&
63-
git checkout -b $GITHUB_BASE_REF origin/$GITHUB_BASE_REF &&
64-
git merge --no-ff $GITHUB_HEAD_REF
67+
- name: Merge branch
68+
run: git config user.email "test@example.com" &&
69+
git config user.name "test" &&
70+
git checkout -b $GH_HEAD $GH_SHA &&
71+
git checkout -b $GH_BASE origin/$GH_BASE &&
72+
git merge --no-ff $GH_HEAD
6573

66-
- name: Cleanup
67-
run: cd epoch1d && make cleanall &&
68-
cd ../epoch2d && make cleanall &&
69-
cd ../epoch3d && make cleanall
74+
- name: Cleanup
75+
run: cd epoch1d && make cleanall &&
76+
cd ../epoch2d && make cleanall &&
77+
cd ../epoch3d && make cleanall
7078

71-
- name: Compile and run tests
72-
run: ./scripts/run-tests-epoch-all.sh ${{ matrix.flag }}
79+
- name: Compile and run tests
80+
run: ./scripts/run-tests-epoch-all.sh ${{ matrix.flag }}

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,23 @@
1+
## v4.17.0 to v4.18.0
2+
3+
* PIC loop re-organised to ensure output files are dumped at the correct
4+
time-step.
5+
6+
* Fixed over-flow bug in dist_fn.
7+
8+
* Input deck can now store logical constants (value T or F).
9+
10+
* Added new n_coll_steps parameter to collisions block. This sub-cycles the
11+
collisions, running them once every n steps. Collisions are run assuming a
12+
time-step of n*dt, to retain the same physical behaviour.
13+
14+
* Added use_bremsstrahlung_scatter parameter to bremsstrahlung block. This
15+
samples photon emission angle from the bremsstrahlung angular distribution.
16+
The model comes from the Geant4 Physics Reference Manual, which parametrises
17+
Tsai 1974, DOI: https://doi.org/10.1103/RevModPhys.46.815
18+
19+
* Fixed bug in non-relativistic bremsstrahlung cross-sections.
20+
121
## v4.16.0 to v4.17.0
222

323
* Added volume correction sampling Zenitani 2015 DOI 10.1063/1.4919383

epoch1d/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ balance.o: balance.F90 boundary.o constants.o mpi_subtype_control.o \
446446
redblack_module.o timer.o utilities.o
447447
boundary.o: boundary.F90 injectors.o laser.o mpi_subtype_control.o \
448448
particle_id_hash.o particle_temperature.o partlist.o utilities.o
449-
bremsstrahlung.o: bremsstrahlung.F90 calc_df.o partlist.o setup.o
449+
bremsstrahlung.o: bremsstrahlung.F90 calc_df.o particles.o partlist.o setup.o
450450
calc_df.o: calc_df.F90 boundary.o
451451
collisions.o: collisions.F90 calc_df.o prefetch.o
452452
constants.o: constants.F90 $(SDFMOD)
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
begin:constant
2+
3+
dl = 7.4e-10
4+
5+
end:constant
6+
7+
begin:control
8+
9+
x_min = 0.0
10+
x_max = 100*dl
11+
nx = 5
12+
t_end = 20e-12
13+
stdout_frequency = 1000
14+
print_eta_string = T
15+
smooth_currents = T
16+
17+
end:control
18+
19+
begin:boundaries
20+
21+
bc_x_max = periodic
22+
bc_x_min = periodic
23+
24+
end:boundaries
25+
26+
begin:species
27+
28+
name = protons
29+
charge = 1
30+
mass = 1836
31+
temp_ev = 50
32+
npart_per_cell = 5000
33+
density = 1e22/cc
34+
35+
end:species
36+
37+
begin:species
38+
39+
name = electrons
40+
charge = -1
41+
mass = 1
42+
temp_ev = 100
43+
npart_per_cell = 5000
44+
density = 1e22/cc
45+
46+
end:species
47+
48+
begin:collisions
49+
50+
use_collisions = T
51+
coulomb_log = 5
52+
collide = all
53+
use_nanbu = T
54+
55+
end:collisions
56+
57+
begin:output
58+
59+
nstep_snapshot = 1000
60+
grid = always
61+
temperature = always + species
62+
number_density = always + species
63+
ekbar = always + species
64+
65+
end:output
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
begin:constant
2+
3+
dl = 7.4e-10
4+
5+
end:constant
6+
7+
begin:control
8+
9+
x_min = 0.0
10+
x_max = 100*dl
11+
nx = 10
12+
t_end = 5e-14
13+
stdout_frequency = 1000
14+
print_eta_string = T
15+
smooth_currents = T
16+
17+
end:control
18+
19+
begin:boundaries
20+
bc_x_max = periodic
21+
bc_x_min = periodic
22+
end:boundaries
23+
24+
begin:species
25+
26+
name = electrons
27+
charge = -1
28+
mass = 1
29+
temp_x_ev = 150
30+
temp_y_ev = 50
31+
temp_z_ev = 50
32+
npart_per_cell = 5000
33+
density = 1e22/cc
34+
35+
end:species
36+
37+
begin:collisions
38+
39+
use_collisions = T
40+
coulomb_log = 5
41+
collide = all
42+
use_nanbu = T
43+
44+
end:collisions
45+
46+
begin:output
47+
48+
nstep_snapshot = 10
49+
grid = always
50+
temperature = always + species
51+
number_density = always + species
52+
ekbar = always + species
53+
temperature_x = always + species
54+
temperature_y = always + species
55+
temperature_z = always + species
56+
57+
end:output

0 commit comments

Comments
 (0)