Periodic centroid #31
Unanswered
eisenlohr
asked this question in
Show and tell
Replies: 1 comment
-
for Grid objects, this is implemented as https://damask-multiphysics.org/documentation/processing_tools/pre-processing.html#damask.seeds.from_grid |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
As many DAMASK simulations utilize periodic grain structures, it is helpful to have a robust method to calculate the centroid of each of these grains. A plain averaging scheme that does not take the periodic boundaries into account will give wrong results, as is easily demonstrated for a one-dimensional example where a grain of interest is occupying grid points marked by
x
. Simple averaging yieldsC
as center of gravity.xxx.......C.....xxxx
The below Python function approximates the centroid of a point cloud (in arbitrary dimensions) considering a periodic tiling of space by a box of given size and origin.
Beta Was this translation helpful? Give feedback.
All reactions