Peano
ModeCalc Namespace Reference

Functions

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

Variables

 pi = np.pi
 
string scheme = "t-design"
 main code scheme="Gauss_Legendre" More...
 
string 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
 find weight More...
 
 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 More...
 
 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 More...
 
 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()

def 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()

def ModeCalc.file_len (   fname)

Definition at line 68 of file ModeCalc.py.

◆ gauss_legendre()

def 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()

def 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()

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

Definition at line 16 of file ModeCalc.py.

References arctan2_2pi(), and performance_testbed.float.

Here is the call graph for this function:

◆ trapezoidal()

def 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

string 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

string 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

find weight

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)

◆ 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.

Referenced by getLastLine().

◆ x

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

Definition at line 172 of file ModeCalc.py.

Referenced by examples::exahype2::mgccz4::ADERDGMGCCZ4.adjustSolution(), airfoilSymmetric(), examples::exahype2::mgccz4::ADERDGMGCCZ4.algebraicSource(), examples::regulargridupscaling::MyObserver.beginTraversal(), examples::exahype2::mgccz4::ADERDGMGCCZ4.boundaryConditions(), riemannSolver.boxcar(), ContextDynamicRupture< Shortcuts, basisSize, numberOfVariables, numberOfParameters, T >.boxcar(), TP::TwoPunctures.BY_Aijofxyz(), TP::TwoPunctures.BY_KKofxyz(), TP::TwoPunctures.C_To_c(), TP::Utilities.chebev(), ConsReadIn(), CoorReadIn(), applications::exahype2::ccz4.diagonal_gaugeWave(), ellipsoidTransform(), ellipsoidTransformInverse(), examples::regulargridupscaling::MyObserver.endTraversal(), TP::TwoPunctures.F_of_v(), FindInterIndex(), examples::exahype2::mgccz4.forcedflat(), projection::albers_equal_area::ellipsoid.forward(), projection::albers_equal_area::sphere.forward(), TP::Utilities.fourev(), TP::Utilities.fourft(), applications::exahype2::ccz4.gaugeWave(), examples::exahype2::mgccz4.gaugeWave(), ContextDynamicRupture< Shortcuts, basisSize, numberOfVariables, numberOfParameters, T >.initialStressTensor(), TP::TwoPunctures.Interpolate(), projection::albers_equal_area::ellipsoid.inverse(), projection::albers_equal_area::sphere.inverse(), invokeFVSolverBoundaryConditions(), TP::TwoPunctures.J_times_dv(), TP::TwoPunctures.JFD_times_dv(), TP::TwoPunctures.LinEquations(), TP::TwoPunctures.LineRelax_al(), TP::TwoPunctures.LineRelax_be(), main(), TP.min(), examples::exahype2::mgccz4::ADERDGMGCCZ4.nonconservativeProduct(), TP::TwoPunctures.NonLinEquations(), math::differentiation::numeric_3D::central_difference.partialT(), math::differentiation::numeric_3D::central_difference.partialX(), math::differentiation::numeric_3D::central_difference.partialY(), riemannSolver.prestress(), ContextDynamicRupture< Shortcuts, basisSize, numberOfVariables, numberOfParameters, T >.preStress(), TP::TwoPunctures.PunctIntPolAtArbitPosition(), TP::TwoPunctures.PunctIntPolAtArbitPositionFast(), TP::TwoPunctures.PunctTaylorExpandAtArbitPosition(), applications::exahype2::ccz4.recomputeAuxiliaryVariablesFD4_4thOrder(), TP.recurrence(), ContextDynamicRupture< Shortcuts, basisSize, numberOfVariables, numberOfParameters, T >.riemannSolver(), riemannSolver.SlipWeakeningFriction(), ContextDynamicRupture< Shortcuts, basisSize, numberOfVariables, numberOfParameters, T >.slipWeakeningFriction(), examples::exahype2::mgccz4::FiniteVolumeMGCCZ4.sourceTerm(), sphereTransform(), sphereTransformInverse(), riemannSolver.TauStrength(), and ContextDynamicRupture< Shortcuts, basisSize, numberOfVariables, numberOfParameters, T >.tauStrength().

◆ zip_iterator

ModeCalc.zip_iterator = zip(zs,ws)

Definition at line 148 of file ModeCalc.py.

◆ zs