Peano
Loading...
Searching...
No Matches
ModeCalc Namespace Reference

Functions

 arctan2_2pi (yy, xx)
 sph_design (func, t=5, author='Hardin', **kwargs)
 gauss_legendre (func, N=40, x_low=0, x_up=pi, **kwargs)
 Gauss-Legendre 1D integration.
 trapezoidal (func, N=40, x_low=0, x_up=pi, **kwargs)
 Gauss 1D integration.
 prod_quad (func, N=20, M=40, **kwargs)
 Gaussian product quadrature using Trapezoidal for azimuthal direction and Gauss-Legendre for polar angle.
 file_len (fname)

Variables

 pi = np.pi
str scheme = "t-design"
 main code scheme="Gauss_Legendre"
str file_name = "zz.csv"
 f = open(file_name)
 dat = f.readlines()[1:]
int tstep = 0
int told = 1e6
 tem = list(map(float,line.split(', ')))
 tnew = tem[0]
int N_tracer = 0
int ID1 = -100
list coors = []
list coor = [tem[3],tem[4],tem[5]]
 data_set = np.zeros((N_tracer,tstep,7))
int t_count = 0
int N_count = 0
 thetas
 ws
float zs = np.cos(np.pi*thetas/2 + np.pi/2)*0.4
 zip_iterator = zip(zs,ws)
 w_dict = dict(zip_iterator)
int l_mode = 2;
 ready for mode decomposition remember to add sin(theta) for GL scheme
 x = data_set[n][t][3];
 p4re = data_set[n][t][5]
tuple sintheta = z/(x**2+y**2+z**2)**0.5;
float sinphi = x/(x**2+y**2)**0.5
int cos2phi = 2*sinphi*cosphi
 ModeRe = np.zeros(tstep)
 start real surface integral here
 ModeIm = np.zeros(tstep)
tuple w = (1.0/40)*(2*np.pi)*data_set[n][t][6]*(np.pi/2.0)

Function Documentation

◆ arctan2_2pi()

ModeCalc.arctan2_2pi ( yy,
xx )

Definition at line 10 of file ModeCalc.py.

Referenced by sph_design().

Here is the caller graph for this function:

◆ file_len()

ModeCalc.file_len ( fname)

Definition at line 68 of file ModeCalc.py.

◆ gauss_legendre()

ModeCalc.gauss_legendre ( func,
N = 40,
x_low = 0,
x_up = pi,
** kwargs )

Gauss-Legendre 1D integration.

Definition at line 39 of file ModeCalc.py.

Referenced by prod_quad().

Here is the caller graph for this function:

◆ prod_quad()

ModeCalc.prod_quad ( func,
N = 20,
M = 40,
** kwargs )

Gaussian product quadrature using Trapezoidal for azimuthal direction and Gauss-Legendre for polar angle.

Definition at line 59 of file ModeCalc.py.

References gauss_legendre(), and trapezoidal().

Here is the call graph for this function:

◆ sph_design()

ModeCalc.sph_design ( func,
t = 5,
author = 'Hardin',
** kwargs )

Definition at line 16 of file ModeCalc.py.

References arctan2_2pi().

Here is the call graph for this function:

◆ trapezoidal()

ModeCalc.trapezoidal ( func,
N = 40,
x_low = 0,
x_up = pi,
** kwargs )

Gauss 1D integration.

Definition at line 50 of file ModeCalc.py.

Referenced by prod_quad().

Here is the caller graph for this function:

Variable Documentation

◆ coor

list ModeCalc.coor = [tem[3],tem[4],tem[5]]

Definition at line 114 of file ModeCalc.py.

◆ coors

ModeCalc.coors = []

Definition at line 108 of file ModeCalc.py.

◆ cos2phi

int ModeCalc.cos2phi = 2*sinphi*cosphi

Definition at line 178 of file ModeCalc.py.

◆ dat

ModeCalc.dat = f.readlines()[1:]

Definition at line 89 of file ModeCalc.py.

◆ data_set

ModeCalc.data_set = np.zeros((N_tracer,tstep,7))

Definition at line 121 of file ModeCalc.py.

◆ f

ModeCalc.f = open(file_name)

Definition at line 85 of file ModeCalc.py.

◆ file_name

str ModeCalc.file_name = "zz.csv"

Definition at line 81 of file ModeCalc.py.

◆ ID1

int ModeCalc.ID1 = -100

Definition at line 107 of file ModeCalc.py.

◆ l_mode

int ModeCalc.l_mode = 2;

ready for mode decomposition remember to add sin(theta) for GL scheme

Definition at line 169 of file ModeCalc.py.

◆ ModeIm

ModeCalc.ModeIm = np.zeros(tstep)

Definition at line 191 of file ModeCalc.py.

◆ ModeRe

ModeCalc.ModeRe = np.zeros(tstep)

start real surface integral here

Definition at line 190 of file ModeCalc.py.

◆ N_count

int ModeCalc.N_count = 0

Definition at line 125 of file ModeCalc.py.

◆ N_tracer

int ModeCalc.N_tracer = 0

Definition at line 106 of file ModeCalc.py.

◆ p4re

ModeCalc.p4re = data_set[n][t][5]

Definition at line 173 of file ModeCalc.py.

◆ pi

ModeCalc.pi = np.pi

Definition at line 8 of file ModeCalc.py.

◆ scheme

str ModeCalc.scheme = "t-design"

main code scheme="Gauss_Legendre"

Definition at line 77 of file ModeCalc.py.

◆ sinphi

float ModeCalc.sinphi = x/(x**2+y**2)**0.5

Definition at line 177 of file ModeCalc.py.

◆ sintheta

tuple ModeCalc.sintheta = z/(x**2+y**2+z**2)**0.5;

Definition at line 175 of file ModeCalc.py.

◆ t_count

int ModeCalc.t_count = 0

Definition at line 124 of file ModeCalc.py.

◆ tem

ModeCalc.tem = list(map(float,line.split(', ')))

Definition at line 95 of file ModeCalc.py.

◆ thetas

ModeCalc.thetas

Definition at line 146 of file ModeCalc.py.

◆ tnew

ModeCalc.tnew = tem[0]

Definition at line 96 of file ModeCalc.py.

◆ told

ModeCalc.told = 1e6

Definition at line 93 of file ModeCalc.py.

◆ tstep

int ModeCalc.tstep = 0

Definition at line 92 of file ModeCalc.py.

◆ w

tuple ModeCalc.w = (1.0/40)*(2*np.pi)*data_set[n][t][6]*(np.pi/2.0)

Definition at line 195 of file ModeCalc.py.

◆ w_dict

ModeCalc.w_dict = dict(zip_iterator)

Definition at line 149 of file ModeCalc.py.

◆ ws

ModeCalc.ws

Definition at line 146 of file ModeCalc.py.

◆ x

ModeCalc.x = data_set[n][t][3];

Definition at line 172 of file ModeCalc.py.

◆ zip_iterator

ModeCalc.zip_iterator = zip(zs,ws)

Definition at line 148 of file ModeCalc.py.

◆ zs

float ModeCalc.zs = np.cos(np.pi*thetas/2 + np.pi/2)*0.4

Definition at line 147 of file ModeCalc.py.