2.1.18. geom_translate
Purpose
translate microstructure indices (shift or substitute) and/or geometry origin.
Usage
> geom_translate options file[s]
Options

o
/ origin
 offset from old to new origin of grid

m
/ microstructure
 offset from old to new microstructure indices

s
/ substitute
 substitutions of microstructure indices from,to,from,to,...

float
 use float input
Example
> geom_translate origin 0.5 0.5 0 substitute 1,7 microstructure 8 < micro.geom > micro_translated.geom
This example demonstrates the combination of grid origin shifting, index substitution, and the overall shift of microstructure indices for a geometry of dimension 1 x 1 x 0.5 containing eight (periodic) grains discretized by 16 x 16 x 8 voxels.
 The original geometry (Figure 1 (a)) is taken from micro.geom. Resulting geometry (Figure 1 (b)) is output to micro_translated.geom.
 Option
origin 0.5 0.5 0.0
moves the origin by this relative amount, i.e. to the xy center of the patch.
 Next,
substitute 1,7
replaces all instances of microstructure index 1 with 7.
 Lastly,
microstructure 8
adds +8 to all microstructure indices in the geometry file.
Note that any substitution always
precedes the index shifting.

(a) Eight (periodic) grains discretized with 16 by 16 by 8 voxels 
(b) Grain patch after translating the origin by 0.5, 0.5, 0.0, substituting (old) microstructure index 1 with 7, and finally shifting all indices by +8. Original microstructure index 1 (cyan) remains constant, since 1 = 7 + 8. 
 
 Figure 1: Original grain patch and resulting patch changed in one step  