Skip to content

Commit ca4f946

Browse files
committed
Merge remote-tracking branch 'firemodels/master' into FireX
2 parents b409d93 + f778101 commit ca4f946

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

Build/Scripts/SUNDIALS/build_sundials.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ if [ -d "$FIREMODELS/sundials" ]; then
5353
cd $FIREMODELS/sundials/BUILDDIR
5454
echo "Creating library directry..."
5555
export SUNDIALS_VERSION=$(git describe)
56-
mkdir $FIREMODELS/libs/sundials/$SUNDIALS_VERSION
5756
echo "Cleaning sundials repository..."
5857
rm -r $FIREMODELS/sundials/BUILDDIR/*
5958
cp $FIREMODELS/fds/Build/Scripts/SUNDIALS/$CONFMAKE .

Utilities/Python/scripts/cantera_yaml_2_fds.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,24 @@
55
import sys
66
import math
77

8+
# Define str2bool function
9+
def str2bool(v):
10+
if isinstance(v, bool):
11+
return v
12+
if v.lower() in ('yes', 'true', 't', 'y', '1'):
13+
return True
14+
elif v.lower() in ('no', 'false', 'f', 'n', '0'):
15+
return False
16+
else:
17+
raise argparse.ArgumentTypeError('Boolean value expected.')
18+
819
parser = argparse.ArgumentParser()
920

1021
parser.add_argument("--background", help="Background species formula",default='noinput',required=True)
1122
parser.add_argument("--yaml_file",help="yaml file",default='noinput',required=True)
1223
parser.add_argument("--spec_file",help="Cantera to FDS species name lookup csv file (default is yaml_file.spec) with column headings FORMULA and NAME ",default='noinput')
13-
parser.add_argument("--fds_prop",help="Set to True (default) to use FDS properties when species is in spec_file. ",type=bool,default=True)
24+
parser.add_argument("--fds_prop", type=str2bool, nargs='?', const=True, default=True,
25+
help="Set to True (default) to use FDS properties when species is in spec_file.")
1426
parser.add_argument("--radcal",help="Set to True (default) to use the RADCAL ID in the spec_file. ",type=bool,default=True)
1527
parser.add_argument("--mf0_file",help="csv file containing MASS_FRACTION_0 with column headings FORMULA and MF0",default='noinput')
1628
args = parser.parse_args()

0 commit comments

Comments
 (0)