Hipace
Classes | Functions | Variables
MakeOpenBoundary Namespace Reference

Classes

class  MyCxxPrinter
 

Functions

def printcxxpow (expr)
 
def Taylor_polynomial_sympy (function_expression, variable_list, evaluation_point, degree)
 
def get_order (fn)
 

Variables

int order = 18
 
 v_xfnorm = sp.Symbol('xf')
 
 v_yfnorm = sp.Symbol('yf')
 
 v_xsnorm = sp.Symbol('xs')
 
 v_ysnorm = sp.Symbol('ys')
 
 v_cx = sp.Symbol('x')
 
 v_cy = sp.Symbol('y')
 
 v_sval = sp.Symbol('s_v')
 
 v_radius_2 = sp.Symbol('radius_2')
 
 f_exact = sp.log((v_xfnorm-v_xsnorm)**2 + (v_yfnorm-v_ysnorm)**2)
 
def f_approx = Taylor_polynomial_sympy(f_exact, (v_xsnorm,v_ysnorm), (0,0), order)
 
 f_approx_sum = list(f_approx.args)
 
 key
 
list f_approx_all = [sp.separatevars(fn,(v_xsnorm,v_ysnorm),dict=True) for fn in f_approx_sum]
 
 j = i
 
list c = f_approx_all[j]["coeff"] / f_approx_all[i]["coeff"]
 
int i = 0
 

Function Documentation

◆ get_order()

def MakeOpenBoundary.get_order (   fn)

◆ printcxxpow()

def MakeOpenBoundary.printcxxpow (   expr)

◆ Taylor_polynomial_sympy()

def MakeOpenBoundary.Taylor_polynomial_sympy (   function_expression,
  variable_list,
  evaluation_point,
  degree 
)
Mathematical formulation reference:
https://math.libretexts.org/Bookshelves/Calculus/Supplemental_Modules_(Calculus)/Multivariable_Calculus/3%3A_Topics_in_Partial_Derivatives/Taylor__Polynomials_of_Functions_of_Two_Variables
:param function_expression: Sympy expression of the function
:param variable_list: list. All variables to be approximated (to be "Taylorized")
:param evaluation_point: list. Coordinates, where the function will be expressed
:param degree: int. Total degree of the Taylor polynomial
:return: Returns a Sympy expression of the Taylor series up to a given degree, of a given multivariate expression, approximated as a multivariate polynomial evaluated at the evaluation_point

Variable Documentation

◆ c

MakeOpenBoundary.c = f_approx_all[j]["coeff"] / f_approx_all[i]["coeff"]

◆ f_approx

def MakeOpenBoundary.f_approx = Taylor_polynomial_sympy(f_exact, (v_xsnorm,v_ysnorm), (0,0), order)

◆ f_approx_all

list MakeOpenBoundary.f_approx_all = [sp.separatevars(fn,(v_xsnorm,v_ysnorm),dict=True) for fn in f_approx_sum]

◆ f_approx_sum

MakeOpenBoundary.f_approx_sum = list(f_approx.args)

◆ f_exact

MakeOpenBoundary.f_exact = sp.log((v_xfnorm-v_xsnorm)**2 + (v_yfnorm-v_ysnorm)**2)

◆ i

int MakeOpenBoundary.i = 0

◆ j

MakeOpenBoundary.j = i

◆ key

MakeOpenBoundary.key

◆ order

int MakeOpenBoundary.order = 18

◆ v_cx

MakeOpenBoundary.v_cx = sp.Symbol('x')

◆ v_cy

MakeOpenBoundary.v_cy = sp.Symbol('y')

◆ v_radius_2

MakeOpenBoundary.v_radius_2 = sp.Symbol('radius_2')

◆ v_sval

MakeOpenBoundary.v_sval = sp.Symbol('s_v')

◆ v_xfnorm

MakeOpenBoundary.v_xfnorm = sp.Symbol('xf')

◆ v_xsnorm

MakeOpenBoundary.v_xsnorm = sp.Symbol('xs')

◆ v_yfnorm

MakeOpenBoundary.v_yfnorm = sp.Symbol('yf')

◆ v_ysnorm

MakeOpenBoundary.v_ysnorm = sp.Symbol('ys')