mirror of
https://asciireactor.com/otho/cloudy-agn.git
synced 2024-12-05 02:05:07 +00:00
cleaned up scripts
This commit is contained in:
parent
23a9946b68
commit
7e7879e969
@ -7,8 +7,9 @@ script_dir=$(
|
|||||||
base_dir=`pwd`
|
base_dir=`pwd`
|
||||||
bin_dir="$script_dir/../bin"
|
bin_dir="$script_dir/../bin"
|
||||||
|
|
||||||
for dir in $(find . -type 'd' -name 'cldn*')
|
for file in $(find . -type 'f' -name 'mpi_grid.out')
|
||||||
do
|
do
|
||||||
echo "Processing ${dir}."
|
echo "Processing ${file}."
|
||||||
|
dir=$(dirname $file)
|
||||||
$script_dir/operations/package_tables.sh $dir
|
$script_dir/operations/package_tables.sh $dir
|
||||||
done
|
done
|
@ -23,8 +23,11 @@ fi
|
|||||||
|
|
||||||
cd $griddir
|
cd $griddir
|
||||||
|
|
||||||
if [[ -not -e "mpi_grid.out" ]]; then
|
if [[ -e "mpi_grid.out" ]]; then
|
||||||
echo "no mpi_grid.out file"
|
echo -n ""
|
||||||
|
else
|
||||||
|
echo "mpi_grid.out doesn't exist"
|
||||||
|
cd $base_dir
|
||||||
exit 6
|
exit 6
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -32,6 +35,9 @@ mkdir -p fortfiles
|
|||||||
cd fortfiles
|
cd fortfiles
|
||||||
# pwd
|
# pwd
|
||||||
|
|
||||||
|
cp ../mpi_grid.in .
|
||||||
|
cp ../*.tab .
|
||||||
|
|
||||||
echo "Directory ready. Calling fort file creation."
|
echo "Directory ready. Calling fort file creation."
|
||||||
$bin_dir/create_fort_files ../mpi_grid.out $script_dir/../reference/linelist.c17
|
$bin_dir/create_fort_files ../mpi_grid.out $script_dir/../reference/linelist.c17
|
||||||
|
|
||||||
|
@ -1,6 +1,10 @@
|
|||||||
#include "agn.hpp"
|
#include "agn.hpp"
|
||||||
#include "spectral_lines.hpp"
|
#include "spectral_lines.hpp"
|
||||||
|
|
||||||
|
// When this number of iterations is achieved, the program flags it
|
||||||
|
// as a possible failure.
|
||||||
|
double MAX_ITERATIONS = 15;
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char const *argv[]) {
|
int main(int argc, char const *argv[]) {
|
||||||
std::ifstream cloudy_result_file;
|
std::ifstream cloudy_result_file;
|
||||||
@ -90,7 +94,7 @@ int main(int argc, char const *argv[]) {
|
|||||||
<< "The following solutions probably did not converge."
|
<< "The following solutions probably did not converge."
|
||||||
<< std::endl << std::endl;
|
<< std::endl << std::endl;
|
||||||
while(result_it != grid.end()) {
|
while(result_it != grid.end()) {
|
||||||
if (result_it->second.iterations >= 40) {
|
if (result_it->second.iterations >= MAX_ITERATIONS) {
|
||||||
num_unconverged++;
|
num_unconverged++;
|
||||||
cautionreportfile
|
cautionreportfile
|
||||||
<< "hden = "
|
<< "hden = "
|
||||||
|
Loading…
Reference in New Issue
Block a user