def __init__(self, Sref, Lref, database=None, aeroShape=None, aOaList=None): ''' Constructor for a polar. @param Sref : reference surface @param Lref : reference length @param database : the dataBase in which the discrete values are stored, or None @param aeroShape : the aeroShape from which the polar should be built, or None if the database is already fulfilled @param aOaList : the angles of attack list on which polar should be built, or None if the database is already fulfilled ''' DifferentiatedAeroShape.__init__(self, Sref, Lref) self.__Sref = Sref self.__Lref = Lref self.__aeroShape = aeroShape self.__aOaList = aOaList self.__ClInterpolator = Kriging() self.__CdInterpolator = Kriging() self.__CmInterpolator = Kriging() if database is not None: self.__database = database self.__buildFromDatabase(database) elif aeroShape is not None and aOaList is not None: self.__database = Database() self.__buildFromAeroShape(aOaList, aeroShape) else: raise Exception, 'A polar initialization must be done either from a non-Null Database or a non-Null AeroShape and aOaList.'