Merge branch 'MiscImprovements' into 'development'

Misc improvements

See merge request damask/DAMASK!199
This commit is contained in:
Philip Eisenlohr 2020-08-10 03:46:56 +02:00
commit 4b45c37ee5
40 changed files with 1337 additions and 1889 deletions

View File

@ -141,13 +141,6 @@ Pre_General:
- release - release
################################################################################################### ###################################################################################################
Post_AverageDown:
stage: postprocessing
script: averageDown/test.py
except:
- master
- release
Post_ASCIItable: Post_ASCIItable:
stage: postprocessing stage: postprocessing
script: ASCIItable/test.py script: ASCIItable/test.py

@ -1 +1 @@
Subproject commit 3fc9d58a35614fd8ffa1179e634431eb457d0150 Subproject commit a52584687a93b9f007cf019861fce68eb31451ab

View File

@ -1,184 +0,0 @@
#!/usr/bin/env python3
import os
import sys
from optparse import OptionParser
import numpy as np
from PIL import Image
import damask
scriptName = os.path.splitext(os.path.basename(__file__))[0]
scriptID = ' '.join([scriptName,damask.version])
# --------------------------------------------------------------------
# MAIN
# --------------------------------------------------------------------
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
Generate PNG image from data in given column (or 2D data of overall table).
""", version = scriptID)
parser.add_option('-l','--label',
dest = 'label',
type = 'string', metavar = 'string',
help = 'column containing data [all]')
parser.add_option('-r','--range',
dest = 'range',
type = 'float', nargs = 2, metavar = 'float float',
help = 'data range (min max) [auto]')
parser.add_option('--gap', '--transparent',
dest = 'gap',
type = 'float', metavar = 'float',
help = 'value to treat as transparent [%default]')
parser.add_option('-d','--dimension',
dest = 'dimension',
type = 'int', nargs = 2, metavar = 'int int',
help = 'data dimension (width height) [native]')
parser.add_option('--color',
dest = 'color',
type = 'string', metavar = 'string',
help = 'color scheme [%default]')
parser.add_option('--invert',
dest = 'invert',
action = 'store_true',
help = 'invert color scheme')
parser.add_option('--abs',
dest = 'abs',
action = 'store_true',
help = 'magnitude of values')
parser.add_option('--log',
dest = 'log',
action = 'store_true',
help = 'log10 of values')
parser.add_option('--fliplr',
dest = 'flipLR',
action = 'store_true',
help = 'flip around vertical axis')
parser.add_option('--flipud',
dest = 'flipUD',
action = 'store_true',
help = 'flip around horizontal axis')
parser.add_option('--crop',
dest = 'crop',
type = 'int', nargs = 4, metavar = 'int int int int',
help = 'pixels cropped on left, right, top, bottom')
parser.add_option('-N','--pixelsize',
dest = 'pixelsize',
type = 'int', metavar = 'int',
help = 'pixel per data point')
parser.add_option('-x','--pixelsizex',
dest = 'pixelsizex',
type = 'int', metavar = 'int',
help = 'pixel per data point along x')
parser.add_option('-y','--pixelsizey',
dest = 'pixelsizey',
type = 'int', metavar = 'int',
help = 'pixel per data point along y')
parser.add_option('--show',
dest = 'show',
action = 'store_true',
help = 'show resulting image')
parser.set_defaults(label = None,
range = [0.0,0.0],
gap = None,
dimension = [],
abs = False,
log = False,
flipLR = False,
flipUD = False,
color = "gray",
invert = False,
crop = [0,0,0,0],
pixelsize = 1,
pixelsizex = 1,
pixelsizey = 1,
show = False,
)
(options,filenames) = parser.parse_args()
if filenames == []: filenames = [None]
if options.pixelsize > 1: (options.pixelsizex,options.pixelsizey) = [options.pixelsize]*2
# --- color palette ---------------------------------------------------------------------------------
theMap = damask.Colormap(predefined = options.color)
if options.invert: theMap = theMap.invert()
theColors = np.uint8(np.array(theMap.export(format = 'list',steps = 256))*255)
# --- loop over input files -------------------------------------------------------------------------
for name in filenames:
try:
table = damask.ASCIItable(name = name, labeled = options.label is not None, readonly = True)
except IOError:
continue
damask.util.report(scriptName,name)
# ------------------------------------------ read header ------------------------------------------
table.head_read()
# ------------------------------------------ process data ------------------------------------------
missing_labels = table.data_readArray(options.label)
if len(missing_labels) > 0:
damask.util.croak('column {} not found.'.format(options.label))
table.close(dismiss = True) # close ASCIItable and remove empty file
continue
# convert data to values between 0 and 1 and arrange according to given options
if options.dimension != []: table.data = table.data.reshape(options.dimension[1],options.dimension[0])
if options.abs: table.data = np.abs(table.data)
if options.log: table.data = np.log10(table.data);options.range = np.log10(options.range)
if options.flipLR: table.data = np.fliplr(table.data)
if options.flipUD: table.data = np.flipud(table.data)
mask = np.logical_or(table.data == options.gap, np.isnan(table.data))\
if options.gap else np.logical_not(np.isnan(table.data)) # mask gap and NaN (if gap present)
if np.all(np.array(options.range) == 0.0):
options.range = [table.data[mask].min(),
table.data[mask].max()]
damask.util.croak('data range: {0} {1}'.format(*options.range))
delta = max(options.range) - min(options.range)
avg = 0.5*(max(options.range) + min(options.range))
if delta * 1e8 <= avg: # delta around numerical noise
options.range = [min(options.range) - 0.5*avg, max(options.range) + 0.5*avg] # extend range to have actual data centered within
table.data = (table.data - min(options.range)) / \
(max(options.range) - min(options.range))
table.data = np.clip(table.data,0.0,1.0).\
repeat(options.pixelsizex,axis = 1).\
repeat(options.pixelsizey,axis = 0)
mask = mask.\
repeat(options.pixelsizex,axis = 1).\
repeat(options.pixelsizey,axis = 0)
(height,width) = table.data.shape
damask.util.croak('image dimension: {0} x {1}'.format(width,height))
im = Image.fromarray(np.dstack((theColors[np.array(255*table.data,dtype = np.uint8)],
255*mask.astype(np.uint8))), 'RGBA').\
crop(( options.crop[0],
options.crop[2],
width -options.crop[1],
height-options.crop[3]))
# ------------------------------------------ output result -----------------------------------------
im.save(sys.stdout if not name else
os.path.splitext(name)[0]+ \
('' if options.label is None else '_'+options.label)+ \
'.png',
format = "PNG")
table.close() # close ASCII table
if options.show: im.show()

View File

@ -1,134 +0,0 @@
#!/usr/bin/env python3
import os
import sys
from optparse import OptionParser
import numpy as np
from PIL import Image
import damask
scriptName = os.path.splitext(os.path.basename(__file__))[0]
scriptID = ' '.join([scriptName,damask.version])
# --------------------------------------------------------------------
# MAIN
# --------------------------------------------------------------------
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [file[s]]', description = """
Generate PNG image from data in given column vector containing RGB tuples.
""", version = scriptID)
parser.add_option('-l','--label',
dest = 'label',
type = 'string', metavar = 'string',
help = 'column containing RGB triplet')
parser.add_option('-d','--dimension',
dest = 'dimension',
type = 'int', nargs = 2, metavar = 'int int',
help = 'data dimension (width height)')
parser.add_option('--fliplr',
dest = 'flipLR',
action = 'store_true',
help = 'flip around vertical axis')
parser.add_option('--flipud',
dest = 'flipUD',
action = 'store_true',
help = 'flip around horizontal axis')
parser.add_option('--crop',
dest = 'crop',
type = 'int', nargs = 4, metavar = ' '.join(['int']*4),
help = 'pixels cropped on left, right, top, bottom')
parser.add_option('-N','--pixelsize',
dest = 'pixelsize',
type = 'int', metavar = 'int',
help = 'pixels per data point')
parser.add_option('-x','--pixelsizex',
dest = 'pixelsizex',
type = 'int', metavar = 'int',
help = 'pixels per data point along x')
parser.add_option('-y','--pixelsizey',
dest = 'pixelsizey',
type = 'int', metavar = 'int',
help = 'pixels per data point along y')
parser.add_option('--show',
dest = 'show',
action = 'store_true',
help = 'show resulting image')
parser.set_defaults(label = None,
dimension = [],
flipLR = False,
flipUD = False,
crop = [0,0,0,0],
pixelsize = 1,
pixelsizex = 1,
pixelsizey = 1,
show = False,
)
(options,filenames) = parser.parse_args()
if filenames == []: filenames = [None]
if options.dimension == []: parser.error('dimension of data array missing')
if options.pixelsize > 1: (options.pixelsizex,options.pixelsizey) = [options.pixelsize]*2
# --- loop over input files -------------------------------------------------------------------------
for name in filenames:
try:
table = damask.ASCIItable(name = name, labeled = options.label is not None, readonly = True)
except IOError:
continue
damask.util.report(scriptName,name)
# ------------------------------------------ read header ------------------------------------------
table.head_read()
# ------------------------------------------ process data ------------------------------------------
errors = []
missing_labels = table.data_readArray(options.label)
if len(missing_labels) > 0:
errors.append('column{} {} not found'.format('s' if len(missing_labels) > 1 else '',
', '.join(missing_labels)))
if table.label_dimension(options.label) != 3:
errors.append('column {} does not have dimension'.format(options.label))
if errors != []:
damask.util.croak(errors)
table.close(dismiss = True) # close ASCII table file handles and delete output file
continue
# convert data to shape and arrange according to given options
if options.dimension != []: table.data = table.data.reshape(options.dimension[1],options.dimension[0],3)
if options.flipLR: table.data = np.fliplr(table.data)
if options.flipUD: table.data = np.flipud(table.data)
table.data = table.data.repeat(options.pixelsizex,axis=1).\
repeat(options.pixelsizey,axis=0)
table.data *= 1. if np.any(table.data > 1.0) else 255.0 # ensure 8 bit data range
(height,width,bands) = table.data.shape
damask.util.croak('image dimension: {0} x {1}'.format(width,height))
im = Image.fromarray(table.data.astype('uint8'), 'RGB').\
crop(( options.crop[0],
options.crop[2],
width -options.crop[1],
height-options.crop[3]))
# ------------------------------------------ output result -----------------------------------------
im.save(os.path.splitext(name)[0]+ \
('_'+options.label if options.label else '')+ \
'.png' if name else sys.stdout,
format = "PNG")
table.close() # close ASCII table
if options.show: im.show()

View File

@ -1,98 +0,0 @@
#!/usr/bin/env python3
import os
import sys
from io import StringIO
from optparse import OptionParser
import numpy as np
import scipy.ndimage
import damask
scriptName = os.path.splitext(os.path.basename(__file__))[0]
scriptID = ' '.join([scriptName,damask.version])
# --------------------------------------------------------------------
# MAIN
# --------------------------------------------------------------------
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [ASCIItable(s)]', description = """
Average each data block of size 'packing' into single values thus reducing the former grid to grid/packing.
""", version = scriptID)
parser.add_option('-c','--coordinates',
dest = 'pos',
type = 'string', metavar = 'string',
help = 'column label of coordinates [%default]')
parser.add_option('-p','--packing',
dest = 'packing',
type = 'int', nargs = 3, metavar = 'int int int',
help = 'size of packed group [%default]')
parser.add_option('--shift',
dest = 'shift',
type = 'int', nargs = 3, metavar = 'int int int',
help = 'shift vector of packing stencil [%default]')
parser.add_option('-g', '--grid',
dest = 'grid',
type = 'int', nargs = 3, metavar = 'int int int',
help = 'grid in x,y,z (optional)')
parser.add_option('-s', '--size',
dest = 'size',
type = 'float', nargs = 3, metavar = 'float float float',
help = 'size in x,y,z (optional)')
parser.set_defaults(pos = 'pos',
packing = (2,2,2),
shift = (0,0,0),
)
(options,filenames) = parser.parse_args()
if filenames == []: filenames = [None]
packing = np.array(options.packing,dtype = int)
shift = np.array(options.shift, dtype = int)
prefix = 'averagedDown{}x{}x{}_'.format(*packing)
if any(shift != 0): prefix += 'shift{:+}{:+}{:+}_'.format(*shift)
for name in filenames:
damask.util.report(scriptName,name)
table = damask.Table.from_ASCII(StringIO(''.join(sys.stdin.read())) if name is None else name)
if (options.grid is None or options.size is None):
grid,size,origin = damask.grid_filters.cell_coord0_gridSizeOrigin(table.get(options.pos))
else:
grid = np.array(options.grid,'i')
size = np.array(options.size,'d')
packing = np.where(grid == 1,1,packing) # reset packing to 1 where grid==1
shift = np.where(grid == 1,0,shift) # reset shift to 0 where grid==1
packedGrid = np.maximum(np.ones(3,'i'),grid//packing)
data = table.data.values.reshape(tuple(grid)+(-1,),order = 'F')
averagedDown = scipy.ndimage.filters.uniform_filter( \
np.roll(
np.roll(
np.roll(data,
-shift[0],axis = 0),
-shift[1],axis = 1),
-shift[2],axis = 2),
size = list(packing) + [1],
mode = 'wrap',
origin = list(-(packing//2)) + [0])\
[::packing[0],::packing[1],::packing[2],:].reshape((packedGrid.prod(),-1),order = 'F')
table = damask.Table(averagedDown,table.shapes,table.comments)
coords = damask.grid_filters.cell_coord0(packedGrid,size,shift/packedGrid*size+origin)
table.set(options.pos, coords.reshape(-1,3,order='F'))
outname = os.path.join(os.path.dirname(name),prefix+os.path.basename(name))
table.to_ASCII(sys.stdout if name is None else outname)

View File

@ -1,72 +0,0 @@
#!/usr/bin/env python3
import os
import sys
from io import StringIO
from optparse import OptionParser
from scipy import ndimage
import numpy as np
import damask
scriptName = os.path.splitext(os.path.basename(__file__))[0]
scriptID = ' '.join([scriptName,damask.version])
# --------------------------------------------------------------------
# MAIN
# --------------------------------------------------------------------
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [ASCIItable(s)]', description = """
Blows up each value to a surrounding data block of size 'packing' thus increasing the former resolution
to resolution*packing.
""", version = scriptID)
parser.add_option('-c','--coordinates',
dest = 'pos', metavar = 'string',
help = 'column label of coordinates [%default]')
parser.add_option('-p','--packing',
dest = 'packing', type = 'int', nargs = 3, metavar = 'int int int',
help = 'dimension of packed group [%default]')
parser.add_option('-g','--grid',
dest = 'resolution', type = 'int', nargs = 3, metavar = 'int int int',
help = 'grid in x,y,z (optional)')
parser.add_option('-s','--size',
dest = 'dimension', type = 'float', nargs = 3, metavar = 'int int int',
help = 'size in x,y,z (optional)')
parser.set_defaults(pos = 'pos',
packing = (2,2,2),
grid = (0,0,0),
size = (0.0,0.0,0.0),
)
(options,filenames) = parser.parse_args()
if filenames == []: filenames = [None]
options.packing = np.array(options.packing)
prefix = 'blowUp{}x{}x{}_'.format(*options.packing)
for name in filenames:
damask.util.report(scriptName,name)
table = damask.Table.from_ASCII(StringIO(''.join(sys.stdin.read())) if name is None else name)
grid,size,origin = damask.grid_filters.cell_coord0_gridSizeOrigin(table.get(options.pos))
packing = np.array(options.packing,'i')
outSize = grid*packing
data = table.data.values.reshape(tuple(grid)+(-1,),order='F')
blownUp = ndimage.interpolation.zoom(data,tuple(packing)+(1,),order=0,mode='nearest').reshape(outSize.prod(),-1,order='F')
table = damask.Table(blownUp,table.shapes,table.comments)
coords = damask.grid_filters.cell_coord0(outSize,size,origin)
table.set(options.pos,coords.reshape(-1,3,order='F'))
table.set('elem',np.arange(1,outSize.prod()+1))
outname = os.path.join(os.path.dirname(name),prefix+os.path.basename(name))
table.to_ASCII(sys.stdout if name is None else outname)

View File

@ -1,4 +1,4 @@
#!/usr/bin/env python2.7 #!/usr/bin/env python3
import os import os
import sys import sys
@ -11,54 +11,50 @@ import vtk
import damask import damask
scriptName = os.path.splitext(os.path.basename(__file__))[0] scriptName = os.path.splitext(os.path.basename(__file__))[0]
scriptID = ' '.join([scriptName,damask.version]) scriptID = ' '.join([scriptName,damask.version])
# ----------------------------- # -----------------------------
def getHeader(filename,sizeFastIndex,sizeSlowIndex,stepsize): def getHeader(filename,sizeFastIndex,sizeSlowIndex,stepsize):
"""Returns header for ang file step size in micrometer""" """Returns header for ang file step size in micrometer."""
return '\n'.join([ \ return '\n'.join([
'# TEM_PIXperUM 1.000000', \ '# TEM_PIXperUM 1.000000',
'# x-star 1.000000', \ '# x-star 1.000000',
'# y-star 1.000000', \ '# y-star 1.000000',
'# z-star 1.000000', \ '# z-star 1.000000',
'# WorkingDistance 18.000000', \ '# WorkingDistance 18.000000',
'#', \ '#',
'# Phase 1', \ '# Phase 1',
'# MaterialName XX', \ '# MaterialName XX',
'# Formula XX', \ '# Formula XX',
'# Info', \ '# Info',
'# Symmetry 43', \ '# Symmetry 43',
'# LatticeConstants 2.870 2.870 2.870 90.000 90.000 90.000', \ '# LatticeConstants 2.870 2.870 2.870 90.000 90.000 90.000',
'# NumberFamilies 1', \ '# NumberFamilies 1',
'# hklFamilies 1 1 0 1 0.000000 1', \ '# hklFamilies 1 1 0 1 0.000000 1',
'# Categories 0 0 0 0 0 ', \ '# Categories 0 0 0 0 0 ',
'#', \ '#',
'# GRID: SqrGrid', \ '# GRID: SqrGrid',
'# XSTEP: ' + str(stepsize*1e6), \ '# XSTEP: ' + str(stepsize*1e6),
'# YSTEP: ' + str(stepsize*1e6), \ '# YSTEP: ' + str(stepsize*1e6),
'# NCOLS_ODD: ' + str(sizeFastIndex), \ '# NCOLS_ODD: ' + str(sizeFastIndex),
'# NCOLS_EVEN: ' + str(sizeFastIndex), \ '# NCOLS_EVEN: ' + str(sizeFastIndex),
'# NROWS: ' + str(sizeSlowIndex), \ '# NROWS: ' + str(sizeSlowIndex),
'#', \ '#',
'# OPERATOR: ' + string.replace('$Id$','\n','\\n'), \ '# OPERATOR: ' + string.replace('$Id$','\n','\\n'),
'#', \ '#',
'# SAMPLEID: %s'%filename, \ '# SAMPLEID: {}'.format(filename),
'#', \ '#',
'# SCANID: ', \ '# SCANID: ',
'#', \ '#',
]) + '\n' ]) + '\n'
# ----------------------------- # -----------------------------
def positiveRadians(angle): def positiveRadians(angle):
"""Returns positive angle in radians from angle in degrees""" """Returns positive angle in radians from angle in degrees."""
angle = math.radians(float(angle)) return math.radians(float(angle)) % (2.*math.pi)
while angle < 0.0:
angle += 2.0 * math.pi
return angle
# ----------------------------- # -----------------------------
@ -67,7 +63,7 @@ def getDataLine(angles,x,y,validData=True):
Returns string of one line in ang file. Returns string of one line in ang file.
Convention in ang file: y coordinate comes first and is fastest index Convention in ang file: y coordinate comes first and is fastest index
positions in micrometer positions in micrometer.
""" """
info = {True: (9999.9, 1.0, 0,99999,0.0), info = {True: (9999.9, 1.0, 0,99999,0.0),
False: ( -1.0,-1.0,-1, -1,1.0)} False: ( -1.0,-1.0,-1, -1,1.0)}
@ -75,18 +71,16 @@ def getDataLine(angles,x,y,validData=True):
%(tuple(map(positiveRadians,angles))+(y*1e6,x*1e6)+info[validData]) %(tuple(map(positiveRadians,angles))+(y*1e6,x*1e6)+info[validData])
# -------------------------------------------------------------------- # --------------------------------------------------------------------
# MAIN FUNCTION STARTS HERE # MAIN FUNCTION STARTS HERE
# -------------------------------------------------------------------- # --------------------------------------------------------------------
parser = OptionParser(usage='%prog options [file[s]]', description = """ parser = OptionParser(usage='%prog options [file[s]]', description = """
Builds a ang files from a vtk file. Builds a ang files from a vtk file.
""", version = scriptID) """, version = scriptID)
parser.add_option('--disp','--displacement',dest='dispLabel', parser.add_option('--disp','--displacement',dest='dispLabel',
metavar ='string', metavar ='string',
help='label of displacements [%default]') help='label of displacements [%default]')
parser.add_option('--euler', dest='eulerLabel', nargs=3, parser.add_option('--euler', dest='eulerLabel', nargs=3,
@ -110,11 +104,6 @@ parser.add_option('-s','--scale', dest='scale', type='float',
parser.add_option('-r','--resolution', dest='resolution', type='float', parser.add_option('-r','--resolution', dest='resolution', type='float',
metavar ='float', metavar ='float',
help='scaling factor for resolution [%default]') help='scaling factor for resolution [%default]')
parser.add_option('--hex','--hexagonal', dest='hexagonal', action='store_true',
help='use in plane hexagonal grid')
parser.add_option('--interpolation', dest='interpolation', type='int',
metavar='float',
help='number of points for linear interpolation [%default]')
parser.add_option('--verbose', dest='verbose', action='store_true', parser.add_option('--verbose', dest='verbose', action='store_true',
help='verbose mode') help='verbose mode')
parser.add_option('--visualize', dest='visualize', action='store_true', parser.add_option('--visualize', dest='visualize', action='store_true',
@ -122,7 +111,6 @@ parser.add_option('--visualize', dest='visualize', action='store_true
parser.set_defaults(dispLabel = 'displacement') parser.set_defaults(dispLabel = 'displacement')
parser.set_defaults(eulerLabel = ['1_1_eulerangles','1_2_eulerangles','1_3_eulerangles']) parser.set_defaults(eulerLabel = ['1_1_eulerangles','1_2_eulerangles','1_3_eulerangles'])
parser.set_defaults(hexagonal = False)
parser.set_defaults(normal = [0.0,0.0,-1.0]) parser.set_defaults(normal = [0.0,0.0,-1.0])
parser.set_defaults(up = [0.0,1.0,0.0]) parser.set_defaults(up = [0.0,1.0,0.0])
parser.set_defaults(Nslices = 1) parser.set_defaults(Nslices = 1)
@ -130,7 +118,6 @@ parser.set_defaults(distance = 0.0)
parser.set_defaults(scale = 1.0) parser.set_defaults(scale = 1.0)
parser.set_defaults(resolution = 1.0) parser.set_defaults(resolution = 1.0)
parser.set_defaults(dispScaling = 1.0) parser.set_defaults(dispScaling = 1.0)
parser.set_defaults(interpolation = 1)
parser.set_defaults(verbose = False) parser.set_defaults(verbose = False)
parser.set_defaults(visualize = False) parser.set_defaults(visualize = False)
(options,filenames) = parser.parse_args() (options,filenames) = parser.parse_args()
@ -153,35 +140,26 @@ if np.dot(np.array(options.normal),np.array(options.up)) > 1e-3:
parser.error('normal vector and up vector have to be orthogonal') parser.error('normal vector and up vector have to be orthogonal')
# check for options that are not yet implemented
if options.interpolation > 1:
parser.error('interpolation not yet supported')
if options.hexagonal:
parser.error('hexagonal grid not yet supported')
#--- ITERATE OVER FILES AND PROCESS THEM #--- ITERATE OVER FILES AND PROCESS THEM
for filename in filenames: for filename in filenames:
if options.verbose: sys.stdout.write("\nREADING VTK FILE\n") if options.verbose: sys.stdout.write("\nREADING VTK FILE\n")
# Read the source file # Read the source file
reader = vtk.vtkUnstructuredGridReader() reader = vtk.vtkUnstructuredGridReader()
reader.SetFileName(filename) reader.SetFileName(filename)
reader.ReadAllScalarsOn() reader.ReadAllScalarsOn()
reader.ReadAllVectorsOn() reader.ReadAllVectorsOn()
reader.Update() reader.Update()
undeformedMesh = reader.GetOutput() undeformedMesh = reader.GetOutput()
# Get euler angles from cell data # Get euler angles from cell data
if options.verbose: sys.stdout.write("\nGETTING EULER ANGLES\n") if options.verbose: sys.stdout.write("\nGETTING EULER ANGLES\n")
angles = {} angles = {}
for i in range(reader.GetNumberOfScalarsInFile()): for i in range(undeformedMesh.GetPointData().GetNumberOfArrays()):
scalarName = reader.GetScalarsNameInFile(i) scalarName = undeformedMesh.GetPointData().GetArrayName(i)
if scalarName in options.eulerLabel: if scalarName in options.eulerLabel:
angles[scalarName] = undeformedMesh.GetCellData().GetScalars(scalarName) angles[scalarName] = undeformedMesh.GetCellData().GetScalars(scalarName)
if options.verbose: sys.stdout.write(" found scalar with name %s\n"%scalarName) if options.verbose: sys.stdout.write(" found scalar with name %s\n"%scalarName)
@ -189,14 +167,14 @@ for filename in filenames:
for label in options.eulerLabel: for label in options.eulerLabel:
if label not in angles.keys(): if label not in angles.keys():
parser.error('Could not find scalar data with name %s'%label) parser.error('Could not find scalar data with name %s'%label)
# Get deformed mesh # Get deformed mesh
if options.verbose: sys.stdout.write("\nDEFORM MESH\n") if options.verbose: sys.stdout.write("\nDEFORM MESH\n")
warpVector = vtk.vtkWarpVector() warpVector = vtk.vtkWarpVector()
undeformedMesh.GetPointData().SetActiveVectors(options.dispLabel) undeformedMesh.GetPointData().SetActiveVectors(options.dispLabel)
warpVector.SetInput(undeformedMesh) warpVector.SetInputData(undeformedMesh)
warpVector.Update() warpVector.Update()
deformedMesh = warpVector.GetOutput() deformedMesh = warpVector.GetOutput()
box = deformedMesh.GetBounds() # bounding box in mesh system box = deformedMesh.GetBounds() # bounding box in mesh system
@ -208,24 +186,24 @@ for filename in filenames:
# Get cell centers of deformed mesh (position of ips) # Get cell centers of deformed mesh (position of ips)
if options.verbose: sys.stdout.write("\nGETTING CELL CENTERS OF DEFORMED MESH\n") if options.verbose: sys.stdout.write("\nGETTING CELL CENTERS OF DEFORMED MESH\n")
cellCenter = vtk.vtkCellCenters() cellCenter = vtk.vtkCellCenters()
cellCenter.SetVertexCells(0) # do not generate vertex cells, just points cellCenter.SetVertexCells(0) # do not generate vertex cells, just points
cellCenter.SetInput(deformedMesh) cellCenter.SetInputData(deformedMesh)
cellCenter.Update() cellCenter.Update()
meshIPs = cellCenter.GetOutput() meshIPs = cellCenter.GetOutput()
# Get outer surface of deformed mesh # Get outer surface of deformed mesh
if options.verbose: sys.stdout.write("\nGETTING OUTER SURFACE OF DEFORMED MESH\n") if options.verbose: sys.stdout.write("\nGETTING OUTER SURFACE OF DEFORMED MESH\n")
surfaceFilter = vtk.vtkDataSetSurfaceFilter() surfaceFilter = vtk.vtkDataSetSurfaceFilter()
surfaceFilter.SetInput(deformedMesh) surfaceFilter.SetInputData(deformedMesh)
surfaceFilter.Update() surfaceFilter.Update()
surface = surfaceFilter.GetOutput() surface = surfaceFilter.GetOutput()
# Get coordinate system for ang files # Get coordinate system for ang files
# z-vector is normal to slices # z-vector is normal to slices
# x-vector corresponds to the up-direction # x-vector corresponds to the up-direction
@ -248,11 +226,11 @@ for filename in filenames:
# Get bounding box in rotated system (x,y,z) # Get bounding box in rotated system (x,y,z)
if options.verbose: sys.stdout.write("\nGETTING BOUNDING BOX IN ROTATED SYSTEM\n") if options.verbose: sys.stdout.write("\nGETTING BOUNDING BOX IN ROTATED SYSTEM\n")
rotatedbox = [[np.inf,-np.inf] for i in range(3)] # bounding box in rotated TSL system rotatedbox = [[np.inf,-np.inf] for i in range(3)] # bounding box in rotated TSL system
for n in range(8): # loop over eight vertices of mesh bounding box for n in range(8): # loop over eight vertices of mesh bounding box
vert = np.array([box[0+(n/1)%2], vert = np.array([box[0+(n//1)%2],
box[2+(n/2)%2], box[2+(n//2)%2],
box[4+(n/4)%2]]) # vertex in mesh system box[4+(n//4)%2]]) # vertex in mesh system
rotatedvert = np.dot(R,vert) # vertex in rotated system rotatedvert = np.dot(R,vert) # vertex in rotated system
for i in range(3): for i in range(3):
rotatedbox[i][0] = min(rotatedbox[i][0],rotatedvert[i]) rotatedbox[i][0] = min(rotatedbox[i][0],rotatedvert[i])
@ -274,7 +252,7 @@ for filename in filenames:
for i in range(2): for i in range(2):
Npoints.extend([int(math.ceil(extent[i] / options.resolution))]) Npoints.extend([int(math.ceil(extent[i] / options.resolution))])
correction.extend([float(Npoints[i]) * options.resolution - extent[i]]) correction.extend([float(Npoints[i]) * options.resolution - extent[i]])
if options.distance > 0.0: if options.distance > 0.0:
Npoints.extend([int(math.ceil(extent[2] / options.distance))]) Npoints.extend([int(math.ceil(extent[2] / options.distance))])
correction.extend([float(Npoints[2]) * options.distance - extent[2]]) correction.extend([float(Npoints[2]) * options.distance - extent[2]])
else: else:
@ -282,8 +260,8 @@ for filename in filenames:
correction.extend([0.0]) correction.extend([0.0])
options.distance = extent[2] / float(options.Nslices) options.distance = extent[2] / float(options.Nslices)
for i in range(3): for i in range(3):
rotatedbox[i][0] = rotatedbox[i][0] - 0.5 * correction[i] rotatedbox[i][0] -= 0.5 * correction[i]
rotatedbox[i][1] = rotatedbox[i][1] + 0.5 * correction[i] rotatedbox[i][1] += 0.5 * correction[i]
extent[i] = rotatedbox[i][1] - rotatedbox[i][0] extent[i] = rotatedbox[i][1] - rotatedbox[i][0]
NpointsPerSlice = Npoints[0] * Npoints[1] NpointsPerSlice = Npoints[0] * Npoints[1]
totalNpoints = NpointsPerSlice * Npoints[2] totalNpoints = NpointsPerSlice * Npoints[2]
@ -301,20 +279,20 @@ for filename in filenames:
if options.verbose: sys.stdout.write("\nGENERATING POINTS FOR POINT GRID") if options.verbose: sys.stdout.write("\nGENERATING POINTS FOR POINT GRID")
points = vtk.vtkPoints() points = vtk.vtkPoints()
for k in range(Npoints[2]): for k in range(Npoints[2]):
for j in range(Npoints[0]): for j in range(Npoints[0]):
for i in range(Npoints[1]): # y is fastest index for i in range(Npoints[1]): # y is fastest index
rotatedpoint = np.array([rotatedbox[0][0] + (float(j) + 0.5) * options.resolution, rotatedpoint = np.array([rotatedbox[0][0] + (float(j) + 0.5) * options.resolution,
rotatedbox[1][0] + (float(i) + 0.5) * options.resolution, rotatedbox[1][0] + (float(i) + 0.5) * options.resolution,
rotatedbox[2][0] + (float(k) + 0.5) * options.distance ]) # point in rotated system rotatedbox[2][0] + (float(k) + 0.5) * options.distance ]) # point in rotated system
point = np.dot(R.T,rotatedpoint) # point in mesh system point = np.dot(R.T,rotatedpoint) # point in mesh system
points.InsertNextPoint(list(point)) points.InsertNextPoint(list(point))
if options.verbose: if options.verbose:
sys.stdout.write("\rGENERATING POINTS FOR POINT GRID %d%%" %(100*(Npoints[1]*(k*Npoints[0]+j)+i+1)/totalNpoints)) sys.stdout.write("\rGENERATING POINTS FOR POINT GRID %d%%" %(100*(Npoints[1]*(k*Npoints[0]+j)+i+1)/totalNpoints))
sys.stdout.flush() sys.stdout.flush()
if options.verbose: if options.verbose:
sys.stdout.write("\n number of slices: %i\n"%Npoints[2]) sys.stdout.write("\n number of slices: %i\n"%Npoints[2])
sys.stdout.write(" slice spacing: %.8f\n"%options.distance) sys.stdout.write(" slice spacing: %.8f\n"%options.distance)
if Npoints[2] > 1: if Npoints[2] > 1:
sys.stdout.write(" number of points per slice: %i = %i rows * %i points in row\n"%(NpointsPerSlice,Npoints[0],Npoints[1])) sys.stdout.write(" number of points per slice: %i = %i rows * %i points in row\n"%(NpointsPerSlice,Npoints[0],Npoints[1]))
sys.stdout.write(" grid resolution: %.8f\n"%options.resolution) sys.stdout.write(" grid resolution: %.8f\n"%options.resolution)
@ -324,7 +302,7 @@ for filename in filenames:
vertex = vtk.vtkVertex() vertex = vtk.vtkVertex()
vertex.GetPointIds().SetId(0,i) # each vertex consists of exactly one (index 0) point with ID "i" vertex.GetPointIds().SetId(0,i) # each vertex consists of exactly one (index 0) point with ID "i"
vertices.InsertNextCell(vertex) vertices.InsertNextCell(vertex)
if options.verbose: if options.verbose:
sys.stdout.write("\rGENERATING VERTICES FOR POINT GRID %d%%" %(100*(i+1)/totalNpoints)) sys.stdout.write("\rGENERATING VERTICES FOR POINT GRID %d%%" %(100*(i+1)/totalNpoints))
sys.stdout.flush() sys.stdout.flush()
@ -357,34 +335,34 @@ for filename in filenames:
if enclosedPoints.IsInside(i): if enclosedPoints.IsInside(i):
NenclosedPoints += 1 NenclosedPoints += 1
# here one could use faster(?) "FindClosestPoint" if only first nearest neighbor required # here one could use faster(?) "FindClosestPoint" if only first nearest neighbor required
kdTree.FindClosestNPoints(options.interpolation,pointgrid.GetPoint(i),ids) kdTree.FindClosestNPoints(1,pointgrid.GetPoint(i),ids)
for j in range(ids.GetNumberOfIds()): for j in range(ids.GetNumberOfIds()):
gridToMesh[-1].extend([ids.GetId(j)]) gridToMesh[-1].extend([ids.GetId(j)])
if options.verbose: if options.verbose:
sys.stdout.write("\rBUILDING MAPPING OF GRID POINTS %d%%" %(100*(i+1)/totalNpoints)) sys.stdout.write("\rBUILDING MAPPING OF GRID POINTS %d%%" %(100*(i+1)/totalNpoints))
sys.stdout.flush() sys.stdout.flush()
if options.verbose: if options.verbose:
sys.stdout.write("\n Number of points inside mesh geometry %i\n"%NenclosedPoints) sys.stdout.write("\n Number of points inside mesh geometry %i\n"%NenclosedPoints)
sys.stdout.write(" Number of points outside mesh geometry %i\n"%(totalNpoints - NenclosedPoints)) sys.stdout.write(" Number of points outside mesh geometry %i\n"%(totalNpoints - NenclosedPoints))
# ITERATE OVER SLICES AND CREATE ANG FILE # ITERATE OVER SLICES AND CREATE ANG FILE
if options.verbose: if options.verbose:
sys.stdout.write("\nWRITING OUT ANG FILES\n") sys.stdout.write("\nWRITING OUT ANG FILES\n")
sys.stdout.write(" scaling all length with %f\n"%options.scale) sys.stdout.write(" scaling all length with %f\n"%options.scale)
x0,y0,z0 = np.dot(R,pointgrid.GetPoint(0)) # first point on slice defines origin x0,y0,z0 = np.dot(R,pointgrid.GetPoint(0)) # first point on slice defines origin
for sliceN in range(Npoints[2]): for sliceN in range(Npoints[2]):
# Open file and write header # Open file and write header
angfilename = eval('"'+eval("'%%s_slice%%0%ii.ang'%(math.log10(Npoints[2])+1)")+'"%(os.path.splitext(filename)[0],sliceN+1)') angfilename = eval('"'+eval("'%%s_slice%%0%ii.ang'%(math.log10(Npoints[2])+1)")+'"%(os.path.splitext(filename)[0],sliceN+1)')
with open(angfilename,'w') as angfile: with open(angfilename,'w') as angfile:
if options.verbose: sys.stdout.write(" %s\n"%angfilename) if options.verbose: sys.stdout.write(" %s\n"%angfilename)
angfile.write(getHeader(filename,Npoints[1],Npoints[0],options.resolution*options.scale)) angfile.write(getHeader(filename,Npoints[1],Npoints[0],options.resolution*options.scale))
for i in range(sliceN*NpointsPerSlice,(sliceN+1)*NpointsPerSlice): # Iterate over points on slice for i in range(sliceN*NpointsPerSlice,(sliceN+1)*NpointsPerSlice): # Iterate over points on slice
# Get euler angles of closest IDs # Get euler angles of closest IDs
@ -397,26 +375,26 @@ for filename in filenames:
phi[-1].extend([angles[options.eulerLabel[k]].GetValue(IP)]) phi[-1].extend([angles[options.eulerLabel[k]].GetValue(IP)])
else: else:
phi = [[720,720,720]] # fake angles phi = [[720,720,720]] # fake angles
# Interpolate Euler angle # Interpolate Euler angle
# NOT YET IMPLEMENTED, simply take the nearest neighbors values # NOT YET IMPLEMENTED, simply take the nearest neighbors values
interpolatedPhi = phi[0] interpolatedPhi = phi[0]
# write data to ang file # write data to ang file
x,y,z = np.dot(R,pointgrid.GetPoint(i)) # point in rotated TSL system x,y,z = np.dot(R,pointgrid.GetPoint(i)) # point in rotated TSL system
x -= x0 # first point on slice defines origin x -= x0 # first point on slice defines origin
y -= y0 # first point on slice defines origin y -= y0 # first point on slice defines origin
x *= options.scale x *= options.scale
y *= options.scale y *= options.scale
angfile.write(getDataLine(interpolatedPhi,x,y,enclosedPoints.IsInside(i))) angfile.write(getDataLine(interpolatedPhi,x,y,enclosedPoints.IsInside(i)))
# Visualize slices # Visualize slices
if options.visualize: if options.visualize:
meshMapper = vtk.vtkDataSetMapper() meshMapper = vtk.vtkDataSetMapper()
meshMapper.SetInput(surface) meshMapper.SetInput(surface)
@ -426,11 +404,11 @@ for filename in filenames:
meshActor.GetProperty().SetOpacity(0.2) meshActor.GetProperty().SetOpacity(0.2)
meshActor.GetProperty().SetColor(1.0,1.0,0) meshActor.GetProperty().SetColor(1.0,1.0,0)
meshActor.GetProperty().BackfaceCullingOn() meshActor.GetProperty().BackfaceCullingOn()
boxpoints = vtk.vtkPoints() boxpoints = vtk.vtkPoints()
for n in range(8): for n in range(8):
P = [rotatedbox[0][(n/1)%2], P = [rotatedbox[0][(n/1)%2],
rotatedbox[1][(n/2)%2], rotatedbox[1][(n/2)%2],
rotatedbox[2][(n/4)%2]] rotatedbox[2][(n/4)%2]]
boxpoints.InsertNextPoint(list(np.dot(R.T,np.array(P)))) boxpoints.InsertNextPoint(list(np.dot(R.T,np.array(P))))
box = vtk.vtkHexahedron() box = vtk.vtkHexahedron()
@ -469,7 +447,7 @@ for filename in filenames:
renderer.AddActor(boxActor) renderer.AddActor(boxActor)
renderer.AddActor(gridActor) renderer.AddActor(gridActor)
renderer.SetBackground(1,1,1) renderer.SetBackground(1,1,1)
renderWindow.Render() renderWindow.Render()
renderWindowInteractor.SetInteractorStyle(vtk.vtkInteractorStyleTrackballCamera()) renderWindowInteractor.SetInteractorStyle(vtk.vtkInteractorStyleTrackballCamera())
renderWindowInteractor.Start() renderWindowInteractor.Start()

View File

@ -1,135 +0,0 @@
#!/usr/bin/env python3
import os
import sys
from io import StringIO
from optparse import OptionParser
import numpy as np
import damask
scriptName = os.path.splitext(os.path.basename(__file__))[0]
scriptID = ' '.join([scriptName,damask.version])
#--------------------------------------------------------------------------------------------------
# MAIN
#--------------------------------------------------------------------------------------------------
parser = OptionParser(option_class=damask.extendableOption, usage='%prog options [geomfile(s)]', description = """
Inserts a primitive geometric object at a given position.
These objects can be boxes, cylinders, or ellipsoids.
""", version = scriptID)
parser.add_option('-c', '--center',
dest='center',
type='float', nargs = 3, metavar=' '.join(['float']*3),
help='a,b,c origin of primitive %default')
parser.add_option('-d', '--dimension',
dest='dimension',
type='float', nargs = 3, metavar=' '.join(['float']*3),
help='a,b,c extension of hexahedral box')
parser.add_option('-e', '--exponent',
dest='exponent',
type='float', nargs = 3, metavar=' '.join(['float']*3),
help='i,j,k exponents for axes: '+
'0 gives octahedron (|x|^(2^0) + |y|^(2^0) + |z|^(2^0) < 1), '+
'1 gives a sphere (|x|^(2^1) + |y|^(2^1) + |z|^(2^1) < 1), '+
'large values produce boxes, negative turn concave.')
parser.add_option('-f', '--fill',
dest='fill',
type='float', metavar = 'int',
help='microstructure index to fill primitive, defaults to max microstructure index + 1')
parser.add_option('-q', '--quaternion',
dest='quaternion',
type='float', nargs = 4, metavar=' '.join(['float']*4),
help = 'rotation of primitive as quaternion')
parser.add_option('-a', '--angleaxis',
dest='angleaxis',
type=float, nargs = 4, metavar=' '.join(['float']*4),
help = 'axis and angle to rotate primitive')
parser.add_option( '--degrees',
dest='degrees',
action='store_true',
help = 'angle is given in degrees')
parser.add_option( '--nonperiodic',
dest='periodic',
action='store_false',
help = 'wrap around edges')
parser.add_option( '--realspace',
dest='realspace',
action='store_true',
help = '-c and -d span [origin,origin+size] instead of [0,grid] coordinates')
parser.add_option( '--invert',
dest='inside',
action='store_false',
help = 'invert the volume filled by the primitive (inside/outside)')
parser.set_defaults(center = (.0,.0,.0),
degrees = False,
exponent = (20,20,20), # box shape by default
periodic = True,
realspace = False,
inside = True,
)
(options, filenames) = parser.parse_args()
if options.dimension is None:
parser.error('no dimension specified.')
if [options.angleaxis,options.quaternion].count(None) == 0:
parser.error('more than one rotation specified.')
if options.angleaxis is not None:
rotation = damask.Rotation.from_axis_angle(np.array(options.angleaxis),options.degrees,normalise=True)
elif options.quaternion is not None:
rotation = damask.Rotation.from_quaternion(options.quaternion)
else:
rotation = damask.Rotation()
if filenames == []: filenames = [None]
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)
grid = geom.get_grid()
size = geom.get_size()
# scale to box of size [1.0,1.0,1.0]
if options.realspace:
center = (np.array(options.center) - geom.get_origin())/size
r = np.array(options.dimension)/size/2.0
else:
center = (np.array(options.center) + 0.5)/grid
r = np.array(options.dimension)/grid/2.0
if np.any(center<0.0) or np.any(center>=1.0): print('error')
offset = np.ones(3)*0.5 if options.periodic else center
mask = np.full(grid,False)
# High exponents can cause underflow & overflow - okay here, just compare to 1, so +infinity and 0 are fine
np.seterr(over='ignore', under='ignore')
e = 2.0**np.array(options.exponent)
for x in range(grid[0]):
for y in range(grid[1]):
for z in range(grid[2]):
coords = np.array([x+0.5,y+0.5,z+0.5])/grid
mask[x,y,z] = np.sum(np.abs((rotation*(coords-offset))/r)**e) < 1
if options.periodic:
shift = ((offset-center)*grid).astype(int)
mask = np.roll(mask,shift,(0,1,2))
if options.inside: mask = np.logical_not(mask)
fill = np.nanmax(geom.microstructure)+1 if options.fill is None else options.fill
damask.util.croak(geom.update(np.where(mask,geom.microstructure,fill)))
geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:]))
geom.to_file(sys.stdout if name is None else name,pack=False)

View File

@ -1,85 +0,0 @@
#!/usr/bin/env python3
import os
import sys
from io import StringIO
from optparse import OptionParser
from scipy import ndimage
import numpy as np
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 [geomfile(s)]', description = """
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)
parser.add_option('-v', '--vicinity',
dest = 'vicinity',
type = 'int', metavar = 'int',
help = 'voxel distance checked for presence of other microstructure [%default]')
parser.add_option('-o', '--offset',
dest='offset',
type = 'int', metavar = 'int',
help='offset (positive or negative) to tag microstructure indices, defaults to max microstructure index')
parser.add_option('-t', '--trigger',
dest = 'trigger',
action = 'extend', metavar = '<int LIST>',
help = 'list of microstructure indices triggering a change')
parser.add_option('-n', '--nonperiodic',
dest = 'mode',
action = 'store_const', const = 'nearest',
help = 'assume geometry to be non-periodic')
parser.set_defaults(vicinity = 1,
trigger = [],
mode = 'wrap',
)
(options, filenames) = parser.parse_args()
options.trigger = np.array(options.trigger, dtype=int)
if filenames == []: filenames = [None]
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)
offset = np.nanmax(geom.microstructure) if options.offset is None else options.offset
damask.util.croak(geom.update(np.where(ndimage.filters.generic_filter(
geom.microstructure,
taintedNeighborhood,
size=1+2*options.vicinity,mode=options.mode,
extra_arguments=(),
extra_keywords={"trigger":options.trigger,"size":1+2*options.vicinity}),
geom.microstructure + offset,geom.microstructure)))
geom.add_comments(scriptID + ' ' + ' '.join(sys.argv[1:]))
geom.to_file(sys.stdout if name is None else name,pack=False)

View File

@ -1,9 +1,14 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
# -*- coding: UTF-8 no BOM -*-
import sys,os,re,time,tempfile import sys
import numpy as np import os
import re
import time
import tempfile
from optparse import OptionParser from optparse import OptionParser
import numpy as np
import damask import damask
sys.path.append(str(damask.solver.Marc().library_path)) sys.path.append(str(damask.solver.Marc().library_path))

View File

@ -20,7 +20,6 @@ def outMentat(cmd,locals):
py_mentat.py_send(cmd) py_mentat.py_send(cmd)
else: else:
py_mentat.py_send(cmd) py_mentat.py_send(cmd)
return
#------------------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------------------
def outFile(cmd,locals,dest): def outFile(cmd,locals,dest):
@ -31,7 +30,6 @@ def outFile(cmd,locals,dest):
dest.write(cmd+'\n') dest.write(cmd+'\n')
else: else:
dest.write(cmd+'\n') dest.write(cmd+'\n')
return
#------------------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------------------
def output(cmds,locals,dest): def output(cmds,locals,dest):
@ -43,8 +41,6 @@ def output(cmds,locals,dest):
outMentat(str(cmd),locals) outMentat(str(cmd),locals)
else: else:
outFile(str(cmd),locals,dest) outFile(str(cmd),locals,dest)
return
#------------------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------------------
@ -105,7 +101,7 @@ def mesh(r,d):
#------------------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------------------
def material(): def material():
cmds = [\ return [\
"*new_mater standard", "*new_mater standard",
"*mater_option general:state:solid", "*mater_option general:state:solid",
"*mater_option structural:type:hypo_elast", "*mater_option structural:type:hypo_elast",
@ -119,12 +115,10 @@ def material():
"all_existing", "all_existing",
] ]
return cmds
#------------------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------------------
def geometry(): def geometry():
cmds = [\ return [\
"*geometry_type mech_three_solid", "*geometry_type mech_three_solid",
# "*geometry_option red_integ_capacity:on", # "*geometry_option red_integ_capacity:on",
"*add_geometry_elements", "*add_geometry_elements",
@ -134,8 +128,6 @@ def geometry():
"all_existing", "all_existing",
] ]
return cmds
#------------------------------------------------------------------------------------------------- #-------------------------------------------------------------------------------------------------
def initial_conditions(homogenization,microstructures): def initial_conditions(homogenization,microstructures):

View File

@ -51,7 +51,7 @@ class Colormap(mpl.colors.ListedColormap):
Color definition for minimum value. Color definition for minimum value.
high : numpy.ndarray of shape (3) high : numpy.ndarray of shape (3)
Color definition for maximum value. Color definition for maximum value.
N : integer, optional N : int, optional
The number of color quantization levels. Defaults to 256. The number of color quantization levels. Defaults to 256.
name : str, optional name : str, optional
The name of the colormap. Defaults to `DAMASK colormap`. The name of the colormap. Defaults to `DAMASK colormap`.

View File

@ -6,7 +6,8 @@ from functools import partial
import numpy as np import numpy as np
from scipy import ndimage,spatial from scipy import ndimage,spatial
import damask from . import environment
from . import Rotation
from . import VTK from . import VTK
from . import util from . import util
from . import grid_filters from . import grid_filters
@ -27,7 +28,7 @@ class Geom:
physical size of the microstructure in meter. physical size of the microstructure in meter.
origin : list or numpy.ndarray, optional origin : list or numpy.ndarray, optional
physical origin of the microstructure in meter. physical origin of the microstructure in meter.
homogenization : integer, optional homogenization : int, optional
homogenization index. homogenization index.
comments : list of str, optional comments : list of str, optional
comments lines. comments lines.
@ -46,7 +47,6 @@ class Geom:
f'grid a b c: {util.srepr(self.get_grid ()," x ")}', f'grid a b c: {util.srepr(self.get_grid ()," x ")}',
f'size x y z: {util.srepr(self.get_size ()," x ")}', f'size x y z: {util.srepr(self.get_size ()," x ")}',
f'origin x y z: {util.srepr(self.get_origin()," ")}', f'origin x y z: {util.srepr(self.get_origin()," ")}',
f'homogenization: {self.get_homogenization()}',
f'# microstructures: {self.N_microstructure}', f'# microstructures: {self.N_microstructure}',
f'max microstructure: {np.nanmax(self.microstructure)}', f'max microstructure: {np.nanmax(self.microstructure)}',
]) ])
@ -100,8 +100,6 @@ class Geom:
message[-1] = util.delete(message[-1]) message[-1] = util.delete(message[-1])
message.append(util.emph(f'origin x y z: {util.srepr(self.get_origin()," ")}')) message.append(util.emph(f'origin x y z: {util.srepr(self.get_origin()," ")}'))
message.append(f'homogenization: {self.get_homogenization()}')
message.append(f'# microstructures: {unique_old}') message.append(f'# microstructures: {unique_old}')
if unique_old != self.N_microstructure: if unique_old != self.N_microstructure:
message[-1] = util.delete(message[-1]) message[-1] = util.delete(message[-1])
@ -146,20 +144,28 @@ class Geom:
""" """
Replace the existing microstructure representation. Replace the existing microstructure representation.
The complete microstructure is replaced (indcluding grid definition),
unless a masked array is provided in which case the grid dimensions
need to match and masked entries are not replaced.
Parameters Parameters
---------- ----------
microstructure : numpy.ndarray microstructure : numpy.ndarray or numpy.ma.core.MaskedArray of shape (:,:,:)
microstructure array (3D). Microstructure indices.
""" """
if microstructure is not None: if microstructure is not None:
if len(microstructure.shape) != 3: if isinstance(microstructure,np.ma.core.MaskedArray):
raise ValueError(f'Invalid microstructure shape {microstructure.shape}') self.microstructure = np.where(microstructure.mask,
elif microstructure.dtype not in np.sctypes['float'] + np.sctypes['int']: self.microstructure,microstructure.data)
raise TypeError(f'Invalid microstructue data type {microstructure.dtype}')
else: else:
self.microstructure = np.copy(microstructure) self.microstructure = np.copy(microstructure)
if len(self.microstructure.shape) != 3:
raise ValueError(f'Invalid microstructure shape {microstructure.shape}')
elif self.microstructure.dtype not in np.sctypes['float'] + np.sctypes['int']:
raise TypeError(f'Invalid microstructue data type {microstructure.dtype}')
def set_size(self,size): def set_size(self,size):
""" """
@ -204,7 +210,7 @@ class Geom:
Parameters Parameters
---------- ----------
homogenization : integer homogenization : int
homogenization index homogenization index
""" """
@ -273,7 +279,7 @@ class Geom:
Parameters Parameters
---------- ----------
fname : str or file handle fname : str or file handle
geometry file to read. Geometry file to read.
""" """
try: try:
@ -339,16 +345,16 @@ class Geom:
Parameters Parameters
---------- ----------
grid : numpy.ndarray of shape (3) grid : int numpy.ndarray of shape (3)
number of grid points in x,y,z direction. Number of grid points in x,y,z direction.
size : list or numpy.ndarray of shape (3) size : list or numpy.ndarray of shape (3)
physical size of the microstructure in meter. Physical size of the microstructure in meter.
seeds : numpy.ndarray of shape (:,3) seeds : numpy.ndarray of shape (:,3)
position of the seed points in meter. All points need to lay within the box. Position of the seed points in meter. All points need to lay within the box.
weights : numpy.ndarray of shape (seeds.shape[0]) weights : numpy.ndarray of shape (seeds.shape[0])
weights of the seeds. Setting all weights to 1.0 gives a standard Voronoi tessellation. Weights of the seeds. Setting all weights to 1.0 gives a standard Voronoi tessellation.
periodic : Boolean, optional periodic : Boolean, optional
perform a periodic tessellation. Defaults to True. Perform a periodic tessellation. Defaults to True.
""" """
if periodic: if periodic:
@ -362,7 +368,7 @@ class Geom:
seeds_p = seeds seeds_p = seeds
coords = grid_filters.cell_coord0(grid,size).reshape(-1,3) coords = grid_filters.cell_coord0(grid,size).reshape(-1,3)
pool = multiprocessing.Pool(processes = int(damask.environment.options['DAMASK_NUM_THREADS'])) pool = multiprocessing.Pool(processes = int(environment.options['DAMASK_NUM_THREADS']))
result = pool.map_async(partial(Geom._find_closest_seed,seeds_p,weights_p), [coord for coord in coords]) result = pool.map_async(partial(Geom._find_closest_seed,seeds_p,weights_p), [coord for coord in coords])
pool.close() pool.close()
pool.join() pool.join()
@ -385,14 +391,14 @@ class Geom:
Parameters Parameters
---------- ----------
grid : numpy.ndarray of shape (3) grid : int numpy.ndarray of shape (3)
number of grid points in x,y,z direction. Number of grid points in x,y,z direction.
size : list or numpy.ndarray of shape (3) size : list or numpy.ndarray of shape (3)
physical size of the microstructure in meter. Physical size of the microstructure in meter.
seeds : numpy.ndarray of shape (:,3) seeds : numpy.ndarray of shape (:,3)
position of the seed points in meter. All points need to lay within the box. Position of the seed points in meter. All points need to lay within the box.
periodic : Boolean, optional periodic : Boolean, optional
perform a periodic tessellation. Defaults to True. Perform a periodic tessellation. Defaults to True.
""" """
coords = grid_filters.cell_coord0(grid,size).reshape(-1,3) coords = grid_filters.cell_coord0(grid,size).reshape(-1,3)
@ -410,9 +416,9 @@ class Geom:
Parameters Parameters
---------- ----------
fname : str or file handle fname : str or file handle
geometry file to write. Geometry file to write.
pack : bool, optional pack : bool, optional
compress geometry with 'x of y' and 'a to b'. Compress geometry with 'x of y' and 'a to b'.
""" """
header = self.get_header() header = self.get_header()
@ -476,7 +482,7 @@ class Geom:
Parameters Parameters
---------- ----------
fname : str, optional fname : str, optional
vtk file to write. If no file is given, a string is returned. Vtk file to write. If no file is given, a string is returned.
""" """
v = VTK.from_rectilinearGrid(self.grid,self.size,self.origin) v = VTK.from_rectilinearGrid(self.grid,self.size,self.origin)
@ -496,6 +502,58 @@ class Geom:
return ''.join(f.readlines()) return ''.join(f.readlines())
def add_primitive(self,dimension,center,exponent,
fill=None,R=Rotation(),inverse=False,periodic=True):
"""
Inserts a primitive geometric object at a given position.
Parameters
----------
dimension : int or float numpy.ndarray of shape(3)
Dimension (diameter/side length) of the primitive. If given as
integers, grid point locations (cell centers) are addressed.
If given as floats, coordinates are addressed.
center : int or float numpy.ndarray of shape(3)
Center of the primitive. If given as integers, grid point
locations (cell centers) are addressed.
If given as floats, coordinates are addressed.
exponent : numpy.ndarray of shape(3) or float
Exponents for the three axis.
0 gives octahedron (|x|^(2^0) + |y|^(2^0) + |z|^(2^0) < 1)
1 gives a sphere (|x|^(2^1) + |y|^(2^1) + |z|^(2^1) < 1)
fill : int, optional
Fill value for primitive. Defaults to microstructure.max() + 1.
R : damask.Rotation, optional
Rotation of primitive. Defaults to no rotation.
inverse : Boolean, optional
Retain original microstructure within primitive and fill
outside. Defaults to False.
periodic : Boolean, optional
Repeat primitive over boundaries. Defaults to False.
"""
# normalized 'radius' and center
r = np.array(dimension)/self.grid/2.0 if np.array(dimension).dtype in np.sctypes['int'] else \
np.array(dimension)/self.size/2.0
c = (np.array(center) + .5)/self.grid if np.array(center).dtype in np.sctypes['int'] else \
(np.array(center) - self.origin)/self.size
coords = grid_filters.cell_coord0(self.grid,np.ones(3)) \
- (np.ones(3)*0.5 if periodic else c) # center if periodic
coords_rot = R.broadcast_to(tuple(self.grid))@coords
with np.errstate(over='ignore',under='ignore'):
mask = np.where(np.sum(np.abs(coords_rot/r)**(2.0**exponent),axis=-1) < 1,True,False)
if periodic: # translate back to center
mask = np.roll(mask,((c-np.ones(3)*.5)*self.grid).astype(int),(0,1,2))
fill_ = np.full_like(self.microstructure,np.nanmax(self.microstructure)+1 if fill is None else fill)
ms = np.ma.MaskedArray(fill_,np.logical_not(mask) if inverse else mask)
return self.update(ms)
def mirror(self,directions,reflect=False): def mirror(self,directions,reflect=False):
""" """
Mirror microstructure along given directions. Mirror microstructure along given directions.
@ -503,9 +561,10 @@ class Geom:
Parameters Parameters
---------- ----------
directions : iterable containing str directions : iterable containing str
direction(s) along which the microstructure is mirrored. Valid entries are 'x', 'y', 'z'. Direction(s) along which the microstructure is mirrored.
Valid entries are 'x', 'y', 'z'.
reflect : bool, optional reflect : bool, optional
reflect (include) outermost layers. Reflect (include) outermost layers.
""" """
valid = {'x','y','z'} valid = {'x','y','z'}
@ -535,7 +594,7 @@ class Geom:
Parameters Parameters
---------- ----------
grid : numpy.ndarray of shape (3) grid : numpy.ndarray of shape (3)
number of grid points in x,y,z direction. Number of grid points in x,y,z direction.
""" """
#ToDo: self.add_comments('geom.py:scale v{}'.format(version) #ToDo: self.add_comments('geom.py:scale v{}'.format(version)
@ -558,7 +617,7 @@ class Geom:
Parameters Parameters
---------- ----------
stencil : int, optional stencil : int, optional
size of smoothing stencil. Size of smoothing stencil.
""" """
def mostFrequent(arr): def mostFrequent(arr):
@ -591,9 +650,9 @@ class Geom:
Parameters Parameters
---------- ----------
R : damask.Rotation R : damask.Rotation
rotation to apply to the microstructure. Rotation to apply to the microstructure.
fill : int or float, optional fill : int or float, optional
microstructure index to fill the corners. Defaults to microstructure.max() + 1. Microstructure index to fill the corners. Defaults to microstructure.max() + 1.
""" """
if fill is None: fill = np.nanmax(self.microstructure) + 1 if fill is None: fill = np.nanmax(self.microstructure) + 1
@ -626,11 +685,11 @@ class Geom:
Parameters Parameters
---------- ----------
grid : numpy.ndarray of shape (3) grid : numpy.ndarray of shape (3)
number of grid points in x,y,z direction. Number of grid points in x,y,z direction.
offset : numpy.ndarray of shape (3) offset : numpy.ndarray of shape (3)
offset (measured in grid points) from old to new microstructue[0,0,0]. Offset (measured in grid points) from old to new microstructure[0,0,0].
fill : int or float, optional fill : int or float, optional
microstructure index to fill the corners. Defaults to microstructure.max() + 1. Microstructure index to fill the corners. Defaults to microstructure.max() + 1.
""" """
if fill is None: fill = np.nanmax(self.microstructure) + 1 if fill is None: fill = np.nanmax(self.microstructure) + 1
@ -653,14 +712,14 @@ class Geom:
def substitute(self,from_microstructure,to_microstructure): def substitute(self,from_microstructure,to_microstructure):
""" """
Substitude microstructure indices. Substitute microstructure indices.
Parameters Parameters
---------- ----------
from_microstructure : iterable of ints from_microstructure : iterable of ints
microstructure indices to be substituted. Microstructure indices to be substituted.
to_microstructure : iterable of ints to_microstructure : iterable of ints
new microstructure indices. New microstructure indices.
""" """
substituted = self.get_microstructure() substituted = self.get_microstructure()
@ -669,3 +728,50 @@ class Geom:
#ToDo: self.add_comments('geom.py:substitute v{}'.format(version) #ToDo: self.add_comments('geom.py:substitute v{}'.format(version)
return self.update(substituted) return self.update(substituted)
def vicinity_offset(self,vicinity=1,offset=None,trigger=[],periodic=True):
"""
Offset microstructure index of points in the vicinity of xxx.
Different from themselves (or listed as triggers) within a given (cubic) vicinity,
i.e. within the region close to a grain/phase boundary.
ToDo: use include/exclude as in seeds.from_geom
Parameters
----------
vicinity : int, optional
Voxel distance checked for presence of other microstructure.
Defaults to 1.
offset : int, optional
Offset (positive or negative) to tag microstructure indices,
defaults to microstructure.max() + 1.
trigger : list of ints, optional
List of microstructure indices triggering a change.
Defaults to [], meaning that different neigboors trigger a change.
periodic : Boolean, optional
Assume geometry to be periodic. Defaults to True.
"""
def tainted_neighborhood(stencil,trigger):
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)))
offset_ = np.nanmax(self.microstructure) if offset is None else offset
mask = ndimage.filters.generic_filter(self.microstructure,
tainted_neighborhood,
size=1+2*vicinity,
mode=('wrap' if periodic else 'nearest'),
extra_keywords={'trigger':trigger})
microstructure = np.ma.MaskedArray(self.microstructure + offset_, np.logical_not(mask))
#ToDo: self.add_comments('geom.py:vicinity_offset v{}'.format(version)
return self.update(microstructure)

View File

@ -357,7 +357,7 @@ class Rotation:
accept_homomorph : boolean, optional accept_homomorph : boolean, optional
Allow homomorphic variants, i.e. q_0 < 0 (negative real hemisphere). Allow homomorphic variants, i.e. q_0 < 0 (negative real hemisphere).
Defaults to False. Defaults to False.
P : integer {-1,1}, optional P : int {-1,1}, optional
Convention used. Defaults to -1. Convention used. Defaults to -1.
""" """
@ -422,7 +422,7 @@ class Rotation:
Angle ω is given in degrees. Defaults to False. Angle ω is given in degrees. Defaults to False.
normalize: boolean, optional normalize: boolean, optional
Allow |n| 1. Defaults to False. Allow |n| 1. Defaults to False.
P : integer {-1,1}, optional P : int {-1,1}, optional
Convention used. Defaults to -1. Convention used. Defaults to -1.
""" """
@ -505,7 +505,7 @@ class Rotation:
(n_1, n_2, n_3, tan(ω/2)), |n| = 1 and ω [0,π]. (n_1, n_2, n_3, tan(ω/2)), |n| = 1 and ω [0,π].
normalize : boolean, optional normalize : boolean, optional
Allow |n| 1. Defaults to False. Allow |n| 1. Defaults to False.
P : integer {-1,1}, optional P : int {-1,1}, optional
Convention used. Defaults to -1. Convention used. Defaults to -1.
""" """
@ -534,7 +534,7 @@ class Rotation:
---------- ----------
h : numpy.ndarray of shape (...,3) h : numpy.ndarray of shape (...,3)
Homochoric vector: (h_1, h_2, h_3), |h| < (3/4*π)^(1/3). Homochoric vector: (h_1, h_2, h_3), |h| < (3/4*π)^(1/3).
P : integer {-1,1}, optional P : int {-1,1}, optional
Convention used. Defaults to -1. Convention used. Defaults to -1.
""" """
@ -561,7 +561,7 @@ class Rotation:
---------- ----------
c : numpy.ndarray of shape (...,3) c : numpy.ndarray of shape (...,3)
Cubochoric vector: (c_1, c_2, c_3), max(c_i) < 1/2*π^(2/3). Cubochoric vector: (c_1, c_2, c_3), max(c_i) < 1/2*π^(2/3).
P : integer {-1,1}, optional P : int {-1,1}, optional
Convention used. Defaults to -1. Convention used. Defaults to -1.
""" """

View File

@ -3,23 +3,23 @@ grid a 8 b 5 c 4
size x 8e-06 y 5e-06 z 4e-06 size x 8e-06 y 5e-06 z 4e-06
origin x 0.0 y 0.0 z 0.0 origin x 0.0 y 0.0 z 0.0
homogenization 1 homogenization 1
1 1 2 22 2 2 1 21 1 1 1 1 1 1 1 1
1 1 6 26 2 2 5 25 1 1 1 1 1 1 1 1
1 1 10 30 2 2 9 29 1 1 1 1 1 1 1 1
1 1 14 34 2 2 13 33 1 1 1 1 1 1 1 1
1 1 18 38 2 2 17 37 1 1 1 1 1 1 1 1
1 1 3 23 2 2 2 22 2 3 4 5 6 7 8 9
1 1 7 27 2 2 6 26 10 11 12 13 14 15 16 17
1 1 11 31 2 2 10 30 18 19 20 21 22 23 24 25
1 1 15 35 2 2 14 34 26 27 28 29 30 31 32 33
1 1 19 39 2 2 18 38 34 35 36 37 38 39 40 41
1 1 4 24 2 2 3 23 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 2 2 2 2 2 2 2 2
1 1 20 40 2 2 19 39 2 2 2 2 2 2 2 2
1 1 5 25 2 2 4 24 1 2 3 4 5 6 7 8
1 1 9 29 2 2 8 28 9 10 11 12 13 14 15 16
1 1 13 33 2 2 12 32 17 18 19 20 21 22 23 24
1 1 17 37 2 2 16 36 25 26 27 28 29 30 31 32
1 1 21 41 2 2 20 40 33 34 35 36 37 38 39 40

View File

@ -3,23 +3,23 @@ grid a 8 b 5 c 4
size x 8e-06 y 5e-06 z 4e-06 size x 8e-06 y 5e-06 z 4e-06
origin x 0.0 y 0.0 z 0.0 origin x 0.0 y 0.0 z 0.0
homogenization 1 homogenization 1
1 1 1 2 2 2 1 1 1 1 1 1 1 1 1 1
1 1 1 2 2 2 2 1 1 1 1 1 1 1 1 1
1 1 1 6 2 2 2 5 1 1 1 1 1 1 1 1
1 1 1 10 2 2 2 9 1 1 1 1 1 1 1 1
1 1 1 14 2 2 2 13 1 1 1 1 1 1 1 1
1 1 1 2 2 2 2 1 1 1 1 1 1 1 1 1
1 1 1 2 2 2 2 1 1 1 1 1 1 1 1 1
1 1 1 6 2 2 2 5 1 1 1 1 1 1 1 1
1 1 1 10 2 2 2 9 1 1 1 1 1 1 1 1
1 1 1 14 2 2 2 13 1 1 1 1 1 1 1 1
1 1 1 3 2 2 2 2 2 2 2 2 2 2 2 2
1 1 1 3 2 2 2 2 2 2 2 2 2 2 2 2
1 1 1 7 2 2 2 6 2 2 2 2 2 2 2 2
1 1 1 11 2 2 2 10 2 2 2 2 2 2 2 2
1 1 1 15 2 2 2 14 2 2 2 2 2 2 2 2
1 1 1 4 2 2 2 3 1 2 2 2 2 2 2 2
1 1 1 4 2 2 2 3 2 2 2 2 2 2 2 2
1 1 1 8 2 2 2 7 2 2 2 2 2 2 2 2
1 1 1 12 2 2 2 11 2 2 2 2 2 2 2 2
1 1 1 16 2 2 2 15 2 2 2 2 2 2 2 2

View File

@ -3,23 +3,23 @@ grid a 8 b 5 c 4
size x 8e-06 y 5e-06 z 4e-06 size x 8e-06 y 5e-06 z 4e-06
origin x 0.0 y 0.0 z 0.0 origin x 0.0 y 0.0 z 0.0
homogenization 1 homogenization 1
1 1 1 2 2 2 2 21 1 1 1 1 1 1 1 1
1 1 1 2 2 2 2 21 1 1 1 1 1 1 1 1
1 1 1 2 2 2 2 25 1 1 1 1 1 1 1 1
1 1 1 2 2 2 2 29 1 1 1 1 1 1 1 1
1 1 1 2 2 2 2 37 1 1 1 1 1 1 1 1
1 1 1 2 2 2 2 21 2 2 1 1 1 1 1 1
1 1 1 2 2 2 2 21 2 2 1 1 1 1 1 1
1 1 1 2 2 2 2 25 1 1 1 1 1 1 1 1
1 1 1 2 2 2 2 29 1 1 1 1 1 1 1 1
1 1 1 2 2 2 2 37 1 1 1 1 1 1 1 1
1 1 1 2 2 2 2 22 2 2 2 2 2 2 2 2
1 1 1 2 2 2 2 22 2 2 2 2 2 2 2 2
1 1 1 2 2 2 2 26 2 2 2 2 2 2 2 2
1 1 1 2 2 2 2 30 2 2 2 2 2 2 2 2
1 1 1 2 2 2 2 38 2 2 2 2 2 2 2 2
1 1 1 2 2 2 2 24 2 2 2 2 2 2 2 2
1 1 1 2 2 2 2 24 2 2 2 2 2 2 2 2
1 1 1 2 2 2 2 28 2 2 2 2 2 2 2 2
1 1 1 2 2 2 2 32 2 2 2 2 2 2 2 2
1 1 1 2 2 2 2 40 2 2 2 2 2 2 2 2

View File

@ -3,23 +3,23 @@ grid a 8 b 5 c 4
size x 8e-06 y 5e-06 z 4e-06 size x 8e-06 y 5e-06 z 4e-06
origin x 0.0 y 0.0 z 0.0 origin x 0.0 y 0.0 z 0.0
homogenization 1 homogenization 1
1 1 1 2 2 2 2 2 1 1 1 1 1 1 1 1
1 1 1 2 2 2 2 2 1 1 1 1 1 1 1 1
1 1 1 2 2 2 2 2 1 1 1 1 1 1 1 1
1 1 1 1 2 2 2 2 1 1 1 1 1 1 1 1
1 1 1 1 2 2 2 2 1 1 1 1 1 1 1 1
1 1 1 2 2 2 2 2 1 1 1 1 1 1 1 1
1 1 1 2 2 2 2 2 1 1 1 1 1 1 1 1
1 1 1 2 2 2 2 2 1 1 1 1 1 1 1 1
1 1 1 1 2 2 2 2 1 1 1 1 1 1 1 1
1 1 1 1 2 2 2 2 1 1 1 1 1 1 1 1
1 1 1 2 2 2 2 2 2 2 2 2 1 1 1 1
1 1 1 2 2 2 2 2 2 2 2 2 1 1 1 1
1 1 1 2 2 2 2 2 2 2 2 2 1 1 1 1
1 1 1 1 2 2 2 2 1 1 1 1 1 1 1 1
1 1 1 1 2 2 2 2 1 1 1 1 1 1 1 1
1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2
1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2
1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2
1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2
1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2

View File

@ -3,83 +3,83 @@ grid a 16 b 10 c 8
size x 1.6e-05 y 1e-05 z 8e-06 size x 1.6e-05 y 1e-05 z 8e-06
origin x 0.0 y 0.0 z 0.0 origin x 0.0 y 0.0 z 0.0
homogenization 1 homogenization 1
1 1 2 22 2 2 1 21 21 1 2 2 22 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 6 26 2 2 5 25 25 5 2 2 26 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 10 30 2 2 9 29 29 9 2 2 30 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 14 34 2 2 13 33 33 13 2 2 34 14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 18 38 2 2 17 37 37 17 2 2 38 18 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 18 38 2 2 17 37 37 17 2 2 38 18 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 14 34 2 2 13 33 33 13 2 2 34 14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 10 30 2 2 9 29 29 9 2 2 30 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 6 26 2 2 5 25 25 5 2 2 26 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 2 22 2 2 1 21 21 1 2 2 22 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 3 23 2 2 2 22 22 2 2 2 23 3 1 1 2 3 4 5 6 7 8 9 9 8 7 6 5 4 3 2
1 1 7 27 2 2 6 26 26 6 2 2 27 7 1 1 10 11 12 13 14 15 16 17 17 16 15 14 13 12 11 10
1 1 11 31 2 2 10 30 30 10 2 2 31 11 1 1 18 19 20 21 22 23 24 25 25 24 23 22 21 20 19 18
1 1 15 35 2 2 14 34 34 14 2 2 35 15 1 1 26 27 28 29 30 31 32 33 33 32 31 30 29 28 27 26
1 1 19 39 2 2 18 38 38 18 2 2 39 19 1 1 34 35 36 37 38 39 40 41 41 40 39 38 37 36 35 34
1 1 19 39 2 2 18 38 38 18 2 2 39 19 1 1 34 35 36 37 38 39 40 41 41 40 39 38 37 36 35 34
1 1 15 35 2 2 14 34 34 14 2 2 35 15 1 1 26 27 28 29 30 31 32 33 33 32 31 30 29 28 27 26
1 1 11 31 2 2 10 30 30 10 2 2 31 11 1 1 18 19 20 21 22 23 24 25 25 24 23 22 21 20 19 18
1 1 7 27 2 2 6 26 26 6 2 2 27 7 1 1 10 11 12 13 14 15 16 17 17 16 15 14 13 12 11 10
1 1 3 23 2 2 2 22 22 2 2 2 23 3 1 1 2 3 4 5 6 7 8 9 9 8 7 6 5 4 3 2
1 1 4 24 2 2 3 23 23 3 2 2 24 4 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 27 7 2 2 28 8 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 31 11 2 2 32 12 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 35 15 2 2 36 16 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 20 40 2 2 19 39 39 19 2 2 40 20 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 20 40 2 2 19 39 39 19 2 2 40 20 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 35 15 2 2 36 16 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 31 11 2 2 32 12 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 27 7 2 2 28 8 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 4 24 2 2 3 23 23 3 2 2 24 4 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 5 25 2 2 4 24 24 4 2 2 25 5 1 1 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1
1 1 9 29 2 2 8 28 28 8 2 2 29 9 1 1 9 10 11 12 13 14 15 16 16 15 14 13 12 11 10 9
1 1 13 33 2 2 12 32 32 12 2 2 33 13 1 1 17 18 19 20 21 22 23 24 24 23 22 21 20 19 18 17
1 1 17 37 2 2 16 36 36 16 2 2 37 17 1 1 25 26 27 28 29 30 31 32 32 31 30 29 28 27 26 25
1 1 21 41 2 2 20 40 40 20 2 2 41 21 1 1 33 34 35 36 37 38 39 40 40 39 38 37 36 35 34 33
1 1 21 41 2 2 20 40 40 20 2 2 41 21 1 1 33 34 35 36 37 38 39 40 40 39 38 37 36 35 34 33
1 1 17 37 2 2 16 36 36 16 2 2 37 17 1 1 25 26 27 28 29 30 31 32 32 31 30 29 28 27 26 25
1 1 13 33 2 2 12 32 32 12 2 2 33 13 1 1 17 18 19 20 21 22 23 24 24 23 22 21 20 19 18 17
1 1 9 29 2 2 8 28 28 8 2 2 29 9 1 1 9 10 11 12 13 14 15 16 16 15 14 13 12 11 10 9
1 1 5 25 2 2 4 24 24 4 2 2 25 5 1 1 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1
1 1 5 25 2 2 4 24 24 4 2 2 25 5 1 1 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1
1 1 9 29 2 2 8 28 28 8 2 2 29 9 1 1 9 10 11 12 13 14 15 16 16 15 14 13 12 11 10 9
1 1 13 33 2 2 12 32 32 12 2 2 33 13 1 1 17 18 19 20 21 22 23 24 24 23 22 21 20 19 18 17
1 1 17 37 2 2 16 36 36 16 2 2 37 17 1 1 25 26 27 28 29 30 31 32 32 31 30 29 28 27 26 25
1 1 21 41 2 2 20 40 40 20 2 2 41 21 1 1 33 34 35 36 37 38 39 40 40 39 38 37 36 35 34 33
1 1 21 41 2 2 20 40 40 20 2 2 41 21 1 1 33 34 35 36 37 38 39 40 40 39 38 37 36 35 34 33
1 1 17 37 2 2 16 36 36 16 2 2 37 17 1 1 25 26 27 28 29 30 31 32 32 31 30 29 28 27 26 25
1 1 13 33 2 2 12 32 32 12 2 2 33 13 1 1 17 18 19 20 21 22 23 24 24 23 22 21 20 19 18 17
1 1 9 29 2 2 8 28 28 8 2 2 29 9 1 1 9 10 11 12 13 14 15 16 16 15 14 13 12 11 10 9
1 1 5 25 2 2 4 24 24 4 2 2 25 5 1 1 1 2 3 4 5 6 7 8 8 7 6 5 4 3 2 1
1 1 4 24 2 2 3 23 23 3 2 2 24 4 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 27 7 2 2 28 8 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 31 11 2 2 32 12 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 35 15 2 2 36 16 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 20 40 2 2 19 39 39 19 2 2 40 20 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 20 40 2 2 19 39 39 19 2 2 40 20 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 35 15 2 2 36 16 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 31 11 2 2 32 12 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 27 7 2 2 28 8 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 4 24 2 2 3 23 23 3 2 2 24 4 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 3 23 2 2 2 22 22 2 2 2 23 3 1 1 2 3 4 5 6 7 8 9 9 8 7 6 5 4 3 2
1 1 7 27 2 2 6 26 26 6 2 2 27 7 1 1 10 11 12 13 14 15 16 17 17 16 15 14 13 12 11 10
1 1 11 31 2 2 10 30 30 10 2 2 31 11 1 1 18 19 20 21 22 23 24 25 25 24 23 22 21 20 19 18
1 1 15 35 2 2 14 34 34 14 2 2 35 15 1 1 26 27 28 29 30 31 32 33 33 32 31 30 29 28 27 26
1 1 19 39 2 2 18 38 38 18 2 2 39 19 1 1 34 35 36 37 38 39 40 41 41 40 39 38 37 36 35 34
1 1 19 39 2 2 18 38 38 18 2 2 39 19 1 1 34 35 36 37 38 39 40 41 41 40 39 38 37 36 35 34
1 1 15 35 2 2 14 34 34 14 2 2 35 15 1 1 26 27 28 29 30 31 32 33 33 32 31 30 29 28 27 26
1 1 11 31 2 2 10 30 30 10 2 2 31 11 1 1 18 19 20 21 22 23 24 25 25 24 23 22 21 20 19 18
1 1 7 27 2 2 6 26 26 6 2 2 27 7 1 1 10 11 12 13 14 15 16 17 17 16 15 14 13 12 11 10
1 1 3 23 2 2 2 22 22 2 2 2 23 3 1 1 2 3 4 5 6 7 8 9 9 8 7 6 5 4 3 2
1 1 2 22 2 2 1 21 21 1 2 2 22 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 6 26 2 2 5 25 25 5 2 2 26 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 10 30 2 2 9 29 29 9 2 2 30 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 14 34 2 2 13 33 33 13 2 2 34 14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 18 38 2 2 17 37 37 17 2 2 38 18 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 18 38 2 2 17 37 37 17 2 2 38 18 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 14 34 2 2 13 33 33 13 2 2 34 14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 10 30 2 2 9 29 29 9 2 2 30 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 6 26 2 2 5 25 25 5 2 2 26 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 2 22 2 2 1 21 21 1 2 2 22 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

View File

@ -3,23 +3,23 @@ grid a 14 b 5 c 4
size x 1.4e-05 y 5e-06 z 4e-06 size x 1.4e-05 y 5e-06 z 4e-06
origin x 0.0 y 0.0 z 0.0 origin x 0.0 y 0.0 z 0.0
homogenization 1 homogenization 1
1 1 2 22 2 2 1 21 1 2 2 22 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 6 26 2 2 5 25 5 2 2 26 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 10 30 2 2 9 29 9 2 2 30 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 14 34 2 2 13 33 13 2 2 34 14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 18 38 2 2 17 37 17 2 2 38 18 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 3 23 2 2 2 22 2 2 2 23 3 1 2 3 4 5 6 7 8 9 8 7 6 5 4 3
1 1 7 27 2 2 6 26 6 2 2 27 7 1 10 11 12 13 14 15 16 17 16 15 14 13 12 11
1 1 11 31 2 2 10 30 10 2 2 31 11 1 18 19 20 21 22 23 24 25 24 23 22 21 20 19
1 1 15 35 2 2 14 34 14 2 2 35 15 1 26 27 28 29 30 31 32 33 32 31 30 29 28 27
1 1 19 39 2 2 18 38 18 2 2 39 19 1 34 35 36 37 38 39 40 41 40 39 38 37 36 35
1 1 4 24 2 2 3 23 3 2 2 24 4 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 7 2 2 28 8 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 11 2 2 32 12 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 15 2 2 36 16 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 20 40 2 2 19 39 19 2 2 40 20 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 5 25 2 2 4 24 4 2 2 25 5 1 1 2 3 4 5 6 7 8 7 6 5 4 3 2
1 1 9 29 2 2 8 28 8 2 2 29 9 1 9 10 11 12 13 14 15 16 15 14 13 12 11 10
1 1 13 33 2 2 12 32 12 2 2 33 13 1 17 18 19 20 21 22 23 24 23 22 21 20 19 18
1 1 17 37 2 2 16 36 16 2 2 37 17 1 25 26 27 28 29 30 31 32 31 30 29 28 27 26
1 1 21 41 2 2 20 40 20 2 2 41 21 1 33 34 35 36 37 38 39 40 39 38 37 36 35 34

View File

@ -3,51 +3,51 @@ grid a 8 b 8 c 6
size x 8e-06 y 8.000000000000001e-06 z 6e-06 size x 8e-06 y 8.000000000000001e-06 z 6e-06
origin x 0.0 y 0.0 z 0.0 origin x 0.0 y 0.0 z 0.0
homogenization 1 homogenization 1
1 1 2 22 2 2 1 21 1 1 1 1 1 1 1 1
1 1 6 26 2 2 5 25 1 1 1 1 1 1 1 1
1 1 10 30 2 2 9 29 1 1 1 1 1 1 1 1
1 1 14 34 2 2 13 33 1 1 1 1 1 1 1 1
1 1 18 38 2 2 17 37 1 1 1 1 1 1 1 1
1 1 14 34 2 2 13 33 1 1 1 1 1 1 1 1
1 1 10 30 2 2 9 29 1 1 1 1 1 1 1 1
1 1 6 26 2 2 5 25 1 1 1 1 1 1 1 1
1 1 3 23 2 2 2 22 2 3 4 5 6 7 8 9
1 1 7 27 2 2 6 26 10 11 12 13 14 15 16 17
1 1 11 31 2 2 10 30 18 19 20 21 22 23 24 25
1 1 15 35 2 2 14 34 26 27 28 29 30 31 32 33
1 1 19 39 2 2 18 38 34 35 36 37 38 39 40 41
1 1 15 35 2 2 14 34 26 27 28 29 30 31 32 33
1 1 11 31 2 2 10 30 18 19 20 21 22 23 24 25
1 1 7 27 2 2 6 26 10 11 12 13 14 15 16 17
1 1 4 24 2 2 3 23 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 2 2 2 2 2 2 2 2
1 1 20 40 2 2 19 39 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 2 2 2 2 2 2 2 2
1 1 5 25 2 2 4 24 1 2 3 4 5 6 7 8
1 1 9 29 2 2 8 28 9 10 11 12 13 14 15 16
1 1 13 33 2 2 12 32 17 18 19 20 21 22 23 24
1 1 17 37 2 2 16 36 25 26 27 28 29 30 31 32
1 1 21 41 2 2 20 40 33 34 35 36 37 38 39 40
1 1 17 37 2 2 16 36 25 26 27 28 29 30 31 32
1 1 13 33 2 2 12 32 17 18 19 20 21 22 23 24
1 1 9 29 2 2 8 28 9 10 11 12 13 14 15 16
1 1 4 24 2 2 3 23 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 2 2 2 2 2 2 2 2
1 1 20 40 2 2 19 39 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 2 2 2 2 2 2 2 2
1 1 3 23 2 2 2 22 2 3 4 5 6 7 8 9
1 1 7 27 2 2 6 26 10 11 12 13 14 15 16 17
1 1 11 31 2 2 10 30 18 19 20 21 22 23 24 25
1 1 15 35 2 2 14 34 26 27 28 29 30 31 32 33
1 1 19 39 2 2 18 38 34 35 36 37 38 39 40 41
1 1 15 35 2 2 14 34 26 27 28 29 30 31 32 33
1 1 11 31 2 2 10 30 18 19 20 21 22 23 24 25
1 1 7 27 2 2 6 26 10 11 12 13 14 15 16 17

View File

@ -3,51 +3,51 @@ grid a 14 b 8 c 6
size x 1.4e-05 y 8.000000000000001e-06 z 6e-06 size x 1.4e-05 y 8.000000000000001e-06 z 6e-06
origin x 0.0 y 0.0 z 0.0 origin x 0.0 y 0.0 z 0.0
homogenization 1 homogenization 1
1 1 2 22 2 2 1 21 1 2 2 22 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 6 26 2 2 5 25 5 2 2 26 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 10 30 2 2 9 29 9 2 2 30 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 14 34 2 2 13 33 13 2 2 34 14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 18 38 2 2 17 37 17 2 2 38 18 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 14 34 2 2 13 33 13 2 2 34 14 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 10 30 2 2 9 29 9 2 2 30 10 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 6 26 2 2 5 25 5 2 2 26 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
1 1 3 23 2 2 2 22 2 2 2 23 3 1 2 3 4 5 6 7 8 9 8 7 6 5 4 3
1 1 7 27 2 2 6 26 6 2 2 27 7 1 10 11 12 13 14 15 16 17 16 15 14 13 12 11
1 1 11 31 2 2 10 30 10 2 2 31 11 1 18 19 20 21 22 23 24 25 24 23 22 21 20 19
1 1 15 35 2 2 14 34 14 2 2 35 15 1 26 27 28 29 30 31 32 33 32 31 30 29 28 27
1 1 19 39 2 2 18 38 18 2 2 39 19 1 34 35 36 37 38 39 40 41 40 39 38 37 36 35
1 1 15 35 2 2 14 34 14 2 2 35 15 1 26 27 28 29 30 31 32 33 32 31 30 29 28 27
1 1 11 31 2 2 10 30 10 2 2 31 11 1 18 19 20 21 22 23 24 25 24 23 22 21 20 19
1 1 7 27 2 2 6 26 6 2 2 27 7 1 10 11 12 13 14 15 16 17 16 15 14 13 12 11
1 1 4 24 2 2 3 23 3 2 2 24 4 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 7 2 2 28 8 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 11 2 2 32 12 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 15 2 2 36 16 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 20 40 2 2 19 39 19 2 2 40 20 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 15 2 2 36 16 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 11 2 2 32 12 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 7 2 2 28 8 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 5 25 2 2 4 24 4 2 2 25 5 1 1 2 3 4 5 6 7 8 7 6 5 4 3 2
1 1 9 29 2 2 8 28 8 2 2 29 9 1 9 10 11 12 13 14 15 16 15 14 13 12 11 10
1 1 13 33 2 2 12 32 12 2 2 33 13 1 17 18 19 20 21 22 23 24 23 22 21 20 19 18
1 1 17 37 2 2 16 36 16 2 2 37 17 1 25 26 27 28 29 30 31 32 31 30 29 28 27 26
1 1 21 41 2 2 20 40 20 2 2 41 21 1 33 34 35 36 37 38 39 40 39 38 37 36 35 34
1 1 17 37 2 2 16 36 16 2 2 37 17 1 25 26 27 28 29 30 31 32 31 30 29 28 27 26
1 1 13 33 2 2 12 32 12 2 2 33 13 1 17 18 19 20 21 22 23 24 23 22 21 20 19 18
1 1 9 29 2 2 8 28 8 2 2 29 9 1 9 10 11 12 13 14 15 16 15 14 13 12 11 10
1 1 4 24 2 2 3 23 3 2 2 24 4 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 7 2 2 28 8 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 11 2 2 32 12 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 15 2 2 36 16 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 20 40 2 2 19 39 19 2 2 40 20 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 15 2 2 36 16 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 11 2 2 32 12 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 7 2 2 28 8 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
1 1 3 23 2 2 2 22 2 2 2 23 3 1 2 3 4 5 6 7 8 9 8 7 6 5 4 3
1 1 7 27 2 2 6 26 6 2 2 27 7 1 10 11 12 13 14 15 16 17 16 15 14 13 12 11
1 1 11 31 2 2 10 30 10 2 2 31 11 1 18 19 20 21 22 23 24 25 24 23 22 21 20 19
1 1 15 35 2 2 14 34 14 2 2 35 15 1 26 27 28 29 30 31 32 33 32 31 30 29 28 27
1 1 19 39 2 2 18 38 18 2 2 39 19 1 34 35 36 37 38 39 40 41 40 39 38 37 36 35
1 1 15 35 2 2 14 34 14 2 2 35 15 1 26 27 28 29 30 31 32 33 32 31 30 29 28 27
1 1 11 31 2 2 10 30 10 2 2 31 11 1 18 19 20 21 22 23 24 25 24 23 22 21 20 19
1 1 7 27 2 2 6 26 6 2 2 27 7 1 10 11 12 13 14 15 16 17 16 15 14 13 12 11

View File

@ -15,8 +15,8 @@ homogenization 1
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 30 14 18 42 42 42 42 42 25 32 40 42 42 42
42 42 29 13 17 42 42 42 42 42 1 1 1 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
@ -25,32 +25,32 @@ homogenization 1
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 31 15 19 42 42 42 42 42 2 2 2 42 42 42
42 6 10 2 2 42 42 42 42 16 24 31 31 42 42 42
42 1 2 2 2 2 42 42 42 1 1 1 1 1 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 32 16 20 42 42 42 42 42 24 31 39 42 42 42
42 7 11 2 2 42 42 42 42 2 2 2 2 42 42 42
42 7 11 2 2 42 42 42 42 2 2 2 2 42 42 42
42 2 2 2 2 2 42 42 42 8 15 23 30 38 42 42
42 42 2 2 31 35 42 42 42 42 14 22 21 29 42 42
42 42 22 26 10 14 1 42 42 42 1 1 1 1 1 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 4 2 2 2 2 42 42 42 7 14 22 29 37 42 42
42 42 2 2 32 36 42 42 42 42 2 2 2 2 42 42
42 42 24 28 12 16 1 42 42 42 2 2 2 2 2 42
42 42 42 7 7 1 1 42 42 42 42 12 12 19 27 42
42 42 42 7 7 1 1 42 42 42 42 12 12 19 27 42
42 42 42 1 1 1 42 42 42 42 42 1 1 1 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
@ -58,9 +58,9 @@ homogenization 1
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 25 29 13 17 1 42 42 42 4 12 19 27 34 42
42 42 42 8 8 1 1 42 42 42 42 2 2 2 2 42
42 42 42 1 1 1 42 42 42 42 42 3 11 18 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
@ -69,8 +69,8 @@ homogenization 1
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 1 1 1 42 42 42 42 42 2 10 17 42 42
42 42 42 1 1 1 42 42 42 42 42 2 2 2 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42

View File

@ -18,66 +18,66 @@ homogenization 1
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 1 2 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 1 42 42 42 42 42 42
42 42 42 42 1 5 42 42 42 42 42
42 42 42 1 7 4 42 42 42 42 42
42 42 42 42 42 27 42 42 42 42 42
42 42 42 42 42 42 2 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 1 1 42 42 42 42 42 42 42 42 42 1 1 42 42 42 42 42 42
42 42 42 1 1 9 29 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 1 1 11 8 28 2 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 1 10 31 2 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 30 2 2 2 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 2 1 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 2 42 42 42 42 42 42
42 42 42 42 2 3 42 42 42 42 42
42 42 42 11 12 2 42 42 42 42 42
42 42 42 42 42 13 42 42 42 42 42
42 42 42 42 42 42 6 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42
42 42 42 2 10 42 42 42 42 42 42
42 42 42 2 2 11 12 42 42 42 42
42 42 1 19 20 2 2 5 42 42 42
42 42 42 1 1 21 2 42 42 42 42
42 42 42 42 1 1 14 15 42 42 42
42 42 42 42 42 42 1 1 42 42 42
42 42 42 42 42 42 42 1 42 42 42 42 42 42 42 42 42 42 1 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 1 42 42 42 42 42 42 42 42 42 42 2 42 42 42 42 42 42 42
42 42 42 1 1 42 42 42 42 42 42 42 42 42 2 2 42 42 42 42 42 42
42 42 1 16 36 12 32 42 42 42 42 42 42 35 2 2 2 2 42 42 42 42
42 42 42 15 35 2 2 2 42 42 42 42 42 42 28 29 2 2 2 42 42 42
42 42 42 42 2 2 2 11 3 42 42 42 42 42 42 22 23 2 2 2 42 42
42 42 42 42 42 42 10 6 42 42 42 42 42 42 42 42 42 24 16 42 42 42
42 42 42 42 42 42 42 6 42 42 42 42 42 42 42 42 42 42 16 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 1 42 42 42 42 42 42 42 42 42 42 34 42 42 42 42 42 42 42
42 42 42 1 17 42 42 42 42 42 42 42 42 42 34 27 42 42 42 42 42 42
42 42 42 16 36 37 2 42 42 42 42 42 42 42 2 2 28 21 42 42 42 42
42 42 42 42 39 2 2 12 42 42 42 42 42 42 42 37 2 22 23 42 42 42
42 42 42 38 2 2 2 11 8 42 42 42 42 42 1 30 31 2 2 15 42 42
42 42 42 42 2 2 14 30 42 42 42 42 42 42 42 1 1 32 25 42 42 42
42 42 42 42 42 42 13 30 42 42 42 42 42 42 42 42 42 1 25 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 40 42 42 42 42 42 42 42 42 42 42 2 42 42 42 42 42 42
42 42 42 42 42 2 42 42 42 42 42 42 42 42 42 42 2 42 42 42 42 42
42 42 42 42 42 2 2 15 42 42 42 42 42 42 42 42 39 2 2 42 42 42
42 42 42 42 42 2 18 42 42 42 42 42 42 42 42 42 1 40 42 42 42 42
42 42 42 42 42 42 17 42 42 42 42 42 42 42 42 42 42 1 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
@ -86,7 +86,7 @@ homogenization 1
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 2 20 42 42 42 42 42 42 42 42 42 38 39 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42
42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42 42

View File

@ -3,103 +3,103 @@ grid a 10 b 10 c 10
size x 8e-06 y 5e-06 z 4e-06 size x 8e-06 y 5e-06 z 4e-06
origin x 0.0 y 0.0 z 0.0 origin x 0.0 y 0.0 z 0.0
homogenization 1 homogenization 1
1 1 2 2 22 2 2 2 1 21 1 1 1 1 1 1 1 1 1 1
1 1 2 2 22 2 2 2 1 21 1 1 1 1 1 1 1 1 1 1
1 1 6 6 26 2 2 2 5 25 1 1 1 1 1 1 1 1 1 1
1 1 6 6 26 2 2 2 5 25 1 1 1 1 1 1 1 1 1 1
1 1 10 10 30 2 2 2 9 29 1 1 1 1 1 1 1 1 1 1
1 1 10 10 30 2 2 2 9 29 1 1 1 1 1 1 1 1 1 1
1 1 14 14 34 2 2 2 13 33 1 1 1 1 1 1 1 1 1 1
1 1 14 14 34 2 2 2 13 33 1 1 1 1 1 1 1 1 1 1
1 1 18 18 38 2 2 2 17 37 1 1 1 1 1 1 1 1 1 1
1 1 18 18 38 2 2 2 17 37 1 1 1 1 1 1 1 1 1 1
1 1 2 2 22 2 2 2 1 21 1 1 1 1 1 1 1 1 1 1
1 1 2 2 22 2 2 2 1 21 1 1 1 1 1 1 1 1 1 1
1 1 6 6 26 2 2 2 5 25 1 1 1 1 1 1 1 1 1 1
1 1 6 6 26 2 2 2 5 25 1 1 1 1 1 1 1 1 1 1
1 1 10 10 30 2 2 2 9 29 1 1 1 1 1 1 1 1 1 1
1 1 10 10 30 2 2 2 9 29 1 1 1 1 1 1 1 1 1 1
1 1 14 14 34 2 2 2 13 33 1 1 1 1 1 1 1 1 1 1
1 1 14 14 34 2 2 2 13 33 1 1 1 1 1 1 1 1 1 1
1 1 18 18 38 2 2 2 17 37 1 1 1 1 1 1 1 1 1 1
1 1 18 18 38 2 2 2 17 37 1 1 1 1 1 1 1 1 1 1
1 1 3 3 23 2 2 2 2 22 2 3 4 4 5 6 7 7 8 9
1 1 3 3 23 2 2 2 2 22 2 3 4 4 5 6 7 7 8 9
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 19 19 39 2 2 2 18 38 34 35 36 36 37 38 39 39 40 41
1 1 19 19 39 2 2 2 18 38 34 35 36 36 37 38 39 39 40 41
1 1 3 3 23 2 2 2 2 22 2 3 4 4 5 6 7 7 8 9
1 1 3 3 23 2 2 2 2 22 2 3 4 4 5 6 7 7 8 9
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 19 19 39 2 2 2 18 38 34 35 36 36 37 38 39 39 40 41
1 1 19 19 39 2 2 2 18 38 34 35 36 36 37 38 39 39 40 41
1 1 3 3 23 2 2 2 2 22 2 3 4 4 5 6 7 7 8 9
1 1 3 3 23 2 2 2 2 22 2 3 4 4 5 6 7 7 8 9
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 19 19 39 2 2 2 18 38 34 35 36 36 37 38 39 39 40 41
1 1 19 19 39 2 2 2 18 38 34 35 36 36 37 38 39 39 40 41
1 1 4 4 24 2 2 2 3 23 2 2 2 2 2 2 2 2 2 2
1 1 4 4 24 2 2 2 3 23 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 20 20 40 2 2 2 19 39 2 2 2 2 2 2 2 2 2 2
1 1 20 20 40 2 2 2 19 39 2 2 2 2 2 2 2 2 2 2
1 1 4 4 24 2 2 2 3 23 2 2 2 2 2 2 2 2 2 2
1 1 4 4 24 2 2 2 3 23 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 20 20 40 2 2 2 19 39 2 2 2 2 2 2 2 2 2 2
1 1 20 20 40 2 2 2 19 39 2 2 2 2 2 2 2 2 2 2
1 1 4 4 24 2 2 2 3 23 2 2 2 2 2 2 2 2 2 2
1 1 4 4 24 2 2 2 3 23 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 20 20 40 2 2 2 19 39 2 2 2 2 2 2 2 2 2 2
1 1 20 20 40 2 2 2 19 39 2 2 2 2 2 2 2 2 2 2
1 1 5 5 25 2 2 2 4 24 1 2 3 3 4 5 6 6 7 8
1 1 5 5 25 2 2 2 4 24 1 2 3 3 4 5 6 6 7 8
1 1 9 9 29 2 2 2 8 28 9 10 11 11 12 13 14 14 15 16
1 1 9 9 29 2 2 2 8 28 9 10 11 11 12 13 14 14 15 16
1 1 13 13 33 2 2 2 12 32 17 18 19 19 20 21 22 22 23 24
1 1 13 13 33 2 2 2 12 32 17 18 19 19 20 21 22 22 23 24
1 1 17 17 37 2 2 2 16 36 25 26 27 27 28 29 30 30 31 32
1 1 17 17 37 2 2 2 16 36 25 26 27 27 28 29 30 30 31 32
1 1 21 21 41 2 2 2 20 40 33 34 35 35 36 37 38 38 39 40
1 1 21 21 41 2 2 2 20 40 33 34 35 35 36 37 38 38 39 40
1 1 5 5 25 2 2 2 4 24 1 2 3 3 4 5 6 6 7 8
1 1 5 5 25 2 2 2 4 24 1 2 3 3 4 5 6 6 7 8
1 1 9 9 29 2 2 2 8 28 9 10 11 11 12 13 14 14 15 16
1 1 9 9 29 2 2 2 8 28 9 10 11 11 12 13 14 14 15 16
1 1 13 13 33 2 2 2 12 32 17 18 19 19 20 21 22 22 23 24
1 1 13 13 33 2 2 2 12 32 17 18 19 19 20 21 22 22 23 24
1 1 17 17 37 2 2 2 16 36 25 26 27 27 28 29 30 30 31 32
1 1 17 17 37 2 2 2 16 36 25 26 27 27 28 29 30 30 31 32
1 1 21 21 41 2 2 2 20 40 33 34 35 35 36 37 38 38 39 40
1 1 21 21 41 2 2 2 20 40 33 34 35 35 36 37 38 38 39 40

View File

@ -3,113 +3,113 @@ grid a 10 b 11 c 10
size x 8e-06 y 5e-06 z 4e-06 size x 8e-06 y 5e-06 z 4e-06
origin x 0.0 y 0.0 z 0.0 origin x 0.0 y 0.0 z 0.0
homogenization 1 homogenization 1
1 1 2 2 22 2 2 2 1 21 1 1 1 1 1 1 1 1 1 1
1 1 2 2 22 2 2 2 1 21 1 1 1 1 1 1 1 1 1 1
1 1 6 6 26 2 2 2 5 25 1 1 1 1 1 1 1 1 1 1
1 1 6 6 26 2 2 2 5 25 1 1 1 1 1 1 1 1 1 1
1 1 10 10 30 2 2 2 9 29 1 1 1 1 1 1 1 1 1 1
1 1 10 10 30 2 2 2 9 29 1 1 1 1 1 1 1 1 1 1
1 1 10 10 30 2 2 2 9 29 1 1 1 1 1 1 1 1 1 1
1 1 14 14 34 2 2 2 13 33 1 1 1 1 1 1 1 1 1 1
1 1 14 14 34 2 2 2 13 33 1 1 1 1 1 1 1 1 1 1
1 1 18 18 38 2 2 2 17 37 1 1 1 1 1 1 1 1 1 1
1 1 18 18 38 2 2 2 17 37 1 1 1 1 1 1 1 1 1 1
1 1 2 2 22 2 2 2 1 21 1 1 1 1 1 1 1 1 1 1
1 1 2 2 22 2 2 2 1 21 1 1 1 1 1 1 1 1 1 1
1 1 6 6 26 2 2 2 5 25 1 1 1 1 1 1 1 1 1 1
1 1 6 6 26 2 2 2 5 25 1 1 1 1 1 1 1 1 1 1
1 1 10 10 30 2 2 2 9 29 1 1 1 1 1 1 1 1 1 1
1 1 10 10 30 2 2 2 9 29 1 1 1 1 1 1 1 1 1 1
1 1 10 10 30 2 2 2 9 29 1 1 1 1 1 1 1 1 1 1
1 1 14 14 34 2 2 2 13 33 1 1 1 1 1 1 1 1 1 1
1 1 14 14 34 2 2 2 13 33 1 1 1 1 1 1 1 1 1 1
1 1 18 18 38 2 2 2 17 37 1 1 1 1 1 1 1 1 1 1
1 1 18 18 38 2 2 2 17 37 1 1 1 1 1 1 1 1 1 1
1 1 3 3 23 2 2 2 2 22 2 3 4 4 5 6 7 7 8 9
1 1 3 3 23 2 2 2 2 22 2 3 4 4 5 6 7 7 8 9
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 19 19 39 2 2 2 18 38 34 35 36 36 37 38 39 39 40 41
1 1 19 19 39 2 2 2 18 38 34 35 36 36 37 38 39 39 40 41
1 1 3 3 23 2 2 2 2 22 2 3 4 4 5 6 7 7 8 9
1 1 3 3 23 2 2 2 2 22 2 3 4 4 5 6 7 7 8 9
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 19 19 39 2 2 2 18 38 34 35 36 36 37 38 39 39 40 41
1 1 19 19 39 2 2 2 18 38 34 35 36 36 37 38 39 39 40 41
1 1 3 3 23 2 2 2 2 22 2 3 4 4 5 6 7 7 8 9
1 1 3 3 23 2 2 2 2 22 2 3 4 4 5 6 7 7 8 9
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 19 19 39 2 2 2 18 38 34 35 36 36 37 38 39 39 40 41
1 1 19 19 39 2 2 2 18 38 34 35 36 36 37 38 39 39 40 41
1 1 4 4 24 2 2 2 3 23 2 2 2 2 2 2 2 2 2 2
1 1 4 4 24 2 2 2 3 23 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 20 20 40 2 2 2 19 39 2 2 2 2 2 2 2 2 2 2
1 1 20 20 40 2 2 2 19 39 2 2 2 2 2 2 2 2 2 2
1 1 4 4 24 2 2 2 3 23 2 2 2 2 2 2 2 2 2 2
1 1 4 4 24 2 2 2 3 23 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 20 20 40 2 2 2 19 39 2 2 2 2 2 2 2 2 2 2
1 1 20 20 40 2 2 2 19 39 2 2 2 2 2 2 2 2 2 2
1 1 4 4 24 2 2 2 3 23 2 2 2 2 2 2 2 2 2 2
1 1 4 4 24 2 2 2 3 23 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 20 20 40 2 2 2 19 39 2 2 2 2 2 2 2 2 2 2
1 1 20 20 40 2 2 2 19 39 2 2 2 2 2 2 2 2 2 2
1 1 5 5 25 2 2 2 4 24 1 2 3 3 4 5 6 6 7 8
1 1 5 5 25 2 2 2 4 24 1 2 3 3 4 5 6 6 7 8
1 1 9 9 29 2 2 2 8 28 9 10 11 11 12 13 14 14 15 16
1 1 9 9 29 2 2 2 8 28 9 10 11 11 12 13 14 14 15 16
1 1 13 13 33 2 2 2 12 32 17 18 19 19 20 21 22 22 23 24
1 1 13 13 33 2 2 2 12 32 17 18 19 19 20 21 22 22 23 24
1 1 13 13 33 2 2 2 12 32 17 18 19 19 20 21 22 22 23 24
1 1 17 17 37 2 2 2 16 36 25 26 27 27 28 29 30 30 31 32
1 1 17 17 37 2 2 2 16 36 25 26 27 27 28 29 30 30 31 32
1 1 21 21 41 2 2 2 20 40 33 34 35 35 36 37 38 38 39 40
1 1 21 21 41 2 2 2 20 40 33 34 35 35 36 37 38 38 39 40
1 1 5 5 25 2 2 2 4 24 1 2 3 3 4 5 6 6 7 8
1 1 5 5 25 2 2 2 4 24 1 2 3 3 4 5 6 6 7 8
1 1 9 9 29 2 2 2 8 28 9 10 11 11 12 13 14 14 15 16
1 1 9 9 29 2 2 2 8 28 9 10 11 11 12 13 14 14 15 16
1 1 13 13 33 2 2 2 12 32 17 18 19 19 20 21 22 22 23 24
1 1 13 13 33 2 2 2 12 32 17 18 19 19 20 21 22 22 23 24
1 1 13 13 33 2 2 2 12 32 17 18 19 19 20 21 22 22 23 24
1 1 17 17 37 2 2 2 16 36 25 26 27 27 28 29 30 30 31 32
1 1 17 17 37 2 2 2 16 36 25 26 27 27 28 29 30 30 31 32
1 1 21 21 41 2 2 2 20 40 33 34 35 35 36 37 38 38 39 40
1 1 21 21 41 2 2 2 20 40 33 34 35 35 36 37 38 38 39 40

View File

@ -3,133 +3,133 @@ grid a 10 b 13 c 10
size x 8e-06 y 5e-06 z 4e-06 size x 8e-06 y 5e-06 z 4e-06
origin x 0.0 y 0.0 z 0.0 origin x 0.0 y 0.0 z 0.0
homogenization 1 homogenization 1
1 1 2 2 22 2 2 2 1 21 1 1 1 1 1 1 1 1 1 1
1 1 2 2 22 2 2 2 1 21 1 1 1 1 1 1 1 1 1 1
1 1 6 6 26 2 2 2 5 25 1 1 1 1 1 1 1 1 1 1
1 1 6 6 26 2 2 2 5 25 1 1 1 1 1 1 1 1 1 1
1 1 6 6 26 2 2 2 5 25 1 1 1 1 1 1 1 1 1 1
1 1 10 10 30 2 2 2 9 29 1 1 1 1 1 1 1 1 1 1
1 1 10 10 30 2 2 2 9 29 1 1 1 1 1 1 1 1 1 1
1 1 10 10 30 2 2 2 9 29 1 1 1 1 1 1 1 1 1 1
1 1 14 14 34 2 2 2 13 33 1 1 1 1 1 1 1 1 1 1
1 1 14 14 34 2 2 2 13 33 1 1 1 1 1 1 1 1 1 1
1 1 14 14 34 2 2 2 13 33 1 1 1 1 1 1 1 1 1 1
1 1 18 18 38 2 2 2 17 37 1 1 1 1 1 1 1 1 1 1
1 1 18 18 38 2 2 2 17 37 1 1 1 1 1 1 1 1 1 1
1 1 2 2 22 2 2 2 1 21 1 1 1 1 1 1 1 1 1 1
1 1 2 2 22 2 2 2 1 21 1 1 1 1 1 1 1 1 1 1
1 1 6 6 26 2 2 2 5 25 1 1 1 1 1 1 1 1 1 1
1 1 6 6 26 2 2 2 5 25 1 1 1 1 1 1 1 1 1 1
1 1 6 6 26 2 2 2 5 25 1 1 1 1 1 1 1 1 1 1
1 1 10 10 30 2 2 2 9 29 1 1 1 1 1 1 1 1 1 1
1 1 10 10 30 2 2 2 9 29 1 1 1 1 1 1 1 1 1 1
1 1 10 10 30 2 2 2 9 29 1 1 1 1 1 1 1 1 1 1
1 1 14 14 34 2 2 2 13 33 1 1 1 1 1 1 1 1 1 1
1 1 14 14 34 2 2 2 13 33 1 1 1 1 1 1 1 1 1 1
1 1 14 14 34 2 2 2 13 33 1 1 1 1 1 1 1 1 1 1
1 1 18 18 38 2 2 2 17 37 1 1 1 1 1 1 1 1 1 1
1 1 18 18 38 2 2 2 17 37 1 1 1 1 1 1 1 1 1 1
1 1 3 3 23 2 2 2 2 22 2 3 4 4 5 6 7 7 8 9
1 1 3 3 23 2 2 2 2 22 2 3 4 4 5 6 7 7 8 9
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 19 19 39 2 2 2 18 38 34 35 36 36 37 38 39 39 40 41
1 1 19 19 39 2 2 2 18 38 34 35 36 36 37 38 39 39 40 41
1 1 3 3 23 2 2 2 2 22 2 3 4 4 5 6 7 7 8 9
1 1 3 3 23 2 2 2 2 22 2 3 4 4 5 6 7 7 8 9
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 19 19 39 2 2 2 18 38 34 35 36 36 37 38 39 39 40 41
1 1 19 19 39 2 2 2 18 38 34 35 36 36 37 38 39 39 40 41
1 1 3 3 23 2 2 2 2 22 2 3 4 4 5 6 7 7 8 9
1 1 3 3 23 2 2 2 2 22 2 3 4 4 5 6 7 7 8 9
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 7 7 27 2 2 2 6 26 10 11 12 12 13 14 15 15 16 17
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 11 11 31 2 2 2 10 30 18 19 20 20 21 22 23 23 24 25
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 15 15 35 2 2 2 14 34 26 27 28 28 29 30 31 31 32 33
1 1 19 19 39 2 2 2 18 38 34 35 36 36 37 38 39 39 40 41
1 1 19 19 39 2 2 2 18 38 34 35 36 36 37 38 39 39 40 41
1 1 4 4 24 2 2 2 3 23 2 2 2 2 2 2 2 2 2 2
1 1 4 4 24 2 2 2 3 23 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 20 20 40 2 2 2 19 39 2 2 2 2 2 2 2 2 2 2
1 1 20 20 40 2 2 2 19 39 2 2 2 2 2 2 2 2 2 2
1 1 4 4 24 2 2 2 3 23 2 2 2 2 2 2 2 2 2 2
1 1 4 4 24 2 2 2 3 23 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 20 20 40 2 2 2 19 39 2 2 2 2 2 2 2 2 2 2
1 1 20 20 40 2 2 2 19 39 2 2 2 2 2 2 2 2 2 2
1 1 4 4 24 2 2 2 3 23 2 2 2 2 2 2 2 2 2 2
1 1 4 4 24 2 2 2 3 23 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 8 8 28 2 2 2 7 27 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 12 12 32 2 2 2 11 31 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 16 16 36 2 2 2 15 35 2 2 2 2 2 2 2 2 2 2
1 1 20 20 40 2 2 2 19 39 2 2 2 2 2 2 2 2 2 2
1 1 20 20 40 2 2 2 19 39 2 2 2 2 2 2 2 2 2 2
1 1 5 5 25 2 2 2 4 24 1 2 3 3 4 5 6 6 7 8
1 1 5 5 25 2 2 2 4 24 1 2 3 3 4 5 6 6 7 8
1 1 9 9 29 2 2 2 8 28 9 10 11 11 12 13 14 14 15 16
1 1 9 9 29 2 2 2 8 28 9 10 11 11 12 13 14 14 15 16
1 1 9 9 29 2 2 2 8 28 9 10 11 11 12 13 14 14 15 16
1 1 13 13 33 2 2 2 12 32 17 18 19 19 20 21 22 22 23 24
1 1 13 13 33 2 2 2 12 32 17 18 19 19 20 21 22 22 23 24
1 1 13 13 33 2 2 2 12 32 17 18 19 19 20 21 22 22 23 24
1 1 17 17 37 2 2 2 16 36 25 26 27 27 28 29 30 30 31 32
1 1 17 17 37 2 2 2 16 36 25 26 27 27 28 29 30 30 31 32
1 1 17 17 37 2 2 2 16 36 25 26 27 27 28 29 30 30 31 32
1 1 21 21 41 2 2 2 20 40 33 34 35 35 36 37 38 38 39 40
1 1 21 21 41 2 2 2 20 40 33 34 35 35 36 37 38 38 39 40
1 1 5 5 25 2 2 2 4 24 1 2 3 3 4 5 6 6 7 8
1 1 5 5 25 2 2 2 4 24 1 2 3 3 4 5 6 6 7 8
1 1 9 9 29 2 2 2 8 28 9 10 11 11 12 13 14 14 15 16
1 1 9 9 29 2 2 2 8 28 9 10 11 11 12 13 14 14 15 16
1 1 9 9 29 2 2 2 8 28 9 10 11 11 12 13 14 14 15 16
1 1 13 13 33 2 2 2 12 32 17 18 19 19 20 21 22 22 23 24
1 1 13 13 33 2 2 2 12 32 17 18 19 19 20 21 22 22 23 24
1 1 13 13 33 2 2 2 12 32 17 18 19 19 20 21 22 22 23 24
1 1 17 17 37 2 2 2 16 36 25 26 27 27 28 29 30 30 31 32
1 1 17 17 37 2 2 2 16 36 25 26 27 27 28 29 30 30 31 32
1 1 17 17 37 2 2 2 16 36 25 26 27 27 28 29 30 30 31 32
1 1 21 21 41 2 2 2 20 40 33 34 35 35 36 37 38 38 39 40
1 1 21 21 41 2 2 2 20 40 33 34 35 35 36 37 38 38 39 40

View File

@ -3,43 +3,43 @@ grid a 10 b 20 c 2
size x 8e-06 y 5e-06 z 4e-06 size x 8e-06 y 5e-06 z 4e-06
origin x 0.0 y 0.0 z 0.0 origin x 0.0 y 0.0 z 0.0
homogenization 1 homogenization 1
1 1 2 2 22 2 2 2 1 21 1 1 1 1 1 1 1 1 1 1
1 1 2 2 22 2 2 2 1 21 1 1 1 1 1 1 1 1 1 1
1 1 2 2 22 2 2 2 1 21 1 1 1 1 1 1 1 1 1 1
1 1 6 6 26 2 2 2 5 25 1 1 1 1 1 1 1 1 1 1
1 1 6 6 26 2 2 2 5 25 1 1 1 1 1 1 1 1 1 1
1 1 6 6 26 2 2 2 5 25 1 1 1 1 1 1 1 1 1 1
1 1 6 6 26 2 2 2 5 25 1 1 1 1 1 1 1 1 1 1
1 1 6 6 26 2 2 2 5 25 1 1 1 1 1 1 1 1 1 1
1 1 10 10 30 2 2 2 9 29 1 1 1 1 1 1 1 1 1 1
1 1 10 10 30 2 2 2 9 29 1 1 1 1 1 1 1 1 1 1
1 1 10 10 30 2 2 2 9 29 1 1 1 1 1 1 1 1 1 1
1 1 10 10 30 2 2 2 9 29 1 1 1 1 1 1 1 1 1 1
1 1 14 14 34 2 2 2 13 33 1 1 1 1 1 1 1 1 1 1
1 1 14 14 34 2 2 2 13 33 1 1 1 1 1 1 1 1 1 1
1 1 14 14 34 2 2 2 13 33 1 1 1 1 1 1 1 1 1 1
1 1 14 14 34 2 2 2 13 33 1 1 1 1 1 1 1 1 1 1
1 1 14 14 34 2 2 2 13 33 1 1 1 1 1 1 1 1 1 1
1 1 18 18 38 2 2 2 17 37 1 1 1 1 1 1 1 1 1 1
1 1 18 18 38 2 2 2 17 37 1 1 1 1 1 1 1 1 1 1
1 1 18 18 38 2 2 2 17 37 1 1 1 1 1 1 1 1 1 1
1 1 5 5 25 2 2 2 4 24 1 2 3 3 4 5 6 6 7 8
1 1 5 5 25 2 2 2 4 24 1 2 3 3 4 5 6 6 7 8
1 1 5 5 25 2 2 2 4 24 1 2 3 3 4 5 6 6 7 8
1 1 9 9 29 2 2 2 8 28 9 10 11 11 12 13 14 14 15 16
1 1 9 9 29 2 2 2 8 28 9 10 11 11 12 13 14 14 15 16
1 1 9 9 29 2 2 2 8 28 9 10 11 11 12 13 14 14 15 16
1 1 9 9 29 2 2 2 8 28 9 10 11 11 12 13 14 14 15 16
1 1 9 9 29 2 2 2 8 28 9 10 11 11 12 13 14 14 15 16
1 1 13 13 33 2 2 2 12 32 17 18 19 19 20 21 22 22 23 24
1 1 13 13 33 2 2 2 12 32 17 18 19 19 20 21 22 22 23 24
1 1 13 13 33 2 2 2 12 32 17 18 19 19 20 21 22 22 23 24
1 1 13 13 33 2 2 2 12 32 17 18 19 19 20 21 22 22 23 24
1 1 17 17 37 2 2 2 16 36 25 26 27 27 28 29 30 30 31 32
1 1 17 17 37 2 2 2 16 36 25 26 27 27 28 29 30 30 31 32
1 1 17 17 37 2 2 2 16 36 25 26 27 27 28 29 30 30 31 32
1 1 17 17 37 2 2 2 16 36 25 26 27 27 28 29 30 30 31 32
1 1 17 17 37 2 2 2 16 36 25 26 27 27 28 29 30 30 31 32
1 1 21 21 41 2 2 2 20 40 33 34 35 35 36 37 38 38 39 40
1 1 21 21 41 2 2 2 20 40 33 34 35 35 36 37 38 38 39 40
1 1 21 21 41 2 2 2 20 40 33 34 35 35 36 37 38 38 39 40

View File

@ -3,83 +3,83 @@ grid a 5 b 4 c 20
size x 8e-06 y 5e-06 z 4e-06 size x 8e-06 y 5e-06 z 4e-06
origin x 0.0 y 0.0 z 0.0 origin x 0.0 y 0.0 z 0.0
homogenization 1 homogenization 1
1 2 2 2 21 1 1 1 1 1
1 6 2 2 25 1 1 1 1 1
1 14 2 2 33 1 1 1 1 1
1 18 2 2 37 1 1 1 1 1
1 2 2 2 21 1 1 1 1 1
1 6 2 2 25 1 1 1 1 1
1 14 2 2 33 1 1 1 1 1
1 18 2 2 37 1 1 1 1 1
1 2 2 2 21 1 1 1 1 1
1 6 2 2 25 1 1 1 1 1
1 14 2 2 33 1 1 1 1 1
1 18 2 2 37 1 1 1 1 1
1 2 2 2 21 1 1 1 1 1
1 6 2 2 25 1 1 1 1 1
1 14 2 2 33 1 1 1 1 1
1 18 2 2 37 1 1 1 1 1
1 3 2 2 22 2 4 6 7 9
1 7 2 2 26 10 12 14 15 17
1 15 2 2 34 26 28 30 31 33
1 19 2 2 38 34 36 38 39 41
1 3 2 2 22 2 4 6 7 9
1 7 2 2 26 10 12 14 15 17
1 15 2 2 34 26 28 30 31 33
1 19 2 2 38 34 36 38 39 41
1 3 2 2 22 2 4 6 7 9
1 7 2 2 26 10 12 14 15 17
1 15 2 2 34 26 28 30 31 33
1 19 2 2 38 34 36 38 39 41
1 3 2 2 22 2 4 6 7 9
1 7 2 2 26 10 12 14 15 17
1 15 2 2 34 26 28 30 31 33
1 19 2 2 38 34 36 38 39 41
1 3 2 2 22 2 4 6 7 9
1 7 2 2 26 10 12 14 15 17
1 15 2 2 34 26 28 30 31 33
1 19 2 2 38 34 36 38 39 41
1 3 2 2 22 2 4 6 7 9
1 7 2 2 26 10 12 14 15 17
1 15 2 2 34 26 28 30 31 33
1 19 2 2 38 34 36 38 39 41
1 4 2 2 23 2 2 2 2 2
1 8 2 2 27 2 2 2 2 2
1 16 2 2 35 2 2 2 2 2
1 20 2 2 39 2 2 2 2 2
1 4 2 2 23 2 2 2 2 2
1 8 2 2 27 2 2 2 2 2
1 16 2 2 35 2 2 2 2 2
1 20 2 2 39 2 2 2 2 2
1 4 2 2 23 2 2 2 2 2
1 8 2 2 27 2 2 2 2 2
1 16 2 2 35 2 2 2 2 2
1 20 2 2 39 2 2 2 2 2
1 4 2 2 23 2 2 2 2 2
1 8 2 2 27 2 2 2 2 2
1 16 2 2 35 2 2 2 2 2
1 20 2 2 39 2 2 2 2 2
1 4 2 2 23 2 2 2 2 2
1 8 2 2 27 2 2 2 2 2
1 16 2 2 35 2 2 2 2 2
1 20 2 2 39 2 2 2 2 2
1 4 2 2 23 2 2 2 2 2
1 8 2 2 27 2 2 2 2 2
1 16 2 2 35 2 2 2 2 2
1 20 2 2 39 2 2 2 2 2
1 5 2 2 24 1 3 5 6 8
1 9 2 2 28 9 11 13 14 16
1 17 2 2 36 25 27 29 30 32
1 21 2 2 40 33 35 37 38 40
1 5 2 2 24 1 3 5 6 8
1 9 2 2 28 9 11 13 14 16
1 17 2 2 36 25 27 29 30 32
1 21 2 2 40 33 35 37 38 40
1 5 2 2 24 1 3 5 6 8
1 9 2 2 28 9 11 13 14 16
1 17 2 2 36 25 27 29 30 32
1 21 2 2 40 33 35 37 38 40
1 5 2 2 24 1 3 5 6 8
1 9 2 2 28 9 11 13 14 16
1 17 2 2 36 25 27 29 30 32
1 21 2 2 40 33 35 37 38 40

View File

@ -3,123 +3,123 @@ grid a 8 b 10 c 12
size x 8e-06 y 5e-06 z 4e-06 size x 8e-06 y 5e-06 z 4e-06
origin x 0.0 y 0.0 z 0.0 origin x 0.0 y 0.0 z 0.0
homogenization 1 homogenization 1
1 1 2 22 2 2 1 21 1 1 1 1 1 1 1 1
1 1 2 22 2 2 1 21 1 1 1 1 1 1 1 1
1 1 6 26 2 2 5 25 1 1 1 1 1 1 1 1
1 1 6 26 2 2 5 25 1 1 1 1 1 1 1 1
1 1 10 30 2 2 9 29 1 1 1 1 1 1 1 1
1 1 10 30 2 2 9 29 1 1 1 1 1 1 1 1
1 1 14 34 2 2 13 33 1 1 1 1 1 1 1 1
1 1 14 34 2 2 13 33 1 1 1 1 1 1 1 1
1 1 18 38 2 2 17 37 1 1 1 1 1 1 1 1
1 1 18 38 2 2 17 37 1 1 1 1 1 1 1 1
1 1 2 22 2 2 1 21 1 1 1 1 1 1 1 1
1 1 2 22 2 2 1 21 1 1 1 1 1 1 1 1
1 1 6 26 2 2 5 25 1 1 1 1 1 1 1 1
1 1 6 26 2 2 5 25 1 1 1 1 1 1 1 1
1 1 10 30 2 2 9 29 1 1 1 1 1 1 1 1
1 1 10 30 2 2 9 29 1 1 1 1 1 1 1 1
1 1 14 34 2 2 13 33 1 1 1 1 1 1 1 1
1 1 14 34 2 2 13 33 1 1 1 1 1 1 1 1
1 1 18 38 2 2 17 37 1 1 1 1 1 1 1 1
1 1 18 38 2 2 17 37 1 1 1 1 1 1 1 1
1 1 3 23 2 2 2 22 2 3 4 5 6 7 8 9
1 1 3 23 2 2 2 22 2 3 4 5 6 7 8 9
1 1 7 27 2 2 6 26 10 11 12 13 14 15 16 17
1 1 7 27 2 2 6 26 10 11 12 13 14 15 16 17
1 1 11 31 2 2 10 30 18 19 20 21 22 23 24 25
1 1 11 31 2 2 10 30 18 19 20 21 22 23 24 25
1 1 15 35 2 2 14 34 26 27 28 29 30 31 32 33
1 1 15 35 2 2 14 34 26 27 28 29 30 31 32 33
1 1 19 39 2 2 18 38 34 35 36 37 38 39 40 41
1 1 19 39 2 2 18 38 34 35 36 37 38 39 40 41
1 1 3 23 2 2 2 22 2 3 4 5 6 7 8 9
1 1 3 23 2 2 2 22 2 3 4 5 6 7 8 9
1 1 7 27 2 2 6 26 10 11 12 13 14 15 16 17
1 1 7 27 2 2 6 26 10 11 12 13 14 15 16 17
1 1 11 31 2 2 10 30 18 19 20 21 22 23 24 25
1 1 11 31 2 2 10 30 18 19 20 21 22 23 24 25
1 1 15 35 2 2 14 34 26 27 28 29 30 31 32 33
1 1 15 35 2 2 14 34 26 27 28 29 30 31 32 33
1 1 19 39 2 2 18 38 34 35 36 37 38 39 40 41
1 1 19 39 2 2 18 38 34 35 36 37 38 39 40 41
1 1 3 23 2 2 2 22 2 3 4 5 6 7 8 9
1 1 3 23 2 2 2 22 2 3 4 5 6 7 8 9
1 1 7 27 2 2 6 26 10 11 12 13 14 15 16 17
1 1 7 27 2 2 6 26 10 11 12 13 14 15 16 17
1 1 11 31 2 2 10 30 18 19 20 21 22 23 24 25
1 1 11 31 2 2 10 30 18 19 20 21 22 23 24 25
1 1 15 35 2 2 14 34 26 27 28 29 30 31 32 33
1 1 15 35 2 2 14 34 26 27 28 29 30 31 32 33
1 1 19 39 2 2 18 38 34 35 36 37 38 39 40 41
1 1 19 39 2 2 18 38 34 35 36 37 38 39 40 41
1 1 3 23 2 2 2 22 2 3 4 5 6 7 8 9
1 1 3 23 2 2 2 22 2 3 4 5 6 7 8 9
1 1 7 27 2 2 6 26 10 11 12 13 14 15 16 17
1 1 7 27 2 2 6 26 10 11 12 13 14 15 16 17
1 1 11 31 2 2 10 30 18 19 20 21 22 23 24 25
1 1 11 31 2 2 10 30 18 19 20 21 22 23 24 25
1 1 15 35 2 2 14 34 26 27 28 29 30 31 32 33
1 1 15 35 2 2 14 34 26 27 28 29 30 31 32 33
1 1 19 39 2 2 18 38 34 35 36 37 38 39 40 41
1 1 19 39 2 2 18 38 34 35 36 37 38 39 40 41
1 1 4 24 2 2 3 23 2 2 2 2 2 2 2 2
1 1 4 24 2 2 3 23 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 2 2 2 2 2 2 2 2
1 1 20 40 2 2 19 39 2 2 2 2 2 2 2 2
1 1 20 40 2 2 19 39 2 2 2 2 2 2 2 2
1 1 4 24 2 2 3 23 2 2 2 2 2 2 2 2
1 1 4 24 2 2 3 23 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 2 2 2 2 2 2 2 2
1 1 20 40 2 2 19 39 2 2 2 2 2 2 2 2
1 1 20 40 2 2 19 39 2 2 2 2 2 2 2 2
1 1 4 24 2 2 3 23 2 2 2 2 2 2 2 2
1 1 4 24 2 2 3 23 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 2 2 2 2 2 2 2 2
1 1 20 40 2 2 19 39 2 2 2 2 2 2 2 2
1 1 20 40 2 2 19 39 2 2 2 2 2 2 2 2
1 1 4 24 2 2 3 23 2 2 2 2 2 2 2 2
1 1 4 24 2 2 3 23 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 2 2 2 2 2 2 2 2
1 1 8 28 2 2 7 27 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 2 2 2 2 2 2 2 2
1 1 12 32 2 2 11 31 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 2 2 2 2 2 2 2 2
1 1 16 36 2 2 15 35 2 2 2 2 2 2 2 2
1 1 20 40 2 2 19 39 2 2 2 2 2 2 2 2
1 1 20 40 2 2 19 39 2 2 2 2 2 2 2 2
1 1 5 25 2 2 4 24 1 2 3 4 5 6 7 8
1 1 5 25 2 2 4 24 1 2 3 4 5 6 7 8
1 1 9 29 2 2 8 28 9 10 11 12 13 14 15 16
1 1 9 29 2 2 8 28 9 10 11 12 13 14 15 16
1 1 13 33 2 2 12 32 17 18 19 20 21 22 23 24
1 1 13 33 2 2 12 32 17 18 19 20 21 22 23 24
1 1 17 37 2 2 16 36 25 26 27 28 29 30 31 32
1 1 17 37 2 2 16 36 25 26 27 28 29 30 31 32
1 1 21 41 2 2 20 40 33 34 35 36 37 38 39 40
1 1 21 41 2 2 20 40 33 34 35 36 37 38 39 40
1 1 5 25 2 2 4 24 1 2 3 4 5 6 7 8
1 1 5 25 2 2 4 24 1 2 3 4 5 6 7 8
1 1 9 29 2 2 8 28 9 10 11 12 13 14 15 16
1 1 9 29 2 2 8 28 9 10 11 12 13 14 15 16
1 1 13 33 2 2 12 32 17 18 19 20 21 22 23 24
1 1 13 33 2 2 12 32 17 18 19 20 21 22 23 24
1 1 17 37 2 2 16 36 25 26 27 28 29 30 31 32
1 1 17 37 2 2 16 36 25 26 27 28 29 30 31 32
1 1 21 41 2 2 20 40 33 34 35 36 37 38 39 40
1 1 21 41 2 2 20 40 33 34 35 36 37 38 39 40

View File

@ -19,7 +19,7 @@ def default():
x=np.concatenate((np.ones(40,dtype=int), x=np.concatenate((np.ones(40,dtype=int),
np.arange(2,42), np.arange(2,42),
np.ones(40,dtype=int)*2, np.ones(40,dtype=int)*2,
np.arange(1,41))).reshape(8,5,4) np.arange(1,41))).reshape(8,5,4,order='F')
return Geom(x,[8e-6,5e-6,4e-6]) return Geom(x,[8e-6,5e-6,4e-6])
@pytest.fixture @pytest.fixture
@ -40,6 +40,13 @@ class TestGeom:
print(modified) print(modified)
assert geom_equal(modified,default) assert geom_equal(modified,default)
@pytest.mark.parametrize('masked',[True,False])
def test_set_microstructure(self,default,masked):
old = default.get_microstructure()
new = np.random.randint(200,size=default.grid)
default.set_microstructure(np.ma.MaskedArray(new,np.full_like(new,masked)))
assert np.all(default.microstructure==(old if masked else new))
def test_write_read_str(self,default,tmpdir): def test_write_read_str(self,default,tmpdir):
default.to_file(str(tmpdir.join('default.geom'))) default.to_file(str(tmpdir.join('default.geom')))
@ -53,6 +60,16 @@ class TestGeom:
new = Geom.from_file(f) new = Geom.from_file(f)
assert geom_equal(new,default) assert geom_equal(new,default)
def test_write_show(self,default,tmpdir):
with open(tmpdir.join('str.geom'),'w') as f:
f.write(default.show())
with open(tmpdir.join('str.geom')) as f:
new = Geom.from_file(f)
assert geom_equal(new,default)
def test_export_vtk(self,default,tmpdir):
default.to_vtk(str(tmpdir.join('default')))
@pytest.mark.parametrize('pack',[True,False]) @pytest.mark.parametrize('pack',[True,False])
def test_pack(self,default,tmpdir,pack): def test_pack(self,default,tmpdir,pack):
default.to_file(tmpdir.join('default.geom'),pack=pack) default.to_file(tmpdir.join('default.geom'),pack=pack)
@ -67,9 +84,19 @@ class TestGeom:
with pytest.raises(ValueError): with pytest.raises(ValueError):
default.update(default.microstructure[1:,1:,1:],size=np.ones(2)) default.update(default.microstructure[1:,1:,1:],size=np.ones(2))
def test_invalid_microstructure(self,default): def test_invalid_origin(self,default):
with pytest.raises(ValueError): with pytest.raises(ValueError):
default.update(default.microstructure[1]) default.update(default.microstructure[1:,1:,1:],origin=np.ones(4))
def test_invalid_microstructure_size(self,default):
microstructure=np.ones((3,3))
with pytest.raises(ValueError):
default.update(microstructure)
def test_invalid_microstructure_type(self,default):
microstructure=np.random.randint(1,300,(3,4,5))==1
with pytest.raises(TypeError):
default.update(microstructure)
def test_invalid_homogenization(self,default): def test_invalid_homogenization(self,default):
with pytest.raises(TypeError): with pytest.raises(TypeError):
@ -162,6 +189,48 @@ class TestGeom:
e = default.grid e = default.grid
assert np.all(modified.microstructure[:e[0],:e[1],:e[2]] == default.microstructure) assert np.all(modified.microstructure[:e[0],:e[1],:e[2]] == default.microstructure)
@pytest.mark.parametrize('center1,center2',[(np.random.random(3)*.5,np.random.random(3)),
(np.random.randint(4,8,(3)),np.random.randint(9,12,(3)))])
@pytest.mark.parametrize('diameter',[np.random.random(3)*.5,
np.random.randint(4,10,(3))])
def test_add_primitive(self,diameter,center1,center2):
"""Same volume fraction for periodic microstructures and different center."""
o = np.random.random(3)-.5
g = np.random.randint(8,32,(3))
s = np.random.random(3)+.5
G_1 = Geom(np.ones(g,'i'),s,o)
G_2 = Geom(np.ones(g,'i'),s,o)
G_1.add_primitive(diameter,center1,1)
G_2.add_primitive(diameter,center2,1)
assert np.count_nonzero(G_1.microstructure!=2) == np.count_nonzero(G_2.microstructure!=2)
@pytest.mark.parametrize('trigger',[[1],[]])
def test_vicinity_offset(self,trigger):
offset = np.random.randint(2,4)
vicinity = np.random.randint(2,4)
g = np.random.randint(28,40,(3))
m = np.ones(g,'i')
x = (g*np.random.permutation(np.array([.5,1,1]))).astype('i')
m[slice(0,x[0]),slice(0,x[1]),slice(0,x[2])] = 2
m2 = copy.deepcopy(m)
for i in [0,1,2]:
m2[(np.roll(m,+vicinity,i)-m)!=0] += offset
m2[(np.roll(m,-vicinity,i)-m)!=0] += offset
if len(trigger) > 0:
m2[m==1] = 1
geom = Geom(m,np.random.rand(3))
geom.vicinity_offset(vicinity,offset,trigger=trigger)
assert np.all(m2==geom.microstructure)
@pytest.mark.parametrize('periodic',[True,False])
def test_vicinity_offset_invariant(self,default,periodic):
old = default.get_microstructure()
default.vicinity_offset(trigger=[old.max()+1,old.min()-1])
assert np.all(old==default.microstructure)
@pytest.mark.parametrize('periodic',[True,False]) @pytest.mark.parametrize('periodic',[True,False])
def test_tessellation_approaches(self,periodic): def test_tessellation_approaches(self,periodic):
grid = np.random.randint(10,20,3) grid = np.random.randint(10,20,3)

View File

@ -246,7 +246,8 @@ end function HDF5_openGroup
subroutine HDF5_closeGroup(group_id) subroutine HDF5_closeGroup(group_id)
integer(HID_T), intent(in) :: group_id integer(HID_T), intent(in) :: group_id
integer :: hdferr
integer :: hdferr
call h5gclose_f(group_id, hdferr) call h5gclose_f(group_id, hdferr)
if (hdferr < 0) call IO_error(1,ext_msg = 'HDF5_closeGroup: h5gclose_f (el is ID)', el = int(group_id)) if (hdferr < 0) call IO_error(1,ext_msg = 'HDF5_closeGroup: h5gclose_f (el is ID)', el = int(group_id))
@ -262,8 +263,8 @@ logical function HDF5_objectExists(loc_id,path)
integer(HID_T), intent(in) :: loc_id integer(HID_T), intent(in) :: loc_id
character(len=*), intent(in), optional :: path character(len=*), intent(in), optional :: path
integer :: hdferr integer :: hdferr
character(len=pStringLen) :: p character(len=:), allocatable :: p
if (present(path)) then if (present(path)) then
p = trim(path) p = trim(path)
@ -291,10 +292,10 @@ subroutine HDF5_addAttribute_str(loc_id,attrLabel,attrValue,path)
character(len=*), intent(in) :: attrLabel, attrValue character(len=*), intent(in) :: attrLabel, attrValue
character(len=*), intent(in), optional :: path character(len=*), intent(in), optional :: path
integer :: hdferr integer(HID_T) :: attr_id, space_id, type_id
integer(HID_T) :: attr_id, space_id, type_id logical :: attrExists
logical :: attrExists integer :: hdferr
character(len=pStringLen) :: p character(len=:), allocatable :: p
if (present(path)) then if (present(path)) then
p = trim(path) p = trim(path)
@ -333,15 +334,15 @@ end subroutine HDF5_addAttribute_str
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
subroutine HDF5_addAttribute_int(loc_id,attrLabel,attrValue,path) subroutine HDF5_addAttribute_int(loc_id,attrLabel,attrValue,path)
integer(HID_T), intent(in) :: loc_id integer(HID_T), intent(in) :: loc_id
character(len=*), intent(in) :: attrLabel character(len=*), intent(in) :: attrLabel
integer, intent(in) :: attrValue integer, intent(in) :: attrValue
character(len=*), intent(in), optional :: path character(len=*), intent(in), optional :: path
integer :: hdferr integer(HID_T) :: attr_id, space_id
integer(HID_T) :: attr_id, space_id integer :: hdferr
logical :: attrExists logical :: attrExists
character(len=pStringLen) :: p character(len=:), allocatable :: p
if (present(path)) then if (present(path)) then
p = trim(path) p = trim(path)
@ -379,10 +380,10 @@ subroutine HDF5_addAttribute_real(loc_id,attrLabel,attrValue,path)
real(pReal), intent(in) :: attrValue real(pReal), intent(in) :: attrValue
character(len=*), intent(in), optional :: path character(len=*), intent(in), optional :: path
integer :: hdferr integer(HID_T) :: attr_id, space_id
integer(HID_T) :: attr_id, space_id integer :: hdferr
logical :: attrExists logical :: attrExists
character(len=pStringLen) :: p character(len=:), allocatable :: p
if (present(path)) then if (present(path)) then
p = trim(path) p = trim(path)
@ -420,11 +421,11 @@ subroutine HDF5_addAttribute_int_array(loc_id,attrLabel,attrValue,path)
integer, intent(in), dimension(:) :: attrValue integer, intent(in), dimension(:) :: attrValue
character(len=*), intent(in), optional :: path character(len=*), intent(in), optional :: path
integer :: hdferr
integer(HID_T) :: attr_id, space_id
integer(HSIZE_T),dimension(1) :: array_size integer(HSIZE_T),dimension(1) :: array_size
integer(HID_T) :: attr_id, space_id
integer :: hdferr
logical :: attrExists logical :: attrExists
character(len=pStringLen) :: p character(len=:), allocatable :: p
if (present(path)) then if (present(path)) then
p = trim(path) p = trim(path)
@ -464,11 +465,11 @@ subroutine HDF5_addAttribute_real_array(loc_id,attrLabel,attrValue,path)
real(pReal), intent(in), dimension(:) :: attrValue real(pReal), intent(in), dimension(:) :: attrValue
character(len=*), intent(in), optional :: path character(len=*), intent(in), optional :: path
integer :: hdferr
integer(HID_T) :: attr_id, space_id
integer(HSIZE_T),dimension(1) :: array_size integer(HSIZE_T),dimension(1) :: array_size
integer(HID_T) :: attr_id, space_id
integer :: hdferr
logical :: attrExists logical :: attrExists
character(len=pStringLen) :: p character(len=:), allocatable :: p
if (present(path)) then if (present(path)) then
p = trim(path) p = trim(path)

View File

@ -413,9 +413,9 @@ subroutine IO_error(error_ID,el,ip,g,instance,ext_msg)
integer, optional, intent(in) :: el,ip,g,instance integer, optional, intent(in) :: el,ip,g,instance
character(len=*), optional, intent(in) :: ext_msg character(len=*), optional, intent(in) :: ext_msg
external :: quit external :: quit
character(len=pStringLen) :: msg character(len=:), allocatable :: msg
character(len=pStringLen) :: formatString character(len=pStringLen) :: formatString
select case (error_ID) select case (error_ID)
@ -661,8 +661,8 @@ subroutine IO_warning(warning_ID,el,ip,g,ext_msg)
integer, optional, intent(in) :: el,ip,g integer, optional, intent(in) :: el,ip,g
character(len=*), optional, intent(in) :: ext_msg character(len=*), optional, intent(in) :: ext_msg
character(len=pStringLen) :: msg character(len=:), allocatable :: msg
character(len=pStringLen) :: formatString character(len=pStringLen) :: formatString
select case (warning_ID) select case (warning_ID)
case (1) case (1)

View File

@ -36,7 +36,7 @@ program DAMASK_grid
N_t = 0, & !< # of time indicators found in load case file N_t = 0, & !< # of time indicators found in load case file
N_n = 0, & !< # of increment specifiers found in load case file N_n = 0, & !< # of increment specifiers found in load case file
N_def = 0 !< # of rate of deformation specifiers found in load case file N_def = 0 !< # of rate of deformation specifiers found in load case file
character(len=pStringLen) :: & character(len=:), allocatable :: &
line line
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------

View File

@ -210,8 +210,8 @@ function grid_damage_spectral_solution(timeinc,timeinc_old) result(solution)
call VecMax(solution_vec,devNull,phi_max,ierr); CHKERRQ(ierr) call VecMax(solution_vec,devNull,phi_max,ierr); CHKERRQ(ierr)
if (solution%converged) & if (solution%converged) &
write(6,'(/,a)') ' ... nonlocal damage converged .....................................' write(6,'(/,a)') ' ... nonlocal damage converged .....................................'
write(6,'(/,a,f8.6,2x,f8.6,2x,f8.6,/)',advance='no') ' Minimum|Maximum|Delta Damage = ',& write(6,'(/,a,f8.6,2x,f8.6,2x,e11.4,/)',advance='no') ' Minimum|Maximum|Delta Damage = ',&
phi_min, phi_max, stagNorm phi_min, phi_max, stagNorm
write(6,'(/,a)') ' ===========================================================================' write(6,'(/,a)') ' ==========================================================================='
flush(6) flush(6)

View File

@ -71,7 +71,7 @@ module grid_mech_FEM
F_aim_lastInc = math_I3, & !< previous average deformation gradient F_aim_lastInc = math_I3, & !< previous average deformation gradient
P_av = 0.0_pReal !< average 1st Piola--Kirchhoff stress P_av = 0.0_pReal !< average 1st Piola--Kirchhoff stress
character(len=pStringLen), private :: incInfo !< time and increment information character(len=:), allocatable, private :: incInfo !< time and increment information
real(pReal), private, dimension(3,3,3,3) :: & real(pReal), private, dimension(3,3,3,3) :: &
C_volAvg = 0.0_pReal, & !< current volume average stiffness C_volAvg = 0.0_pReal, & !< current volume average stiffness

View File

@ -66,7 +66,7 @@ module grid_mech_spectral_basic
F_aim_lastInc = math_I3, & !< previous average deformation gradient F_aim_lastInc = math_I3, & !< previous average deformation gradient
P_av = 0.0_pReal !< average 1st Piola--Kirchhoff stress P_av = 0.0_pReal !< average 1st Piola--Kirchhoff stress
character(len=pStringLen) :: incInfo !< time and increment information character(len=:), allocatable :: incInfo !< time and increment information
real(pReal), private, dimension(3,3,3,3) :: & real(pReal), private, dimension(3,3,3,3) :: &
C_volAvg = 0.0_pReal, & !< current volume average stiffness C_volAvg = 0.0_pReal, & !< current volume average stiffness
C_volAvgLastInc = 0.0_pReal, & !< previous volume average stiffness C_volAvgLastInc = 0.0_pReal, & !< previous volume average stiffness

View File

@ -74,7 +74,7 @@ module grid_mech_spectral_polarisation
F_av = 0.0_pReal, & !< average incompatible def grad field F_av = 0.0_pReal, & !< average incompatible def grad field
P_av = 0.0_pReal !< average 1st Piola--Kirchhoff stress P_av = 0.0_pReal !< average 1st Piola--Kirchhoff stress
character(len=pStringLen) :: incInfo !< time and increment information character(len=:), allocatable :: incInfo !< time and increment information
real(pReal), dimension(3,3,3,3) :: & real(pReal), dimension(3,3,3,3) :: &
C_volAvg = 0.0_pReal, & !< current volume average stiffness C_volAvg = 0.0_pReal, & !< current volume average stiffness
C_volAvgLastInc = 0.0_pReal, & !< previous volume average stiffness C_volAvgLastInc = 0.0_pReal, & !< previous volume average stiffness

View File

@ -27,7 +27,7 @@ program DAMASK_mesh
integer, allocatable, dimension(:) :: chunkPos ! this is longer than needed for geometry parsing integer, allocatable, dimension(:) :: chunkPos ! this is longer than needed for geometry parsing
integer :: & integer :: &
N_def = 0 !< # of rate of deformation specifiers found in load case file N_def = 0 !< # of rate of deformation specifiers found in load case file
character(len=pStringLen) :: & character(len=:), allocatable :: &
line line
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------

View File

@ -95,14 +95,8 @@ contains
logical function isDirectory(path) logical function isDirectory(path)
character(len=*), intent(in) :: path character(len=*), intent(in) :: path
character(kind=C_CHAR), dimension(pPathLen) :: strFixedLength ! C string as array
integer :: i isDirectory=merge(.True.,.False.,isDirectory_C(f_c_string(path)) /= 0_C_INT)
strFixedLength = repeat(C_NULL_CHAR,len(strFixedLength))
do i=1,len(path) ! copy array components
strFixedLength(i)=path(i:i)
enddo
isDirectory=merge(.True.,.False.,isDirectory_C(strFixedLength) /= 0_C_INT)
end function isDirectory end function isDirectory
@ -112,25 +106,16 @@ end function isDirectory
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
function getCWD() function getCWD()
character(kind=C_CHAR), dimension(pPathLen) :: charArray ! C string is an array character(kind=C_CHAR), dimension(pPathLen) :: getCWD_Cstring
character(len=:), allocatable :: getCWD character(len=:), allocatable :: getCWD
integer(C_INT) :: stat integer(C_INT) :: stat
integer :: i
call getCurrentWorkDir_C(charArray,stat) call getCurrentWorkDir_C(getCWD_Cstring,stat)
if (stat /= 0_C_INT) then if(stat == 0) then
getCWD = 'Error occured when getting currend working directory' getCWD = c_f_string(getCWD_Cstring)
else else
allocate(character(len=pPathLen)::getCWD) getCWD = 'Error occured when getting currend working directory'
arrayToString: do i=1,len(getCWD)
if (charArray(i) /= C_NULL_CHAR) then
getCWD(i:i)=charArray(i)
else
getCWD = getCWD(:i-1)
exit
endif
enddo arrayToString
endif endif
end function getCWD end function getCWD
@ -141,25 +126,16 @@ end function getCWD
!-------------------------------------------------------------------------------------------------- !--------------------------------------------------------------------------------------------------
function getHostName() function getHostName()
character(kind=C_CHAR), dimension(pPathLen) :: charArray ! C string is an array character(kind=C_CHAR), dimension(pPathLen) :: getHostName_Cstring
character(len=:), allocatable :: getHostName character(len=:), allocatable :: getHostName
integer(C_INT) :: stat integer(C_INT) :: stat
integer :: i
call getHostName_C(charArray,stat) call getHostName_C(getHostName_Cstring,stat)
if (stat /= 0_C_INT) then if(stat == 0) then
getHostName = 'Error occured when getting host name' getHostName = c_f_string(getHostName_Cstring)
else else
allocate(character(len=pPathLen)::getHostName) getHostName = 'Error occured when getting host name'
arrayToString: do i=1,len(getHostName)
if (charArray(i) /= C_NULL_CHAR) then
getHostName(i:i)=charArray(i)
else
getHostName = getHostName(:i-1)
exit
endif
enddo arrayToString
endif endif
end function getHostName end function getHostName
@ -171,16 +147,52 @@ end function getHostName
logical function setCWD(path) logical function setCWD(path)
character(len=*), intent(in) :: path character(len=*), intent(in) :: path
character(kind=C_CHAR), dimension(pPathLen) :: strFixedLength ! C string is an array
integer :: i
strFixedLength = repeat(C_NULL_CHAR,len(strFixedLength)) setCWD=merge(.True.,.False.,chdir_C(f_c_string(path)) /= 0_C_INT)
do i=1,len(path) ! copy array components
strFixedLength(i)=path(i:i)
enddo
setCWD=merge(.True.,.False.,chdir_C(strFixedLength) /= 0_C_INT)
end function setCWD end function setCWD
!--------------------------------------------------------------------------------------------------
!> @brief convert C string to Fortran string
!> @details: C string is NULL terminated and, hence, longer by one than the Fortran string
!--------------------------------------------------------------------------------------------------
pure function c_f_string(c_string) result(f_string)
character(kind=C_CHAR), dimension(:), intent(in) :: c_string
character(len=:), allocatable :: f_string
integer :: i
allocate(character(len=size(c_string))::f_string)
arrayToString: do i=1,len(f_string)
if (c_string(i) /= C_NULL_CHAR) then
f_string(i:i)=c_string(i)
else
f_string = f_string(:i-1)
exit
endif
enddo arrayToString
end function c_f_string
!--------------------------------------------------------------------------------------------------
!> @brief convert Fortran string to C string
!> @details: C string is NULL terminated and, hence, longer by one than the Fortran string
!--------------------------------------------------------------------------------------------------
pure function f_c_string(f_string) result(c_string)
character(len=*), intent(in) :: f_string
character(kind=C_CHAR), dimension(len(f_string)+1) :: c_string
integer :: i
do i=1,len(f_string)
c_string(i)=f_string(i:i)
enddo
c_string(i) = C_NULL_CHAR
end function f_c_string
end module system_routines end module system_routines