Commit Graph

1134 Commits

Author SHA1 Message Date
Martin Diehl 4960cf43d4 documented and tested 2020-09-24 21:43:04 +02:00
Martin Diehl e5b414419a Poisson disc for periodic situation 2020-09-24 21:26:16 +02:00
Martin Diehl ec23ab8b61 basic test for seeding 2020-09-24 21:06:26 +02:00
Martin Diehl b5ea04424b Merge remote-tracking branch 'origin/development' into seeds-module 2020-09-24 20:58:53 +02:00
Philip Eisenlohr 8c8db5b99f switched "Geom.materials" to "Geom.material" 2020-09-23 17:27:15 -04:00
Martin Diehl b995f34834 Merge branch 'development' into geom-fully-out-of-place 2020-09-23 22:50:20 +02:00
Martin Diehl 8c83566b71 suppress warning
we already handle the invalid FPE
2020-09-23 21:10:39 +02:00
Martin Diehl 9bce1ddc29 simplified 2020-09-23 20:48:34 +02:00
Franz Roters 3612b17295 corrected Sphinx warnings 2020-09-23 16:21:20 +02:00
Martin Diehl c85d27baec functionality for seed creation 2020-09-23 09:45:36 +02:00
Martin Diehl ae579d8baa allow to specify seed IDs explicitly 2020-09-23 09:28:00 +02:00
Sharan Roongta 5a64dd30e1 Merge branch 'development' into modernize-testing 2020-09-23 00:05:59 +02:00
Philip Eisenlohr 683161d479 Merge branch 'development' into geom-fully-out-of-place 2020-09-22 15:22:58 -04:00
Philip Eisenlohr 05835bacd3 removed set_X(), duplicate(), and .homogenization; renamed ".microstructure" to ".materials" 2020-09-22 14:49:28 -04:00
Martin Diehl 716a406361 Merge remote-tracking branch 'origin/master' into modernize-testing 2020-09-22 16:51:36 +02:00
Franz Roters 7801f527f2 Merge remote-tracking branch 'origin/load-save-X-no-suffix' into development 2020-09-22 14:57:39 +02:00
Martin Diehl 5ef761fb98 inform the user about missing items in material.yaml 2020-09-21 19:10:20 +02:00
Philip Eisenlohr 188905766f removed Geom.get_X() methods in favor of direct property access 2020-09-21 11:13:53 -04:00
Philip Eisenlohr ca2f3f9493 set_X and add_comments methods now default to out-of-place 2020-09-21 10:29:07 -04:00
Martin Diehl 7bdd44a3d9 consistent names:
default file operations: save/load, non-default save_xx/load_xx
2020-09-20 22:04:28 +02:00
Martin Diehl d33507866d statistically more valid test 2020-09-20 21:50:52 +02:00
Martin Diehl 6ab88aad2b default format for Table is ASCII
hence, renamed load_ASCII/save_ASCII to load/save
2020-09-20 20:45:06 +02:00
Martin Diehl 5895e74029 p is never above 1
1e-4 is quite low, usually we are far above. 1e-3 from https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.normaltest.html
is not too far away.
2020-09-20 19:13:54 +02:00
Philip Eisenlohr 5b0b0de6b4 assertion reports offense; fixed seeds for spherical and fiber 2020-09-20 12:22:41 -04:00
Philip Eisenlohr 3cc319ef08 removed debug print statement in test_util 2020-09-19 14:30:58 -04:00
Philip Eisenlohr 7cbd422ae3 fixed coprime error when encountering NaN 2020-09-19 13:38:32 -04:00
Martin Diehl 6f45203c98 first version of a pyaml based class for material configuration
pyaml is (again) actively maintained and the ruamel.pyaml API is
instable
2020-09-19 13:01:19 +02:00
Martin Diehl 0746a2f3a4 give visual feedback
in most tests, this is done manually
2020-09-19 08:33:15 +02:00
Martin Diehl c42511f101 small polishing 2020-09-18 16:32:59 +02:00
Martin Diehl f23b89f055 get rid of annoying warning during test 2020-09-18 16:30:22 +02:00
Martin Diehl c935ba1215 user friendly self reporting 2020-09-18 16:23:23 +02:00
Martin Diehl 1849ff0330 polishing 2020-09-18 15:03:51 +02:00
Martin Diehl e2cd3da295 remaning to_xx 2020-09-18 14:29:27 +02:00
Martin Diehl cdf3323774 Merge remote-tracking branch 'origin/development' into load-save-X 2020-09-18 14:21:43 +02:00
Martin Diehl ec7dbb4c9a do not store temp files 2020-09-18 14:21:30 +02:00
Franz Roters 190f8a82d4 Merge branch 'texture-components-in-rotation-class2' into 'development'
Texture components in rotation class2

See merge request damask/DAMASK!225
2020-09-18 13:31:42 +02:00
Vitesh ca689193f6 Merge branch 'new-random-style' into 'development'
new style for numpy random numbers

See merge request damask/DAMASK!224
2020-09-16 11:12:55 +02:00
Martin Diehl 70911b64ea Merge branch 'development' into texture-components-in-rotation-class2 2020-09-16 09:57:50 +02:00
Martin Diehl c71768a37a polishing 2020-09-16 06:33:17 +02:00
Philip Eisenlohr ed006d1a89 streamlined fiber/spherical component sampling 2020-09-15 19:12:30 -04:00
Philip Eisenlohr c6be6fe87f fixed spherical component sampling and testing 2020-09-15 18:40:05 -04:00
Philip Eisenlohr 82ed546ff7 Merge branch 'texture-components-in-rotation-class2' of magit1.mpie.de:damask/DAMASK into texture-components-in-rotation-class2 2020-09-15 18:14:19 -04:00
Philip Eisenlohr 0a34e342e4 fixed fiber component sampling and testing 2020-09-15 18:14:15 -04:00
Philip Eisenlohr d6378ec9bc shortened from_fiber_component algorithm 2020-09-15 16:34:19 -04:00
Martin Diehl ad2badd3be [skip ci] vectorized and simplified
based on Philips ideas. Test requires from_axis_angle fix
2020-09-15 22:13:28 +02:00
Martin Diehl 9e93e8b710 test for last commit 2020-09-15 19:59:03 +02:00
Philip Eisenlohr d02617c961 fixed normalization of multidimensional axes (from_Rodrigues, from_axis_angle) 2020-09-15 13:09:24 -04:00
Martin Diehl 3f823ca717 testing general case 2020-09-15 14:39:05 +02:00
Martin Diehl 18c38f1284 polishing 2020-09-15 13:49:44 +02:00
Martin Diehl 2a082b7983 methods for texture component calculations 2020-09-15 12:11:46 +02:00
Martin Diehl 82e41d92ce new style for numpy random numbers
https://numpy.org/doc/stable/reference/random/index.html?highlight=random#quick-start
https://albertcthomas.github.io/good-practices-random-number-generators/
2020-09-15 08:12:02 +02:00
Philip Eisenlohr 2114c51098 revert mistakenly made header length change in array-comparison 2020-09-15 01:47:26 -04:00
Philip Eisenlohr 96ad358f83 modified file reading/writing methods to load_X, save_X formalism 2020-09-15 01:14:05 -04:00
Martin Diehl b298962101 Merge branch 'development' into table-out-of-place-only 2020-09-14 08:06:44 +02:00
Martin Diehl f6758ecc28 table class operates out of place 2020-09-14 07:04:01 +02:00
Martin Diehl a5d5638e4a allow uncompressed files 2020-09-12 13:46:55 +02:00
Philip Eisenlohr 865c90d00b first check data type, then determine length of data... 2020-09-09 19:10:03 -04:00
Philip Eisenlohr 7d9a4c08ce Do not strictly require np.ndarrays for grid, size, or origin when not essential for functionality. 2020-09-10 00:59:40 +02:00
Philip Eisenlohr 9fb3fef4b0 changed British "normalise" to US "normalize" as we (should) follow US English everywhere else. 2020-09-08 10:39:31 -04:00
Philip Eisenlohr a4785ba562 modified file writing of geom and table to a general to_file() that takes a "format=" argument 2020-09-03 10:53:16 -04:00
Philip Eisenlohr d645849baf fixed remnant occurrences of .write() --> .to_file() 2020-09-02 11:32:40 -04:00
Philip Eisenlohr 6785062a10 Merge branch 'development' into 'vtk-to-file-method'
# Conflicts:
#   python/tests/test_VTK.py
2020-08-31 21:10:29 +02:00
Franz Roters 6986d20b32 Merge branch 'geom-out-of-place' into 'development'
Geom methods are now out-of-place, i.e. return an updated duplicate

See merge request damask/DAMASK!203
2020-08-31 12:39:01 +02:00
Martin Diehl 03b02ad641 typos/sentence 2020-08-29 16:06:10 +02:00
Martin Diehl c58693328e don't try to access folders that don't exist
this happened in the case when different types of output exist in
different phases, e.g.

Aluminum: generic, plastic, sources
Steel: generic, plastic

We are a little bit inconsistent because 'generic' and 'plastic' are
always created (even if empty) but 'sources' will only exist if it
contains output. In future, we should have only folders that actually
contain data
2020-08-28 12:45:41 +02:00
Franz Roters 9457435612 Merge branch 'polishing-for-release' into 'development'
Polishing for release

See merge request damask/DAMASK!206
2020-08-27 17:01:43 +02:00
Martin Diehl 0d5279863d avoid rounding errors related to rotation 2020-08-27 09:33:09 +02:00
Martin Diehl 94797f8325 ignore all kinds of FPE 2020-08-27 09:32:49 +02:00
Martin Diehl c5761831e2 more meaningful message
if add_xxx (Results) does not find matching datasets, inform the user
about this fact instead of saying
TypeError: object of type 'IMapUnorderedIterator' has no len()
2020-08-27 00:14:37 +02:00
Philip Eisenlohr c2191fd930 Make logic to mask (outside of) primitive more apparent (hopefully). 2020-08-27 00:06:52 +02:00
Martin Diehl 248ef8ef97 more tests
- invalid files
- scalar/array size,center,exponent for add_primitive
- rotation invariance for add primitive
2020-08-26 23:56:20 +02:00
Martin Diehl 229f6139c8 better user experience
- no meaningless warnings regarding floating point precision
- meaningful error message for invalid header
2020-08-26 23:54:56 +02:00
Philip Eisenlohr b9f1421c6b [skip ci] removed unnecessary line continuations "\" 2020-08-26 17:27:08 -04:00
Philip Eisenlohr 3f24d16603 renamed VTK.write() to VTK.to_file() 2020-08-26 16:15:15 -04:00
Philip Eisenlohr da46e5ea9a cannot use np.linalg.norm when dealing with exponent triple 2020-08-26 15:49:25 -04:00
Philip Eisenlohr 06b524d13e added 'iso' as possible lattice (with no symmetry) 2020-08-26 21:39:20 +02:00
Sharan Roongta 68c2908ba8 Merge branch 'rename-hdf5-output' into development 2020-08-26 12:34:56 +02:00
Martin Diehl fee21cbd9c more sensible tests 2020-08-25 17:17:49 +02:00
Martin Diehl bf401e56cf avoid name clash with damask.Geom 2020-08-25 09:56:24 +02:00
Martin Diehl 800dac5d01 correct type handling
no reason to calculate fill twice
2020-08-25 08:47:24 +02:00
Martin Diehl 96d4975fc4 using numpy functionality 2020-08-25 08:34:04 +02:00
Martin Diehl 51da632108 aiming at testing each individual statement 2020-08-25 07:49:56 +02:00
Martin Diehl 2d98325fa4 increasing test coverage 2020-08-25 01:21:17 +02:00
Martin Diehl 453f5a14c5 duplicated test (w/o wait for parallel out) 2020-08-25 00:53:05 +02:00
Martin Diehl 2751cdb6af support comments also in vtr 2020-08-25 00:40:14 +02:00
Martin Diehl 9a2ac31545 explicit is better then implicit 2020-08-24 23:35:46 +02:00
Martin Diehl 0ceba2a6d3 use central functionality 2020-08-24 23:28:26 +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 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