similar structure for building blocks

This commit is contained in:
Martin Diehl 2019-05-30 10:45:17 +02:00
parent 510b55df50
commit e974bb9c43
4 changed files with 7 additions and 4 deletions

View File

@ -89,8 +89,8 @@ for x in range(options.grid[0]):
geom=damask.Geom(microstructure,options.size, geom=damask.Geom(microstructure,options.size,
homogenization=options.homogenization, homogenization=options.homogenization,
comments=[scriptID + ' ' + ' '.join(sys.argv[1:])]) comments=[scriptID + ' ' + ' '.join(sys.argv[1:])])
damask.util.croak(geom) damask.util.croak(geom)
if name is None: if name is None:
sys.stdout.write(str(geom.show())) sys.stdout.write(str(geom.show()))
else: else:

View File

@ -134,7 +134,8 @@ for i in range(3,np.max(microstructure)):
config_header.append('[Point{}]'.format(i-2)) config_header.append('[Point{}]'.format(i-2))
config_header.append('(gauss)\tphi1 {:.2f}\tPhi {:.2f}\tphi2 0'.format(Alpha[i],Beta[i])) config_header.append('(gauss)\tphi1 {:.2f}\tPhi {:.2f}\tphi2 0'.format(Alpha[i],Beta[i]))
header = [scriptID + ' ' + ' '.join(sys.argv[1:])] + config_header header = [scriptID + ' ' + ' '.join(sys.argv[1:])]\
+ config_header
geom = damask.Geom(microstructure.reshape(grid), geom = damask.Geom(microstructure.reshape(grid),
size,-size/2, size,-size/2,
homogenization=options.homogenization,comments=header) homogenization=options.homogenization,comments=header)

0
processing/pre/geom_fromTable.py Normal file → Executable file
View File

View File

@ -194,15 +194,17 @@ parser.set_defaults(pos = 'pos',
normalized = True, normalized = True,
config = True, config = True,
) )
(options,filenames) = parser.parse_args() (options,filenames) = parser.parse_args()
# --- loop over input files -------------------------------------------------------------------------
if filenames == []: filenames = [None] if filenames == []: filenames = [None]
for name in filenames: for name in filenames:
table = damask.ASCIItable(name = name, readonly = True)
damask.util.report(scriptName,name) damask.util.report(scriptName,name)
table = damask.ASCIItable(name = name, readonly = True)
# --- read header ---------------------------------------------------------------------------- # --- read header ----------------------------------------------------------------------------