diff --git a/PRIVATE b/PRIVATE index a3a88933c..66d562c75 160000 --- a/PRIVATE +++ b/PRIVATE @@ -1 +1 @@ -Subproject commit a3a88933cbb92b81d481305ce93374917baf3980 +Subproject commit 66d562c755cd9aa4bbb8280c509383014acd52db diff --git a/examples/ConfigFiles/Crystallite_All.config b/examples/ConfigFiles/Crystallite_All.config deleted file mode 100644 index 2e9bafa73..000000000 --- a/examples/ConfigFiles/Crystallite_All.config +++ /dev/null @@ -1,9 +0,0 @@ -[all] -(output) orientation # quaternion -(output) grainrotation # deviation from initial orientation as axis (1-3) and angle in degree (4) in crystal reference coordinates -(output) F # deformation gradient tensor -(output) Fe # elastic deformation gradient tensor -(output) Fp # plastic deformation gradient tensor -(output) P # first Piola-Kichhoff stress tensor -(output) S # second Piola-Kichhoff stress tensor -(output) Lp # plastic velocity gradient tensor diff --git a/processing/post/DADF5_postResults.py b/processing/post/DADF5_postResults.py index a16ef147c..88e4d777a 100755 --- a/processing/post/DADF5_postResults.py +++ b/processing/post/DADF5_postResults.py @@ -59,35 +59,35 @@ for filename in options.filenames: data = np.concatenate((data,coords),1) header+=' 1_pos 2_pos 3_pos' + results.set_visible('materialpoints',False) + results.set_visible('constituents', True) for label in options.con: - for p in results.iter_visible('con_physics'): - for c in results.iter_visible('constituents'): - x = results.get_dataset_location(label) - if len(x) == 0: - continue - array = results.read_dataset(x,0,plain=True) - d = int(np.product(np.shape(array)[1:])) - data = np.concatenate((data,np.reshape(array,[np.product(results.grid),d])),1) - - if d>1: - header+= ''.join([' {}_{}'.format(j+1,label) for j in range(d)]) - else: - header+=' '+label + x = results.get_dataset_location(label) + if len(x) == 0: + continue + array = results.read_dataset(x,0,plain=True) + d = np.product(np.shape(array)[1:]) + data = np.concatenate((data,np.reshape(array,[np.product(results.grid),d])),1) + if d>1: + header+= ''.join([' {}_{}'.format(j+1,label) for j in range(d)]) + else: + header+=' '+label + + results.set_visible('constituents', False) + results.set_visible('materialpoints',True) for label in options.mat: - for p in results.iter_visible('mat_physics'): - for m in results.iter_visible('materialpoints'): - x = results.get_dataset_location(label) - if len(x) == 0: - continue - array = results.read_dataset(x,0,plain=True) - d = int(np.product(np.shape(array)[1:])) - data = np.concatenate((data,np.reshape(array,[np.product(results.grid),d])),1) + x = results.get_dataset_location(label) + if len(x) == 0: + continue + array = results.read_dataset(x,0,plain=True) + d = np.product(np.shape(array)[1:]) + data = np.concatenate((data,np.reshape(array,[np.product(results.grid),d])),1) - if d>1: - header+= ''.join([' {}_{}'.format(j+1,label) for j in range(d)]) - else: - header+=' '+label + if d>1: + header+= ''.join([' {}_{}'.format(j+1,label) for j in range(d)]) + else: + header+=' '+label dirname = os.path.abspath(os.path.join(os.path.dirname(filename),options.dir)) if not os.path.isdir(dirname): diff --git a/processing/post/DADF5_vtk_cells.py b/processing/post/DADF5_vtk_cells.py index 1f5cc6686..9cd982e50 100755 --- a/processing/post/DADF5_vtk_cells.py +++ b/processing/post/DADF5_vtk_cells.py @@ -74,7 +74,6 @@ for filename in options.filenames: results.set_visible('materialpoints',False) results.set_visible('constituents', True) for label in options.con: - for p in results.iter_visible('con_physics'): if p != 'generic': for c in results.iter_visible('constituents'): diff --git a/processing/pre/geom_addPrimitive.py b/processing/pre/geom_addPrimitive.py index 3e147e24d..f33ba27b1 100755 --- a/processing/pre/geom_addPrimitive.py +++ b/processing/pre/geom_addPrimitive.py @@ -132,7 +132,4 @@ for name in filenames: damask.util.croak(geom.update(np.where(mask,geom.microstructure,fill))) geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:])) - if name is None: - sys.stdout.write(str(geom.show())) - else: - geom.to_file(name) + geom.to_file(sys.stdout if name is None else name,pack=False) diff --git a/processing/pre/geom_canvas.py b/processing/pre/geom_canvas.py index a44065dd2..edd5fe622 100755 --- a/processing/pre/geom_canvas.py +++ b/processing/pre/geom_canvas.py @@ -61,7 +61,7 @@ for name in filenames: canvas = np.full(new,options.fill if options.fill is not None else np.nanmax(geom.microstructure)+1,geom.microstructure.dtype) - l = np.clip( offset, 0,np.minimum(old +offset,new)) + l = np.clip( offset, 0,np.minimum(old +offset,new)) # noqa r = np.clip( offset+old,0,np.minimum(old*2+offset,new)) L = np.clip(-offset, 0,np.minimum(new -offset,old)) R = np.clip(-offset+new,0,np.minimum(new*2-offset,old)) @@ -71,7 +71,4 @@ for name in filenames: damask.util.croak(geom.update(canvas,origin=origin+offset*size/old,rescale=True)) geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:])) - if name is None: - sys.stdout.write(str(geom.show())) - else: - geom.to_file(name) + geom.to_file(sys.stdout if name is None else name,pack=False) diff --git a/processing/pre/geom_clean.py b/processing/pre/geom_clean.py index 50f3657b2..8883c1b2a 100755 --- a/processing/pre/geom_clean.py +++ b/processing/pre/geom_clean.py @@ -37,12 +37,6 @@ for name in filenames: damask.util.report(scriptName,name) geom = damask.Geom.from_file(StringIO(''.join(sys.stdin.read())) if name is None else name) - damask.util.croak(geom.clean(options.stencil)) - geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:])) - - if name is None: - sys.stdout.write(str(geom.show())) - else: - geom.to_file(name) + geom.to_file(sys.stdout if name is None else name,pack=False) diff --git a/processing/pre/geom_fromDREAM3D.py b/processing/pre/geom_fromDREAM3D.py index 5d41e05b9..159793cd8 100755 --- a/processing/pre/geom_fromDREAM3D.py +++ b/processing/pre/geom_fromDREAM3D.py @@ -86,7 +86,7 @@ for name in filenames: * inFile[os.path.join(group_geom,'SPACING')][...] grid = inFile[os.path.join(group_geom,'DIMENSIONS')][...] origin = inFile[os.path.join(group_geom,'ORIGIN')][...] - except: + except KeyError: errors.append('Geometry data ({}) not found'.format(group_geom)) @@ -98,13 +98,13 @@ for name in filenames: try: quats = np.reshape(inFile[dataset][...],(np.product(grid),4)) rot = [damask.Rotation.fromQuaternion(q,True,P=+1) for q in quats] - except: + except KeyError: errors.append('Pointwise orientation (quaternion) data ({}) not readable'.format(dataset)) dataset = os.path.join(group_pointwise,options.phase) try: phase = np.reshape(inFile[dataset][...],(np.product(grid))) - except: + except KeyError: errors.append('Pointwise phase data ({}) not readable'.format(dataset)) microstructure = np.arange(1,np.product(grid)+1,dtype=int).reshape(grid,order='F') @@ -116,7 +116,7 @@ for name in filenames: dataset = os.path.join(group_pointwise,options.microstructure) try: microstructure = np.transpose(inFile[dataset][...].reshape(grid[::-1]),(2,1,0)) # convert from C ordering - except: + except KeyError: errors.append('Link between pointwise and grain average data ({}) not readable'.format(dataset)) group_average = os.path.join(rootDir,options.basegroup,options.average) @@ -124,13 +124,13 @@ for name in filenames: dataset = os.path.join(group_average,options.quaternion) try: rot = [damask.Rotation.fromQuaternion(q,True,P=+1) for q in inFile[dataset][...][1:]] # skip first entry (unindexed) - except: + except KeyError: errors.append('Average orientation data ({}) not readable'.format(dataset)) dataset = os.path.join(group_average,options.phase) try: phase = [i[0] for i in inFile[dataset][...]][1:] # skip first entry (unindexed) - except: + except KeyError: errors.append('Average phase data ({}) not readable'.format(dataset)) if errors != []: @@ -155,4 +155,4 @@ for name in filenames: homogenization=options.homogenization,comments=header) damask.util.croak(geom) - geom.to_file(os.path.splitext(name)[0]+'.geom') + geom.to_file(os.path.splitext(name)[0]+'.geom',pack=False) diff --git a/processing/pre/geom_fromMinimalSurface.py b/processing/pre/geom_fromMinimalSurface.py index ab42ce5af..bb6859b54 100755 --- a/processing/pre/geom_fromMinimalSurface.py +++ b/processing/pre/geom_fromMinimalSurface.py @@ -89,7 +89,4 @@ geom=damask.Geom(microstructure,options.size, comments=[scriptID + ' ' + ' '.join(sys.argv[1:])]) damask.util.croak(geom) -if name is None: - sys.stdout.write(str(geom.show())) -else: - geom.to_file(name) +geom.to_file(sys.stdout if name is None else name,pack=False) diff --git a/processing/pre/geom_fromOsteonGeometry.py b/processing/pre/geom_fromOsteonGeometry.py index 146bf216c..499a8867f 100755 --- a/processing/pre/geom_fromOsteonGeometry.py +++ b/processing/pre/geom_fromOsteonGeometry.py @@ -145,7 +145,4 @@ geom = damask.Geom(microstructure.reshape(grid), homogenization=options.homogenization,comments=header) damask.util.croak(geom) -if name is None: - sys.stdout.write(str(geom.show())) -else: - geom.to_file(name) +geom.to_file(sys.stdout if name is None else name,pack=False) diff --git a/processing/pre/geom_fromScratch.py b/processing/pre/geom_fromScratch.py index bfb294080..89fd27be5 100755 --- a/processing/pre/geom_fromScratch.py +++ b/processing/pre/geom_fromScratch.py @@ -63,7 +63,4 @@ geom = damask.Geom(microstructure=np.full(options.grid,options.fill,dtype=dtype) comments=scriptID + ' ' + ' '.join(sys.argv[1:])) damask.util.croak(geom) -if name is None: - sys.stdout.write(str(geom.show())) -else: - geom.to_file(name) +geom.to_file(sys.stdout if name is None else name,pack=False) diff --git a/processing/pre/geom_fromTable.py b/processing/pre/geom_fromTable.py index aa37451c7..f513c4834 100755 --- a/processing/pre/geom_fromTable.py +++ b/processing/pre/geom_fromTable.py @@ -152,7 +152,4 @@ for name in filenames: homogenization=options.homogenization,comments=header) damask.util.croak(geom) - if name is None: - sys.stdout.write(str(geom.show())) - else: - geom.to_file(os.path.splitext(name)[0]+'.geom') + geom.to_file(sys.stdout if name is None else os.path.splitext(name)[0]+'.geom',pack=False) diff --git a/processing/pre/geom_fromVoronoiTessellation.py b/processing/pre/geom_fromVoronoiTessellation.py index 9d4573c2c..28e215f85 100755 --- a/processing/pre/geom_fromVoronoiTessellation.py +++ b/processing/pre/geom_fromVoronoiTessellation.py @@ -302,7 +302,4 @@ for name in filenames: homogenization=options.homogenization,comments=header) damask.util.croak(geom) - if name is None: - sys.stdout.write(str(geom.show())) - else: - geom.to_file(os.path.splitext(name)[0]+'.geom') + geom.to_file(sys.stdout if name is None else os.path.splitext(name)[0]+'.geom',pack=False) diff --git a/processing/pre/geom_grainGrowth.py b/processing/pre/geom_grainGrowth.py index b31fc13f2..bdf8d8efe 100755 --- a/processing/pre/geom_grainGrowth.py +++ b/processing/pre/geom_grainGrowth.py @@ -172,7 +172,4 @@ for name in filenames: damask.util.croak(geom.update(microstructure[0:grid_original[0],0:grid_original[1],0:grid_original[2]])) geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:])) - if name is None: - sys.stdout.write(str(geom.show())) - else: - geom.to_file(name) + geom.to_file(sys.stdout if name is None else name,pack=False) diff --git a/processing/pre/geom_mirror.py b/processing/pre/geom_mirror.py index 77ec1f4d7..cca0a4e10 100755 --- a/processing/pre/geom_mirror.py +++ b/processing/pre/geom_mirror.py @@ -42,11 +42,6 @@ for name in filenames: damask.util.report(scriptName,name) geom = damask.Geom.from_file(StringIO(''.join(sys.stdin.read())) if name is None else name) - damask.util.croak(geom.mirror(options.directions,options.reflect)) geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:])) - - if name is None: - sys.stdout.write(str(geom.show())) - else: - geom.to_file(name) + geom.to_file(sys.stdout if name is None else name,pack=False) diff --git a/processing/pre/geom_pack.py b/processing/pre/geom_pack.py index 786a40b95..e927c006f 100755 --- a/processing/pre/geom_pack.py +++ b/processing/pre/geom_pack.py @@ -33,42 +33,5 @@ for name in filenames: damask.util.croak(geom) geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:])) - - compressType = None - former = start = -1 - reps = 0 - - if name is None: - f = sys.stdout - else: - f= open(name,'w') - - for current in geom.microstructure.flatten('F'): - if abs(current - former) == 1 and (start - current) == reps*(former - current): - compressType = 'to' - reps += 1 - elif current == former and start == former: - compressType = 'of' - reps += 1 - else: - if compressType is None: - f.write('\n'.join(geom.get_header())+'\n') - elif compressType == '.': - f.write('{}\n'.format(former)) - elif compressType == 'to': - f.write('{} to {}\n'.format(start,former)) - elif compressType == 'of': - f.write('{} of {}\n'.format(reps,former)) - - compressType = '.' - start = current - reps = 1 - - former = current - - if compressType == '.': - f.write('{}\n'.format(former)) - elif compressType == 'to': - f.write('{} to {}\n'.format(start,former)) - elif compressType == 'of': - f.write('{} of {}\n'.format(reps,former)) + + geom.to_file(sys.stdout if name is None else name,pack=True) diff --git a/processing/pre/geom_renumber.py b/processing/pre/geom_renumber.py index 2eee189e1..6e51062a5 100755 --- a/processing/pre/geom_renumber.py +++ b/processing/pre/geom_renumber.py @@ -5,8 +5,6 @@ import sys from io import StringIO from optparse import OptionParser -import numpy as np - import damask @@ -32,15 +30,6 @@ for name in filenames: damask.util.report(scriptName,name) geom = damask.Geom.from_file(StringIO(''.join(sys.stdin.read())) if name is None else name) - - renumbered = np.empty(geom.get_grid(),dtype=geom.microstructure.dtype) - for i, oldID in enumerate(np.unique(geom.microstructure)): - renumbered = np.where(geom.microstructure == oldID, i+1, renumbered) - - damask.util.croak(geom.update(renumbered)) + damask.util.croak(geom.renumber()) geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:])) - - if name is None: - sys.stdout.write(str(geom.show())) - else: - geom.to_file(name) + geom.to_file(sys.stdout if name is None else name,pack=False) diff --git a/processing/pre/geom_rescale.py b/processing/pre/geom_rescale.py index e84c7597b..b1a15593c 100755 --- a/processing/pre/geom_rescale.py +++ b/processing/pre/geom_rescale.py @@ -2,11 +2,10 @@ import os import sys -import numpy as np - from io import StringIO from optparse import OptionParser -from scipy import ndimage + +import numpy as np import damask @@ -55,20 +54,7 @@ for name in filenames: np.array([o*float(n.lower().replace('x','')) if n.lower().endswith('x') \ else float(n) for o,n in zip(size,options.size)],dtype=float) - damask.util.croak(geom.update(microstructure = - ndimage.interpolation.zoom( - geom.microstructure, - new_grid/grid, - output=geom.microstructure.dtype, - order=0, - mode='nearest', - prefilter=False, - ) if np.any(new_grid != grid) \ - else None, - size = new_size)) + geom.scale(new_grid) + damask.util.croak(geom.update(microstructure = None,size = new_size)) geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:])) - - if name is None: - sys.stdout.write(str(geom.show())) - else: - geom.to_file(name) + geom.to_file(sys.stdout if name is None else name,pack=False) diff --git a/processing/pre/geom_rotate.py b/processing/pre/geom_rotate.py index c2a4af04b..977e00b65 100755 --- a/processing/pre/geom_rotate.py +++ b/processing/pre/geom_rotate.py @@ -95,7 +95,4 @@ for name in filenames: damask.util.croak(geom.update(microstructure,origin=origin-(np.asarray(microstructure.shape)-grid)/2*size/grid,rescale=True)) geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:])) - if name is None: - sys.stdout.write(str(geom.show())) - else: - geom.to_file(name) + geom.to_file(sys.stdout if name is None else name,pack=False) diff --git a/processing/pre/geom_translate.py b/processing/pre/geom_translate.py index 4b91920ae..2d4279821 100755 --- a/processing/pre/geom_translate.py +++ b/processing/pre/geom_translate.py @@ -58,7 +58,4 @@ for name in filenames: damask.util.croak(geom.update(substituted,origin=geom.get_origin()+options.origin)) geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:])) - if name is None: - sys.stdout.write(str(geom.show())) - else: - geom.to_file(name) + geom.to_file(sys.stdout if name is None else name,pack=False) diff --git a/processing/pre/geom_unpack.py b/processing/pre/geom_unpack.py index 2a2d54130..58bd5de87 100755 --- a/processing/pre/geom_unpack.py +++ b/processing/pre/geom_unpack.py @@ -34,7 +34,4 @@ for name in filenames: damask.util.croak(geom) geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:])) - if name is None: - sys.stdout.write(str(geom.show())) - else: - geom.to_file(name) + geom.to_file(sys.stdout if name is None else name,pack=False) diff --git a/processing/pre/geom_vicinityOffset.py b/processing/pre/geom_vicinityOffset.py index 3a4853121..e30779d31 100755 --- a/processing/pre/geom_vicinityOffset.py +++ b/processing/pre/geom_vicinityOffset.py @@ -82,7 +82,4 @@ for name in filenames: geom.microstructure + offset,geom.microstructure))) geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:])) - if name is None: - sys.stdout.write(str(geom.show())) - else: - geom.to_file(name) + geom.to_file(sys.stdout if name is None else name,pack=False) diff --git a/python/damask/geom.py b/python/damask/geom.py index 6dfcda013..1c9e10cd1 100644 --- a/python/damask/geom.py +++ b/python/damask/geom.py @@ -250,11 +250,15 @@ class Geom(): geometry file to read. """ - with (open(fname) if isinstance(fname,str) else fname) as f: - f.seek(0) - header_length,keyword = f.readline().split()[:2] - header_length = int(header_length) - content = f.readlines() + try: + f = open(fname) + except TypeError: + f = fname + + f.seek(0) + header_length,keyword = f.readline().split()[:2] + header_length = int(header_length) + content = f.readlines() if not keyword.startswith('head') or header_length < 3: raise TypeError('Header length information missing or invalid') @@ -299,7 +303,7 @@ class Geom(): return cls(microstructure.reshape(grid),size,origin,homogenization,comments) - def to_file(self,fname): + def to_file(self,fname,pack=None): """ Writes a geom file. @@ -307,15 +311,63 @@ class Geom(): ---------- fname : str or file handle geometry file to write. + pack : bool, optional + compress geometry with 'x of y' and 'a to b'. """ header = self.get_header() grid = self.get_grid() - format_string = '%g' if self.microstructure in np.sctypes['float'] else \ - '%{}i'.format(1+int(np.floor(np.log10(np.nanmax(self.microstructure))))) - np.savetxt(fname, - self.microstructure.reshape([grid[0],np.prod(grid[1:])],order='F').T, - header='\n'.join(header), fmt=format_string, comments='') + + if pack is None: + plain = grid.prod()/np.unique(self.microstructure).size < 250 + else: + plain = not pack + + if plain: + format_string = '%g' if self.microstructure.dtype in np.sctypes['float'] else \ + '%{}i'.format(1+int(np.floor(np.log10(np.nanmax(self.microstructure))))) + np.savetxt(fname, + self.microstructure.reshape([grid[0],np.prod(grid[1:])],order='F').T, + header='\n'.join(header), fmt=format_string, comments='') + else: + try: + f = open(fname,'w') + except TypeError: + f = fname + + compressType = None + former = start = -1 + reps = 0 + for current in self.microstructure.flatten('F'): + if abs(current - former) == 1 and (start - current) == reps*(former - current): + compressType = 'to' + reps += 1 + elif current == former and start == former: + compressType = 'of' + reps += 1 + else: + if compressType is None: + f.write('\n'.join(self.get_header())+'\n') + elif compressType == '.': + f.write('{}\n'.format(former)) + elif compressType == 'to': + f.write('{} to {}\n'.format(start,former)) + elif compressType == 'of': + f.write('{} of {}\n'.format(reps,former)) + + compressType = '.' + start = current + reps = 1 + + former = current + + if compressType == '.': + f.write('{}\n'.format(former)) + elif compressType == 'to': + f.write('{} to {}\n'.format(start,former)) + elif compressType == 'of': + f.write('{} of {}\n'.format(reps,former)) + def to_vtk(self,fname=None): """ @@ -419,6 +471,29 @@ class Geom(): #self.add_comments('tbd') + def scale(self,grid): + """ + Scale microstructure to new grid. + + Parameters + ---------- + grid : iterable of int + new grid dimension + + """ + return self.update( + ndimage.interpolation.zoom( + self.microstructure, + grid/self.get_grid(), + output=self.microstructure.dtype, + order=0, + mode='nearest', + prefilter=False + ) + ) + #self.add_comments('tbd') + + def clean(self,stencil=3): """ Smooth microstructure by selecting most frequent index within given stencil at each location. @@ -433,7 +508,20 @@ class Geom(): unique, inverse = np.unique(arr, return_inverse=True) return unique[np.argmax(np.bincount(inverse))] - return self.update(ndimage.filters.generic_filter(self.microstructure, + return self.update(ndimage.filters.generic_filter( + self.microstructure, mostFrequent, - size=(stencil,)*3).astype(self.microstructure.dtype)) + size=(stencil,)*3 + ).astype(self.microstructure.dtype) + ) + #self.add_comments('tbd') + + + def renumber(self): + """Renumber sorted microstructure indices to 1,...,N.""" + renumbered = np.empty(self.get_grid(),dtype=self.microstructure.dtype) + for i, oldID in enumerate(np.unique(self.microstructure)): + renumbered = np.where(self.microstructure == oldID, i+1, renumbered) + + return self.update(renumbered) #self.add_comments('tbd') diff --git a/src/homogenization.f90 b/src/homogenization.f90 index cf0455d4f..a62f94820 100644 --- a/src/homogenization.f90 +++ b/src/homogenization.f90 @@ -592,15 +592,13 @@ subroutine materialpoint_postResults thePos, & theSize, & myNgrains, & - myCrystallite, & g, & !< grain number i, & !< integration point number e !< element number - !$OMP PARALLEL DO PRIVATE(myNgrains,myCrystallite,thePos,theSize) + !$OMP PARALLEL DO PRIVATE(myNgrains,thePos,theSize) elementLooping: do e = FEsolving_execElem(1),FEsolving_execElem(2) myNgrains = homogenization_Ngrains(material_homogenizationAt(e)) - myCrystallite = microstructure_crystallite(discretization_microstructureAt(e)) IpLooping: do i = FEsolving_execIP(1,e),FEsolving_execIP(2,e) thePos = 0 diff --git a/src/material.f90 b/src/material.f90 index e86ba98e1..2f70fe97b 100644 --- a/src/material.f90 +++ b/src/material.f90 @@ -120,8 +120,7 @@ module material homogenization_Noutput, & !< number of '(output)' items per homogenization homogenization_typeInstance, & !< instance of particular type of each homogenization thermal_typeInstance, & !< instance of particular type of each thermal transport - damage_typeInstance, & !< instance of particular type of each nonlocal damage - microstructure_crystallite !< crystallite setting ID of each microstructure ! DEPRECATED !!!! + damage_typeInstance !< instance of particular type of each nonlocal damage real(pReal), dimension(:), allocatable, public, protected :: & thermal_initialT, & !< initial temperature per each homogenization @@ -273,9 +272,6 @@ subroutine material_init allocate(temperatureRate (material_Nhomogenization)) do m = 1,size(config_microstructure) - if(microstructure_crystallite(m) < 1 .or. & - microstructure_crystallite(m) > size(config_crystallite)) & - call IO_error(150,m,ext_msg='crystallite') if(minval(microstructure_phase(1:microstructure_Nconstituents(m),m)) < 1 .or. & maxval(microstructure_phase(1:microstructure_Nconstituents(m),m)) > size(config_phase)) & call IO_error(150,m,ext_msg='phase') @@ -294,9 +290,8 @@ subroutine material_init enddo write(6,'(/,a14,18x,1x,a11,1x,a12,1x,a13)') 'microstructure','crystallite','constituents' do m = 1,size(config_microstructure) - write(6,'(1x,a32,1x,i11,1x,i12)') config_name_microstructure(m), & - microstructure_crystallite(m), & - microstructure_Nconstituents(m) + write(6,'(1x,a32,1x,i12)') config_name_microstructure(m), & + microstructure_Nconstituents(m) if (microstructure_Nconstituents(m) > 0) then do c = 1,microstructure_Nconstituents(m) write(6,'(a1,1x,a32,1x,a32,1x,f7.4)') '>',config_name_phase(microstructure_phase(c,m)),& @@ -496,7 +491,6 @@ subroutine material_parseMicrostructure character(len=65536) :: & tag - allocate(microstructure_crystallite(size(config_microstructure)), source=0) allocate(microstructure_Nconstituents(size(config_microstructure)), source=0) allocate(microstructure_active(size(config_microstructure)), source=.false.) @@ -508,7 +502,6 @@ subroutine material_parseMicrostructure do m=1, size(config_microstructure) microstructure_Nconstituents(m) = config_microstructure(m)%countKeys('(constituent)') - microstructure_crystallite(m) = config_microstructure(m)%getInt('crystallite') enddo microstructure_maxNconstituents = maxval(microstructure_Nconstituents)