added output of complete mesh to voronoi fast.f90
first version of post processing for spectral method: spectral_post.py
This commit is contained in:
parent
36f27edd75
commit
9d32bc7ae6
|
@ -0,0 +1,18 @@
|
|||
print('post processing for mpie_spectral')
|
||||
|
||||
results = open('results.out', 'rb')
|
||||
|
||||
header = results.read(4)
|
||||
end = results.read(1024).find(header)
|
||||
results.seek(4)
|
||||
loadcase = results.read(end)
|
||||
print('loadcase:', loadcase)
|
||||
#
|
||||
begin = end
|
||||
results.seek(end+4)
|
||||
header = results.read(4)
|
||||
print(header)
|
||||
end = results.read(1024).find(header)
|
||||
#results.seek(4)
|
||||
#workingdir = results.read(end)
|
||||
#print('workingdir:', workingdir)
|
|
@ -173,6 +173,25 @@ program voronoi
|
|||
print*, 'for more information on gmsh: http://geuz.org/gmsh/'
|
||||
|
||||
! write full mesh out
|
||||
open(20, file = ((trim(name))//'_3Dfull.msh'))
|
||||
write(20, '(A, /, A, /, A, /, A, /, I10)'), '$MeshFormat', '2.1 0 8', '$EndMeshFormat', '$Nodes', abc
|
||||
do i = 1, abc
|
||||
write(20, '(I10, I10, I10, I10)'), i, mod((i-1), a) +1, mod(((i-1)/a), b) +1, mod(((i-1)/(ab)), c) +1
|
||||
end do
|
||||
write(20, '(A, /, A, /, I10)'), '$EndNodes', '$Elements', abc
|
||||
do i = 1, abc
|
||||
write(20, '(I10, A, I10, A, I10)'), i, ' 15 2', grainMap(i), ' 2', i
|
||||
end do
|
||||
write(20, '(A)'), '$EndElements'
|
||||
write(20, '(A, /, A, /, A, /, A, /, A, /, A, /, A, /, A, /, I10)'), '$NodeData', '1', '"Grain No."', '1', &
|
||||
&'0.0', '3', '0', '1', abc
|
||||
do i = 1, abc
|
||||
write(20, '(I10, tr2, I10)'), i, grainMap(i)
|
||||
end do
|
||||
write(20, *), '$EndNodeData'
|
||||
close(20)
|
||||
|
||||
! write 3d skin out
|
||||
open(20, file = ((trim(name))//'_3D.msh'))
|
||||
write(20, '(A, /, A, /, A, /, A, /, I10)'), '$MeshFormat', '2.1 0 8', '$EndMeshFormat', '$Nodes', abc_Red
|
||||
do j = 1, abc_Red
|
||||
|
|
Loading…
Reference in New Issue