diff --git a/Adaptation.py b/Adaptation.py index 8116dc8..28e0837 100644 --- a/Adaptation.py +++ b/Adaptation.py @@ -15,7 +15,7 @@ ## Developed with support from the EC FP7/2007-2013: ARCH, Project n. 224 -from numpy.lib.function_base import linspace +from numpy import linspace class Adaptation(object): """ @@ -190,4 +190,4 @@ def Adapt(self, day): preRun = True if day == -1: preRun = False - return preRun \ No newline at end of file + return preRun diff --git a/Elements.py b/Elements.py index 08a7437..41d0708 100755 --- a/Elements.py +++ b/Elements.py @@ -426,12 +426,9 @@ def InputParameters(self, evaluator=None): #Wall-Thickness if type(self.WallThickness) is not str: - len_wall_thickness = len(self.WallThickness)-1 - idx_st = int(len_wall_thickness * s1) - idx_end = int(len_wall_thickness * s2) + h1 = (self.WallThickness[s2] - self.WallThickness[s1])/self.Length + h2 = self.WallThickness[s1] - h1 = (self.WallThickness[idx_end] - self.WallThickness[idx_st])/self.Length - h2 = self.WallThickness[idx_st] h_z = h2+(h1*z) self.WallThickness = h_z else: @@ -439,12 +436,9 @@ def InputParameters(self, evaluator=None): evaluator.Evaluate(self.WallThickness) #Young's Modulus - len_young_modulus = len(self.YoungModulus)-1 - idx_st = int(len_young_modulus * s1) if type(self.YoungModulus) != dict else s1 - idx_end = int(len_young_modulus * s2) if type(self.YoungModulus) != dict else s2 + E1 = (self.YoungModulus[s2] - self.YoungModulus[s1])/self.Length + E2 = self.YoungModulus[s1] - E1 = (self.YoungModulus[idx_end] - self.YoungModulus[idx_st])/self.Length - E2 = self.YoungModulus[idx_st] E_z = E2+(E1*z) self.YoungModulus = E_z @@ -1421,4 +1415,4 @@ class Error(Exception): ''' A base class for exceptions defined in this module. ''' - pass \ No newline at end of file + pass diff --git a/InverseWomersley.py b/InverseWomersley.py index 4f90572..cc34e2c 100755 --- a/InverseWomersley.py +++ b/InverseWomersley.py @@ -21,7 +21,7 @@ from numpy.core.fromnumeric import mean from numpy.lib.scimath import sqrt from numpy.ma.core import exp -from numpy.lib.function_base import linspace +from numpy import linspace def add_bessel(name): @@ -554,4 +554,4 @@ def PlotWss(self, meshid, imagpath): savefig(imagpath+str(meshid)+'_'+str(self.Name)+'_wss.png') print "Wss, MeshId", meshid, self.Name, "=", str(round(max(self.Tauplot),1)), "$dyne/cm^2$" close() - return (round(max(self.Tauplot),1)) \ No newline at end of file + return (round(max(self.Tauplot),1)) diff --git a/NetworkSolutions.py b/NetworkSolutions.py index 7cd8c77..d656268 100755 --- a/NetworkSolutions.py +++ b/NetworkSolutions.py @@ -21,7 +21,7 @@ from numpy.core.fromnumeric import mean from numpy.core.numeric import array, zeros from math import pi -from numpy.lib.function_base import linspace +from numpy import linspace from numpy.core.numeric import arange from numpy.lib.scimath import sqrt from numpy.ma.core import ceil