test script exit code -1 if any error exceed tolerence, tolerence set to 2.5%
This commit is contained in:
parent
0f589b50ec
commit
a5c29a9632
2 changed files with 12 additions and 1 deletions
|
|
@ -1,6 +1,12 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
|
||||
mkdir cases
|
||||
|
||||
exit_code=0
|
||||
|
||||
error_cases=()
|
||||
|
||||
for sp in H2 H O O2 OH H2O HO2 H2O2 \
|
||||
C CH CH2 CH2\(S\) CH3 CH4 CO CO2 \
|
||||
HCO CH2O CH2OH CH3O CH3OH C2H C2H2 C2H3 \
|
||||
|
|
@ -13,4 +19,9 @@ do
|
|||
foamDictionary -entry fractions -set '{}' cases/$sp/constant/initialConditions
|
||||
foamDictionary -entry fractions.$sp -set 1 cases/$sp/constant/initialConditions
|
||||
./canteraTest -case cases/$sp
|
||||
[ $? -ne 0 ] && error_cases[${#error_cases[*]}]=$sp && exit_code=-1
|
||||
done
|
||||
|
||||
echo ${error_cases[*]}
|
||||
|
||||
exit $exit_code
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ Description
|
|||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
const scalar relTol = 2. / 100.;
|
||||
const scalar relTol = 2.5 / 100.;
|
||||
|
||||
inline scalar relError (scalar x, scalar x0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue