<div dir="ltr">Hello<div><br></div><div>I am creating my vector using DMDA, so the hdf file knows something about the grid. But it uses (i,j) indices as (x,y) coordinates to plot. Here is what I do</div><div><br></div><div><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">   ierr = DMCreateGlobalVector(da, &ug); CHKERRQ(ierr);</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">   // set values into ug</span></p></div><div><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">   ierr = PetscViewerHDF5Open(PETSC_COMM_WORLD, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(209,47,27)">"sol.h5"</span><span style="font-variant-ligatures:no-common-ligatures">,FILE_MODE_WRITE,&viewer);  CHKERRQ(ierr);</span></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">   ierr = PetscViewerHDF5SetTimestep(viewer, </span><span style="font-variant-ligatures:no-common-ligatures;color:rgb(39,42,216)">0</span><span style="font-variant-ligatures:no-common-ligatures">); CHKERRQ(ierr);</span><br></p>
<p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">   ierr = VecView(ug, viewer); CHKERRQ(ierr);</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">   // update ug and save it again</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo"><span style="font-variant-ligatures:no-common-ligatures">   ierr = PetscViewerHDF5IncrementTimestep(viewer); CHKERRQ(ierr);</span></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,132,0)"><span style="color:rgb(34,34,34)">   ierr = VecView(ug, viewer); CHKERRQ(ierr);</span><br></p><p style="margin:0px;font-size:11px;line-height:normal;font-family:menlo;color:rgb(0,132,0)"><span style="color:rgb(34,34,34)"><br></span></p>I have not saved mesh coordinates, so I can understand that it uses (i,j) coordinates. How can I save x,y coordinates and time information so that VisIt will be able to know the mesh and time information ?<br><br>I can save solution at different times into different .h5 files but is that really necessary ?<br><br>What I understood is that the h5 file only contains some data, and one has to create a xdmf file that tells VisIt how to use the data in the h5 file. The h5 file should contain "geometry" and "topology" sections. I could add the "geometry" section by saving the mesh coordinates. But how to add the "topology" section which contains cell information ? Is there an easy way to add this o the hdf file when I use DMDA ?</div><div><br>Thanks<br>praveen</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 29, 2016 at 11:03 PM, Santiago Ospina De Los Rios <span dir="ltr"><<a href="mailto:sospinar@unal.edu.co" target="_blank">sospinar@unal.edu.co</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">2016-09-29 18:57 GMT+02:00 Praveen C <span dir="ltr"><<a href="mailto:cpraveen@gmail.com" target="_blank">cpraveen@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Dear all<div><br></div><div>Is there an example  to save hdf5 file on cartesian mesh with time dependent solution, that I can visualize in VisIt ?</div><div><br></div></div></blockquote><div class="gmail_quote"><br></div></span>If you save the file with a successive numbering at the final of the name, Visit will recognize it as a time-dependent. <span class=""><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div></div><div>I am able to save in hdf5 and open in VisIt but I cannot get the actual mesh coordinates or time dependent data.</div><br></div></blockquote><div><br></div></span><div>To get the mesh you have to save a vector associated to a DM object, otherwise, you will get a row of values at the visualization.</div><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">I have seen a script petsc_gen_xdmf.py but that needs lot of information in the hdf5 file which I do not know how to create. An example for 2d Cartesian mesh would be very useful to learn this.<br><br></div></blockquote><div><br></div></span><div>Anyway, it's a good question: how to visualize time-dependent hdf5 files in other viewers such as Paraview just using PETSc calls. Is there a way?</div><div><br></div><div>Santiago O.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Thanks<span><font color="#888888"><br>praveen</font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div><br><div><span style="color:rgb(136,136,136)">-- <br><span style="font-family:tahoma">Att:<br style="text-indent:0px"><br style="text-indent:0px">Santiago Ospina De Los Ríos<br style="text-indent:0px">National University of Colombia<br></span></span></div></div></div></div></div></div>
</font></span></div></div>
</blockquote></div><br></div></div>