Chi-Tech
test_framework_tutorials_pwlc_test2_lua.h
Go to the documentation of this file.
1
/** \page test_framework_tutorials_pwlc_test2_lua test/framework/tutorials/pwlc_test2.lua
2
\ingroup LuaInputExamples
3
4
\code
5
--############################################### Setup mesh
6
if (nmesh==nil) then nmesh = 10 end
7
8
nodes={}
9
N=nmesh
10
L=2.0
11
xmin = -L/2
12
dx = L/N
13
for i=1,(N+1) do
14
k=i-1
15
nodes[i] = xmin + k*dx
16
end
17
18
meshgen1 = chi_mesh.OrthogonalMeshGenerator.Create({ node_sets = {nodes,nodes} })
19
chi_mesh.MeshGenerator.Execute(meshgen1)
20
21
--############################################### Set Material IDs
22
chiVolumeMesherSetMatIDToAll(0)
23
24
function MMS_phi(x,y,z)
25
return math.cos(math.pi*x) + math.cos(math.pi*y)
26
end
27
function MMS_q(x,y,z)
28
return math.pi*math.pi * (math.cos(math.pi*x)+math.cos(math.pi*y))
29
end
30
31
chi_unit_tests.chiSimTest04_PWLC()
32
chiMPIBarrier()
33
if (chi_location_id == 0) then
34
os.execute("rm CodeTut4_PWLC*")
35
end\endcode
36
*/
37
38
doc
generated_files
test
framework
tutorials
test_framework_tutorials_pwlc_test2_lua.h
Generated by
1.9.3