From 01ba11448c5e991378e1ce4039fec3cc651ca181 Mon Sep 17 00:00:00 2001 From: Philip Eisenlohr Date: Fri, 15 Apr 2016 07:41:24 -0400 Subject: [PATCH] small polishing of remark output regarding <3D vectors --- processing/post/addDisplacements.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/processing/post/addDisplacements.py b/processing/post/addDisplacements.py index 3c3456b91..98d5c3291 100755 --- a/processing/post/addDisplacements.py +++ b/processing/post/addDisplacements.py @@ -139,8 +139,12 @@ for name in filenames: errors.append('deformation gradient "{}" is not a 3x3 tensor.'.format(options.defgrad)) coordDim = table.label_dimension(options.coords) - if not 3 >= coordDim >= 1: errors.append('coordinates "{}" need to have one, two, or three dimensions.'.format(options.coords)) - elif coordDim < 3: remarks.append('appending {} dimensions to coordinates "{}"...'.format(3-coordDim,options.coords)) + if not 3 >= coordDim >= 1: + errors.append('coordinates "{}" need to have one, two, or three dimensions.'.format(options.coords)) + elif coordDim < 3: + remarks.append('appending {} dimension{} to coordinates "{}"...'.format(3-coordDim, + 's' if coordDim < 2 else '', + options.coords)) if remarks != []: damask.util.croak(remarks) if errors != []: