corrected reporting and convergence check

This commit is contained in:
Martin Diehl 2015-10-14 20:33:22 +00:00
parent bdfd9c69bb
commit dd0167821f
1 changed files with 3 additions and 4 deletions

View File

@ -1321,8 +1321,8 @@ def doSim(thread):
line+=1
if not validity[i]:
s.acquire()
#damask.util.croak('The data of result %i at the threshold %f is invalid,'\
# +'the fitting at this point is skipped'%(loadNo,threshold))
damask.util.croak('The data of result %i at the threshold %f is invalid,'%(loadNo,threshold)\
+'the fitting at this point is skipped')
s.release()
# do the actual fitting procedure and write results to file
@ -1353,7 +1353,7 @@ def converged():
global N_simulations; fitResidual
if N_simulations < options.max:
if len(fitResidual) > 5:
if len(fitResidual) > 5 and N_simulations >= options.min:
residualList = np.array(fitResidual[len(fitResidual)-5:])
if np.std(residualList)/np.max(residualList) < 0.05:
return True
@ -1443,7 +1443,6 @@ if options.dimension not in fitCriteria[options.criterion]['dimen']:
if options.criterion not in ['vonmises','tresca','drucker','hill1984'] and options.eqStress == None:
parser.error('please specifie an equivalent stress (e.g. fitting to von Mises)')
run = runFit(options.exponent, options.eqStress, options.dimension, options.criterion)
damask.util.croak('Finished fitting to yield criteria')