-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update test code in supernovaia.cpp and scripts in testonestar.
- Loading branch information
Showing
4 changed files
with
56 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
This directory contains tests of the feedback and associated stellar | ||
evolution. The test simulation is a single star (actually stellar population) | ||
in a cloud of gas, that is run for 13 Gyr. | ||
|
||
run.sh shows the basic script to run the test with ChaNGa. "metalcheck.sh" | ||
extracts needed information into a number of files and then runs an IDL | ||
script to perform the check. | ||
|
||
"metals.awk" and "energy.awk" are other helper scripts to do checks on the | ||
output. | ||
|
||
Makefile also can build a standalone test for supernovaia that shows | ||
overall supernova output based on the modules used in ChaNGa. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# script to sum up all the feedbacks in onestar.out | ||
# | ||
# Run with "awk -f energy.awk < onestar.out" | ||
# | ||
BEGIN { | ||
total_fb0 = 0.0; | ||
total_fb1 = 0.0; | ||
total_fb2 = 0.0; | ||
} | ||
|
||
# order is SNII, SNIa, Wind | ||
/feedback 0:/ { total_fb0 += $4; } | ||
/feedback 1:/ { total_fb1 += $4; } | ||
/feedback 2:/ { total_fb2 += $4; } | ||
|
||
END { | ||
print "Total SNII Energy: ", total_fb0; | ||
print "Total SNIa Energy: ", total_fb1; | ||
print "Total Wind Energy: ", total_fb2; | ||
print "Total Energy: ", total_fb0 + total_fb1 + total_fb2; | ||
} | ||
|