Commit Graph

95 Commits

Author SHA1 Message Date
Martin Diehl 2d98325fa4 increasing test coverage 2020-08-25 01:21:17 +02:00
Martin Diehl 2751cdb6af support comments also in vtr 2020-08-25 00:40:14 +02:00
Martin Diehl 71e08ea66a small fixes:
- numpy has multiple float variants
- start renaming microstructure -> materialpoint where it does not hurt
- no need for type check if comparing against set of valid directions
  (or I miss some corner cases)
2020-08-24 23:23:47 +02:00
Philip Eisenlohr 2560f014a3 Merge remote-tracking branch 'origin/increase-geom-test-coverage' into geom-out-of-place 2020-08-24 17:17:31 -04:00
Martin Diehl 9d505c8518 better readable
- more explicit reporting
- always relative import for DAMASK
2020-08-24 09:58:24 +02:00
Martin Diehl 0d3ef29554 more logical encapsulation
- getting data out of VTK is a functionality of the VTK class. Need to
  discuss whether the VTK class should also provide grid and size (works
  only for rectilinear grid, so hiding VTK type is not possible
  anymore), but the current situation requires the Geom class to rely on
  'internals' of the VTK class
- header is specific to *.geom format, not to Geom objects.
2020-08-24 06:46:22 +02:00
Philip Eisenlohr 446ac03b07 All geom methods are now out-of-place, i.e. return an updated duplicate (to allow for daisy chaining).
* Added comments when methods acted.
* Added diff method
* Added flip method
* Fixed add_primitive inversion bug (again...)
* Fixed cell centering bug in add_primitive

* Added missing tests
2020-08-23 19:43:46 -04:00
Martin Diehl 9867830d68 store history of geometry modifications 2020-08-23 23:52:48 +02:00
Martin Diehl d65371d42f removed unused and untested functionality
PEP 20: Explicit is better than implicit.
2020-08-23 12:55:55 +02:00
Martin Diehl 6f79573140 more test coverage 2020-08-23 11:05:56 +02:00
Martin Diehl 07af7b2f98 geom is written to vtr exlcusively, not to general vtk
base tests on vtr
2020-08-23 10:50:15 +02:00
Martin Diehl 64e7582e8e consistent interface to ndimage filters
Boolean 'periodic' sets mode to 'wrap' or 'nearest'
2020-08-23 10:02:22 +02:00
Martin Diehl 975db01f31 microstructure -> materialpoint
at least for new functionality
2020-08-23 09:38:08 +02:00
Martin Diehl 5fb2d30ee4 fast and for arbitrary type 2020-08-23 09:02:17 +02:00
Martin Diehl b731b1e768 Geom.to_vtk improvements
- should be integer
- should have a test
2020-08-23 08:49:49 +02:00
Philip Eisenlohr 2b09a7d31d fixed Geom.canvas bug, added Geom.from_vtk, added mode,selection options to Geom.clean 2020-08-22 21:36:11 -04:00
Philip Eisenlohr 499ce01748 added Geom.copy() method 2020-08-22 13:57:31 -04:00
Martin Diehl ff7eed4477 (unified) type hints 2020-08-08 20:56:17 +02:00
Martin Diehl 55a620b378 migrating to library 2020-08-08 20:14:30 +02:00
Martin Diehl a0e0f28e51 migrating shell scripts to library 2020-08-08 19:42:34 +02:00
Martin Diehl 5fcff876f9 replace selectively
useful for vicinity_offset and add_primitive
2020-08-08 18:41:47 +02:00
Martin Diehl 56eb57d253 homogenization will be removed soon, stop reporting it 2020-08-08 18:24:17 +02:00
Martin Diehl 6259984e93 simplified
complicated, but allows to use functions as properties
2020-07-15 20:54:37 +02:00
Martin Diehl 5d7213b062 restore reminder to document changes
causes conflicts with outdated tests and is not urgent: postpone until
release.
2020-06-25 08:19:07 +02:00
Philip Eisenlohr 14d3b7e66d more f-stringing 2020-06-24 16:59:55 -04:00
Philip Eisenlohr f8f433e826 introduced f-strings 2020-06-24 14:13:56 -04:00
Martin Diehl 421b8f4268 documented function interfaces 2020-05-30 17:31:50 +02:00
Martin Diehl b1b8d02320 typo 2020-05-25 16:41:23 +02:00
Martin Diehl 9d7158b51a Merge branch 'misc-improvements' of magit1.mpie.de:/damask/DAMASK into misc-improvements 2020-05-25 16:40:23 +02:00
Martin Diehl 784d6d09d9 cleaning 2020-05-25 15:55:38 +02:00
Martin Diehl 17aa3c00dc more tests 2020-05-24 22:52:00 +02:00
Martin Diehl 296308e11e fix for rotation around 90 deg
more tests
2020-05-24 20:52:19 +02:00
Martin Diehl 34adefd4ca simplified 2020-05-24 18:30:45 +02:00
Martin Diehl 594fcb2b72 seems more appropriate 2020-05-24 15:10:53 +02:00
Martin Diehl 3231a49107 centralize functionality 2020-05-24 09:39:58 +02:00
Martin Diehl 25d29bf438 no need for Fortran order forward/backward 2020-04-20 20:24:55 +02:00
Martin Diehl 1ccda22ae3 nothing to flatten here 2020-04-20 20:16:25 +02:00
Martin Diehl 4db91fff03 simplified 2020-04-20 20:14:27 +02:00
Martin Diehl 9979eb58f4 consistent layout for grid data
has now always the shape ([x,y,z,...]) with x fastest. For conversion from or
to linear layout ([x*y*z,...]), e.g. storage in ASCII table, reshape needs
to have the 'F' option.
Credits to Vitesh and Fran for pointing this out.
2020-04-20 13:09:59 +02:00
Martin Diehl 9c0ea13e4f Merge branch 'development' into misc-improvements 2020-04-10 08:14:33 +02:00
Martin Diehl fbd61fda99 ignore comments 2020-04-02 11:54:34 +02:00
Martin Diehl 396d428af7 bugfix: works for all cuboids, not just cubes 2020-03-29 23:09:43 +02:00
Martin Diehl e61c1a027b avoid detour via shell 2020-03-29 19:12:23 +02:00
Martin Diehl 20a06840b0 works also for arrays ... 2020-03-21 11:07:21 +01:00
Martin Diehl 9bb0608187 maybe this is the cleaner way 2020-03-19 14:40:30 +01:00