diff options
author | 2019-09-19 09:30:29 -0700 | |
---|---|---|
committer | 2019-09-19 09:30:29 -0700 | |
commit | 9743de59f2d76e09912ae702c62b9a3e124b4c53 (patch) | |
tree | 7c8f3e986361870c7dff71120fcf6627e99ae4aa /Examples/Tests/photon_pusher/check.py | |
parent | 0eb541900afbb8decde013a471a26d6f2b70d40b (diff) | |
download | WarpX-9743de59f2d76e09912ae702c62b9a3e124b4c53.tar.gz WarpX-9743de59f2d76e09912ae702c62b9a3e124b4c53.tar.zst WarpX-9743de59f2d76e09912ae702c62b9a3e124b4c53.zip |
Add function descriptions
Diffstat (limited to 'Examples/Tests/photon_pusher/check.py')
-rwxr-xr-x | Examples/Tests/photon_pusher/check.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Examples/Tests/photon_pusher/check.py b/Examples/Tests/photon_pusher/check.py index e62e7af23..b7601d085 100755 --- a/Examples/Tests/photon_pusher/check.py +++ b/Examples/Tests/photon_pusher/check.py @@ -52,7 +52,8 @@ tol_mom = 0.0; #momentum should be conserved exactly inputname = "inputs" #________________________________________ - +# This function reads the WarpX plotfile given as the first command-line +# argument, and check if the position of each photon agrees with theory. def check(): filename = sys.argv[1] data_set_end = yt.load(filename) @@ -88,6 +89,7 @@ def check(): assert ((max(disc_pos) <= tol_pos) and (max(disc_mom) <= tol_mom)) +# This function generates the input file to test the photon pusher. def generate(): with open(inputname,'w') as f: f.write("#Automatically generated inputfile\n") |