def __init__(self, outer_stl, inner_stl, center_line_controls,
        thickness_controls, name='shell', r_ref=None, x_ref=None): 

        self.outer_stl = outer_stl
        self.inner_stl = inner_stl

        outer_points = outer_stl.points
        inner_points = inner_stl.points

        self.n_outer = len(outer_points)
        self.n_inner = len(inner_points)

        self.outer_coords = Coordinates(outer_points, cartesian=True)
        self.inner_coords = Coordinates(inner_points, cartesian=True)
    
        self.Po = self.outer_coords.cylindrical
        self.Pi = self.inner_coords.cylindrical
        self.Po_cart = self.outer_coords.cartesian
        self.Pi_cart = self.inner_coords.cartesian
        #just initialization for array size
        self.Po_bar = outer_points.copy()
        self.Pi_bar = inner_points.copy()
        self.name = name
        
        if isinstance(center_line_controls,int): 
            X = outer_points[:,0]
            x_max = np.max(X)
            x_min = np.min(X)
            C_x = np.linspace(x_min,x_max,center_line_controls) 
            C_r = np.zeros((center_line_controls,))
            control_points = np.array(zip(C_x,C_r))

            self.Cc = control_points
            self.n_c_controls = center_line_controls
        else: 
            self.Cc = center_line_controls
            self.n_c_controls = len(center_line_controls)
        self.Cc_bar = self.Cc.copy()
        self.delta_Cc = np.zeros(self.Cc.shape)


        if isinstance(thickness_controls,int): 
            X = inner_points[:,0]
            x_max = np.max(X)
            x_min = np.min(X)
            C_x = np.linspace(x_min,x_max,thickness_controls) 
            C_r = np.zeros((thickness_controls,))
            control_points = np.array(zip(C_x,C_r))
            self.Ct = control_points
            self.n_t_controls = thickness_controls
        else: 
            self.Ct = thickness_controls 
            self.n_t_controls = len(thickness_controls)
        self.Ct_bar = self.Ct.copy()
        self.delta_Ct = np.zeros(self.Ct.shape)
         
        self.bsc_o = Bspline(self.Cc,outer_points)
        self.bsc_i = Bspline(self.Cc,inner_points)
        
        self.bst_o = Bspline(self.Ct,outer_points)
        self.bst_i = Bspline(self.Ct,inner_points)
        
        self.name = name

        if x_ref is not None: 
            self.x_mag = float(x_ref)
        else: 
            self.x_mag = 10**np.floor(np.log10(np.average(outer_points[:,0])))

        if r_ref is not None: 
            self.r_mag = float(r_ref)
        else: 
            indecies = np.logical_and(abs(outer_points[:,2])<.0001, outer_points[:,1]>0)
            points = outer_points[indecies]
            self.r_mag = 10**np.floor(np.log10(np.average(points[:,1]))) #grab the order of magnitude of the average


        self.outer_theta = self.Po[:,2]
        self.sin_outer_c_theta = np.tile(np.sin(self.outer_theta),(self.n_c_controls,1)).T.flatten()
        self.cos_outer_c_theta = np.tile(np.cos(self.outer_theta),(self.n_c_controls,1)).T.flatten()
        self.sin_outer_t_theta = np.tile(np.sin(self.outer_theta),(self.n_t_controls,1)).T.flatten()
        self.cos_outer_t_theta = np.tile(np.cos(self.outer_theta),(self.n_t_controls,1)).T.flatten()

        self.inner_theta = self.Pi[:,2]
        self.sin_inner_c_theta = np.tile(np.sin(self.inner_theta),(self.n_c_controls,1)).T.flatten()
        self.cos_inner_c_theta = np.tile(np.cos(self.inner_theta),(self.n_c_controls,1)).T.flatten()
        self.sin_inner_t_theta = np.tile(np.sin(self.inner_theta),(self.n_t_controls,1)).T.flatten()
        self.cos_inner_t_theta = np.tile(np.cos(self.inner_theta),(self.n_t_controls,1)).T.flatten()

        #calculate derivatives
        #in polar coordinates
        self.dPo_bar_xqdCc = np.array(self.x_mag*self.bsc_o.B.flatten())
        self.dPo_bar_rqdCc = np.array(self.r_mag*self.bsc_o.B.flatten())

        self.dPi_bar_xqdCc = np.array(self.x_mag*self.bsc_i.B.flatten())
        self.dPi_bar_rqdCc = np.array(self.r_mag*self.bsc_i.B.flatten())

        self.dPo_bar_rqdCt = np.array(self.r_mag*self.bst_o.B.flatten())
        self.dPi_bar_rqdCt = -1*np.array(self.r_mag*self.bst_i.B.flatten())

        #Project Polar derivatives into revolved cartisian coordinates
        self.dXoqdCc = self.dPo_bar_xqdCc.reshape(-1,self.n_c_controls)
        self.dYoqdCc = (self.dPo_bar_rqdCc*self.sin_outer_c_theta).reshape(-1,self.n_c_controls)
        self.dZoqdCc = (self.dPo_bar_rqdCc*self.cos_outer_c_theta).reshape(-1,self.n_c_controls)

        self.dXiqdCc = self.dPi_bar_xqdCc.reshape(-1,self.n_c_controls)
        self.dYiqdCc = (self.dPi_bar_rqdCc*self.sin_inner_c_theta).reshape(-1,self.n_c_controls)
        self.dZiqdCc = (self.dPi_bar_rqdCc*self.cos_inner_c_theta).reshape(-1,self.n_c_controls)

        self.dYoqdCt = (self.dPo_bar_rqdCt*self.sin_outer_t_theta).reshape(-1,self.n_t_controls)
        self.dZoqdCt = (self.dPo_bar_rqdCt*self.cos_outer_t_theta).reshape(-1,self.n_t_controls)
        self.dYiqdCt = (self.dPi_bar_rqdCt*self.sin_inner_t_theta).reshape(-1,self.n_t_controls)
        self.dZiqdCt = (self.dPi_bar_rqdCt*self.cos_inner_t_theta).reshape(-1,self.n_t_controls)
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.lib/src/openmdao/lib/geometry/ffd_axisymetric.py/Shell.__init__/original