Chi-Tech
test_framework_chi_math_Quadrature_quadrature_test1_lua.h
Go to the documentation of this file.
1
/** \page test_framework_chi_math_Quadrature_quadrature_test1_lua test/framework/chi_math/Quadrature/quadrature_test1.lua
2
\ingroup LuaInputExamples
3
4
\code
5
function PrintTable(t, indent)
6
if not indent then indent = 0 end
7
strform = "%"..tostring(indent).."s"
8
9
for k,v in pairs(t) do
10
if (type(v) == "table") then
11
print(string.rep(" ", indent)..k.." ".."table")
12
PrintTable(v, indent+2)
13
else
14
print(string.rep(" ", indent)..k.." "..tostring(v))
15
end
16
end
17
end
18
19
print("GOLD_BEGIN")
20
q = chi_math.QuadratureGaussLegendre.Create({N = 4, verbose = true})
21
22
qdata = chi_math.Get1DQuadratureData(q)
23
24
print("qpoints:")
25
PrintTable(qdata.qpoints, 2)
26
print("weights:")
27
PrintTable(qdata.weights, 2)
28
print()
29
30
--################################################
31
q = chi_math.QuadratureGaussChebyshev.Create({N = 4, verbose = true})
32
33
qdata = chi_math.Get1DQuadratureData(q)
34
35
print("qpoints:")
36
PrintTable(qdata.qpoints, 2)
37
print("weights:")
38
PrintTable(qdata.weights, 2)
39
40
print("chiLegendre(0, 0.25)", chiLegendre(0, 0.25))
41
print("chiLegendre(1, 0.25)", chiLegendre(1, 0.25))
42
print("chiLegendreDerivative(0, 0.25)", chiLegendreDerivative(0, 0.25))
43
print("chiLegendreDerivative(1, 0.25)", chiLegendreDerivative(1, 0.25))
44
45
print("chiYlm(0, 0, 45*math.pi/180.0, 45*math.pi/180.0)", chiYlm(0, 0, 45*math.pi/180.0, 45*math.pi/180.0))
46
print("chiYlm(1, 0, 45*math.pi/180.0, 45*math.pi/180.0)", chiYlm(1, 0, 45*math.pi/180.0, 45*math.pi/180.0))
47
48
print("GOLD_END")\endcode
49
*/
50
51
doc
generated_files
test
framework
chi_math
Quadrature
test_framework_chi_math_Quadrature_quadrature_test1_lua.h
Generated by
1.9.3