SDEint.py
def solve(self, solverString=None,timeFactor = 1):
        """Central method of osIto, call this to solve SDEprob.

        After an osIto is created, this is the function you call to solve
        SDEprob. First ensures a valid solver is chosen, then oneStepper is
        called which solves SDEprob. Then a solution object is created with the
        answer, which adds itself to SDEprob's solution dictionary."""
        if solverString is not None:#Allows both setting and resetting solver.
            self.setSolver(solverString)
        elif self.solverString is None:#In case solver not set before or now.
            raise ValueError("solverString not included before osIto.solve().")

        if timeFactor == 1:
            t = self.p.t
            X = np.zeros((len(t),self.p.d,self.p.totSimNum))
            for simNum in range(0,self.p.totSimNum):
                X[:,:,simNum] = list(self.oneStepper(simNum))
            X = np.array(X)
        else:#For solving a problem realization with different step sizes.
            t = self.p.reduceTime(self.p.t,timeFactor)
            X = np.zeros((len(reducedTime),self.p.d,self.p.totSimNum))
            for simNum in range(0,self.p.totSimNum):
                X[:,:,simNum] = list(self.oneStepper(simNum,
                    reducedTime = t))
            X = np.array(X)
        #Embeds solution into solution ditorionary here.
        dictKey = self.solverString + str(timeFactor)
        self.s = solution(self.p, X, self.solverString)
        if self.printNum:
            print("X: ",np.squeeze(X))      
        if self.p.trueX is not None:
            string = ("End-point-difference in Froebenius norm, sim = 0:"
                +str(np.linalg.norm(X[-1,:,0]-self.p.trueX[-1,:,0])))
            print(string)
        return (t,X)
Central method of osIto, call this to solve SDEprob.

        After an osIto is created, this is the function you call to solve
        SDEprob. First ensures a valid solver is chosen, then oneStepper is
        called which solves SDEprob. Then a solution object is created with the
        answer, which adds itself to SDEprob's solution dictionary.
Central method of osIto, call this to solve SDEprob.
After an osIto is created, this is the function you call to solve
SDEprob. First ensures a valid solver is chosen, then oneStepper is
called which solves SDEprob. Then a solution object is created with the
answer, which adds itself to SDEprob's solution dictionary.
Central method of osIto call this to solve SDEprob . After an osIto is created this is the function you call to solve SDEprob . First ensures a valid solver is chosen then oneStepper is called which solves SDEprob . Then a solution object is created with the answer which adds itself to SDEprob ' s solution dictionary .
def solve(self, solverString=None,timeFactor = 1):
        if solverString is not None:
            self.setSolver(solverString)
        elif self.solverString is None:
            raise ValueError("solverString not included before osIto.solve().")
        if timeFactor == 1:
            t = self.p.t
            X = np.zeros((len(t),self.p.d,self.p.totSimNum))
            for simNum in range(0,self.p.totSimNum):
                X[:,:,simNum] = list(self.oneStepper(simNum))
            X = np.array(X)
        else:
            t = self.p.reduceTime(self.p.t,timeFactor)
            X = np.zeros((len(reducedTime),self.p.d,self.p.totSimNum))
            for simNum in range(0,self.p.totSimNum):
                X[:,:,simNum] = list(self.oneStepper(simNum,
                    reducedTime = t))
            X = np.array(X)
        dictKey = self.solverString + str(timeFactor)
        self.s = solution(self.p, X, self.solverString)
        if self.printNum:
            print("X: ",np.squeeze(X))      
        if self.p.trueX is not None:
            string = ("End-point-difference in Froebenius norm, sim = 0:"
                +str(np.linalg.norm(X[-1,:,0]-self.p.trueX[-1,:,0])))
            print(string)
        return (t,X)
def solve ( self , solverString = None , timeFactor = 1 ) : if solverString is not None : self . setSolver ( solverString ) elif self . solverString is None : raise ValueError ( "solverString not included before osIto.solve()." ) if timeFactor == 1 : t = self . p . t X = np . zeros ( ( len ( t ) , self . p . d , self . p . totSimNum ) ) for simNum in range ( 0 , self . p . totSimNum ) : X [ : , : , simNum ] = list ( self . oneStepper ( simNum ) ) X = np . array ( X ) else : t = self . p . reduceTime ( self . p . t , timeFactor ) X = np . zeros ( ( len ( reducedTime ) , self . p . d , self . p . totSimNum ) ) for simNum in range ( 0 , self . p . totSimNum ) : X [ : , : , simNum ] = list ( self . oneStepper ( simNum , reducedTime = t ) ) X = np . array ( X ) dictKey = self . solverString + str ( timeFactor ) self . s = solution ( self . p , X , self . solverString ) if self . printNum : print ( "X: " , np . squeeze ( X ) ) if self . p . trueX is not None : string = ( "End-point-difference in Froebenius norm, sim = 0:" + str ( np . linalg . norm ( X [ - 1 , : , 0 ] - self . p . trueX [ - 1 , : , 0 ] ) ) ) print ( string ) return ( t , X )
Central method of osIto, call this to solve SDEprob.
Central method of osIto call this to solve SDEprob .
"""Central method of osIto, call this to solve SDEprob.

        After an osIto is created, this is the function you call to solve
        SDEprob. First ensures a valid solver is chosen, then oneStepper is
        called which solves SDEprob. Then a solution object is created with the
        answer, which adds itself to SDEprob's solution dictionary.""" #Allows both setting and resetting solver.
 #In case solver not set before or now.
 #For solving a problem realization with different step sizes.
 #Embeds solution into solution ditorionary here.

self
solverString
timeFactor