corrected reporting and convergence check
This commit is contained in:
parent
bdfd9c69bb
commit
dd0167821f
|
@ -1321,8 +1321,8 @@ def doSim(thread):
|
||||||
line+=1
|
line+=1
|
||||||
if not validity[i]:
|
if not validity[i]:
|
||||||
s.acquire()
|
s.acquire()
|
||||||
#damask.util.croak('The data of result %i at the threshold %f is invalid,'\
|
damask.util.croak('The data of result %i at the threshold %f is invalid,'%(loadNo,threshold)\
|
||||||
# +'the fitting at this point is skipped'%(loadNo,threshold))
|
+'the fitting at this point is skipped')
|
||||||
s.release()
|
s.release()
|
||||||
|
|
||||||
# do the actual fitting procedure and write results to file
|
# do the actual fitting procedure and write results to file
|
||||||
|
@ -1353,7 +1353,7 @@ def converged():
|
||||||
global N_simulations; fitResidual
|
global N_simulations; fitResidual
|
||||||
|
|
||||||
if N_simulations < options.max:
|
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:])
|
residualList = np.array(fitResidual[len(fitResidual)-5:])
|
||||||
if np.std(residualList)/np.max(residualList) < 0.05:
|
if np.std(residualList)/np.max(residualList) < 0.05:
|
||||||
return True
|
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:
|
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)')
|
parser.error('please specifie an equivalent stress (e.g. fitting to von Mises)')
|
||||||
|
|
||||||
|
|
||||||
run = runFit(options.exponent, options.eqStress, options.dimension, options.criterion)
|
run = runFit(options.exponent, options.eqStress, options.dimension, options.criterion)
|
||||||
|
|
||||||
damask.util.croak('Finished fitting to yield criteria')
|
damask.util.croak('Finished fitting to yield criteria')
|
||||||
|
|
Loading…
Reference in New Issue