BUG: snappyHexMesh with -decomposeParDict option (issue #265)

- only occurs in combination with distributedTriSurfaceMesh in snappy.

- workaround similar to that previously used for surfaceRedistributePar
  (issue #60).

Minor adjustment of incompressible motorBike tutorial to detect use of
distributedTriSurfaceMesh.
This commit is contained in:
Mark Olesen
2016-11-24 12:02:11 +01:00
parent 55ed6ec776
commit 58fad3ab79
5 changed files with 59 additions and 34 deletions

View File

@ -56,15 +56,17 @@ isTest()
#
getNumberOfProcessors()
{
local dict="${1:-system/decomposeParDict}"
# Re-use positional parameters for automatic whitespace elimination
set -- $(foamDictionary -entry numberOfSubdomains -value "${1:-system/decomposeParDict}")
set -- $(foamDictionary -entry numberOfSubdomains -value "$dict" 2>/dev/null)
if [ "$#" -eq 1 ]
then
echo "$1"
else
echo "Error retrieving 'numberOfSubdomains' from decomposeParDict" 1>&2
echo 1
echo "Warning no 'numberOfSubdomains' in '$dict'" 1>&2
echo 1 # serial as fallback
return 1
fi
}