Esempio n. 1
0
    def process(self, timestep=1):
        '''    
        Processes the surface depending whether par.ETCHING is set or not.
        
        When the initialTime is specified 
    
        par.ETCHING = True -> etching
        par.ETCHING = False-> Sputtern

        When a file is specified, the process is written to a file after each step.
        >>>surface.process(time, step)
        '''
                
        if par.ETCHING:
            vn = par.ETCH_RATE
        else:
            vn = sputterVelocity(self)
            assert len(vn) > 0, 'Error: vn could not be calculated!'
                    
        self.movePointsByDirection(vn*timestep)
                
        if not par.NUMPY:
            #Umwandlung da delopping ein Liste für korrekte Funktion braucht, wenn par.NUMPY=False
            self.xvals, self.yvals = np.array(deloop(list(self.xvals), list(self.yvals)))
        else:
            self.xvals, self.yvals = deloop(self.xvals, self.yvals)
            
        #Berechne neue Winkelsymmetralen für die neuen x & y werte
        self.xs, self.ys = anglebisect(self.xvals, self.yvals)

        #Falls die Funktion Adaptive Gitter erwünscht ist, passe Knoten (und Winkelsymmetralen) an
        if par.ADAPTIVE_GRID:
            adapt(self)
Esempio n. 2
0
def SurfaceProcess(xvals,yvals,file=None):
    '''
    Fuehrt abhaengig von par.ETCHING eine Bearbeitung der Oberfläche durch.
    par.ETCHING = True -> Aetzen
    par.ETCHING = False-> Sputtern
    xvals, yvals Punkte des Kurvenzuges
    file Wenn ein File angegeben wird, wird der Fortschritt nach jedem Druchlauf in eine
    Datei geschrieben
    '''
    t=par.TOTAL_TIME
    dt=par.TIME_STEP
    
    for i in range(1,round(t/dt)+1):
        xs,ys = symmetrals(xvals,yvals)
        
        if par.ETCHING:
            vn=par.ETCH_RATE
        else:
            vn=SputterVelocity(xs,ys)
            
        xvals,yvals=MovePointsByDirection(xvals,yvals,xs,ys,vn*dt)
        
        if not par.NUMPY:
            #Umwandlung da delopping ein Liste für korrekte Funktion braucht, wenn par.NUMPY=False
            xlist=list(xvals)
            ylist=list(yvals)
            xlist,ylist = delooping.deloop(xlist,ylist)
            xvals=np.array(xlist)
            yvals=np.array(ylist)
        else:
            xvals,yvals=delooping.deloop(xvals,yvals)
        
        if file != None:
            write(file,i*dt,xvals,yvals)
        
    return xvals,yvals