Beispiel #1
0
 def endpoints(f):
     f0 = sp.mirror0(sp.matC(f), -1)
     aa = f - sp.unmirror0(
         sp.I_space(0, h / 2)(sp.I_space_inv(-h / 2, h / 2)(f0)))
     bb = f - sp.unmirror0(
         sp.I_space(-h / 2, 0)(sp.I_space_inv(-h / 2, h / 2)(f0)))
     return sp.matB(aa) + sp.matB1(bb)
Beispiel #2
0
 def midpoints(f):
     f = sp.mirror0(sp.matC(f), -1)
     # Shift function with S, Sinv to avoid division by zero at x=0, x=pi
     f = sp.I_space_inv(-h/2, h/2)(f)
     f = sp.T_space(+h/2)(f)
     f = f/sp.Omega_d(f.shape[0])
     f = sp.T_space(-h/2)(f)
     f = sp.unmirror0(f)
     return f
Beispiel #3
0
 def midpoints(f):
     f = sp.mirror0(sp.matC(f), -1)
     # Shift function with S, Sinv to avoid division by zero at x=0, x=pi
     f = sp.I_space_inv(-h / 2, h / 2)(f)
     f = sp.T_space(+h / 2)(f)
     f = f / sp.Omega_d(f.shape[0])
     f = sp.T_space(-h / 2)(f)
     f = sp.unmirror0(f)
     return f
Beispiel #4
0
 def endpoints(f):
     f0 = sp.mirror0(sp.matC(f), -1)
     aa = f - sp.unmirror0(sp.I_space(0, h/2)(sp.I_space_inv(-h/2, h/2)(f0)))
     bb = f - sp.unmirror0(sp.I_space(-h/2, 0)(sp.I_space_inv(-h/2, h/2)(f0)))
     return sp.matB(aa) + sp.matB1(bb)