172new_format=`rheolef-config --have-new-code 2>/dev/null`
173GEO_BIN=${GEO_BIN-
"geo"}
176 -h) echo ${usage} >&2; exit 0;;
177 -e) dim=
"1d"; args=
"$args $1";;
178 -[tq]) dim=
"2d"; args=
"$args $1";;
179 -[TPH]) dim=
"3d"; args=
"$args $1";;
180 [0-9]*) args=
"$args $1";;
181 -[abcdfg]) args=
"$args $1 $2"; shift;;
182 -rz) args=
"$args $1"; sys_coord=
"rz";;
183 -zr) args=
"$args $1"; sys_coord=
"zr";;
184 -sides | -boundary | -region | -corner | -nosides | -noboundary | -noregion | -nocorner)
186 *) echo
"mkgeo_grid: unexpected argument $1" 1>&2
187 echo ${usage} 1>&2; exit 1;;
191if test ${new_format} = true; then
196pkgbindir=`rheolef-config --pkglibdir`
198if test $sys_coord !=
"cartesian" -a $dim != 2d; then
199 echo
"mkgeo_grid: incompatible $dim geometry and non-cartesian \"${sys_coord}\"coordinate system" >&2
203command=
"$pkgbindir/mkgeo_grid_$dim $args 2>/dev/null"
204if test $dim = 3d || test ${new_format} = true; then
205 command=
"$command | ${GEO_BIN} -upgrade -geo - 2>/dev/null"
210if test $status -ne 0; then
211 echo
"$0: command failed" 1>&2