run and postprocess the spectral solver example automatically.

This commit is contained in:
Claudio Zambaldi 2013-03-19 18:19:00 +00:00
parent cb8a7e7d25
commit efb048fc04
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,33 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os,sys
import glob
from subprocess import call
geom_name = '20grains16x16x16_tensionX'
postResults = 'postResults --cr f,p --split --separation x,y,z '+geom_name+'.spectralOut'
sts = call(postResults, shell=True)
os.chdir('./postProc/')
env = os.environ
ascii_files = glob.glob(geom_name+'_inc*.txt')
print ascii_files
showTable = "showTable -a "
addCauchy = 'addCauchy '
addMises = 'addMises -s Cauchy '
addStrainTensors = "addStrainTensors -l -v "
visualize3D = "3Dvisualize -s 'Mises(Cauchy)',1_p Cauchy "
postProc = [addCauchy, addMises, addStrainTensors, visualize3D]
for f in ascii_files:
print f
for p in postProc:
p = p+f
print p
sts = call(p,shell=True)

View File

@ -0,0 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from subprocess import call
call('DAMASK_spectral -l tensionX.load -g 20grains16x16x16.geom', shell=True)