<div><br></div><div><br><div class="gmail_quote"><div dir="ltr">On Sun, 26 Aug 2018 at 03:54, Yingjie Wu <<a href="mailto:yjwu16@gmail.com">yjwu16@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear PETSc developer: <div>Hello, </div><div>I am a student of nuclear energy science from Tsinghua University. I want to do some work of neutron numerical simulation based on PETSc. At present, some examples of learning and testing PETSc have the following questions: </div><div>1. How to input data to PETSc conveniently? </div></div></blockquote><div dir="auto"><br></div><div dir="auto">What sort of data? Heavy data or stuff like model parameters / simulation params / meta data?</div><div dir="auto"><br></div><div dir="auto">For single values or relatively short arrays the methods </div><div dir="auto">PetscOptionsGetInt() </div><div dir="auto">and </div><div dir="auto">PetscOptionsGetIntArray()</div><div dir="auto">are useful. There are variants for real's, bool's and char's as well.</div><div dir="auto"><br></div><div dir="auto">See</div><div dir="auto"><br></div><div dir="auto"><div><a href="http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsGetInt.html">http://www.mcs.anl.gov/petsc/petsc-current/docs/manualpages/Sys/PetscOptionsGetInt.html</a></div><br></div><div dir="auto">Options can be parsed from the command line or collected in a text file which is parsed.</div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>In some examples of VEC, PETSc support data input and output in .dat and HDF5 format. I don't know much about HDF5, and the binary data file I can't open with any software. </div></div></blockquote><div dir="auto"><br></div><div dir="auto">You can use matlab</div><div dir="auto">See here</div><div dir="auto"><br></div><div dir="auto"><div><a href="https://www.mcs.anl.gov/petsc/documentation/faq.html#matlab">https://www.mcs.anl.gov/petsc/documentation/faq.html#matlab</a></div><br></div><div dir="auto">I suggest following point b</div><div dir="auto"><br></div><div dir="auto">Thanks,</div><div dir="auto"> Dave</div><div dir="auto"><br></div><div dir="auto"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>I need an easy-to-view input and output format, preferably a file format that can be opened with a text editor for subsequent analysis and data loading. </div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><br></div><div>I'm not very good at using "petsc-users" mailing list. I'm very sorry if I disturb you. </div><div>And I am looking forward to your reply. <br></div><div>Thanks,</div><div>Yingjie</div></div>
</blockquote></div></div>