<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Iulian,<div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">And the overall workflow looks like this:</div><div class=""><ol class=""><li class="">Use python to call Gmsh to generate finite element mesh;</li><li class="">Prepare input files for FEAP (Finite Element Analysis Program);</li><li class="">While load steps not yet finished, Do:</li><ol class=""><li class="">Use python to call FEAP to run the calculation, and generate .vtu file based on the calculation results;</li><li class="">Generate a new mesh, with Gmsh, based on the deformed configuration;</li><li class="">Use the MOAB .vtu reader to read .vtu file and pass the information to mbcoupler;</li><li class="">Transfer data from old to new mesh by mbcoupler, and write the data on the new mesh into a .vtu file.</li><li class="">Prepare input files for FEAP based on the new .vtu file;</li></ol></ol><div class="">Run simulation using a mesh generated with GMSH and write vtu files to export the solution of the simulation.</div><div class="">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 class="">mbcoupler would be used to perform the transfer of the data from the last vtu to the new mesh.</div><div class=""><br class=""></div><div class="">Any suggestion about this work is greatly appreciated!</div></div><div class=""><br class=""></div><div class="">Best,</div><div class="">Jie</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">
<br class=""><div><blockquote type="cite" class=""><div class="">On Jun 1, 2016, at 7:44 PM, Grindeanu, Iulian R. <<a href="mailto:iulian@mcs.anl.gov" class="">iulian@mcs.anl.gov</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; direction: ltr; font-family: Tahoma; font-size: 10pt;" class="">Hi<br class="">vtk can be unstructured too;<br class="">the issue is that the vtk file converted from your vtu file using VisIt cannot be read directly by MOAB.<span class="Apple-converted-space"> </span><br class="">It would make more sense to make a vtu reader in MOAB, or make a h5m writer in VisIt.<br class="">Actually, I am working on that (h5m writer) , but it is in a branch now, it is not part of visit yet.<br class=""><br class="">I am not sure what is the best solution to your problem now.<span class="Apple-converted-space"> </span><br class="">How do you plan to use the coupler?<span class="Apple-converted-space"> </span><br class=""><br class="">Iulian<br class=""><br class=""><div style="font-family: 'Times New Roman'; font-size: 16px;" class=""><hr tabindex="-1" class=""><div id="divRpF931620" style="direction: ltr;" class=""><font face="Tahoma" size="2" class=""><b class="">From:</b><span class="Apple-converted-space"> </span>Jie Wu [<a href="mailto:jie.voo@gmail.com" class="">jie.voo@gmail.com</a>]<br class=""><b class="">Sent:</b><span class="Apple-converted-space"> </span>Wednesday, June 01, 2016 5:07 PM<br class=""><b class="">To:</b><span class="Apple-converted-space"> </span>Grindeanu, Iulian R.<br class=""><b class="">Cc:</b><span class="Apple-converted-space"> </span><a href="mailto:moab-dev@mcs.anl.gov" class="">moab-dev@mcs.anl.gov</a><br class=""><b class="">Subject:</b><span class="Apple-converted-space"> </span>Re: [MOAB-dev] How can I prepare a .h5m file base on my own calculation<br class=""></font><br class=""></div><div class=""></div><div class=""><div class="" style="word-wrap: break-word;">Hi Iulian,<div class=""><br class=""></div><div class="">I will try to convert from .vtu to .vtk by the tools you mentioned.</div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">Here is a small vtu file I used to store mesh and solution information. </div><div class=""><br class=""></div><div class="">On the nodes, we have displacements and a scaler damage parameter. We also have some other solution variables on the Integration nodes.</div><div class=""><br class=""></div><div class="">Thank you so much for your help.</div><div class=""><br class=""></div><div class="">Best,</div><div class="">Jie</div><div class=""><br class=""></div><div class=""></div></div><div class="" style="word-wrap: break-word;"><div class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jun 1, 2016, at 5:31 PM, Grindeanu, Iulian R. <<a href="mailto:iulian@mcs.anl.gov" class="" target="_blank">iulian@mcs.anl.gov</a>> wrote:</div><br class="x_Apple-interchange-newline"><div class=""><div class="" style="font-style: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; direction: ltr; font-family: Tahoma; font-size: 10pt;">Hi,<br class="">You can try paraview to convert from vtu format to vtk;<br class="">Moab vtk reader is not very robust, in the sense that there are vtk files it cannot read.<br class="">You can also try VisIt to convert from vtu to vtk<br class=""><br class="">Do you have a small vtu file that you can share? I can try to look at it, to see how it goes.<br class="">What kind of data do you have at nodes?<br class=""><br class="">Iulian<br class=""><br class=""><div class="" style="font-family: 'Times New Roman'; font-size: 16px;"><hr tabindex="-1" class=""><div id="x_divRpF128615" class="" style="direction: ltr;"><font class="" face="Tahoma" size="2"><b class="">From:</b><span class="x_Apple-converted-space"> </span>Jie Wu [<a href="mailto:jie.voo@gmail.com" class="" target="_blank">jie.voo@gmail.com</a>]<br class=""><b class="">Sent:</b><span class="x_Apple-converted-space"> </span>Wednesday, June 01, 2016 2:42 PM<br class=""><b class="">To:</b><span class="x_Apple-converted-space"> </span>Grindeanu, Iulian R.<br class=""><b class="">Cc:</b><span class="x_Apple-converted-space"> </span><a href="mailto:moab-dev@mcs.anl.gov" class="" target="_blank">moab-dev@mcs.anl.gov</a><br class=""><b class="">Subject:</b><span class="x_Apple-converted-space"> </span>Re: [MOAB-dev] How can I prepare a .h5m file base on my own calculation<br class=""></font><br class=""></div><div class=""></div><div class="">Hi Iulian,<div class=""><br class=""></div><div class="">Thank you very much for your help. The format we use to store mesh and solution information is .vtu file. </div><div class=""><br class=""></div><div class="">I tried to run function ./mbconvert. It can successfully transfer from .h5m to .vtk, and vice versa. </div><div class=""><br class=""></div><div class="">But I cannot convert either these 2 format to/from .vtu file. </div><div class=""><br class=""></div><div class="">An example error message is like following. </div><div class=""><br class=""></div><div class="">Is there any solution for this problem? Any suggestion is greatly appreciated!</div><div class=""><br class=""></div><div class="">Best,</div><div class="">Jie</div><div class=""><br class=""></div><div class=""><div class="" 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 class="">dyn-160-39-11-225:tools jiewu$ ./mbconvert in.vtu out.h5m</span></div><div class="" 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 class="">[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div class="" 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 class="">[0]MOAB ERROR: in.vtu: File is not HDF5!</span></div><div class="" 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 class="">[0]MOAB ERROR: set_up_read() line 472 in src/io/ReadHDF5.cpp</span></div><div class="" 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 class="">[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div class="" 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 class="">[0]MOAB ERROR: NULL file handle.!</span></div><div class="" 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 class="">[0]MOAB ERROR: is_error() line 133 in src/io/ReadHDF5.hpp</span></div><div class="" 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 class="">[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div class="" 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 class="">[0]MOAB ERROR: ReadNCDF:: problem opening Netcdf/Exodus II file in.vtu!</span></div><div class="" 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 class="">[0]MOAB ERROR: load_file() line 303 in src/io/ReadNCDF.cpp</span></div><div class="" 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 class="">[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div class="" 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 class="">[0]MOAB ERROR: Trouble opening file in.vtu!</span></div><div class="" 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 class="">[0]MOAB ERROR: load_file() line 68 in src/io/ReadNC.cpp</span></div><div class="" 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 class="">[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div class="" 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 class="">[0]MOAB ERROR: Expected Keyword!</span></div><div class="" 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 class="">[0]MOAB ERROR: load_file() line 178 in src/io/ReadABAQUS.cpp</span></div><div class="" 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 class="">0x0 hahhahahah</span></div><div class="" 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 class="">[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div class="" 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 class="">[0]MOAB ERROR: This doesn't appear to be a .cub file!</span></div><div class="" 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 class="">[0]MOAB ERROR: load_file() line 310 in src/io/Tqdcfr.cpp</span></div><div class="" 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 class="">[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div class="" 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 class="">[0]MOAB ERROR: Parsing error at line 1: expected one of { $NOD $MeshFormat } got "<?xml"!</span></div><div class="" 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 class="">[0]MOAB ERROR: match_token() line 378 in src/io/FileTokenizer.cpp</span></div><div class="" 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 class="">[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div class="" 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 class="">[0]MOAB ERROR: in.vtu: No such file or directory!</span></div><div class="" 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 class="">[0]MOAB ERROR: ascii_read_triangles() line 201 in src/io/ReadSTL.cpp</span></div><div class="" 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 class="">[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div class="" 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 class="">[0]MOAB ERROR: in.vtu: not a binary STL file!</span></div><div class="" 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 class="">[0]MOAB ERROR: binary_read_triangles() line 312 in src/io/ReadSTL.cpp</span></div><div class="" 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 class="">[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div class="" 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 class="">[0]MOAB ERROR: in.vtu.node: cannot read file!</span></div><div class="" 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 class="">[0]MOAB ERROR: open_file() line 59 in src/io/ReadTetGen.cpp</span></div><div class="" 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 class="">[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div class="" 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 class="">[0]MOAB ERROR: in.vtu: Trouble reading vertices!</span></div><div class="" 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 class="">[0]MOAB ERROR: read_vertices() line 129 in src/io/ReadTemplate.cpp</span></div><div class="" 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 class="">[0]MOAB ERROR: --------------------- Error Message ------------------------------------</span></div><div class="" 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 class="">[0]MOAB ERROR: Failed to load file after trying all possible readers!</span></div><div class="" 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 class="">[0]MOAB ERROR: serial_load_file() line 635 in src/Core.cpp</span></div><div class="" 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 class="">[0]MOAB ERROR: load_file() line 526 in src/Core.cpp</span></div><div class="" 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 class="">Failed to load "in.vtu".</span></div><div class="" 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 class="">Error code: MB_INDEX_OUT_OF_RANGE (1)</span></div><div class="" 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 class="">Error message: Failed to load file after trying all possible readers</span></div></div><div class=""><span class=""><br class=""></span></div><div class=""><br class=""></div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jun 1, 2016, at 12:26 PM, Grindeanu, Iulian R. <<a href="mailto:iulian@mcs.anl.gov" class="" target="_blank">iulian@mcs.anl.gov</a>> wrote:</div><br class="x_Apple-interchange-newline"><div class=""><div class="" style="font-style: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; direction: ltr; font-family: Tahoma; font-size: 10pt;">Hello,<br class="">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 class="x_Apple-converted-space"> </span><br class="">Do you care about parallelism or not? Then h5m format is required, otherwise it will be hard to employ parallelism<br class=""><br class="">there are several converters available, to h5m format, you can do tools/mbconvert -l to see what is available based on your configuration<br class=""><br class="">What format do you use?<br class=""><br class="">Iulian<br class=""><div class="" style="font-family: 'Times New Roman'; font-size: 16px;"><hr tabindex="-1" class=""><div id="x_divRpF772430" class="" style="direction: ltr;"><font class="" face="Tahoma" size="2"><b class="">From:</b><span class="x_Apple-converted-space"> </span><a href="mailto:moab-dev-bounces@mcs.anl.gov" class="" target="_blank">moab-dev-bounces@mcs.anl.gov</a><span class="x_Apple-converted-space"> </span>[<a href="mailto:moab-dev-bounces@mcs.anl.gov" class="" target="_blank">moab-dev-bounces@mcs.anl.gov</a>] on behalf of Jie Wu [<a href="mailto:jie.voo@gmail.com" class="" target="_blank">jie.voo@gmail.com</a>]<br class=""><b class="">Sent:</b><span class="x_Apple-converted-space"> </span>Wednesday, June 01, 2016 9:17 AM<br class=""><b class="">To:</b><span class="x_Apple-converted-space"> </span><a href="mailto:moab-dev@mcs.anl.gov" class="" target="_blank">moab-dev@mcs.anl.gov</a><br class=""><b class="">Subject:</b><span class="x_Apple-converted-space"> </span>[MOAB-dev] How can I prepare a .h5m file base on my own calculation<br class=""></font><br class=""></div><div class=""></div><div class="">Hi All,<div class=""><br class=""></div><div class="">In order to transfer variables from a Source mesh to a Target mesh, I am studying the use of function<span class="x_Apple-converted-space"> </span><i class="">mbcoupler_test.cpp</i><span class="x_Apple-converted-space"> </span>these days. </div><div class=""><br class=""></div><div class="">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 class=""><br class=""></div><div class="">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 class="x_Apple-converted-space"> </span><i class="">./mbcoupler_test</i><span class="x_Apple-converted-space"> </span>to help me to transfer the mesh variables.</div><div class=""><br class=""></div><div class="">Any instruction is deeply appreciated!</div><div class=""><br class=""></div><div class="">Best,</div><div class="">Jie</div><div class=""><br class=""></div><br class=""><div class=""><div class=""><div class="">Jie Wu, Ph.D. candidate</div><div class="">Department of Geotechnical Engineering, Tongji University</div><div class="">Visiting student at Civil Engineering & Engineering Mechanics, Columbia University <br class="">Add: 500 West 120th Street 641 S.W. Mudd New York, NY 10027<br class="">Ph: +1(917)822-0942</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 class=""></div></body></html>