diff --git a/DAMASK_prerequisites.sh b/DAMASK_prerequisites.sh index 12dd9bd07..3f5e25a71 100755 --- a/DAMASK_prerequisites.sh +++ b/DAMASK_prerequisites.sh @@ -68,6 +68,7 @@ echo PYTHONPATH: $PYTHONPATH echo SHELL: $SHELL echo PETSC_ARCH: $PETSC_ARCH echo PETSC_DIR: $PETSC_DIR +ls $PETSC_DIR/lib echo echo ============================================================================================== echo Python diff --git a/PRIVATE b/PRIVATE index 8546f9bda..af8516892 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit 8546f9bda04b58c3b26979048288a8a01f607876 +Subproject commit af851689285b8c1a633495219abd9dbbd5a11c69 diff --git a/VERSION b/VERSION index becfecaca..488dd8695 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v2.0.1-1107-g2c3eae6 +v2.0.1-1138-gfcac08c diff --git a/processing/pre/geom_grainGrowth.py b/processing/pre/geom_grainGrowth.py index 90c24219c..f1394cb5f 100755 --- a/processing/pre/geom_grainGrowth.py +++ b/processing/pre/geom_grainGrowth.py @@ -109,14 +109,6 @@ for name in filenames: for smoothIter in range(options.N): - # replace immutable microstructures with closest mutable ones - index = ndimage.morphology.distance_transform_edt(np.in1d(microstructure,options.immutable).reshape(grid), - return_distances = False, - return_indices = True) - microstructure = microstructure[index[0], - index[1], - index[2]] - interfaceEnergy = np.zeros(microstructure.shape,dtype=np.float32) for i in (-1,0,1): for j in (-1,0,1): @@ -182,8 +174,16 @@ for name in filenames: grid[1]/2:-grid[1]/2, grid[2]/2:-grid[2]/2] # extent grains into interface region + # replace immutable microstructures with closest mutable ones + index = ndimage.morphology.distance_transform_edt(np.in1d(microstructure,options.immutable).reshape(grid), + return_distances = False, + return_indices = True) + microstructure = microstructure[index[0], + index[1], + index[2]] + immutable = np.zeros(microstructure.shape, dtype=np.bool) - # find locations where immutable microstructures have been (or are now) + # find locations where immutable microstructures have been in original structure for micro in options.immutable: immutable += microstructure_original == micro diff --git a/processing/pre/geom_vicinityOffset.py b/processing/pre/geom_vicinityOffset.py index d4eb8e097..c172171b7 100755 --- a/processing/pre/geom_vicinityOffset.py +++ b/processing/pre/geom_vicinityOffset.py @@ -10,13 +10,24 @@ import damask scriptName = os.path.splitext(os.path.basename(__file__))[0] scriptID = ' '.join([scriptName,damask.version]) +def taintedNeighborhood(stencil,trigger=[],size=1): + + me = stencil[stencil.shape[0]//2] + if len(trigger) == 0: + return np.any(stencil != me) + if me in trigger: + trigger = set(trigger) + trigger.remove(me) + trigger = list(trigger) + return np.any(np.in1d(stencil,np.array(trigger))) + #-------------------------------------------------------------------------------------------------- # MAIN #-------------------------------------------------------------------------------------------------- parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """ -Offset microstructure index for points which see a microstructure different from themselves within a given (cubic) vicinity, -i.e. within the region close to a grain/phase boundary. +Offset microstructure index for points which see a microstructure different from themselves +(or listed as triggers) within a given (cubic) vicinity, i.e. within the region close to a grain/phase boundary. """, version = scriptID) @@ -29,6 +40,9 @@ parser.add_option('-m', '--microstructureoffset', type = 'int', metavar = 'int', help = 'offset (positive or negative) for tagged microstructure indices. '+ '"0" selects maximum microstructure index [%default]') +parser.add_option('-t', '--trigger', + action = 'extend', dest = 'trigger', metavar = '', + help = 'list of microstructure indices triggering a change') parser.add_option('-n', '--nonperiodic', dest = 'mode', action = 'store_const', const = 'nearest', @@ -36,10 +50,13 @@ parser.add_option('-n', '--nonperiodic', parser.set_defaults(vicinity = 1, offset = 0, + trigger = [], mode = 'wrap', ) (options, filenames) = parser.parse_args() +options.trigger = np.array(options.trigger, dtype=int) + # --- loop over input files ------------------------------------------------------------------------- @@ -84,9 +101,12 @@ for name in filenames: if options.offset == 0: options.offset = microstructure.max() - microstructure = np.where(ndimage.filters.maximum_filter(microstructure,size=1+2*options.vicinity,mode=options.mode) == - ndimage.filters.minimum_filter(microstructure,size=1+2*options.vicinity,mode=options.mode), - microstructure, microstructure + options.offset) + microstructure = np.where(ndimage.filters.generic_filter(microstructure, + taintedNeighborhood, + size=1+2*options.vicinity,mode=options.mode, + extra_arguments=(), + extra_keywords={"trigger":options.trigger,"size":1+2*options.vicinity}), + microstructure + options.offset,microstructure) newInfo['microstructures'] = microstructure.max() diff --git a/src/DAMASK_abaqus_exp.f b/src/DAMASK_abaqus_exp.f index 1fab2472d..cfd02cbed 100644 --- a/src/DAMASK_abaqus_exp.f +++ b/src/DAMASK_abaqus_exp.f @@ -37,6 +37,7 @@ subroutine DAMASK_interface_init dateAndTime ! type default integer call date_and_time(values = dateAndTime) write(6,'(/,a)') ' <<<+- DAMASK_abaqus_exp -+>>>' + write(6,'(/,a)') ' Roters et al., Computational Materials Science, 2018' write(6,'(/,a)') ' Version: '//DAMASKVERSION write(6,'(a,2(i2.2,a),i4.4)') ' Date: ',dateAndTime(3),'/',& dateAndTime(2),'/',& diff --git a/src/DAMASK_abaqus_std.f b/src/DAMASK_abaqus_std.f index d15682c58..e91cbb0bb 100644 --- a/src/DAMASK_abaqus_std.f +++ b/src/DAMASK_abaqus_std.f @@ -37,6 +37,7 @@ subroutine DAMASK_interface_init dateAndTime ! type default integer call date_and_time(values = dateAndTime) write(6,'(/,a)') ' <<<+- DAMASK_abaqus_std -+>>>' + write(6,'(/,a)') ' Roters et al., Computational Materials Science, 2018' write(6,'(/,a)') ' Version: '//DAMASKVERSION write(6,'(a,2(i2.2,a),i4.4)') ' Date: ',dateAndTime(3),'/',& dateAndTime(2),'/',& diff --git a/src/DAMASK_marc.f90 b/src/DAMASK_marc.f90 index 27640e5f2..81465350c 100644 --- a/src/DAMASK_marc.f90 +++ b/src/DAMASK_marc.f90 @@ -54,6 +54,7 @@ subroutine DAMASK_interface_init call date_and_time(values = dateAndTime) write(6,'(/,a)') ' <<<+- DAMASK_Marc -+>>>' + write(6,'(/,a)') ' Roters et al., Computational Materials Science, 2018' write(6,'(/,a)') ' Version: '//DAMASKVERSION write(6,'(a,2(i2.2,a),i4.4)') ' Date: ',dateAndTime(3),'/',& dateAndTime(2),'/',& diff --git a/src/DAMASK_spectral.f90 b/src/DAMASK_spectral.f90 index 068aebbc6..5bb882e2d 100644 --- a/src/DAMASK_spectral.f90 +++ b/src/DAMASK_spectral.f90 @@ -161,6 +161,7 @@ program DAMASK_spectral ! init DAMASK (all modules) call CPFEM_initAll(el = 1_pInt, ip = 1_pInt) write(6,'(/,a)') ' <<<+- DAMASK_spectral init -+>>>' + write(6,'(/,a)') ' Roters et al., Computational Materials Science, 2018' write(6,'(a15,a)') ' Current time: ',IO_timeStamp() #include "compilation_info.f90" diff --git a/src/IO.f90 b/src/IO.f90 index 9e8033f73..7291f36ad 100644 --- a/src/IO.f90 +++ b/src/IO.f90 @@ -560,6 +560,9 @@ function IO_hybridIA(Nast,ODFfileName) IO_hybridIA = 0.0_pReal ! initialize return value for case of error write(6,'(/,a,/)',advance='no') ' Using linear ODF file: '//trim(ODFfileName) + write(6,'(/,a)') 'Eisenlohr et al., Computational Materials Science, 42(4):670–678, 2008' + write(6,'(/,a)') 'https://doi.org/10.1016/j.commatsci.2007.09.015' + !-------------------------------------------------------------------------------------------------- ! parse header of ODF file diff --git a/src/homogenization_RGC.f90 b/src/homogenization_RGC.f90 index 611268393..fe9885215 100644 --- a/src/homogenization_RGC.f90 +++ b/src/homogenization_RGC.f90 @@ -69,7 +69,7 @@ module homogenization_RGC contains !-------------------------------------------------------------------------------------------------- -!> @brief allocates all neccessary fields, reads information from material configuration file +!> @brief allocates all necessary fields, reads information from material configuration file !-------------------------------------------------------------------------------------------------- subroutine homogenization_RGC_init(fileUnit) #if defined(__GFORTRAN__) || __INTEL_COMPILER >= 1800 @@ -116,6 +116,10 @@ subroutine homogenization_RGC_init(fileUnit) line = '' write(6,'(/,a)') ' <<<+- homogenization_'//HOMOGENIZATION_RGC_label//' init -+>>>' + write(6,'(/,a)') ' Tjahjanto et al., International Journal of Material Forming, 2(1):939–942, 2009' + write(6,'(/,a)') ' https://doi.org/10.1007/s12289-009-0619-1' + write(6,'(/,a)') ' Tjahjanto et al., Modelling and Simulation in Materials Science and Engineering, 18:015006, 2010' + write(6,'(/,a)') ' https://doi.org/10.1088/0965-0393/18/1/015006' write(6,'(a15,a)') ' Current time: ',IO_timeStamp() #include "compilation_info.f90" diff --git a/src/plastic_disloUCLA.f90 b/src/plastic_disloUCLA.f90 index 9c0a6c494..514652397 100644 --- a/src/plastic_disloUCLA.f90 +++ b/src/plastic_disloUCLA.f90 @@ -176,6 +176,8 @@ subroutine plastic_disloUCLA_init(fileUnit) real(pReal), dimension(:), allocatable :: tempPerSlip write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_DISLOUCLA_label//' init -+>>>' + write(6,'(/,a)') ' Cereceda et al., International Journal of Plasticity 78, 2016, 242-256' + write(6,'(/,a)') ' http://dx.doi.org/10.1016/j.ijplas.2015.09.002' write(6,'(a15,a)') ' Current time: ',IO_timeStamp() #include "compilation_info.f90" diff --git a/src/plastic_dislotwin.f90 b/src/plastic_dislotwin.f90 index c7aaf5400..e0da954a6 100644 --- a/src/plastic_dislotwin.f90 +++ b/src/plastic_dislotwin.f90 @@ -265,6 +265,12 @@ subroutine plastic_dislotwin_init(fileUnit) real(pReal), dimension(:), allocatable :: tempPerSlip, tempPerTwin, tempPerTrans write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_DISLOTWIN_label//' init -+>>>' + write(6,'(/,a)') ' A. Ma and F. Roters, Acta Materialia, 52(12):3603–3612, 2004' + write(6,'(/,a)') ' https://doi.org/10.1016/j.actamat.2004.04.012' + write(6,'(/,a)') ' F.Roters et al., Computational Materials Science, 39:91–95, 2007' + write(6,'(/,a)') ' https://doi.org/10.1016/j.commatsci.2006.04.014' + write(6,'(/,a)') ' Wong et al., Acta Materialia, 118:140–151, 2016' + write(6,'(/,a)') ' https://doi.org/10.1016/j.actamat.2016.07.032' write(6,'(a15,a)') ' Current time: ',IO_timeStamp() #include "compilation_info.f90" diff --git a/src/plastic_isotropic.f90 b/src/plastic_isotropic.f90 index 4a9d70061..a3a1d5caf 100644 --- a/src/plastic_isotropic.f90 +++ b/src/plastic_isotropic.f90 @@ -150,6 +150,8 @@ subroutine plastic_isotropic_init(fileUnit) integer(pInt) :: NipcMyPhase write(6,'(/,a)') ' <<<+- constitutive_'//PLASTICITY_ISOTROPIC_label//' init -+>>>' + write(6,'(/,a)') ' Ma et al., Computational Materials Science, 109:323–329, 2015' + write(6,'(/,a)') ' https://doi.org/10.1016/j.commatsci.2015.07.041' write(6,'(a15,a)') ' Current time: ',IO_timeStamp() #include "compilation_info.f90" diff --git a/src/spectral_damage.f90 b/src/spectral_damage.f90 index 1ac3c4c73..c6caf410d 100644 --- a/src/spectral_damage.f90 +++ b/src/spectral_damage.f90 @@ -103,6 +103,8 @@ subroutine spectral_damage_init() SNESVISetVariableBounds write(6,'(/,a)') ' <<<+- spectral_damage init -+>>>' + write(6,'(/,a)') ' Shanthraj et al., Handbook of Mechanics of Materials, volume in press, ' + write(6,'(/,a)') ' chapter Spectral Solvers for Crystal Plasticity and Multi-Physics Simulations. Springer, 2018 ' write(6,'(a15,a)') ' Current time: ',IO_timeStamp() #include "compilation_info.f90" diff --git a/src/spectral_interface.f90 b/src/spectral_interface.f90 index b45e8316c..eca92df9d 100644 --- a/src/spectral_interface.f90 +++ b/src/spectral_interface.f90 @@ -115,6 +115,7 @@ subroutine DAMASK_interface_init() call date_and_time(values = dateAndTime) write(6,'(/,a)') ' <<<+- DAMASK_spectral -+>>>' + write(6,'(/,a)') ' Roters et al., Computational Materials Science, 2018' write(6,'(/,a)') ' Version: '//DAMASKVERSION write(6,'(a,2(i2.2,a),i4.4)') ' Date: ',dateAndTime(3),'/',& dateAndTime(2),'/',& diff --git a/src/spectral_mech_AL.f90 b/src/spectral_mech_AL.f90 index 27a1def0c..67eda6f42 100644 --- a/src/spectral_mech_AL.f90 +++ b/src/spectral_mech_AL.f90 @@ -147,7 +147,9 @@ subroutine AL_init SNESSetFromOptions write(6,'(/,a)') ' <<<+- DAMASK_spectral_solverAL init -+>>>' - write(6,'(a15,a)') ' Current time: ',IO_timeStamp() + write(6,'(/,a)') ' Shanthraj et al., International Journal of Plasticity, 66:31–45, 2015' + write(6,'(/,a)') ' https://doi.org/10.1016/j.ijplas.2014.02.006' + write(6,'(a15,a)') ' Current time: ',IO_timeStamp() #include "compilation_info.f90" !-------------------------------------------------------------------------------------------------- diff --git a/src/spectral_mech_Basic.f90 b/src/spectral_mech_Basic.f90 index 171eeacad..bef70153d 100644 --- a/src/spectral_mech_Basic.f90 +++ b/src/spectral_mech_Basic.f90 @@ -135,7 +135,9 @@ subroutine basicPETSc_init SNESSetFromOptions write(6,'(/,a)') ' <<<+- DAMASK_spectral_solverBasicPETSc init -+>>>' - write(6,'(a15,a)') ' Current time: ',IO_timeStamp() + write(6,'(/,a)') ' Shanthraj et al., International Journal of Plasticity, 66:31–45, 2015' + write(6,'(/,a)') ' https://doi.org/10.1016/j.ijplas.2014.02.006' + write(6,'(a15,a)') ' Current time: ',IO_timeStamp() #include "compilation_info.f90" !-------------------------------------------------------------------------------------------------- diff --git a/src/spectral_mech_Polarisation.f90 b/src/spectral_mech_Polarisation.f90 index acd713c70..02e0e0ab8 100644 --- a/src/spectral_mech_Polarisation.f90 +++ b/src/spectral_mech_Polarisation.f90 @@ -145,7 +145,9 @@ subroutine Polarisation_init SNESSetFromOptions write(6,'(/,a)') ' <<<+- DAMASK_spectral_solverPolarisation init -+>>>' - write(6,'(a15,a)') ' Current time: ',IO_timeStamp() + write(6,'(/,a)') ' Shanthraj et al., International Journal of Plasticity, 66:31–45, 2015' + write(6,'(/,a)') ' https://doi.org/10.1016/j.ijplas.2014.02.006' + write(6,'(a15,a)') ' Current time: ',IO_timeStamp() #include "compilation_info.f90" !-------------------------------------------------------------------------------------------------- diff --git a/src/spectral_thermal.f90 b/src/spectral_thermal.f90 index f89184543..ff318f395 100644 --- a/src/spectral_thermal.f90 +++ b/src/spectral_thermal.f90 @@ -103,7 +103,9 @@ subroutine spectral_thermal_init mainProcess: if (worldrank == 0_pInt) then write(6,'(/,a)') ' <<<+- spectral_thermal init -+>>>' - write(6,'(a15,a)') ' Current time: ',IO_timeStamp() + write(6,'(/,a)') ' Shanthraj et al., Handbook of Mechanics of Materials, volume in press,' + write(6,'(/,a)') ' chapter Spectral Solvers for Crystal Plasticity and Multi-Physics Simulations. Springer, 2018' + write(6,'(a15,a)') ' Current time: ',IO_timeStamp() #include "compilation_info.f90" endif mainProcess diff --git a/src/spectral_utilities.f90 b/src/spectral_utilities.f90 index e3383f3d1..4289d7829 100644 --- a/src/spectral_utilities.f90 +++ b/src/spectral_utilities.f90 @@ -215,7 +215,9 @@ subroutine utilities_init() vecSize = 3_C_INTPTR_T, & tensorSize = 9_C_INTPTR_T - write(6,'(/,a)') ' <<<+- spectral_utilities init -+>>>' + write(6,'(/,a)') ' <<<+- spectral_utilities init -+>>>' + write(6,'(/,a)') ' Eisenlohr et al., International Journal of Plasticity, 46:37–53, 2013' + write(6,'(/,a)') ' https://doi.org/10.1016/j.ijplas.2012.09.012' write(6,'(a15,a)') ' Current time: ',IO_timeStamp() #include "compilation_info.f90"