src/MOIRA.py
def expr(self, points, direction, order, time):
        '''
        Generates an expression based on the stencil points, the direction,  order of the derivative, and the time at which the expression is evaluated.

        Parameters:
            points (list of int): N points used for the stencil gen function
            direction (string): the name of the independent variable that indicate the direction of the derivative
            order (int): order of the derivative
            time (symbolic expression): time at which to evaluate the expression. ex: n+1 or n

        Returns:
            symbolic expression

        Examples:
             >>> <DE>.expr(points=[-1,0],direction='x',order=1,time=n)
        '''
        points = points
        direction = direction
        order = order
        time = time
        stencil = self.stencil_gen(points, order)
        expression = 0
        for coef, pt in zip(stencil['coefs'], stencil['points']):

            kwargs = {}
            for var in self.__independentVars:
                if var == direction:
                    kwargs[var] = self.vars[direction]['index'] + pt
                else:
                    kwargs[var] = self.vars[var]['index']
            expression += coef * self.function(time=time, **kwargs) / (self.vars[direction]['variation'] ** order)
        return ratsimp(expression)

        Generates an expression based on the stencil points, the direction,  order of the derivative, and the time at which the expression is evaluated.

        Parameters:
            points (list of int): N points used for the stencil gen function
            direction (string): the name of the independent variable that indicate the direction of the derivative
            order (int): order of the derivative
            time (symbolic expression): time at which to evaluate the expression. ex: n+1 or n

        Returns:
            symbolic expression

        Examples:
             >>> <DE>.expr(points=[-1,0],direction='x',order=1,time=n)
        
Generates an expression based on the stencil points, the direction,  order of the derivative, and the time at which the expression is evaluated.
Generates an expression based on the stencil points the direction order of the derivative and the time at which the expression is evaluated .
def expr(self, points, direction, order, time):
        points = points
        direction = direction
        order = order
        time = time
        stencil = self.stencil_gen(points, order)
        expression = 0
        for coef, pt in zip(stencil['coefs'], stencil['points']):
            kwargs = {}
            for var in self.__independentVars:
                if var == direction:
                    kwargs[var] = self.vars[direction]['index'] + pt
                else:
                    kwargs[var] = self.vars[var]['index']
            expression += coef * self.function(time=time, **kwargs) / (self.vars[direction]['variation'] ** order)
        return ratsimp(expression)
def expr ( self , points , direction , order , time ) : points = points direction = direction order = order time = time stencil = self . stencil_gen ( points , order ) expression = 0 for coef , pt in zip ( stencil [ 'coefs' ] , stencil [ 'points' ] ) : kwargs = { } for var in self . __independentVars : if var == direction : kwargs [ var ] = self . vars [ direction ] [ 'index' ] + pt else : kwargs [ var ] = self . vars [ var ] [ 'index' ] expression += coef * self . function ( time = time , ** kwargs ) / ( self . vars [ direction ] [ 'variation' ] ** order ) return ratsimp ( expression )
Generates an expression based on the stencil points, the direction,  order of the derivative, and the time at which the expression is evaluated.
Generates an expression based on the stencil points the direction order of the derivative and the time at which the expression is evaluated .
'''
        Generates an expression based on the stencil points, the direction,  order of the derivative, and the time at which the expression is evaluated.

        Parameters:
            points (list of int): N points used for the stencil gen function
            direction (string): the name of the independent variable that indicate the direction of the derivative
            order (int): order of the derivative
            time (symbolic expression): time at which to evaluate the expression. ex: n+1 or n

        Returns:
            symbolic expression

        Examples:
             >>> <DE>.expr(points=[-1,0],direction='x',order=1,time=n)
        '''
None
self
points
N points used for the stencil gen function
N points used for the stencil gen function
direction
the name of the independent variable that indicate the direction of the derivative
the name of the independent variable that indicate the direction of the derivative
order
order of the derivative
order of the derivative
time
time at which to evaluate the expression. ex: n+1 or n
time at which to evaluate the expression . ex : n + 1 or n
examples
None