corrected 3D visualize (math.f90 part was not working)

small polishing of voronoi_tessellation.f90
This commit is contained in:
Martin Diehl 2011-12-06 17:46:33 +00:00
parent 5ebeb96e85
commit ea0fe7b406
3 changed files with 8 additions and 7 deletions

View File

@ -3019,7 +3019,8 @@ subroutine mesh_regular_grid(res,geomdim,defgrad_av,centroids,nodes)
real(pReal), dimension(res(1)+2_pInt,res(2)+2_pInt,res(3)+2_pInt,3) :: wrappedCentroids real(pReal), dimension(res(1)+2_pInt,res(2)+2_pInt,res(3)+2_pInt,3) :: wrappedCentroids
! other variables ! other variables
integer(pInt) :: i,j,k,n integer(pInt) :: i,j,k,n
integer(pInt), dimension(3) :: diag = 0_pInt , shift = 0_pInt, lookup = 0_pInt, me integer(pInt), dimension(3), parameter :: diag = 1_pInt
integer(pInt), dimension(3) :: shift = 0_pInt, lookup = 0_pInt, me = 0_pInt
integer(pInt), dimension(3,8) :: neighbor = reshape((/ & integer(pInt), dimension(3,8) :: neighbor = reshape((/ &
0_pInt, 0_pInt, 0_pInt, & 0_pInt, 0_pInt, 0_pInt, &
1_pInt, 0_pInt, 0_pInt, & 1_pInt, 0_pInt, 0_pInt, &
@ -3058,9 +3059,9 @@ subroutine mesh_regular_grid(res,geomdim,defgrad_av,centroids,nodes)
do i = 0_pInt,res(1) do i = 0_pInt,res(1)
do n = 1_pInt,8_pInt do n = 1_pInt,8_pInt
nodes(i+1_pInt,j+1_pInt,k+1_pInt,1:3) = & nodes(i+1_pInt,j+1_pInt,k+1_pInt,1:3) = &
nodes(i+1_pInt,j+1_pInt,k+1_pInt,3) + wrappedCentroids(i+1_pInt+neighbor(1_pInt,n), & nodes(i+1_pInt,j+1_pInt,k+1_pInt,1:3) + wrappedCentroids(i+1_pInt+neighbor(1_pInt,n), &
j+1_pInt+neighbor(2,n), & j+1_pInt+neighbor(2,n), &
k+1_pInt+neighbor(3,n),1:3) k+1_pInt+neighbor(3,n),1:3)
enddo; enddo; enddo; enddo enddo; enddo; enddo; enddo
nodes = nodes/8.0_pReal nodes = nodes/8.0_pReal

View File

@ -337,7 +337,7 @@ for filename in args:
m = re.search('(\d+)\shead',content[0],re.I) m = re.search('(\d+)\shead',content[0],re.I)
if m == None: if m == None:
continue continue
print filename, print filename,'\n'
sys.stdout.flush() sys.stdout.flush()
headrow = int(m.group(1)) headrow = int(m.group(1))
@ -417,12 +417,12 @@ for filename in args:
column['tensor'][options.defgrad]+9], column['tensor'][options.defgrad]+9],
(res[0],res[1],res[2],3,3))) (res[0],res[1],res[2],3,3)))
#centroids = DAMASK.math.deformed_linear(res,dim,defgrad_av,
centroids = DAMASK.math.deformed_fft(res,dim,defgrad_av,options.scaling, centroids = DAMASK.math.deformed_fft(res,dim,defgrad_av,options.scaling,
numpy.reshape(values[:,column['tensor'][options.defgrad]: numpy.reshape(values[:,column['tensor'][options.defgrad]:
column['tensor'][options.defgrad]+9], column['tensor'][options.defgrad]+9],
(res[0],res[1],res[2],3,3))) (res[0],res[1],res[2],3,3)))
ms = DAMASK.math.mesh_regular_grid(res,dim,defgrad_av,centroids) ms = DAMASK.math.mesh_regular_grid(res,dim,defgrad_av,centroids)
fields = {\ fields = {\
'tensor': {},\ 'tensor': {},\
'vector': {},\ 'vector': {},\

View File

@ -307,7 +307,7 @@ program voronoi
do i = 1, N_Seeds do i = 1, N_Seeds
write(20, trim(format1)), '[Grain', i, ']' write(20, trim(format1)), '[Grain', i, ']'
write(20, trim(format2)), '(gauss) phi1 ', grainEuler(i,1), ' Phi ', grainEuler(i,2), & write(20, trim(format2)), '(gauss) phi1 ', grainEuler(i,1), ' Phi ', grainEuler(i,2), &
&' Phi2 ', grainEuler(i,3), ' scatter 0 fraction 1' &' Phi2 ', grainEuler(i,3), ' scatter 0.0 fraction 1.0'
end do end do
close(20) close(20)
print*, 'material.config done.' print*, 'material.config done.'