Commit Graph

418 Commits

Author SHA1 Message Date
Martin Diehl 828e82605e ensure that data is correctly ordered 2019-12-08 18:13:45 +01:00
Martin Diehl 8d0c4310cf improvements to grid generation
- handling of origin
- inverse functions: calculate grid,size,origin from regular coordinates
(cell or node). should replace corresponding functionality in util
2019-12-08 18:12:22 +01:00
Martin Diehl 9dc726ff53 polishing 2019-12-08 09:17:57 +01:00
Martin Diehl ba69f5a631 polishing 2019-12-07 22:33:31 +01:00
Sharan Roongta 96710a238d Merge branch 'development' of magit1.mpie.de:damask/DAMASK into incs-no-leading-zero 2019-12-06 15:25:21 +01:00
Martin Diehl 4ddfd82304 better names 2019-12-05 18:32:21 +01:00
Martin Diehl b1ff178109 Merge branch 'new-ASCII' into grid-filters 2019-12-05 18:06:56 +01:00
Philip Eisenlohr 2648a67dcd fixed sort_by to respect updated index (upon subsequent adding of new data) 2019-12-05 12:02:10 -05:00
Philip Eisenlohr 3caf2c1296 condensing code 2019-12-05 09:05:50 -05:00
Martin Diehl e7358746dc taking care of prospector complaints
variables in 'eval' are hidden
2019-12-05 10:54:35 +01:00
Martin Diehl 274aaa7359 Merge branch 'new-ASCII' into grid-filters 2019-12-05 10:50:56 +01:00
Martin Diehl 1018b89296 nice to have.. 2019-12-05 10:48:42 +01:00
Martin Diehl f885748a58 variable was never used 2019-12-05 08:43:14 +01:00
Martin Diehl 1bf4946e67 invalid escape sequence 2019-12-05 08:37:39 +01:00
Martin Diehl 469d638afb making table class feature complete 2019-12-05 06:57:09 +01:00
Martin Diehl ee8e3386f4 shorter but still descriptive names 2019-12-05 06:16:29 +01:00
Martin Diehl e7a67262f8 clear enough 2019-12-05 06:00:49 +01:00
Martin Diehl 2172e92e7e test exotic input files 2019-12-05 05:57:47 +01:00
Martin Diehl 5fdf112f78 allow strings as data in ASCII file 2019-12-05 05:45:27 +01:00
Martin Diehl 1c83572589 more descriptive names 2019-12-05 05:11:58 +01:00
Martin Diehl 381c95bd1e WIP: regrid functionality 2019-12-04 10:41:02 +01:00
Martin Diehl 07e9778798 one more test 2019-12-04 10:20:57 +01:00
Martin Diehl bc41bbbec5 test coordinates-related functions 2019-12-04 09:23:08 +01:00
Martin Diehl 999321e588 Merge branch 'new-ASCII' into grid-filters 2019-12-04 07:45:01 +01:00
Martin Diehl 285075bb6b ordered alphabetically 2019-12-04 06:15:32 +01:00
Martin Diehl 6902d3dd0a repeated test
better sort alphabetically
2019-12-04 06:04:06 +01:00
Martin Diehl 6c31e22855 testing new style DADF5 file 2019-12-04 05:59:52 +01:00
Martin Diehl 32ebcea207 more tests 2019-12-04 05:49:43 +01:00
Martin Diehl fecd4632b4 correct reporting of time 2019-12-04 05:49:17 +01:00
Martin Diehl 58a190ede8 Merge branch 'development' into incs-no-leading-zero 2019-12-04 05:19:38 +01:00
Martin Diehl 1110affec2 Merge branch 'new-ASCII' of magit1.mpie.de:/damask/DAMASK into new-ASCII 2019-12-04 05:10:01 +01:00
Martin Diehl 9ad8743396 using central functionality 2019-12-03 22:00:21 +01:00
Martin Diehl e006e0ebec functions for spatial coordinates on regular grids 2019-12-03 18:59:59 +01:00
Martin Diehl 3effea8e1d also check operations that should NOT work 2019-12-03 17:03:03 +01:00
Martin Diehl f5bbd3cf22 ensure functionality through unit testing 2019-12-03 16:39:54 +01:00
Martin Diehl ff1778d149 Merge branch 'development' into new-ASCII 2019-12-03 15:56:49 +01:00
Martin Diehl 8f77843b0f improved naming
- clearer variable names
- no '-' in attributes
- single source of truth
2019-11-30 09:01:37 +01:00
Martin Diehl 354c0123a1 backward compatibility 2019-11-30 08:40:59 +01:00
Martin Diehl 4185fcb4c3 adjust to new naming 2019-11-29 21:40:54 +01:00
Martin Diehl dc3fc8f70c do not clutter with leading zeros 2019-11-29 17:00:48 +01:00
Martin Diehl 76a1506893 small improvements
bugfix: writing correct labels (now consistent with readin)
error handling for inconsistent initialization
2019-11-28 20:18:54 +01:00
Martin Diehl f2e722ed2e polishing 2019-11-28 18:22:34 +01:00
Martin Diehl 3e65d44e07 centralized facilities for differential operations
note the need to reverse the grid shape in data from the ASCII table. If x is fastest,
z is slowest we require x to be the rightmost index
2019-11-28 15:46:22 +01:00
Martin Diehl 80b50f460e cleaning
trying to get rid of strange re-ordering related to ASCII table data
layout
2019-11-28 10:09:22 +01:00
Martin Diehl ca92400c2f polishing
columns is the term used py pandas
2019-11-28 05:58:28 +01:00
Martin Diehl b85049cb81 use brackets for line continuation with comments 2019-11-28 05:41:53 +01:00
Martin Diehl 98d5738fe6 Merge branch 'new-ASCII' into grid-filters 2019-11-28 05:12:36 +01:00
Martin Diehl 80002e6cfd proper capitalization 2019-11-27 13:21:41 +01:00
Martin Diehl cee095b58e better use centralized code 2019-11-27 12:22:28 +01:00
Martin Diehl 7d4b982c73 make information on modifications mandatory 2019-11-27 12:08:23 +01:00
Martin Diehl 76c3577378 pandas.DataFrame needs to be a 2nd order array 2019-11-27 12:03:35 +01:00
Martin Diehl 39734ef53c alter data
allows to access multiple columns ('f') and individual components
('1_f')
2019-11-27 10:56:29 +01:00
Martin Diehl 96714089b1 documented and tested handling of multi-dimensional data
more precise regex expressions. get_array can handle individual
components
2019-11-27 09:58:58 +01:00
Martin Diehl 882a11c5f8 get labels without shape information 2019-11-27 08:43:20 +01:00
Martin Diehl 2d96136a0d more general constructor for Table
reading from file is just one case (now handled by static method).
General constructor needs data and header information as dictionary.
Works only with python 3.7 where dict keeps the insertion order. Earlier
python versions/other implementations might fail.
2019-11-26 22:53:46 +01:00
Martin Diehl 5661f60552 fname seems to be the common name 2019-11-26 21:36:24 +01:00
Martin Diehl 925a4f73d6 staticmethod better suited than class method
a classmethod changes the class, i.e. it assigns attributes and gives
them specific values.
a staticmethod does not alter the class

https://www.geeksforgeeks.org/class-method-vs-static-method-python
2019-11-26 20:32:54 +01:00
Martin Diehl 845cfc34ec similar logic as in geom class
- filename is not part of the object
- transparent handling of files, strings, and path-like objects for file
IO
2019-11-26 14:26:25 +01:00
Martin Diehl 81abc43920 Merge branch 'development' into new-ASCII 2019-11-26 10:29:05 +01:00
Martin Diehl 23f5e0fa58 filters for operations on regular grids (in fourier space) 2019-11-26 10:25:39 +01:00
Martin Diehl af78aaf2f1 testing rescale 2019-11-25 14:01:40 +01:00
Martin Diehl e16024ddf9 Merge branch 'PythonImprovements' into pytest 2019-11-25 14:00:24 +01:00
Martin Diehl 476569390a enable use of path objects, strings, and opened files 2019-11-25 13:47:14 +01:00
Martin Diehl b757f02649 avoid repetitions 2019-11-25 12:04:57 +01:00
Martin Diehl 6d25506204 test for new pack functionality 2019-11-25 09:28:59 +01:00
Martin Diehl 969fa9bbc7 Merge branch 'PythonImprovements' into pytest 2019-11-25 09:15:06 +01:00
Martin Diehl 3e8518d861 following prospector guidelines 2019-11-24 19:30:00 +01:00
Martin Diehl c9f9f7c681 pack causes trouble with tests .. 2019-11-24 19:02:19 +01:00
Martin Diehl b2cdabd009 getting rid of shell scripts 2019-11-24 18:25:53 +01:00
Martin Diehl 816e86ae5f phasing out python shell scripts 2019-11-24 15:13:26 +01:00
Martin Diehl 8186be6293 compress functionality should be part of the geom class
automated decision is base on heuristic whether compression is memory
efficient
2019-11-24 14:27:24 +01:00
Martin Diehl 02df55b9bd bugfix
casting to plain array works only (and makes sense only) for a derived
type
2019-11-24 11:18:41 +01:00
Martin Diehl 6060abb375 cleaning 2019-11-24 09:10:47 +01:00
Martin Diehl c9b1944493 handling of derived datatypes/structs
currently required for orientation
2019-11-24 08:50:27 +01:00
Martin Diehl f30cbde99e use first constituent as default 2019-11-24 08:04:40 +01:00
Martin Diehl 928a5c2e55 better use fixtures 2019-11-24 06:29:00 +01:00
Martin Diehl 2b392241f9 Merge branch 'PythonImprovements' into pytest 2019-11-23 19:25:22 +01:00
Martin Diehl 406ae29897 adopting rename in mechanics 2019-11-23 19:22:18 +01:00
Martin Diehl 3be1caa4ef read_dataset has at least two dimensions 2019-11-23 19:21:41 +01:00
Martin Diehl eb80a82e05 first idea how to test pointwise operations 2019-11-23 18:58:44 +01:00
Martin Diehl e3f8195621 no not change line endings 2019-11-23 17:08:36 +01:00
Martin Diehl 4dc4442fae small DADF5 file for testing 2019-11-23 16:15:08 +01:00
Martin Diehl 510e4752fd using parametrized tests for better coverage 2019-11-23 14:03:47 +01:00
Martin Diehl 2810531c97 a test with reference results 2019-11-23 13:37:03 +01:00
Martin Diehl 834cd43b66 intention not clear
any ideas why __transforms__ was used?
2019-11-23 08:06:26 +01:00
Martin Diehl ea4c4b6636 Merge branch 'PythonImprovements' into pytest 2019-11-22 22:10:20 +01:00
Martin Diehl dfb95df689 migrating shell scripts to python class 2019-11-22 21:48:41 +01:00
Martin Diehl c00af5c402 4 space indents are common practice 2019-11-22 20:52:36 +01:00
Martin Diehl e5e3db8286 Merge branch 'PythonImprovements' into pytest 2019-11-22 15:42:27 +01:00
Martin Diehl fad679a9a5 need to catch IOError 2019-11-22 15:19:20 +01:00
Martin Diehl 6e0b2a4fab following prospector rules 2019-11-22 13:16:53 +01:00
Martin Diehl dac63f7d92 subfolders not needed 2019-11-22 12:55:56 +01:00
Martin Diehl 77e410d7d1 follow prospector rules 2019-11-22 12:17:44 +01:00
Martin Diehl a26a5738dd polishing 2019-11-21 21:48:54 +01:00
Martin Diehl e0f3fe3cc0 ported from hand written test class 2019-11-21 21:01:01 +01:00
Martin Diehl a3376a35b7 testing mechanics module with pytest 2019-11-21 20:00:28 +01:00
Martin Diehl cf88c1f907 correct syntax for integer comparison 2019-11-21 19:49:46 +01:00
Martin Diehl a5ae82fe90 handle deprecation warning in python 3.8 2019-11-21 19:47:27 +01:00
Martin Diehl 7a7eea47b5 correct handling of arrays
all strains measures except for logarithmic had wrong off-diagonal
components
2019-11-21 19:46:05 +01:00
Martin Diehl fb286af354 [skip sc] first draft 2019-10-31 10:47:40 +01:00
Martin Diehl 1c10459a5a also use fast operation order 2019-10-30 21:09:17 +01:00
Martin Diehl 8a85123abc 4 space indent is python standard 2019-10-30 18:05:44 +01:00
Martin Diehl b733bd3038 polar decomposition 2019-10-28 11:18:26 +01:00
navyanthkusam fca288ae8a performance improvement
this mapping is faster for large volumes
2019-10-25 14:47:36 +02:00
Philip Eisenlohr 894b646283 corrected name of U,V; fixed Mises_strain factor from 3/2 to 2/3; 2019-10-23 15:03:24 +02:00
Martin Diehl 2d08eb68b1 bugfix for (3x3) version of Cauchy 2019-10-23 14:39:52 +02:00
Martin Diehl 5e7f9a223b should be a passive rotation 2019-10-21 23:17:58 +02:00
Martin Diehl 9489c04ccb less confusing 2019-10-21 23:02:31 +02:00
Martin Diehl ecc51e34d3 rouding should affect color calculation
avoid NaN in math.power(x,0.5). math.power(-0.0,0.5) is ok
2019-10-21 22:44:12 +02:00
Martin Diehl 578cbf9bbf bugfixes:
- vonMises calculation was wrong
- wrong type of data used in some add_XXX
2019-10-21 18:07:35 +02:00
Martin Diehl 78a2941436 avoid numerical issues 2019-10-21 16:59:49 +02:00
Martin Diehl 51ed4d68e6 more info 2019-10-20 13:13:48 +02:00
Martin Diehl b593dfbfd9 better layout 2019-10-20 11:34:05 +02:00
Martin Diehl f00f6952c0 selecting by increment is a common task
https://www.python.org/dev/peps/pep-0257/
The docstring is a phrase ending in a period. It prescribes the function or method's effect as
a command ("Do this", "Return that"), not as a description; e.g. don't write "Returns the pathname ...".
2019-10-20 11:00:10 +02:00
Martin Diehl 8f315836b0 easier to use if end time is included: 2019-10-20 10:42:45 +02:00
Martin Diehl 64731369e3 general definition for strain tensors 2019-10-19 16:05:53 +02:00
Martin Diehl a665d5726d polishing 2019-10-19 13:22:37 +02:00
Martin Diehl b31de5d0f6 outsourcing tensor math to mechanics class
strain calculation is generalize to arbitrary order and simplified: No
need for svd, F^T F/F F^T does the job.
2019-10-19 12:54:16 +02:00
Martin Diehl e51f6cee72 improved handling of string types for HDF5
- convert bytes to string when reading
- convert string to bytes when writing
2019-10-19 09:47:26 +02:00
Martin Diehl 5f0a48fae7 enhanced and documented 2019-10-19 08:51:51 +02:00
Martin Diehl dc9aca5710 copy and paste error/invalid syntax 2019-10-18 20:57:36 +02:00
Martin Diehl 5858d03a6b prospector complaints for stupid reasons 2019-10-18 20:55:39 +02:00
Martin Diehl 3336cfc3da better have tensor functions available
allows in-memory evaluation of results
2019-10-18 20:50:03 +02:00
Martin Diehl 1a34a6f7b5 some useful tensor operations 2019-10-18 20:41:39 +02:00
Martin Diehl 47ba7d49b5 allow to use the same label twice in a function 2019-10-18 20:39:00 +02:00
Martin Diehl de912c22b4 Merge branch 'development' into HDF5-spectral-displacements 2019-10-18 12:54:12 +02:00
Franz Roters 91691744c6 Merge branch 'Marc-No-nonlocal' into 'development'
Marc no nonlocal

See merge request damask/DAMASK!98
2019-10-15 10:35:37 +02:00
Martin Diehl 708bbd3cb9 mesh/grid type transparent handling of coordinates 2019-10-12 16:15:04 +02:00
Martin Diehl b208fa6565 takeover from Vitesh's work with small adoptions to current DADF5 2019-10-12 08:02:57 +02:00
Martin Diehl 0eef73935e handling of derived types (orientation for the moment) 2019-10-11 08:35:21 +02:00
Martin Diehl b8a1a5bb7d v 0.2 is ok, not sure what the future brings so better check 2019-10-03 20:23:49 +02:00
Martin Diehl 0b29d08109 bump to DADF5 v0.3
contains displacements (for grid solver)
2019-10-03 19:02:17 +02:00
Martin Diehl 62fb4d2ea9 polishing 2019-10-01 14:30:09 -07:00
Martin Diehl e96eb55edd calculate different strain tensors 2019-09-30 14:28:58 -07:00
Martin Diehl 0e3b09adc1 negative eigenvalues are not possible
left/right Cauchy-Green Deformation Tensors are positive definit
https://de.wikipedia.org/wiki/Deformationsgradient
2019-09-30 14:12:15 -07:00
Martin Diehl d95a795e3b Merge branch 'MiscImprovements' into HDF5-spectral-displacements 2019-09-30 13:53:24 -07:00
Martin Diehl 0dd14a0652 correct reporting of version 2019-09-30 09:07:56 -07:00
Martin Diehl 457f9aa4e3 prospector found duplicated key 2019-09-30 08:53:53 -07:00
Martin Diehl 3206ee04bc nodal displacements for grid solver
currently for non-MPI only
2019-09-27 20:38:02 -07:00
Martin Diehl 970d172160 correct message 2019-09-27 17:52:01 -07:00
Martin Diehl ad83c8541d same names as in python 2019-09-20 17:18:09 -07:00
Martin Diehl fb61899c5f seems that testing has Marc 2018.1 already 2019-09-20 20:54:30 +02:00
Martin Diehl 0b6620bfb7 Merge branch 'development' into MiscImprovements
F***ing commits to development!
2019-09-20 07:40:52 -07:00
Martin Diehl 4b2263bebe conversion to float causes issues
test only current version of MSC.Marc
2019-09-20 03:21:53 +02:00
Yang Su 6fdab024b6 ensure that integer inputs to Rotation.fromX() translate into float quantities 2019-09-19 17:03:31 -04:00
Martin Diehl 7fd4b8bff6 more prospector hints 2019-09-19 12:51:16 -07:00
Martin Diehl f1f88610dd documenting 2019-09-19 12:32:15 -07:00
Martin Diehl 2e25a03d13 adopting to new prospector 2019-09-19 11:56:58 -07:00
Martin Diehl 35a009f513 prospector complaind
help details were anyway pretty useless
2019-09-19 11:41:41 -07:00
Martin Diehl 32639caec2 better readable 2019-09-19 11:12:44 -07:00