Skip to content
Snippets Groups Projects
Commit 3aef592e authored by Tuomas Karna's avatar Tuomas Karna
Browse files

fixed Stommel lua file

parent b2cbd52a
No related branches found
No related tags found
No related merge requests found
model = GModel() model = GModel()
model:load ('stommel_square.msh') model:load ('stommel_square.msh')
order=3 order=1
dimension = 2 dimension = 2
claw = dgConservationLawShallowWater2d() claw = dgConservationLawShallowWater2d()
claw:addBoundaryCondition('Wall',claw:newBoundaryWall()) claw:addBoundaryCondition('Wall',claw:newBoundaryWall())
...@@ -8,17 +8,11 @@ groups = dgGroupCollection(model, dimension, order) ...@@ -8,17 +8,11 @@ groups = dgGroupCollection(model, dimension, order)
-- groups:split... -- groups:split...
groups:buildGroupsOfInterfaces() groups:buildGroupsOfInterfaces()
solution = dgDofContainer(groups, claw:getNbFields()) solution = dgDofContainer(groups, claw:getNbFields())
a = fullMatrix(3,1);
a:set(0,0, 1.);
a:set(1,0, 2.);
a:set(2,0, 3.);
f = functionConstant(a):getName()
solution:L2Projection(f)
solution:exportMsh('output/init') solution:exportMsh('output/init')
rk=dgRungeKutta()
for i=1,100000 do for i=1,100000 do
norm = dg:RK44(150*(3/(2.*order+1))) norm = rk:iterate33(claw,150*(3/(2.*order+1)/2),solution)
if ( i%100 ==0 ) then if ( i%100 ==0 ) then
print ('iter ', i, norm) print ('iter ', i, norm)
end end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment