implemented fast yield surface fitting with yield stop criteria

This commit is contained in:
Fengbo Han 2017-08-08 17:25:38 +02:00
parent afda166fd8
commit 36c370e668
3 changed files with 1392 additions and 2 deletions

3
lib/damask/util.py Normal file → Executable file
View File

@ -39,7 +39,7 @@ def srepr(arg,glue = '\n'):
if (not hasattr(arg, "strip") and
hasattr(arg, "__getitem__") or
hasattr(arg, "__iter__")):
return glue.join(srepr(x) for x in arg)
return glue.join(str(x) for x in arg)
return arg if isinstance(arg,str) else repr(arg)
# -----------------------------
@ -221,6 +221,7 @@ def leastsqBound(func, x0, args=(), bounds=None, Dfun=None, full_output=0,
def _check_func(checker, argname, thefunc, x0, args, numinputs,
output_shape=None):
from numpy import shape
"""The same as that of minpack.py"""
res = np.atleast_1d(thefunc(*((x0[:numinputs],) + args)))
if (output_shape is not None) and (shape(res) != output_shape):

File diff suppressed because it is too large Load Diff

View File

@ -1140,7 +1140,6 @@ subroutine utilities_calcPlasticity(yieldStress, plasticStrain, eqStress, eqTota
strain_plastic_av = strain_plastic_av + strain_plastic
Vp_av = Vp_av + Vp(1:3,1:3,i,j,k)
flush(6)
enddo; enddo; enddo