2.1.18. geom_translate


Purpose

translate microstructure indices (shift or substitute) and/or geometry origin.

parent_gray

Usage

> geom_translate options file[s] 

parent_gray

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


parent_gray

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 x-y 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.

original
(a) Eight (periodic) grains discretized with 16 by 16 by 8 voxels
after translation
(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

This topic: Documentation > Processing > PreProcessing > GeomTranslate
Topic revision: 06 Jul 2016, MartinDiehl
This site is powered by FoswikiCopyright by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding DAMASK? Send feedback
§ Imprint § Data Protection