<p dir="ltr">Hi Jie, </p>
<p dir="ltr">Thanks for detailing your workflow so that we understand your requirements better. I've considered adding support for vtu before but wasn't sure if we could do it without adding dependency on vtk. Our configuration already includes vtk support however, for our Paraview visualization plugin. So this may simplify things a bit. If you have the time to write the text/binary VTU I/O implementations (as an add-on to VTK I/O), we would be more than happy to take a PR submission for it. We can also help you along the way to get the implementation refined and tested. </p>
<p dir="ltr">Regarding your workflow, we are attempting something similar with a spectral element code right now with conforming quad/hex local refinements, in combination with mesh optimization. This would be the task where you are using Gmsh in your step 2.</p>
<p dir="ltr">I would be interested to know how your workflow is progressing and what difficulties, if any, you encounter in the mesh regeneration stages, especially with propagating deformations back to the geometry model. Perhaps with simpler domains, this may not prove to be a bottleneck.</p>
<p dir="ltr">Anyway, do let us know if you have more questions. </p>
<p dir="ltr">Best,<br>
Vijay</p>
<div class="gmail_quote">On Jun 2, 2016 5:24 PM, "Jie Wu" <<a href="mailto:jie.voo@gmail.com">jie.voo@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi Iulian,<div><br></div><div>Thank you very much for your instruction. After talking about this with my colleagues, we think about writing a .vtu reader for MOAB.</div><div><br></div><div>And the overall workflow looks like this:</div><div><ol><li>Use python to call Gmsh to generate finite element mesh;</li><li>Prepare input files for FEAP (Finite Element Analysis Program);</li><li>While load steps not yet finished, Do:</li><ol><li>Use python to call FEAP to run the calculation, and generate .vtu file based on the calculation results;</li><li>Generate a new mesh, with Gmsh, based on the deformed configuration;</li><li>Use the MOAB .vtu reader to read .vtu file and pass the information to mbcoupler;</li><li>Transfer data from old to new mesh by mbcoupler, and write the data on the new mesh into a .vtu file.</li><li>Prepare input files for FEAP based on the new .vtu file;</li></ol></ol><div>Run simulation using a mesh generated with GMSH and write vtu files to export the solution of the simulation.</div><div>When the mesh is too distorted, stop the simulation, generate a new mesh with GMSH and transfer the data from the last vtu file to the new mesh.</div><div>mbcoupler would be used to perform the transfer of the data from the last vtu to the new mesh.</div><div><br></div><div>Any suggestion about this work is greatly appreciated!</div></div><div><br></div><div>Best,</div><div>Jie</div><div><br></div><div><br></div><div>
<br><div><blockquote type="cite"><div>On Jun 1, 2016, at 7:44 PM, Grindeanu, Iulian R. <<a href="mailto:iulian@mcs.anl.gov" target="_blank">iulian@mcs.anl.gov</a>> wrote:</div><br><div><div style="font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;direction:ltr;font-family:Tahoma;font-size:10pt">Hi<br>vtk can be unstructured too;<br>the issue is that the vtk file converted from your vtu file using VisIt cannot be read directly by MOAB.<span> </span><br>It would make more sense to make a vtu reader in MOAB, or make a h5m writer in VisIt.<br>Actually, I am working on that (h5m writer) , but it is in a branch now, it is not part of visit yet.<br><br>I am not sure what is the best solution to your problem now.<span> </span><br>How do you plan to use the coupler?<span> </span><br><br>Iulian<br><br><div style="font-family:'Times New Roman';font-size:16px"><hr><div style="direction:ltr"><font face="Tahoma" size="2"><b>From:</b><span> </span>Jie Wu [<a href="mailto:jie.voo@gmail.com" target="_blank">jie.voo@gmail.com</a>]<br><b>Sent:</b><span> </span>Wednesday, June 01, 2016 5:07 PM<br><b>To:</b><span> </span>Grindeanu, Iulian R.<br><b>Cc:</b><span> </span><a href="mailto:moab-dev@mcs.anl.gov" target="_blank">moab-dev@mcs.anl.gov</a><br><b>Subject:</b><span> </span>Re: [MOAB-dev] How can I prepare a .h5m file base on my own calculation<br></font><br></div><div></div><div><div style="word-wrap:break-word">Hi Iulian,<div><br></div><div>I will try to convert from .vtu to .vtk by the tools you mentioned.</div><div><br></div><div>But as I know, .vtk file is usually used for structured mesh, while .vtu for unstructured mesh. I was just wondering if the conversion from .vtu to .vtk make sense?</div><div><br></div><div>Here is a small vtu file I used to store mesh and solution information. </div><div><br></div><div>On the nodes, we have displacements and a scaler damage parameter. We also have some other solution variables on the Integration nodes.</div><div><br></div><div>Thank you so much for your help.</div><div><br></div><div>Best,</div><div>Jie</div><div><br></div><div></div></div><div style="word-wrap:break-word"><div></div><div><br><div><blockquote type="cite"><div>On Jun 1, 2016, at 5:31 PM, Grindeanu, Iulian R. <<a href="mailto:iulian@mcs.anl.gov" target="_blank">iulian@mcs.anl.gov</a>> wrote:</div><br><div><div style="font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;direction:ltr;font-family:Tahoma;font-size:10pt">Hi,<br>You can try paraview to convert from vtu format to vtk;<br>Moab vtk reader is not very robust, in the sense that there are vtk files it cannot read.<br>You can also try VisIt to convert from vtu to vtk<br><br>Do you have a small vtu file that you can share? I can try to look at it, to see how it goes.<br>What kind of data do you have at nodes?<br><br>Iulian<br><br><div style="font-family:'Times New Roman';font-size:16px"><hr><div style="direction:ltr"><font face="Tahoma" size="2"><b>From:</b><span> </span>Jie Wu [<a href="mailto:jie.voo@gmail.com" target="_blank">jie.voo@gmail.com</a>]<br><b>Sent:</b><span> </span>Wednesday, June 01, 2016 2:42 PM<br><b>To:</b><span> </span>Grindeanu, Iulian R.<br><b>Cc:</b><span> </span><a href="mailto:moab-dev@mcs.anl.gov" target="_blank">moab-dev@mcs.anl.gov</a><br><b>Subject:</b><span> </span>Re: [MOAB-dev] How can I prepare a .h5m file base on my own calculation<br></font><br></div><div></div><div>Hi Iulian,<div><br></div><div>Thank you very much for your help. The format we use to store mesh and solution information is .vtu file. </div><div><br></div><div>I tried to run function ./mbconvert. It can successfully transfer from .h5m to .vtk, and vice versa. </div><div><br></div><div>But I cannot convert either these 2 format to/from .vtu file. </div><div><br></div><div>An example error message is like following. </div><div><br></div><div>Is there any solution for this problem? Any suggestion is greatly appreciated!</div><div><br></div><div>Best,</div><div>Jie</div><div><br></div><div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>dyn-160-39-11-225:tools jiewu$ ./mbconvert in.vtu out.h5m</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: in.vtu: File is not HDF5!</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: set_up_read() line 472 in src/io/ReadHDF5.cpp</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: NULL file handle.!</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: is_error() line 133 in src/io/ReadHDF5.hpp</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: ReadNCDF:: problem opening Netcdf/Exodus II file in.vtu!</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: load_file() line 303 in src/io/ReadNCDF.cpp</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: Trouble opening file in.vtu!</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: load_file() line 68 in src/io/ReadNC.cpp</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: Expected Keyword!</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: load_file() line 178 in src/io/ReadABAQUS.cpp</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>0x0 hahhahahah</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: This doesn't appear to be a .cub file!</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: load_file() line 310 in src/io/Tqdcfr.cpp</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: Parsing error at line 1: expected one of { $NOD $MeshFormat } got "<?xml"!</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: match_token() line 378 in src/io/FileTokenizer.cpp</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: in.vtu: No such file or directory!</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: ascii_read_triangles() line 201 in src/io/ReadSTL.cpp</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: in.vtu: not a binary STL file!</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: binary_read_triangles() line 312 in src/io/ReadSTL.cpp</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: in.vtu.node: cannot read file!</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: open_file() line 59 in src/io/ReadTetGen.cpp</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: in.vtu: Trouble reading vertices!</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: read_vertices() line 129 in src/io/ReadTemplate.cpp</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: Failed to load file after trying all possible readers!</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: serial_load_file() line 635 in src/Core.cpp</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>[0]MOAB ERROR: load_file() line 526 in src/Core.cpp</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>Failed to load "in.vtu".</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>Error code: MB_INDEX_OUT_OF_RANGE (1)</span></div><div style="margin:0px;font-size:14px;line-height:normal;font-family:'Andale Mono';color:rgb(254,253,201);background-color:rgb(0,0,0)"><span>Error message: Failed to load file after trying all possible readers</span></div></div><div><span><br></span></div><div><br></div><div><br><div><blockquote type="cite"><div>On Jun 1, 2016, at 12:26 PM, Grindeanu, Iulian R. <<a href="mailto:iulian@mcs.anl.gov" target="_blank">iulian@mcs.anl.gov</a>> wrote:</div><br><div><div style="font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;direction:ltr;font-family:Tahoma;font-size:10pt">Hello,<br>Coupler.cpp depends on a moab instance, so even if you do not use h5m format, if you want to use the coupler, your model has to reside inside a moab instance.<span> </span><br>Do you care about parallelism or not? Then h5m format is required, otherwise it will be hard to employ parallelism<br><br>there are several converters available, to h5m format, you can do tools/mbconvert -l to see what is available based on your configuration<br><br>What format do you use?<br><br>Iulian<br><div style="font-family:'Times New Roman';font-size:16px"><hr><div style="direction:ltr"><font face="Tahoma" size="2"><b>From:</b><span> </span><a href="mailto:moab-dev-bounces@mcs.anl.gov" target="_blank">moab-dev-bounces@mcs.anl.gov</a><span> </span>[<a href="mailto:moab-dev-bounces@mcs.anl.gov" target="_blank">moab-dev-bounces@mcs.anl.gov</a>] on behalf of Jie Wu [<a href="mailto:jie.voo@gmail.com" target="_blank">jie.voo@gmail.com</a>]<br><b>Sent:</b><span> </span>Wednesday, June 01, 2016 9:17 AM<br><b>To:</b><span> </span><a href="mailto:moab-dev@mcs.anl.gov" target="_blank">moab-dev@mcs.anl.gov</a><br><b>Subject:</b><span> </span>[MOAB-dev] How can I prepare a .h5m file base on my own calculation<br></font><br></div><div></div><div>Hi All,<div><br></div><div>In order to transfer variables from a Source mesh to a Target mesh, I am studying the use of function<span> </span><i>mbcoupler_test.cpp</i><span> </span>these days. </div><div><br></div><div>The stuff confusing me is the .h5m file. From the MOAB user guide, I know that .h5m is theMOAB’s native file format. </div><div><br></div><div>But I don’t know how to prepare a .h5m file based on my own calculation results (which usually contains node coordinates, node connectivities, and nodal variables). As a result, I cannot employ a function like<span> </span><i>./mbcoupler_test</i><span> </span>to help me to transfer the mesh variables.</div><div><br></div><div>Any instruction is deeply appreciated!</div><div><br></div><div>Best,</div><div>Jie</div><div><br></div><br><div><div><div>Jie Wu, Ph.D. candidate</div><div>Department of Geotechnical Engineering, Tongji University</div><div>Visiting student at Civil Engineering & Engineering Mechanics, Columbia University <br>Add: 500 West 120th Street 641 S.W. Mudd New York, NY 10027<br>Ph: <a href="tel:%2B1%28917%29822-0942" value="+19178220942" target="_blank">+1(917)822-0942</a></div></div></div></div></div></div></div></blockquote></div></div></div></div></div></div></blockquote></div></div></div></div></div></div></div></blockquote></div><br></div></div></blockquote></div>