Commit 792dba47 authored by Jonathan Lambrechts's avatar Jonathan Lambrechts
Browse files

rewrite readMsh and rename to readIdx

parent e2e4b25f
Pipeline #1172 passed with stage
in 27 minutes and 33 seconds
...@@ -50,7 +50,7 @@ groups.splitGroupsByPhysicalTag(); ...@@ -50,7 +50,7 @@ groups.splitGroupsByPhysicalTag();
claw = dgEulerAtmLaw(dimension) claw = dgEulerAtmLaw(dimension)
####Load reference solution from file### ####Load reference solution from file###
reloaded =dgDofContainer(groups,claw.getNbFields()) reloaded =dgDofContainer(groups,claw.getNbFields())
reloaded.readMsh("refSolERK"+str(period)+"/subwindow4/subwindow4.idx") reloaded.importIdx("refSolERK"+str(period)+"/subwindow4/subwindow4.idx")
solution = dgDofContainer(groups, claw.getNbFields()) solution = dgDofContainer(groups, claw.getNbFields())
XYZ = groups.getFunctionCoordinates(); XYZ = groups.getFunctionCoordinates();
......
...@@ -50,7 +50,7 @@ groups.splitGroupsByPhysicalTag(); ...@@ -50,7 +50,7 @@ groups.splitGroupsByPhysicalTag();
claw = dgEulerAtmLaw(dimension) claw = dgEulerAtmLaw(dimension)
####Load reference solution from file### ####Load reference solution from file###
reloaded =dgDofContainer(groups,claw.getNbFields()) reloaded =dgDofContainer(groups,claw.getNbFields())
reloaded.readMsh("refSolERK"+str(period)+"/subwindow4/subwindow4.idx") reloaded.importIdx("refSolERK"+str(period)+"/subwindow4/subwindow4.idx")
solution = dgDofContainer(groups, claw.getNbFields()) solution = dgDofContainer(groups, claw.getNbFields())
XYZ = groups.getFunctionCoordinates(); XYZ = groups.getFunctionCoordinates();
......
...@@ -50,7 +50,7 @@ groups.splitGroupsByPhysicalTag(); ...@@ -50,7 +50,7 @@ groups.splitGroupsByPhysicalTag();
claw = dgEulerAtmLaw(dimension) claw = dgEulerAtmLaw(dimension)
####Load reference solution from file### ####Load reference solution from file###
reloaded =dgDofContainer(groups,claw.getNbFields()) reloaded =dgDofContainer(groups,claw.getNbFields())
reloaded.readMsh("refSolERK"+str(period)+"/subwindow4/subwindow4.idx") reloaded.importIdx("refSolERK"+str(period)+"/subwindow4/subwindow4.idx")
solution = dgDofContainer(groups, claw.getNbFields()) solution = dgDofContainer(groups, claw.getNbFields())
XYZ = groups.getFunctionCoordinates(); XYZ = groups.getFunctionCoordinates();
......
...@@ -47,7 +47,7 @@ groups.splitGroupsByPhysicalTag(); ...@@ -47,7 +47,7 @@ groups.splitGroupsByPhysicalTag();
claw = dgEulerAtmLaw(dimension) claw = dgEulerAtmLaw(dimension)
####Load reference solution from file### ####Load reference solution from file###
reloaded =dgDofContainer(groups,claw.getNbFields()) reloaded =dgDofContainer(groups,claw.getNbFields())
reloaded.readMsh("refSolERK"+str(period)+"/subwindow4/subwindow4.idx") reloaded.importIdx("refSolERK"+str(period)+"/subwindow4/subwindow4.idx")
solution = dgDofContainer(groups, claw.getNbFields()) solution = dgDofContainer(groups, claw.getNbFields())
XYZ = groups.getFunctionCoordinates(); XYZ = groups.getFunctionCoordinates();
......
...@@ -51,7 +51,7 @@ groups.splitGroupsByPhysicalTag(); ...@@ -51,7 +51,7 @@ groups.splitGroupsByPhysicalTag();
claw = dgEulerAtmLaw(dimension) claw = dgEulerAtmLaw(dimension)
####Load reference solution from file### ####Load reference solution from file###
reloaded =dgDofContainer(groups,claw.getNbFields()) reloaded =dgDofContainer(groups,claw.getNbFields())
reloaded.readMsh("refSolERK"+str(period)+"/subwindow4/subwindow4.idx") reloaded.importIdx("refSolERK"+str(period)+"/subwindow4/subwindow4.idx")
solution = dgDofContainer(groups, claw.getNbFields()) solution = dgDofContainer(groups, claw.getNbFields())
XYZ = groups.getFunctionCoordinates(); XYZ = groups.getFunctionCoordinates();
......
...@@ -41,7 +41,7 @@ claw = dgEulerAtmLaw(dimension) ...@@ -41,7 +41,7 @@ claw = dgEulerAtmLaw(dimension)
if compError: if compError:
####Load reference solution from file### ####Load reference solution from file###
reloaded =dgDofContainer(groups,claw.getNbFields()) reloaded =dgDofContainer(groups,claw.getNbFields())
reloaded.readMsh("refSolERK"+str(period)+"_16"+"/subwindow2/subwindow2.idx") reloaded.importIdx("refSolERK"+str(period)+"_16"+"/subwindow2/subwindow2.idx")
solution = dgDofContainer(groups, claw.getNbFields()) solution = dgDofContainer(groups, claw.getNbFields())
XYZ = groups.getFunctionCoordinates(); XYZ = groups.getFunctionCoordinates();
......
...@@ -41,7 +41,7 @@ claw = dgEulerAtmLaw(dimension) ...@@ -41,7 +41,7 @@ claw = dgEulerAtmLaw(dimension)
if compError: if compError:
####Load reference solution from file### ####Load reference solution from file###
reloaded =dgDofContainer(groups,claw.getNbFields()) reloaded =dgDofContainer(groups,claw.getNbFields())
reloaded.readMsh("refSolERK"+str(period)+"_16"+"/subwindow2/subwindow2.idx") reloaded.importIdx("refSolERK"+str(period)+"_16"+"/subwindow2/subwindow2.idx")
solution = dgDofContainer(groups, claw.getNbFields()) solution = dgDofContainer(groups, claw.getNbFields())
XYZ = groups.getFunctionCoordinates(); XYZ = groups.getFunctionCoordinates();
......
...@@ -41,7 +41,7 @@ claw = dgEulerAtmLaw(dimension) ...@@ -41,7 +41,7 @@ claw = dgEulerAtmLaw(dimension)
if compError: if compError:
####Load reference solution from file### ####Load reference solution from file###
reloaded =dgDofContainer(groups,claw.getNbFields()) reloaded =dgDofContainer(groups,claw.getNbFields())
reloaded.readMsh("refSolERK"+str(period)+"_16"+"/subwindow2/subwindow2.idx") reloaded.importIdx("refSolERK"+str(period)+"_16"+"/subwindow2/subwindow2.idx")
solution = dgDofContainer(groups, claw.getNbFields()) solution = dgDofContainer(groups, claw.getNbFields())
XYZ = groups.getFunctionCoordinates(); XYZ = groups.getFunctionCoordinates();
......
...@@ -41,7 +41,7 @@ claw = dgEulerAtmLaw(dimension) ...@@ -41,7 +41,7 @@ claw = dgEulerAtmLaw(dimension)
if compError: if compError:
####Load reference solution from file### ####Load reference solution from file###
reloaded =dgDofContainer(groups,claw.getNbFields()) reloaded =dgDofContainer(groups,claw.getNbFields())
reloaded.readMsh("refSolERK"+str(period)+"_16"+"/subwindow2/subwindow2.idx") reloaded.importIdx("refSolERK"+str(period)+"_16"+"/subwindow2/subwindow2.idx")
solution = dgDofContainer(groups, claw.getNbFields()) solution = dgDofContainer(groups, claw.getNbFields())
XYZ = groups.getFunctionCoordinates(); XYZ = groups.getFunctionCoordinates();
......
...@@ -41,7 +41,7 @@ claw = dgEulerAtmLaw(dimension) ...@@ -41,7 +41,7 @@ claw = dgEulerAtmLaw(dimension)
if compError: if compError:
####Load reference solution from file### ####Load reference solution from file###
reloaded =dgDofContainer(groups,claw.getNbFields()) reloaded =dgDofContainer(groups,claw.getNbFields())
reloaded.readMsh("refSolERK"+str(period)+"_16"+"/subwindow2/subwindow2.idx") reloaded.importIdx("refSolERK"+str(period)+"_16"+"/subwindow2/subwindow2.idx")
solution = dgDofContainer(groups, claw.getNbFields()) solution = dgDofContainer(groups, claw.getNbFields())
XYZ = groups.getFunctionCoordinates(); XYZ = groups.getFunctionCoordinates();
......
...@@ -43,7 +43,7 @@ claw = dgEulerAtmLaw(dimension) ...@@ -43,7 +43,7 @@ claw = dgEulerAtmLaw(dimension)
if compError: if compError:
####Load reference solution from file### ####Load reference solution from file###
reloaded =dgDofContainer(groups,claw.getNbFields()) reloaded =dgDofContainer(groups,claw.getNbFields())
reloaded.readMsh("refSolERK"+str(period)+"_16"+"/subwindow2/subwindow2.idx") reloaded.importIdx("refSolERK"+str(period)+"_16"+"/subwindow2/subwindow2.idx")
solution = dgDofContainer(groups, claw.getNbFields()) solution = dgDofContainer(groups, claw.getNbFields())
XYZ = groups.getFunctionCoordinates(); XYZ = groups.getFunctionCoordinates();
......
...@@ -43,7 +43,7 @@ claw = dgEulerAtmLaw(dimension) ...@@ -43,7 +43,7 @@ claw = dgEulerAtmLaw(dimension)
if compError: if compError:
####Load reference solution from file### ####Load reference solution from file###
reloaded =dgDofContainer(groups,claw.getNbFields()) reloaded =dgDofContainer(groups,claw.getNbFields())
reloaded.readMsh("refSolERK"+str(period)+"_16"+"/subwindow2/subwindow2.idx") reloaded.importIdx("refSolERK"+str(period)+"_16"+"/subwindow2/subwindow2.idx")
solution = dgDofContainer(groups, claw.getNbFields()) solution = dgDofContainer(groups, claw.getNbFields())
XYZ = groups.getFunctionCoordinates(); XYZ = groups.getFunctionCoordinates();
......
...@@ -43,7 +43,7 @@ claw = dgEulerAtmLaw(dimension) ...@@ -43,7 +43,7 @@ claw = dgEulerAtmLaw(dimension)
if compError: if compError:
####Load reference solution from file### ####Load reference solution from file###
reloaded =dgDofContainer(groups,claw.getNbFields()) reloaded =dgDofContainer(groups,claw.getNbFields())
reloaded.readMsh("refSolERK"+str(period)+"_16"+"/subwindow2/subwindow2.idx") reloaded.importIdx("refSolERK"+str(period)+"_16"+"/subwindow2/subwindow2.idx")
solution = dgDofContainer(groups, claw.getNbFields()) solution = dgDofContainer(groups, claw.getNbFields())
XYZ = groups.getFunctionCoordinates(); XYZ = groups.getFunctionCoordinates();
......
...@@ -43,7 +43,7 @@ claw = dgEulerAtmLaw(dimension) ...@@ -43,7 +43,7 @@ claw = dgEulerAtmLaw(dimension)
if compError: if compError:
####Load reference solution from file### ####Load reference solution from file###
reloaded =dgDofContainer(groups,claw.getNbFields()) reloaded =dgDofContainer(groups,claw.getNbFields())
reloaded.readMsh("refSolERK"+str(period)+"_16"+"/subwindow2/subwindow2.idx") reloaded.importIdx("refSolERK"+str(period)+"_16"+"/subwindow2/subwindow2.idx")
solution = dgDofContainer(groups, claw.getNbFields()) solution = dgDofContainer(groups, claw.getNbFields())
XYZ = groups.getFunctionCoordinates(); XYZ = groups.getFunctionCoordinates();
......
...@@ -43,7 +43,7 @@ claw = dgEulerAtmLaw(dimension) ...@@ -43,7 +43,7 @@ claw = dgEulerAtmLaw(dimension)
if compError: if compError:
####Load reference solution from file### ####Load reference solution from file###
reloaded =dgDofContainer(groups,claw.getNbFields()) reloaded =dgDofContainer(groups,claw.getNbFields())
reloaded.readMsh("refSolERK"+str(period)+"_16"+"/subwindow1/subwindow1.idx") reloaded.importIdx("refSolERK"+str(period)+"_16"+"/subwindow1/subwindow1.idx")
solution = dgDofContainer(groups, claw.getNbFields()) solution = dgDofContainer(groups, claw.getNbFields())
XYZ = groups.getFunctionCoordinates(); XYZ = groups.getFunctionCoordinates();
......
...@@ -41,7 +41,7 @@ claw = dgEulerAtmLaw(dimension) ...@@ -41,7 +41,7 @@ claw = dgEulerAtmLaw(dimension)
if compError: if compError:
####Load reference solution from file### ####Load reference solution from file###
reloaded =dgDofContainer(groups,claw.getNbFields()) reloaded =dgDofContainer(groups,claw.getNbFields())
reloaded.readMsh("refSolERK"+str(period)+"_16"+"/subwindow1/subwindow1.idx") reloaded.importIdx("refSolERK"+str(period)+"_16"+"/subwindow1/subwindow1.idx")
solution = dgDofContainer(groups, claw.getNbFields()) solution = dgDofContainer(groups, claw.getNbFields())
XYZ = groups.getFunctionCoordinates(); XYZ = groups.getFunctionCoordinates();
......
...@@ -281,7 +281,7 @@ while (True): ...@@ -281,7 +281,7 @@ while (True):
if (i == nbStart and i > 0): if (i == nbStart and i > 0):
loadFile=exportBaseDir + '/' + loadDirName + '/solution/solution-'+ ("%06d" % nbStart)+'.idx' loadFile=exportBaseDir + '/' + loadDirName + '/solution/solution-'+ ("%06d" % nbStart)+'.idx'
Msg.Info('Reloading solution '+loadFile) Msg.Info('Reloading solution '+loadFile)
solution.readMsh(loadFile) solution.importIdx(loadFile)
if (i%checkPointInterv==0 and i > nbStart and checkPointInterv > 0): if (i%checkPointInterv==0 and i > nbStart and checkPointInterv > 0):
Msg.Info('Writing solution for reload') Msg.Info('Writing solution for reload')
solutionExporter.exportIdx(i, t) solutionExporter.exportIdx(i, t)
......
...@@ -64,7 +64,7 @@ groups.splitFaceGroupsByOrientation(extrusion, ["bottom_domain", "top_domain"]) ...@@ -64,7 +64,7 @@ groups.splitFaceGroupsByOrientation(extrusion, ["bottom_domain", "top_domain"])
claw = dgEulerAtmLaw(dimension) claw = dgEulerAtmLaw(dimension)
####Load reference solution from file### ####Load reference solution from file###
reloaded =dgDofContainer(groups,claw.getNbFields()) reloaded =dgDofContainer(groups,claw.getNbFields())
reloaded.readMsh("refSolERK/refSolERK.idx") reloaded.importIdx("refSolERK/refSolERK.idx")
solution = dgDofContainer(groups, claw.getNbFields()) solution = dgDofContainer(groups, claw.getNbFields())
......
...@@ -64,7 +64,7 @@ groups.splitFaceGroupsByOrientation(extrusion, ["bottom_domain", "top_domain"]) ...@@ -64,7 +64,7 @@ groups.splitFaceGroupsByOrientation(extrusion, ["bottom_domain", "top_domain"])
claw = dgEulerAtmLaw(dimension) claw = dgEulerAtmLaw(dimension)
####Load reference solution from file### ####Load reference solution from file###
reloaded =dgDofContainer(groups,claw.getNbFields()) reloaded =dgDofContainer(groups,claw.getNbFields())
reloaded.readMsh("refSolERK/refSolERK.idx") reloaded.importIdx("refSolERK/refSolERK.idx")
solution = dgDofContainer(groups, claw.getNbFields()) solution = dgDofContainer(groups, claw.getNbFields())
......
...@@ -363,7 +363,7 @@ for order in range(minOrder,maxOrder+1): ...@@ -363,7 +363,7 @@ for order in range(minOrder,maxOrder+1):
if (t%interv/interv < 1e-11 or (interv-t%interv)/interv < 1e-11): if (t%interv/interv < 1e-11 or (interv-t%interv)/interv < 1e-11):
solution.exportFunctionVtk(Exp,expDir+'/export', t, i,"solution",nCompExp,namesExp) solution.exportFunctionVtk(Exp,expDir+'/export', t, i,"solution",nCompExp,namesExp)
if loadRef: if loadRef:
refSol.readMsh("refSol"+str(t)+"/refSol"+str(t)+".idx") refSol.importIdx("refSol"+str(t)+"/refSol"+str(t)+".idx")
Msg.Barrier() Msg.Barrier()
projToRef.projectFromTo(solution,solInRefMesh) projToRef.projectFromTo(solution,solInRefMesh)
integratorError.compute(intErr) integratorError.compute(intErr)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment