<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Apr 26, 2017 at 2:42 AM, Aroli Marcellinus <span dir="ltr"><<a href="mailto:aroli.marcellinus@gmail.com" target="_blank">aroli.marcellinus@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div>Dear all,<br><br></div>I have this kind of mesh file, and I want to use PETSc to include the information of this file.<br><br><br></div>In short, this file contains of:<br><br></div><NUM_OF_NODES> <NUM_OF_ELEMENTS> <1> <2> <3><br></div><NODE1_X_COORD>  <NODE1_Y_COORD> <NODE1_Z_COORD> <FLAG><br><NODE2_X_COORD>  <NODE2_Y_COORD> <NODE2_Z_COORD> <FLAG><br><div><div><div><div><div><div><NODE3_X_COORD>  <NODE3_Y_COORD> <NODE3_Z_COORD> <FLAG><br>...<br>...<br>...<br></div><div><NODEN_X_COORD>  <NODEN_Y_COORD> <NODEN_Z_COORD> <FLAG><br></div><div><ELEMENT_NUMBER_1> <ELEMENT_NUMBER_2> <ELEMENT_NUMBER_3> <ELEMENT_NUMBER_4> <----showing element connectivity from node 1 2 3 and 4.<br><br></div><div>Can I read this kind of data into PETSc? I am new in PETSc and want to use it for this purpose.<br><br><br></div><div>Actually, this file contains a mesh of cardiac heart, and I want to convert this data into a suitable mesh data structure, and I thought that PETSc have a kind of mesh data structure. However, after surfing into a lot of tutorial, I cannot find any references that suits my purpose.</div></div></div></div></div></div></div></blockquote><div><br></div><div>You could write a PETSc program to read in the data, and call</div><div><br></div><div>  <a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMPlexCreateFromCellList.html">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/DM/DMPlexCreateFromCellList.html</a></div><div><br></div><div>However, I would probably write a small Python program to convert this to Gmsh format or MED format,</div><div>which PETSc can read natively, and so can many other programs.</div><div><br></div><div>  Thanks,</div><div><br></div><div>     Matt</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><br><br></div><div>​<div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;color:rgb(34,34,34);font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border-width:1px;border-style:solid;border-color:rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/0B7k-y9MbsuJUNU9PNWVmYU51alk/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0px;border-width:medium;border-style:none;border-color:currentcolor" target="_blank"><img style="vertical-align: bottom; border-width: medium; border-style: none; border-color: currentcolor;" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:rgb(17,85,204);text-decoration:none;vertical-align:bottom">heart_het.dat</span></a><img src="" style="display: none; opacity: 0.55; float: right;"></div>​<span class="gmail-HOEnZb"><font color="#888888"><br clear="all"><div><div class="gmail-m_-6194128750074998844gmail_signature"><div dir="ltr"><div><div dir="ltr"><font size="4">Aroli Marcellinus</font><br><b>Kumoh Institute of Technology<br></b><b>Computational Medicine Laboratory</b><br>61 Daehak-ro (Sinpyeong-dong), Gumi, Gyeongbuk<br><a href="tel:+82%2010-9724-3957" value="+821097243957" target="_blank">+82 10 9724 3957</a><br>KTalk ID: vondarkness</div></div></div></div></div>
</font></span></div></div></div></div></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.<br>-- Norbert Wiener</div>
</div></div>