25 lines
624 B
Plaintext
25 lines
624 B
Plaintext
|
#!/usr/bin/env bash
|
||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.."
|
||
|
cd ${DIR}
|
||
|
|
||
|
source $OPENFOAM
|
||
|
|
||
|
getcase()
|
||
|
{
|
||
|
for _case in $( find $1 -type f -name $2 ); do
|
||
|
if [ "$( cat $_case | grep "$3" )" ]; then
|
||
|
echo $_case
|
||
|
fi
|
||
|
done
|
||
|
}
|
||
|
|
||
|
echo -e "\nFailed mesh:"
|
||
|
getcase "$DIR/build" "task.toml" "mesh = false"
|
||
|
|
||
|
echo -e "\nFailed flow:"
|
||
|
getcase "$DIR/build" "task.toml" "flow = false"
|
||
|
|
||
|
endTime="$( foamDictionary "${DIR}/openfoam/template/system/controlDict" -entry endTime -value )"
|
||
|
echo -e "\nComputation exceed 'endTime = $endTime':"
|
||
|
getcase "$DIR/build" "simpleFoam.log" "Time = $endTime"
|