diff --git a/processing/post/marc_deformedGeometry.py b/processing/post/marc_deformedGeometry.py index 1461d6b54..166f6fedd 100755 --- a/processing/post/marc_deformedGeometry.py +++ b/processing/post/marc_deformedGeometry.py @@ -42,10 +42,13 @@ parser.add_option('-r','--range', dest='range', type='int', nargs=3, \ help='range of positions (or increments) to output (start, end, step) [all]') parser.add_option('--increments', action='store_true', dest='getIncrements', \ help='switch to increment range [%default]') +parser.add_option('--scale', dest='scale', type='float', \ + help='scaling factor for the nodal displacements [%default]') parser.set_defaults(dir = 'vtk') parser.set_defaults(getIncrements= False) +parser.set_defaults(scale = 1) (options, files) = parser.parse_args() @@ -128,7 +131,7 @@ for incCount,position in enumerate(locations): # walk through locations node_displacement = [[0,0,0] for i in range(Nnodes)] for n in range(Nnodes): if p.node_displacements(): - node_displacement[n] = list(p.node_displacement(n)) + node_displacement[n] = map(lambda x:x*options.scale,list(p.node_displacement(n))) c = damask.core.mesh.mesh_build_cellnodes(numpy.array(node_displacement).T,Ncellnodes) cellnode_displacement = [[c[i][n] for i in range(3)] for n in range(Ncellnodes)]