Commit Graph

1046 Commits

Author SHA1 Message Date
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 55443a3ff5 reflect change of variable names in file layout version 2020-08-24 22:54:09 +02:00
Martin Diehl 279d43ccc6 include version info + date in comments (Table class) 2020-08-24 19:04:59 +02:00
Martin Diehl 9d505c8518 better readable
- more explicit reporting
- always relative import for DAMASK
2020-08-24 09:58:24 +02:00
Martin Diehl b393da4955 relative imports
... it's all about damask.XXX
2020-08-24 07:28:10 +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
Martin Diehl 507a165733 functionality for getting data
- handy for Geom class, but could be of general interest
- add/set/get comments: follows same functions as for Geom class
2020-08-24 06:40:36 +02:00
Philip Eisenlohr 3738002e4a forgot the new reference files... 2020-08-23 22:27:53 -04: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 22da3af92e cleaning (prospector complaint) 2020-08-24 00:44:18 +02:00
Martin Diehl 44015082a3 dead code (copy and paste error) 2020-08-24 00:34:07 +02:00
Martin Diehl c7cbd961a1 more systematic monkeypatching
allows comparison of reference files (log/history does not contain
information about damask.version and datetime.datetime.now)
2020-08-24 00:31:38 +02:00
Martin Diehl 9867830d68 store history of geometry modifications 2020-08-23 23:52:48 +02:00
Martin Diehl a1c78b778a WIP: track history in VTK objects 2020-08-23 23:22:53 +02:00
Martin Diehl 7b50a3b364 material.config is not used anymore 2020-08-23 15:20:11 +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
Martin Diehl bd4fb562bc make use of inhereted dependencies 2020-08-22 20:57:42 +02:00
Philip Eisenlohr 499ce01748 added Geom.copy() method 2020-08-22 13:57:31 -04:00
Martin Diehl 34a08bd8b8 pip package is pillow, not PIL 2020-08-22 17:04:21 +02:00
Philip Eisenlohr 752d6f773b corrected add_primitive test 2020-08-09 23:14:32 +02:00
Martin Diehl ff7eed4477 (unified) type hints 2020-08-08 20:56:17 +02:00
Martin Diehl 0c6ce390b5 simple IO tests
can be improved ...
2020-08-08 20:35:50 +02:00
Martin Diehl 6a5471d243 have microstructure with 'to' and 'of' 2020-08-08 20:24:36 +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
Karo 7824a61f2e Merge branch 'user_defined_add_calculation' into 'development'
User defined add calculation

See merge request damask/DAMASK!195
2020-08-06 00:53:16 +02:00
Philip Eisenlohr ce00371f52 fixed rounding bug and updated reference images 2020-08-05 10:44:10 -04:00
Philip Eisenlohr e4103564a9 16bit color index; proper rounding of index values 2020-08-05 10:08:48 -04:00
Martin Diehl 0aaba487d7 required packages 2020-08-05 06:20:05 +02:00
Martin Diehl 856dc22eab Merge branch 'imageData-as-colormap.apply' of magit1.mpie.de:/damask/DAMASK into imageData-as-colormap.apply 2020-08-04 20:38:02 +02:00
Martin Diehl 7d49606597 restored correct bound calculation
test different bounds options
2020-08-04 20:34:40 +02:00
Philip Eisenlohr e73ffd6da9 fixed and condensed lo,hi range assignment 2020-08-04 20:29:27 +02:00
Martin Diehl e07c00a592 polishing + simple test
autoscaling seems to be broken
2020-08-04 20:14:04 +02:00
Philip Eisenlohr 84551c9d1e integrated former imageData functionality as "shade" method 2020-08-04 13:05:30 -04:00
Martin Diehl ae20f5ffe6 attempt to fix parallel writing on MacOS
should resolve TypeError: cannot pickle
'vtkmodules.vtkIOXML.vtkXMLRectilinearGridWriter' object error
2020-08-03 18:19:38 +02:00
Martin Diehl 3f2e63977d not needed anymore 2020-07-31 19:46:44 +02:00
Martin Diehl 72ea9a5cec non-vectorized formulas can be implemented in a user function 2020-07-31 19:42:44 +02:00
Martin Diehl a9f53f4822 non-vectorized formulas can be implemented in a user functionc 2020-07-31 17:04:14 +02:00
Martin Diehl 50d7842dbe more tests 2020-07-31 16:50:01 +02:00
Martin Diehl aadce1e554 Merge branch 'development' into user_defined_add_calculation 2020-07-31 16:15:31 +02:00
Martin Diehl daab5a8952 polishing 2020-07-24 22:42:16 +02:00
Martin Diehl 326b82b3aa symmetric scatter around nominal value 2020-07-24 22:41:41 +02:00
Martin Diehl 4860f9c9ce drop support for parallel marc versions
can still be handled by the user, but is a niche use case
2020-07-18 09:51:53 +02:00
Martin Diehl 2bbd68d964 with_suffix strips .1 from 2019.1 2020-07-16 09:33:17 +02:00
Martin Diehl 199ec51bf8 typo 2020-07-15 21:59:43 +02:00
Martin Diehl 9225d439ab object oriented path handling 2020-07-15 21:58:24 +02:00
Martin Diehl fa7f7e6fa4 don't complain if ssh without -X/-Y 2020-07-15 21:19:09 +02:00
Martin Diehl 333e840b09 standard behavior
most modules have an __version__ attribute
2020-07-15 20:57:56 +02:00
Martin Diehl 6259984e93 simplified
complicated, but allows to use functions as properties
2020-07-15 20:54:37 +02:00
Martin Diehl b0e06f180a reading numpy manual ...
https://numpy.org/doc/stable/reference/generated/numpy.isclose.html
rtol=1.e-8, b=1 gives atol+btol=1.e-8+1e-9, simplified to 1e-8
2020-07-13 22:48:29 +02:00
Francisco Jose Gallardo Basile e1bbaac0d7 Merge branch 'Vectorize-Orientation' into 'development'
Vectorize orientation

See merge request damask/DAMASK!186
2020-07-03 12:22:04 +02:00
Martin Diehl 7b3d1204fa easier to use 2020-07-03 07:29:31 +02:00
Philip Eisenlohr d4f97f8346 Merge branch 'misc-improvements' into 'development'
Misc improvements

See merge request damask/DAMASK!184
2020-07-02 21:52:47 +02:00
Philip Eisenlohr 7b899f1ff1 fixed output number format width for single increment0 2020-07-02 11:33:09 -04:00
Philip Eisenlohr 81b3c10305 removed ambiguous variable "l" 2020-07-02 10:37:57 -04:00
Philip Eisenlohr 368a241931 added testing of __iadd__ and __invert__ 2020-07-02 10:27:52 -04:00
Philip Eisenlohr 5a96708f41 added __iadd__ method 2020-07-02 10:26:04 -04:00
Philip Eisenlohr f3ff2e7412 added __iadd__ method 2020-07-02 10:25:04 -04:00
Philip Eisenlohr 3b72d0ec72 added __invert__ method to reverse colormap 2020-07-02 10:13:47 -04:00
Martin Diehl b88becb9d0 don't go out of focus during initialization 2020-07-02 08:25:35 +02:00
Martin Diehl 208d5109d4 still needed ... 2020-07-02 08:14:13 +02:00
Martin Diehl 86dc7054a4 still needed 2020-07-01 22:11:16 +02:00
Martin Diehl 4abd77fccf more test coverage 2020-07-01 17:31:16 +02:00
Martin Diehl be1eb996e0 more tests and cleaning 2020-07-01 15:12:34 +02:00
Martin Diehl a7e3dd5a56 Merge branch 'development' into Vectorize-Orientation 2020-07-01 13:30:39 +02:00
Martin Diehl e18a5b8a1b simplifications + more tests 2020-07-01 08:57:28 +02:00
Martin Diehl de8e9b5fc1 fast reduced operation 2020-07-01 00:37:02 +02:00
Martin Diehl 23365660d8 polishing 2020-06-30 23:18:32 +02:00
Martin Diehl ef0c78745a fix for vectorized in_SST + test 2020-06-30 23:05:41 +02:00
Martin Diehl 49d448dced vectorized and cleaned 2020-06-30 21:43:57 +02:00
Martin Diehl 9a83b11a99 testing IPF color (vectorization) 2020-06-30 18:41:59 +02:00
Martin Diehl bdb461a553 more flexible and independent 2020-06-30 18:12:39 +02:00
Martin Diehl 6e27a140f6 better split 2020-06-30 17:35:52 +02:00
Martin Diehl 3d6afff27a clearer name 2020-06-30 17:30:29 +02:00
Martin Diehl be21d1289d using slicing method 2020-06-30 16:33:04 +02:00
Martin Diehl c86e3e292c WIP: cleaning namespace 2020-06-30 14:07:10 +02:00
Martin Diehl 9d94b521ad polishing 2020-06-30 13:31:58 +02:00
Martin Diehl ce7018164f WIP: more reasonable naming 2020-06-30 13:05:06 +02:00
Martin Diehl b8b34080fe enable array like slicing/iteration 2020-06-30 12:16:47 +02:00
Martin Diehl c8adfae0fa bugfix: wrong variables used 2020-06-30 07:16:49 +02:00
Philip Eisenlohr 8dc87023d1 test from_range; update ASCII colormap labels (i_RGBA) 2020-06-29 22:23:24 -04:00
Philip Eisenlohr decbe8074a not using unassigned variable 2020-06-29 22:22:21 -04:00
Philip Eisenlohr d3b3d628b2 PEP conformity... 2020-06-29 22:07:14 -04:00
Philip Eisenlohr 39aac76859 __add__, from_range, fixed missing np.array(colors), show peppered... 2020-06-29 22:04:03 -04:00
Philip Eisenlohr 97ca1b1a9b try wxPython before tkinter, recent macOS otherwise fails 2020-06-29 22:02:12 -04:00
f.basile d06daec4cb reducec vectorized is improved 2020-06-29 18:25:45 +02:00
Martin Diehl 2d0c680daf useful information 2020-06-29 07:30:42 +02:00
f.basile 4875191ffd change if statement so github doesnt complain 2020-06-28 19:32:22 +02:00
Martin Diehl a657125840 standard version string 2020-06-28 19:30:23 +02:00
f.basile a99f016438 problem with if value is true / if value == True 2020-06-28 19:29:52 +02:00
Martin Diehl c7eb56a63d single precision reference files 2020-06-28 19:25:58 +02:00
Martin Diehl 37f7362cbe Merge branch 'development' into misc-improvements 2020-06-28 19:23:17 +02:00
Martin Diehl 323f828606 Merge branch 'development' into modernize_colormap 2020-06-28 19:09:52 +02:00
f.basile 8484d2e6cc fix github stuff 2020-06-28 19:05:10 +02:00
f.basile 352c4e95f1 more vectorized 2020-06-28 19:03:06 +02:00
Martin Diehl 1cfa6d44d9 dummy version could be useful for other tests
note that monkey patching requires direct access to damask.version in
the respective modules.
'from xx import yy' creates a copy (at least for the version string).
2020-06-28 11:51:30 +02:00
Martin Diehl b3f5ee022a unified style 2020-06-28 11:40:19 +02:00
Martin Diehl e6a87da37c compare to reference results
need to patch damask.version to be independent of version strings (in
json and ASCII table)
2020-06-28 11:20:09 +02:00
Martin Diehl 6a748d2edf do not expand single strings into characters 2020-06-28 11:19:18 +02:00
Martin Diehl ae4146f1c6 report version, write out 'modern' ASCII table style 2020-06-28 11:18:22 +02:00
Martin Diehl e81b67e964 polishing 2020-06-28 10:32:59 +02:00
Martin Diehl 1c03bd157f more testing 2020-06-28 10:25:28 +02:00
Martin Diehl b78c809375 real output 2020-06-28 10:25:28 +02:00
Martin Diehl 3513754647 low/high instead of left/right 2020-06-28 10:25:28 +02:00
Martin Diehl f4d13bc810 binary representation depends on vtk lib version 2020-06-28 10:07:31 +02:00
Martin Diehl d965d66319 [skip ci] documenting 2020-06-28 09:34:10 +02:00
Martin Diehl 8a9a768a77 support pathlib.Path 2020-06-28 07:17:51 +02:00
Martin Diehl 8d5a72e936 more test, swich to pathlib 2020-06-27 23:38:58 +02:00
Martin Diehl 8c8132bcd7 coordinates should not have random names 2020-06-27 23:37:09 +02:00
Martin Diehl c929af12c0 testing/polishing 2020-06-27 19:44:12 +02:00
Martin Diehl cf63226721 testing all conversions 2020-06-27 18:55:27 +02:00
Martin Diehl 234699bd18 reverse should return DAMASK colormap 2020-06-27 16:25:10 +02:00
Martin Diehl e779e190ea new colormap class for use in python
- based on matplotlib "ListedColormap"
- constructors
  - Array of RGB values (inherited),
  - 'from_bounds': perceptual uniform colormap within given bounds
  - 'from_predefined': from matplotlib or DAMASK templates
- export to files (WIP)
- preview on screen
2020-06-27 16:12:40 +02:00
Martin Diehl 1f9b5280cb forgotten debug statement 2020-06-26 11:47:04 +02:00
Martin Diehl a69f82e7c3 speed up vtk out
- limit to single precision
- write in background
2020-06-26 11:45:54 +02:00
Martin Diehl bfae88a364 numpy compatible 2020-06-26 11:45:30 +02:00
Martin Diehl bddb514072 more systematic reporting 2020-06-26 11:45:06 +02:00
Martin Diehl 27220a03bc not invalid anymore 2020-06-25 09:23:43 +02:00
Martin Diehl 3290e2c585 handle even obscure directions 2020-06-25 08:29:36 +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
Martin Diehl c9829f0f1f only Chuck Norris can divide by zero 2020-06-25 08:18:39 +02:00
Martin Diehl cd23937af5 Merge branch 'development' into f-strings 2020-06-25 07:46:24 +02:00
Philip Eisenlohr e64d353865 condensed scale_to_coprime; added test of scale_to_coprime 2020-06-24 18:37:33 -04:00
Philip Eisenlohr 9999560247 easier understanding of from_ang data layout interpretation 2020-06-24 18:36:43 -04:00
Philip Eisenlohr 14d3b7e66d more f-stringing 2020-06-24 16:59:55 -04:00
Philip Eisenlohr 966b6f8007 shapes init copes with integers instead of strict tuples; introduced f-strings 2020-06-24 14:18:06 -04:00
Philip Eisenlohr f8f433e826 introduced f-strings 2020-06-24 14:13:56 -04:00
Philip Eisenlohr ff858fd4c8 [skip ci] corrected help string for "srepr" 2020-06-24 20:13:09 +02:00
Philip Eisenlohr 4314ec1f37 [skip ci] started to replace .format() with f-strings 2020-06-24 11:02:37 -04:00
Anderson Wallace Paiva do Nascimento 3d93a5ff00 Merge branch 'migrate-to-pathlib' into 'development'
Migrate to pathlib

See merge request damask/DAMASK!177
2020-06-24 14:54:36 +02:00
Martin Diehl 6fa5ae6ebf literature from Karo 2020-06-22 23:14:58 +02:00
Martin Diehl e33895dd35 [skip ci] better logic 2020-06-21 10:37:09 +02:00
Martin Diehl c6a5bb8a3b is 2020 2020-06-21 10:04:45 +02:00
Martin Diehl 4c5939ef23 small polishing 2020-06-20 22:51:00 +02:00
Martin Diehl 15b43bcebf from_directions is not general, removed
polishing
2020-06-20 19:57:49 +02:00
Martin Diehl 3f63a4fdbc [skip ci] typo 2020-06-20 18:13:34 +02:00
Martin Diehl 4dae3643c9 vectorized IPF color working
results also uses the vectorized form.
Still needs careful checking
2020-06-20 17:15:13 +02:00
Martin Diehl ebdb65d31f standard broadcast_to behavior 2020-06-20 16:35:22 +02:00
Martin Diehl 262346ff5a polishing 2020-06-20 16:34:19 +02:00
Martin Diehl d93ed2bc5c several improvements:
- vectorized from_directions
- more tests (96% coverage, only random functionality is untested)
- updated documentation, folloing numpy standard
- inverse operator '~' introduced
2020-06-20 12:20:43 +02:00
Martin Diehl 055fa64f5f better readable 2020-06-19 12:25:46 +02:00